Skip to content

Commit

Permalink
Minor doc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
dasgarner committed Dec 22, 2017
1 parent 68ad53a commit 731355e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/Widget/GoogleTraffic.php
Expand Up @@ -11,6 +11,7 @@

use Respect\Validation\Validator as v;
use Xibo\Exception\ConfigurationException;
use Xibo\Exception\XiboException;
use Xibo\Factory\ModuleFactory;

/**
Expand Down Expand Up @@ -221,6 +222,7 @@ private function setCommonOptions()
$this->setOption('zoom', $this->getSanitizer()->getInt('zoom'));
}

/** @inheritdoc */
public function isValid()
{
// Using the information you have in your module calculate whether it is valid or not.
Expand All @@ -235,12 +237,11 @@ public function isValid()
* Return the rendered resource to be used by the client (or a preview) for displaying this content.
* @param integer $displayId If this comes from a real client, this will be the display id.
* @return mixed
* @throws ConfigurationException
* @throws XiboException
*/
public function getResource($displayId = 0)
{
// Behave exactly like the client.
$data = [];
$isPreview = ($this->getSanitizer()->getCheckbox('preview') == 1);

if ($this->getSetting('apiKey') == '')
Expand Down
4 changes: 3 additions & 1 deletion lib/Widget/Pdf.php
Expand Up @@ -5,9 +5,10 @@
* (Pdf.php)
*/


namespace Xibo\Widget;

use Xibo\Exception\XiboException;

/**
* Class Pdf
* @package Xibo\Widget
Expand Down Expand Up @@ -90,6 +91,7 @@ public function isValid()
* Get Resource
* @param int $displayId
* @return mixed
* @throws XiboException
*/
public function getResource($displayId = 0)
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Widget/Text.php
Expand Up @@ -267,7 +267,7 @@ public function GetResource($displayId = 0)
}
}

// Generate a JSON string of substituted items.
// The xibo-text-render library will take these items and render them appropriately depending on the options provided
$this->appendItems([$text]);

// Replace the head content
Expand Down
5 changes: 5 additions & 0 deletions lib/Widget/WebPage.php
Expand Up @@ -23,6 +23,10 @@
use InvalidArgumentException;
use Respect\Validation\Validator as v;

/**
* Class WebPage
* @package Xibo\Widget
*/
class WebPage extends ModuleWidget
{
/**
Expand Down Expand Up @@ -278,6 +282,7 @@ public function getResource($displayId = 0)
return $this->renderTemplate($data);
}

/** @inheritdoc */
public function IsValid()
{
// Can't be sure because the client does the rendering
Expand Down
10 changes: 10 additions & 0 deletions views/display-page.twig
Expand Up @@ -9,6 +9,12 @@
{% extends "authed.twig" %}
{% import "inline.twig" as inline %}

{% block actionMenu %}
<ul class="nav nav-pills pull-right">
<li class="btn btn-success btn-xs"><a class="btns" id="refreshGrid" title="{% trans "Refresh the Table" %}" href="#"><i class="fa fa-refresh" aria-hidden="true"></i> {% trans "Refresh" %}</a></li>
</ul>
{% endblock %}

{% block pageContent %}
<div class="widget">
<div class="widget-title">{% trans "Displays" %}</div>
Expand Down Expand Up @@ -276,6 +282,10 @@
table.on('draw', { form: $("#displays").closest(".XiboGrid").find(".FilterDiv form") }, dataTableCreateTagEvents);
table.on('processing.dt', dataTableProcessing);
dataTableAddButtons(table, $('#displays_wrapper').find('.col-sm-6').eq(1));
$("#refreshGrid").click(function () {
table.ajax.reload();
});
});
</script>
{% endblock %}

0 comments on commit 731355e

Please sign in to comment.