コード例 #1
0
    public function render(View $view, $titel)
    {
        $result = '

          <div class="modal-dialog" id="this_window">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">' . $titel . '</h4>
              </div>
              <div class="modal-body">
                ' . $view->render() . '
              </div>
            </div><!-- /.modal-content -->
          </div><!-- /.modal-dialog -->

            <!-- TODO -->
            <script>

                $(\'#this_window .checkbox\').click(function (event) {
                    hiddenElement = \'#\' + event.target.id + \'_hidden\';
                    if (event.target.checked)
                        $(hiddenElement).attr(\'value\', 1);
                    else
                        $(hiddenElement).attr(\'value\', 0);
                });

            </script>

        ';
        echo $result;
        Javascript::display();
    }
コード例 #2
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     Javascript::requireLibrary('froala');
     $this->options = new FroalaOptions();
     Logging::info('Requiring...');
     $this->options->requirePlugins();
 }
コード例 #3
0
 public function toHtml()
 {
     $topPanel = new TopPanelControl(null, 'debugTopPanel');
     $topPanel->setCaption('
             <div class="debug-block">
                 <span class="glyphicon glyphicon-flash"></span> &nbsp;&nbsp;' . QueryLog::count() . '
             </div>
             <div class="debug-block">
                 <span class="glyphicon glyphicon-time"></span> &nbsp;&nbsp;' . Profiler::getTotalTime() . ' ms
             </div>
             <div class="debug-block">
                 <span class="glyphicon glyphicon-oil"></span> &nbsp;&nbsp;' . round(memory_get_peak_usage() / 1024 / 1024, 1) . ' MB
             </div>
             ')->setOpened(Logging::isError());
     if ($this->mode === self::MODE_LARGE) {
         $tabControl = new TabControl(null, 'debugTabControl');
         $tabControl->addTab('Log (' . count(Logging::getLogItems()) . ')')->add($this->showLog());
         $tabControl->addTab('SQL-Queries (' . QueryLog::count() . ')')->add($this->showQueryLog());
         $tabControl->addTab('Request')->add($this->showNfsRequest());
         $tabControl->addTab('REQUEST-Array (' . count($_REQUEST) . ')')->add($this->showRequest());
         if (Configuration::get('logging.showServerVar') === 'true') {
             $tabControl->addTab('SERVER-Array (' . count($_SERVER) . ')')->add($this->showServer());
         }
         $tabControl->addTab('FILES-Array (' . count($_FILES) . ')')->add($this->showFiles());
         $tabControl->addTab('Profiler')->add($this->showProfilerInfo());
         $tabControl->addTab('Cache')->add($this->showTabInfo());
         $tabControl->addTab('Debug')->add($this->showDebugTab());
         $topPanel->add($tabControl);
     }
     Javascript::addJs($topPanel->getJavascript());
     return $topPanel->toHtml();
 }
コード例 #4
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     Javascript::requireLibrary('froala');
     return;
     Javascript::requireLibrary('ckeditor');
     Javascript::requireLibrary('ckfinder');
     if (Application::getCurrentRequest()->admin) {
         $this->toolbar = self::TOOLBAR_LARGE;
     }
 }
コード例 #5
0
 public function setOrdner($ordner)
 {
     Javascript::requireLibrary('magnific');
     if ($ordner === null) {
         $this->ordner = 0;
     } else {
         $this->ordnerObj = $ordner;
         $this->ordner = $ordner->id;
     }
     return $this;
 }
コード例 #6
0
 public function init()
 {
     Javascript::requireLibrary('bootstrap');
     $this->defaultSkinFile = __DIR__ . '/TabControl.skin';
     if (isset(Application::getInstance()->getRequest()->initPanel)) {
         $this->initPanel = Application::getInstance()->getRequest()->initPanel;
     }
     $key = 'tab_active_' . $this->id;
     if (isset(Application::getInstance()->getRequest()->{$key}) && Application::getInstance()->getRequest()->{$key} != '') {
         $this->activePanel = Application::getInstance()->getRequest()->{$key};
     } else {
         if ($this->initPanel < 0) {
             $this->initPanel = 0;
         }
     }
 }
コード例 #7
0
 protected function createControls()
 {
     $showNew = true;
     if (isset($this->request->showNew)) {
         $showNew = $this->request->showNew;
     }
     $showUp = true;
     if (isset($this->request->showUp)) {
         $showUp = $this->request->showUp;
     }
     if (!$this->request->ajax) {
         $panel = new CoreControls\ControlContainer($this, 'pnlAjax');
         $panel->setSkin('<div id="pnlAjax">{controls}</div>');
     } else {
         $panel = $this;
     }
     $panel = new CoreControls\ControlContainer($panel, 'panel');
     //$panel->setCaption('Dokumente / Medien');
     //if ($this->controller->kollektion != null) {
     //    $panel->setCaption($this->controller->kollektion->ko_bezeichnung);
     //}
     if ($showNew) {
         $button = new StdControls\ButtonControl($panel, 'btnNeuOrdner');
         $button->setCaption('Neuer Ordner')->addCssClass('btn-small')->addCssClass('nfs-modal');
         if ($this->controller->kollektion != null) {
             $button->setLink('medien', 'newKollektion', array('parent' => $this->controller->kollektion->id));
         } else {
             $button->setLink('medien', 'newKollektion', array('parent' => 0));
         }
     }
     if ($this->controller->kollektion !== null) {
         $uploader = new UploaderControl($this, 'uploader');
         $uploader->setKollektionId($this->controller->kollektion->id);
         //->setNotify('dok');
     } else {
         Javascript::requireLibrary('jqueryuploader');
     }
     $dokumente = new DokumentenControl($panel, 'dok');
     $dokumente->setOrdner($this->controller->kollektion)->setShowUp($showUp)->setAjaxTarget('pnlAjax');
 }
コード例 #8
0
 public function init()
 {
     Javascript::requireLibrary('googlemaps');
 }
コード例 #9
0
 /**
  * Führt den Request aus
  * @param Controller $controller
  * @param Request $request
  * @return null
  */
 protected function executeRequestViaController(Controller $controller, Request $request)
 {
     $response = null;
     if ($controller->hatBerechtigung()) {
         try {
             $response = $controller->execute($request);
         } catch (Exception $ex) {
             Logging::error($ex->getMessage());
             $response = null;
         }
         if ($response !== null) {
             $content = $response->getContent();
             if ($content instanceof Action) {
                 $request = $request->createSubRequest($request->getArray());
                 $request->module = $content->module->qualifiedName;
                 $request->action = $content->name;
                 $this->handleRequest($request);
             } elseif ($content instanceof View) {
                 if ($request->ajax && $request->dialog) {
                     $this->modalDialog($content);
                     Javascript::display();
                 } elseif ($request->ajax) {
                     $this->flashMessagesAusgeben();
                     $content->display();
                     Javascript::display();
                 } else {
                     $this->display($content);
                 }
             } elseif (is_string($content)) {
                 echo $content;
             } elseif (is_array($content)) {
                 echo json_encode($content);
             }
         }
     } else {
         $this->showNoAccess();
     }
     return $response;
 }
コード例 #10
0
 public function init()
 {
     Javascript::requireLibrary('nfs.ExtControls');
 }
コード例 #11
0
 public function init()
 {
     Javascript::requireLibrary('jqueryuploader');
     $this->defaultSkinFile = __DIR__ . '/UploaderControl.skin';
 }
コード例 #12
0
 public function init()
 {
     Javascript::requireLibrary('jquery');
     $this->defaultSkinFile = __DIR__ . '/TopPanelControl.skin';
 }
コード例 #13
0
 public function toJavascript()
 {
     Javascript::requireLibrary('jQuery');
     Javascript::requireLibrary('nfs.DataControls');
     if (!isset($this->deleteModule)) {
         $this->deleteModule = $this->entity->getModuleName();
     }
     $gridUrl = Configuration::get('site.internalUrl') . '/ajaxGridControl.php';
     $url = Configuration::get('site.scriptUrl');
     $result = "\n            var {$this->id} = new GridControl(\$('#{$this->id}'), {\n                deleteModule: '{$this->deleteModule}',\n                deleteAction: '{$this->deleteAction}',\n                gridUrl: '{$gridUrl}',\n                url: '{$url}'\n            }).setup();\n            ";
     return $result;
 }
コード例 #14
0
 public function init()
 {
     Javascript::requireLibrary('Chart.js');
 }
コード例 #15
0
 /**
  * @covers \NewFrontiers\Framework\Output\Javascript::bool
  * @covers \NewFrontiers\Framework\Output\Javascript::boolean
  */
 public function testBool()
 {
     $this->assertEquals("true", Javascript::bool(true));
     $this->assertEquals("false", Javascript::bool(false));
     $this->assertEquals("true", Javascript::boolean(true));
     $this->assertEquals("false", Javascript::boolean(false));
 }
コード例 #16
0
 public function render()
 {
     Profiler::startSection(get_called_class());
     $this->createControls();
     $mainControl = $this->controls;
     if ($this->formControl !== null) {
         $mainControl = $this->formControl;
         $this->formControl->add($this->controls);
     }
     $temp = $mainControl->toHtml();
     Javascript::addJs($mainControl->getJavascript());
     Profiler::endSection(get_called_class());
     return $temp;
 }
コード例 #17
0
 public function requirePlugins()
 {
     if ($this->align) {
         Javascript::requireLibrary('froala-align');
     }
     if ($this->charCounter) {
         Javascript::requireLibrary('froala-charCounter');
         Css::requireLibrary('froala-charCounter');
     }
     if ($this->codeBeautifier) {
         Javascript::requireLibrary('froala-codeBeautifier');
     }
     if ($this->codeView) {
         Javascript::requireLibrary('froala-codeView');
         Css::requireLibrary('froala-codeView');
     }
     if ($this->colors) {
         Javascript::requireLibrary('froala-colors');
         Css::requireLibrary('froala-colors');
     }
     if ($this->draggable) {
         Javascript::requireLibrary('froala-draggable');
         Css::requireLibrary('froala-draggable');
     }
     if ($this->emoticons) {
         Javascript::requireLibrary('froala-emoticons');
         Css::requireLibrary('froala-emoticons');
     }
     if ($this->entities) {
         Javascript::requireLibrary('froala-entities');
         Css::requireLibrary('froala-entities');
     }
     if ($this->file) {
         Javascript::requireLibrary('froala-file');
         Css::requireLibrary('froala-file');
     }
     if ($this->fontFamily) {
         Javascript::requireLibrary('froala-fontFamily');
     }
     if ($this->fontSize) {
         Javascript::requireLibrary('froala-fontSize');
     }
     if ($this->fullscreen) {
         Javascript::requireLibrary('froala-fullscreen');
         Css::requireLibrary('froala-fullscreen');
     }
     if ($this->image) {
         Javascript::requireLibrary('froala-image');
         Css::requireLibrary('froala-image');
     }
     if ($this->imageManager) {
         Javascript::requireLibrary('froala-imageManager');
         Css::requireLibrary('froala-imageManager');
     }
     if ($this->inlineStyle) {
         Javascript::requireLibrary('froala-inlineStyle');
     }
     if ($this->lineBreaker) {
         Javascript::requireLibrary('froala-lineBreaker');
         Css::requireLibrary('froala-lineBreaker');
     }
     if ($this->link) {
         Javascript::requireLibrary('froala-link');
     }
     if ($this->lists) {
         Javascript::requireLibrary('froala-lists');
     }
     if ($this->paragraphFormat) {
         Javascript::requireLibrary('froala-paragraphFormat');
     }
     if ($this->paragraphStyle) {
         Javascript::requireLibrary('froala-paragraphStyle');
     }
     if ($this->quickInsert) {
         Javascript::requireLibrary('froala-quickInsert');
         Css::requireLibrary('froala-quickInsert');
     }
     if ($this->quote) {
         Javascript::requireLibrary('froala-quote');
     }
     if ($this->save) {
         Javascript::requireLibrary('froala-save');
     }
     if ($this->table) {
         Javascript::requireLibrary('froala-table');
         Css::requireLibrary('froala-table');
     }
     if ($this->url) {
         Javascript::requireLibrary('froala-url');
     }
     if ($this->video) {
         Javascript::requireLibrary('froala-video');
         Css::requireLibrary('froala-video');
     }
 }
コード例 #18
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     Javascript::requireLibrary('datetimepicker');
 }
コード例 #19
0
 public function setUseChosen($useChosen)
 {
     Javascript::requireLibrary('chosen');
     $this->useChosen = $useChosen;
     return $this;
 }
コード例 #20
0
 public function init()
 {
     $this->defaultSkinFile = __DIR__ . '/TypeaheadBoxControl.NoSearchButton.skin';
     Javascript::requireLibrary('typeahead');
 }
コード例 #21
0
    <!-- /.modal-dialog -->
</div>


<?php 
Template::js('jquery-2.1.1.js');
Template::js('bootstrap.min.js');
Template::js('plugins/metisMenu/jquery.metisMenu.js');
Template::js('plugins/slimscroll/jquery.slimscroll.min.js');
Template::js('inspinia.js');
Template::js('plugins/pace/pace.min.js');
Template::js('plugins/jvectormap/jquery-jvectormap-2.0.2.min.js');
Template::js('plugins/jvectormap/jquery-jvectormap-world-mill-en.js');
Template::js('ModalizerControl.js', Configuration::get('site.internalUrl') . '/assets');
Template::js('GridControl.js', Configuration::get('site.internalUrl') . '/assets');
Template::js('spin.js', Configuration::get('site.internalUrl') . '/bower_components/spin.js');
Template::js('jquery.spin.js', Configuration::get('site.internalUrl') . '/bower_components/spin.js');
Template::js('jquery.validate.min.js', Configuration::get('site.internalUrl') . '/bower_components/jquery-validation/dist');
Template::js('globalize.js', Configuration::get('site.internalUrl') . '/bower_components/globalize/lib');
Template::js('globalize.culture.de-DE.js', Configuration::get('site.internalUrl') . '/bower_components/globalize/lib/cultures');
Template::js('validator.languages.de.js', Configuration::get('site.internalUrl') . '/assets');
Template::js('jquery.validate.globalize.min.js', Configuration::get('site.internalUrl') . '/assets');
Template::js('Chart.min.js', Configuration::get('site.internalUrl') . '/bower_components/Chart.js/dist');
Debug::showDebugConsole();
Javascript::display();
?>

</body>

</html>
コード例 #22
0
 public function init()
 {
     Javascript::requireLibrary('bootstrap-star-rating');
 }
コード例 #23
0
 public function init()
 {
     Javascript::requireLibrary('bootstrap-toggle');
 }
コード例 #24
0
 /**
  * Übergibt den benötigten Javascript-Code an den JS-Manager und echoed
  * das HTML des Controls. Wird eigentlich nur bei Controls, die direkt
  * in der default.php des Templates stehen eingesetzt.
  *
  * @return string
  */
 public function display()
 {
     Javascript::addJs($this->getJavascript());
     echo $this->toHtml();
 }
コード例 #25
0
 public function init()
 {
     Javascript::requireLibrary('bootstrap-slider');
 }