예제 #1
0
파일: Search.php 프로젝트: GruppoMeta/Movio
 function render()
 {
     if (!$this->_application->isAdmin()) {
         if ($this->_content['result']) {
             org_glizy_helpers_Array::arrayMultisortByLabel($this->_content['result'], '__weight__');
         }
         if (!$this->getAttribute('skipFormTag')) {
             parent::render_html_onStart();
         }
         parent::render();
         if (!$this->getAttribute('skipFormTag')) {
             parent::render_html_onEnd();
         }
     }
 }
예제 #2
0
    public function render_html_onEnd($value = '')
    {
        parent::render_html_onEnd();
        $corePath = __Paths::get('CORE');
        $jQueryPath = $corePath . 'classes/org/glizycms/js/jquery/';
        $languageCode = $this->_application->getLanguage();
        $language = $languageCode . '-' . strtoupper($languageCode);
        if ($this->getAttribute('newCode')) {
            $formEditPath = $corePath . 'classes/org/glizycms/js/formEdit2/';
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($corePath . 'classes/org/glizycms/js/underscore/underscore-min.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEdit.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditStandard.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditCheckbox.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditRepeat.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditDate.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditDateTime.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($jQueryPath . 'bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($jQueryPath . 'bootstrap-datetimepicker-master/js/locales/bootstrap-datetimepicker.it.js'));
            $this->addOutputCode(org_glizy_helpers_CSS::linkCSSfile($jQueryPath . 'bootstrap-datetimepicker-master/css/datetimepicker.css'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditColorPicker.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($jQueryPath . 'bootstrap-colorpicker/js/bootstrap-colorpicker.min.js'));
            $this->addOutputCode(org_glizy_helpers_CSS::linkCSSfile($jQueryPath . 'bootstrap-colorpicker/css/bootstrap-colorpicker.min.css'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditGUID.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditSelectFrom.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($jQueryPath . 'select2/select2.min.js'));
            $this->addOutputCode(org_glizy_helpers_CSS::linkCSSfile($jQueryPath . 'select2/select2.css'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditTINYMCE.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditMediaPicker.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditFile.js'));
            //$this->addOutputCode( org_glizy_helpers_JS::linkJSfile( $jQueryPath.'fineuploader.jquery/jquery.fineuploader.js' ) );
            //$this->addOutputCode( org_glizy_helpers_CSS::linkCSSfile( $jQueryPath.'fineuploader.jquery/fineuploader.css' ) );
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($jQueryPath . 'jquery.validVal-packed.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditPermission.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditPhotoGalleryCategory.js'));
            // $this->addOutputCode( org_glizy_helpers_JS::linkJSfile( $formEditPath.'GlizyFormEditGoogleMaps.js' ) );
            // $this->addOutputCode(org_glizy_helpers_JS::linkJSfile( 'http://maps.google.com/maps/api/js?sensor=false' ));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditCmsPagePicker.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditSelectPageType.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditUrl.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditModalPage.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($corePath . 'classes/org/glizycms/js/glizy-locale/' . $language . '.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($jQueryPath . 'jquery.pnotify/jquery.pnotify.min.js'));
            $this->addOutputCode(org_glizy_helpers_CSS::linkCSSfile($jQueryPath . 'jquery.pnotify/jquery.pnotify.default.css'));
            $id = $this->getId();
            $mediaPicker = $this->getMediaPickerUrl();
            $AJAXAtion = $this->getAttribute('controllerName') ? $this->getAjaxUrl() : '';
            $customValidation = $this->getAttribute('customValidation');
            if ($customValidation) {
                $customValidation = 'customValidation: "' . $customValidation . '",';
            }
            $tinyMceUrls = json_encode($this->getTinyMceUrls());
            $jsCode = <<<EOD
jQuery(function(){
    if ( Glizy.tinyMCE_options )
    {
        Glizy.tinyMCE_options.urls = {$tinyMceUrls};
    }

    var myFormEdit = Glizy.oop.create("glizy.FormEdit", '{$id}', {
        AJAXAction: "{$AJAXAtion}",
        mediaPicker: {$mediaPicker},
        formData: {$this->data},
        {$customValidation}
        lang: GlizyLocale.FormEdit
    });
});
EOD;
        } else {
            $formEditPath = $corePath . 'classes/org/glizycms/js/formEdit/';
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($corePath . 'classes/org/glizycms/js/underscore/underscore-min.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEdit.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditTINYMCE.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditFile.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditMediaPicker.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditGoogleMaps.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditGUID.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditColorPicker.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditValuesPreset.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditDate.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditDatetime.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($jQueryPath . 'bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($jQueryPath . 'bootstrap-datetimepicker-master/js/locales/bootstrap-datetimepicker.it.js'));
            $this->addOutputCode(org_glizy_helpers_CSS::linkCSSfile($jQueryPath . 'bootstrap-datetimepicker-master/css/datetimepicker.css'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($jQueryPath . 'bootstrap-colorpicker/js/bootstrap-colorpicker.min.js'));
            $this->addOutputCode(org_glizy_helpers_CSS::linkCSSfile($jQueryPath . 'bootstrap-colorpicker/css/bootstrap-colorpicker.min.css'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($corePath . 'classes/org/glizycms/js/glizy-locale/' . $language . '.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($jQueryPath . 'dropzone/dropzone.min.js'));
            $this->addOutputCode(org_glizy_helpers_CSS::linkCSSfile($jQueryPath . 'dropzone/css/basic2.css'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($jQueryPath . 'jquery.validVal-packed.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditCmsPagePicker.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditSelectFrom.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($jQueryPath . 'select2/select2.min.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($jQueryPath . 'jquery.pnotify/jquery.pnotify.min.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditPermission.js'));
            $this->addOutputCode(org_glizy_helpers_CSS::linkCSSfile($jQueryPath . 'select2/select2.css'));
            $this->addOutputCode(org_glizy_helpers_CSS::linkCSSfile($jQueryPath . 'jquery.pnotify/jquery.pnotify.default.css'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditCheckbox.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile('http://maps.google.com/maps/api/js?sensor=false'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditSelectPageType.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditPhotoGalleryCategory.js'));
            $this->addOutputCode(org_glizy_helpers_JS::linkJSfile($formEditPath . 'GlizyFormEditImageHotspot.js'));
            // $this->addOutputCode( org_glizy_helpers_JS::linkJSfile( $formEditPath.'GlizyFormEditTreeSelect.js' ) );
            // $this->addOutputCode( org_glizy_helpers_JS::linkJSfile( $jQueryPath.'fancytree/jquery.fancytree-all.min.js' ) );
            // $this->addOutputCode( org_glizy_helpers_CSS::linkCSSfile( $jQueryPath.'fancytree/skin-win7/ui.fancytree.min.css' ) );
            $id = $this->getId();
            $mediaPicker = $this->getMediaPickerUrl();
            $AJAXAtion = $this->getAttribute('controllerName') ? $this->getAjaxUrl() : '';
            $customValidation = $this->getAttribute('customValidation');
            if ($customValidation) {
                $customValidation = 'customValidation: "' . $customValidation . '",';
            }
            $tinyMceUrls = json_encode($this->getTinyMceUrls());
            $jsCode = <<<EOD
jQuery(function(){
    if ( Glizy.tinyMCE_options )
    {
        Glizy.tinyMCE_options.urls = {$tinyMceUrls};
    }

    var ajaxUrl = "{$AJAXAtion}";
    jQuery( "#{$id}" ).GlizyFormEdit({
        AJAXAction: ajaxUrl ? ajaxUrl : Glizy.ajaxUrl,
        mediaPicker: {$mediaPicker},
        formData: {$this->data},
        {$customValidation}
        lang: GlizyLocale.FormEdit
    });
});
EOD;
        }
        $this->addOutputCode(org_glizy_helpers_JS::JScode($jsCode));
    }
예제 #3
0
 function render_html_onEnd()
 {
     if ($this->getAttribute('fieldset')) {
         $this->addOutputCode('</fieldset>');
     }
     parent::render_html_onEnd();
     if ($this->getAttribute('wrapDiv')) {
         $this->addOutputCode('</div>');
     }
 }