public function finalize()
 {
     parent::finalize();
     EaseShared::webPage()->addJavaScript('$("#' . $this->getTagID() . '").msDropDown();', null, true);
     EaseShared::webPage()->includeJavaScript('js/msdropdown/jquery.dd.min.js');
     EaseShared::webPage()->includeCss('css/msdropdown/dd.css');
 }
    public function finalize()
    {
        parent::finalize();
        reset($this->platforms);
        foreach ($this->pageParts as $optionName => $option) {
            $platform = current($this->platforms);
            if (isset($platform['image'])) {
                $this->pageParts[$optionName]->setTagProperties(array('data-image' => $platform['image']));
            }
            next($this->platforms);
        }
        EaseShared::webPage()->addJavaScript('$("#' . $this->getTagID() . '").msDropDown();', null, true);
        EaseShared::webPage()->addJavaScript('$("#' . $this->getTagID() . '").change(function() {
            var oDropdown = $("#' . $this->getTagID() . '").msDropdown().data("dd");
            var text = oDropdown.get("selectedText");
            console.log(text);

        var saverClass = $("[name=\'class\']").val();
        var keyId = $(".keyId").val();
        var columnName = $(this).attr("name");

var jqxhr = $.post( "datasaver.php?SaverClass=" + saverClass , { Field: columnName, Value: text, Key: keyId }  ,   function() {
    console.log( "success" );
})
.done(function() {
    console.log( "second success" );
})
.fail(function() {
    console.log( "error" );
});
        });', null, true);
        EaseShared::webPage()->includeJavaScript('js/msdropdown/jquery.dd.min.js');
        EaseShared::webPage()->includeCss('css/msdropdown/dd.css');
    }
예제 #3
0
 public function finalize()
 {
     parent::finalize();
     reset($this->services);
     foreach ($this->pageParts as $optionName => $option) {
         $platform = current($this->services);
         if (isset($platform['image'])) {
             $this->pageParts[$optionName]->setTagProperties(array('data-image' => $platform['image']));
         }
         next($this->services);
     }
     EaseShared::webPage()->addJavaScript('$("#' . $this->getTagID() . '").msDropDown();', null, true);
     EaseShared::webPage()->includeJavaScript('js/msdropdown/jquery.dd.min.js');
     EaseShared::webPage()->includeCss('css/msdropdown/dd.css');
 }
예제 #4
0
 */
require_once 'includes/IEInit.php';
if ($oPage->isPosted()) {
    $importer = new IECommand();
    $success = 0;
    $cfgText = $oPage->getRequestValue('cfgtext');
    if ($cfgText) {
        $success += $importer->importText($cfgText, array('command_type' => $oPage->getRequestValue('type')));
    }
    if (isset($_FILES['cfgfile']['tmp_name']) && strlen(trim($_FILES['cfgfile']['tmp_name']))) {
        $success += $importer->importFile($_FILES['cfgfile']['tmp_name'], array('command_type' => $oPage->getRequestValue('type')));
    }
    if ($success) {
        $oPage->addStatusMessage(sprintf(_('Příkaz %s byl naimportován'), $importer->getName()), 'success');
    } else {
        $oPage->addStatusMessage(_('Příkaz nebyl naimportován'), 'warning');
    }
} else {
    $oPage->addStatusMessage(_('Zadejte konfigurační fragment příkazu, nebo zvolte soubor k importu'));
}
$oPage->addItem(new IEPageTop(_('Načtení příkazů ze souboru')));
$fileForm = new EaseTWBForm('CfgFileUp', null, 'POST', null, array('class' => 'form-horizontal', 'enctype' => 'multipart/form-data'));
$fileForm->addInput(new EaseHtmlTextareaTag('cfgtext', ''), _('konfigurační fragment'));
$fileForm->addInput(new EaseHtmlInputFileTag('cfgfile', null), _('konfigurační soubor'));
$typeSelector = new EaseHtmlSelect('type', 'check');
$typeSelector->addItems(array('check' => 'check', 'notify' => 'notify', 'handler' => 'handler'));
$fileForm->addInput($typeSelector, _('druh vkládaných příkazů'));
$fileForm->addItem(new EaseTWSubmitButton(_('importovat'), 'success'));
$oPage->container->addItem(new EaseTWBPanel(_('Import příkazu do konfigurace'), 'success', $fileForm));
$oPage->addItem(new IEPageBottom());
$oPage->draw();