コード例 #1
0
ファイル: Event.php プロジェクト: Umz/ImpressPages
 public static function ipBeforeController()
 {
     $style = ipGetOption('Colorbox.style', 1);
     ipAddCss('Plugin/Colorbox/assets/theme' . $style . '/colorbox.css');
     ipAddJs('Plugin/Colorbox/assets/colorbox/jquery.colorbox-min.js');
     ipAddJs('Plugin/Colorbox/assets/colorboxInit.js');
 }
コード例 #2
0
ファイル: AdminController.php プロジェクト: vizo/ImpressPages
 public function index()
 {
     ipAddJs('assets/email.js');
     ipAddCss('assets/email.css');
     $previewModal = ipView('view/previewModal.php');
     return parent::index() . $previewModal;
 }
コード例 #3
0
ファイル: AdminController.php プロジェクト: Umz/ImpressPages
 public function index()
 {
     ipAddJs('Ip/Internal/Core/assets/js/jquery-ui/jquery-ui.js');
     ipAddCss('Ip/Internal/Core/assets/js/jquery-ui/jquery-ui.css');
     ipAddJs('Ip/Internal/Core/assets/js/easyXDM/easyXDM.min.js');
     ipAddJs('Ip/Internal/Design/assets/options.js');
     ipAddJs('Ip/Internal/Design/assets/market.js');
     ipAddJs('Ip/Internal/Design/assets/design.js');
     ipAddJs('Ip/Internal/Design/assets/pluginInstall.js');
     ipAddJs('Ip/Internal/System/assets/market.js');
     $model = Model::instance();
     $themes = $model->getAvailableThemes();
     $model = Model::instance();
     $theme = $model->getTheme(ipConfig()->theme());
     $options = $theme->getOptionsAsArray();
     $themePlugins = $model->getThemePlugins();
     $installedPlugins = \Ip\Internal\Plugins\Service::getActivePluginNames();
     $notInstalledPlugins = array();
     //filter plugins that are already installed
     foreach ($themePlugins as $plugin) {
         if (!empty($plugin['name']) && (!in_array($plugin['name'], $installedPlugins) || !is_dir(ipFile('Plugin/' . $plugin['name'])))) {
             $notInstalledPlugins[] = $plugin;
         }
     }
     if (isset($_SESSION['module']['design']['pluginNote'])) {
         $pluginNote = $_SESSION['module']['design']['pluginNote'];
         unset($_SESSION['module']['design']['pluginNote']);
     } else {
         $pluginNote = '';
     }
     $data = array('pluginNote' => $pluginNote, 'theme' => $model->getTheme(ipConfig()->theme()), 'plugins' => $notInstalledPlugins, 'availableThemes' => $themes, 'marketUrl' => $model->getMarketUrl(), 'showConfiguration' => !empty($options), 'contentManagementUrl' => ipConfig()->baseUrl() . '?aa=Content.index', 'contentManagementText' => __('Manage content', 'Ip-admin', false));
     $contentView = ipView('view/layout.php', $data);
     ipResponse()->setLayoutVariable('removeAdminContentWrapper', true);
     return $contentView->render();
 }
コード例 #4
0
ファイル: AdminController.php プロジェクト: Umz/ImpressPages
 public function index()
 {
     ipAddJsVariable('ipTranslationAreYouSure', __('Are you sure?', 'Ip-admin', false));
     ipAddJs('Ip/Internal/Core/assets/js/angular.js');
     ipAddJs('Ip/Internal/Pages/assets/js/pages.js');
     ipAddJs('Ip/Internal/Pages/assets/js/pagesLayout.js');
     ipAddJs('Ip/Internal/Pages/assets/js/menuList.js');
     ipAddJs('Ip/Internal/Pages/assets/jstree/jstree.min.js');
     ipAddJs('Ip/Internal/Pages/assets/js/jquery.pageTree.js');
     ipAddJs('Ip/Internal/Pages/assets/js/jquery.pageProperties.js');
     ipAddJs('Ip/Internal/Grid/assets/grid.js');
     ipAddJs('Ip/Internal/Grid/assets/gridInit.js');
     ipAddJs('Ip/Internal/Grid/assets/subgridField.js');
     ipAddJsVariable('languageList', Helper::languageList());
     ipAddJsVariable('ipPagesLanguagesPermission', ipAdminPermission('Languages'));
     $menus = Model::getMenuList();
     foreach ($menus as $key => &$menu) {
         $default = 'top';
         if ($key == 0) {
             $default = 'bottom';
         }
         $menu['defaultPosition'] = Model::getDefaultMenuPagePosition($menu['alias'], false, $default);
         $default = 'below';
         $menu['defaultPositionWhenSelected'] = Model::getDefaultMenuPagePosition($menu['alias'], true, $default);
     }
     $menus = ipFilter('ipPagesMenuList', $menus);
     ipAddJsVariable('menuList', $menus);
     $variables = array('addPageForm' => Helper::addPageForm(), 'addMenuForm' => Helper::addMenuForm(), 'languagesUrl' => ipConfig()->baseUrl() . '?aa=Languages.index');
     $layout = ipView('view/layout.php', $variables);
     ipResponse()->setLayoutVariable('removeAdminContentWrapper', true);
     ipAddJsVariable('listStylePageSize', ipGetOption('Pages.pageListSize', 30));
     return $layout->render();
 }
コード例 #5
0
ファイル: AdminController.php プロジェクト: Umz/ImpressPages
 public function index()
 {
     $model = Model::instance();
     ipAddJs('Ip/Internal/Grid/assets/grid.js');
     ipAddJs('Ip/Internal/Grid/assets/gridInit.js');
     ipAddJs('Ip/Internal/Grid/assets/subgridField.js');
     $notes = array();
     if (isset($_SESSION['Ip']['notes']) && is_array($_SESSION['Ip']['notes'])) {
         $notes = $_SESSION['Ip']['notes'];
     }
     unset($_SESSION['Ip']['notes']);
     $enableUpdate = !defined('MULTISITE_WEBSITES_DIR');
     // Disable update in MultiSite installation.
     $trash = array('size' => \Ip\Internal\Pages\Service::trashSize());
     $data = array('notes' => $notes, 'version' => \Ip\ServiceLocator::storage()->get('Ip', 'version'), 'changedUrl' => $model->getOldUrl() != $model->getNewUrl(), 'oldUrl' => $model->getOldUrl(), 'newUrl' => $model->getNewUrl(), 'migrationsAvailable' => \Ip\Internal\Update\Service::migrationsAvailable(), 'migrationsUrl' => ipActionUrl(array('pa' => 'Update')), 'recoveryPageForm' => \Ip\Internal\System\Helper::recoveryPageForm(), 'emptyPageForm' => \Ip\Internal\System\Helper::emptyPageForm(), 'trash' => $trash);
     $content = ipView('view/index.php', $data)->render();
     if ($enableUpdate) {
         ipAddJs('Ip/Internal/System/assets/update.js');
     }
     if ($trash['size'] > 0) {
         ipAddJs('Ip/Internal/Core/assets/js/angular.js');
         ipAddJs('Ip/Internal/System/assets/trash.js');
     }
     ipAddJs('Ip/Internal/System/assets/migrations.js');
     ipAddJs('assets/cache.js');
     return $content;
 }
コード例 #6
0
ファイル: Event.php プロジェクト: Umz/ImpressPages
 protected static function initConfig()
 {
     ipAddCss('Ip/Internal/Core/assets/admin/admin.css');
     ipAddJs('Ip/Internal/Core/assets/js/jquery-ui/jquery-ui.js');
     ipAddJsVariable('ipTranslationSaving', __('Saving...', 'Ip-admin', false));
     ipAddJs('Ip/Internal/Design/assets/optionsBox.js');
     ipAddJsVariable('ipModuleDesignConfiguration', Helper::getConfigurationBoxHtml());
     if (file_exists(ipThemeFile(Model::INSTALL_DIR . 'Options.js'))) {
         ipAddJs(ipThemeUrl(Model::INSTALL_DIR . 'Options.js'));
     } elseif (file_exists(ipThemeFile(Model::INSTALL_DIR . 'options.js'))) {
         ipAddJs(ipThemeUrl(Model::INSTALL_DIR . 'options.js'));
     }
     $model = Model::instance();
     $theme = $model->getTheme(ipConfig()->theme());
     if (!$theme) {
         throw new \Ip\Exception("Theme doesn't exist");
     }
     $options = $theme->getOptionsAsArray();
     $fieldNames = array();
     foreach ($options as $option) {
         if (empty($option['name'])) {
             continue;
         }
         $fieldNames[] = $option['name'];
     }
     ipAddJsVariable('ipModuleDesignOptionNames', $fieldNames);
 }
コード例 #7
0
ファイル: Event.php プロジェクト: sspaeti/ImpressPages
 public static function ipBeforeController()
 {
     if (ipAdminId()) {
         ipAddJs('assets/floatImage.js');
     }
     ipAddCss('assets/floatImage.css');
 }
コード例 #8
0
ファイル: Event.php プロジェクト: Umz/ImpressPages
 public static function ipBeforeController()
 {
     $request = \Ip\ServiceLocator::request();
     $sessionLifetime = ini_get('session.gc_maxlifetime');
     if (!$sessionLifetime) {
         $sessionLifetime = 120;
     }
     if ($sessionLifetime > 30) {
         $sessionLifetime = $sessionLifetime - 20;
     }
     ipAddJsVariable('ipSessionRefresh', $sessionLifetime);
     if (ipConfig()->isDebugMode()) {
         ipAddJs('Ip/Internal/Core/assets/ipCore/jquery.js', null, 10);
         // default, global jQuery
         ipAddJs('Ip/Internal/Core/assets/ipCore/console.log.js', null, 10);
         ipAddJs('Ip/Internal/Core/assets/ipCore/functions.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/jquery.tools.form.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/color.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/file.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/richtext.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/repositoryFile.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/url.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/validator.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/widgets.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/ipCore.js');
     } else {
         ipAddJs('Ip/Internal/Core/assets/ipCore.min.js', null, 10);
     }
     //Form init
     $validatorTranslations = array('Ip-admin' => static::validatorLocalizationData('Ip-admin'), ipContent()->getCurrentLanguage()->getCode() => static::validatorLocalizationData('Ip'));
     ipAddJsVariable('ipValidatorTranslations', $validatorTranslations);
     if (ipAdminId() || \Ip\Internal\Admin\Model::isLoginPage() || \Ip\Internal\Admin\Model::isPasswordResetPage()) {
         if (ipConfig()->isDebugMode()) {
             ipAddJs('Ip/Internal/Core/assets/admin/managementMode.js');
             ipAddJs('Ip/Internal/Core/assets/admin/functions.js');
             ipAddJs('Ip/Internal/Core/assets/admin/validator.js');
             ipAddJs('Ip/Internal/Core/assets/admin/bootstrap/bootstrap.js');
             ipAddJs('Ip/Internal/Core/assets/admin/bootstrap-switch/bootstrap-switch.js');
         } else {
             ipAddJs('Ip/Internal/Core/assets/admin.min.js', null, 10);
         }
         ipAddJs('Ip/Internal/Core/assets/tinymce/pastePreprocess.js');
         ipAddJs('Ip/Internal/Core/assets/tinymce/default.js');
     }
     if (ipAdminId()) {
         ipAddJs('Ip/Internal/Core/assets/js/tiny_mce/jquery.tinymce.min.js');
         ipAddJs('Ip/Internal/Core/assets/js/tiny_mce/tinymce.min.js');
         ipAddJsVariable('ipBrowseLinkModalTemplate', ipView('view/browseLinkModal.php')->render());
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/plupload.full.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/plupload.browserplus.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/plupload.gears.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/jquery.plupload.queue/jquery.plupload.queue.js');
         if (is_file(ipThemeFile('setup/admin.js'))) {
             ipAddJs(ipThemeUrl('setup/admin.js'));
         }
         ipAddCss('Ip/Internal/Core/assets/admin/admin.css');
     }
 }
コード例 #9
0
ファイル: Event.php プロジェクト: sspaeti/ImpressPages
 public static function ipBeforeController()
 {
     if (ipAdminId()) {
         ipAddJs('assets/FontAwesomeField.js');
         ipAddCss('assets/FontAwesomeField.css');
     }
     ipAddCss('Plugin/FontAwesomeIcons/assets/css/font-awesome.min.css');
 }
コード例 #10
0
ファイル: Event.php プロジェクト: sspaeti/ImpressPages
 public static function ipBeforeController()
 {
     // Add Stylesheet
     ipAddCss('assets/css/bootstrap.min.css');
     ipAddCss('assets/css/portfolio-font.css');
     ipAddCss('assets/css/portfolio.css');
     // Add JavaScript
     ipAddJs('assets/js/jquery.isotope.min.js');
 }
コード例 #11
0
ファイル: Event.php プロジェクト: sspaeti/ImpressPages
 public static function ipBeforeController()
 {
     if (ipIsManagementState()) {
         ipAddCss('assets/gridWidget.css');
         ipAddCss('assets/admin_custom.css');
     }
     ipAddCss('assets/style.css');
     ipAddJs('assets/scripts.js');
 }
コード例 #12
0
ファイル: Event.php プロジェクト: Umz/ImpressPages
 public static function ipBeforeController()
 {
     if (ipIsManagementState()) {
         // Works only if admin is logged in (AJAX is sent to Admin Controller)
         if (isset($_SESSION['module']['system']['adminJustLoggedIn']) && ipAdminPermission('Super admin')) {
             ipAddJs('Ip/Internal/System/assets/usageStatistics.js');
             ipAddJsVariable('ipSystemSendUsageStatistics', 1);
         }
     }
 }
コード例 #13
0
 /**
  * @ipSubmenu Table types
  */
 public function index()
 {
     ipAddJs('Ip/Internal/Core/assets/js/angular.js');
     ipAddJs('Plugin/DataTableWidget/assets/tableTypesController.js');
     $data = array('createForm' => AdminFormHelper::createForm(true), 'updateForm' => AdminFormHelper::updateForm(true), 'deleteForm' => AdminFormHelper::deleteForm());
     ipAddJsVariable('tableTypes', TableType::getAllAsArray());
     ipAddJsVariable('columnOptions', TableType::getColumnOptions());
     ipAddJsVariable('languages', ipContent()->getLanguages());
     return ipView('view/layout.php', $data)->render();
 }
コード例 #14
0
ファイル: Event.php プロジェクト: sspaeti/ImpressPages
 public static function ipBeforeController()
 {
     $pubId = ipGetOption('AddThis.addThisUid');
     if ($pubId) {
         $data['pubid'] = $pubId;
         // AddThis publisher ID, if applicable
     }
     $data['data_track_addressbar'] = true;
     ipAddJsVariable("addthis_config", $data);
     ipAddJs('http://s7.addthis.com/js/300/addthis_widget.js');
 }
コード例 #15
0
ファイル: Event.php プロジェクト: sspaeti/ImpressPages
 public static function ipBeforeController()
 {
     if (ipIsManagementState()) {
         ipAddJs('assets/js/plugin.js');
     }
     ipAddJs('https://maps.googleapis.com/maps/api/js?v=3.exp');
     ipAddJs('assets/js/map.js');
     ipAddCss('assets/css/map.css');
     if (!ipIsManagementState()) {
     }
 }
コード例 #16
0
ファイル: AdminController.php プロジェクト: Umz/ImpressPages
 public function index()
 {
     ipAddJs('Ip/Internal/Config/assets/config.js');
     ipAddCss('Ip/Internal/Config/assets/config.css');
     $form = Forms::getForm();
     $advancedForm = false;
     if (ipAdminPermission('Config advanced')) {
         $advancedForm = Forms::getAdvancedForm();
     }
     $data = array('form' => $form, 'advancedForm' => $advancedForm);
     return ipView('view/configWindow.php', $data)->render();
 }
コード例 #17
0
ファイル: Event.php プロジェクト: sspaeti/ImpressPages
 public static function ipBeforeController()
 {
     if (ipIsManagementState()) {
         $plugin = explode('.', ipRequest()->getQuery('aa'));
         if ($plugin[0] == 'Pages') {
             ipAddCss('assets/php.css');
             ipAddCss('assets/codeEditorField.css');
             ipAddJs('assets/src-noconflict/ace.js');
             ipAddJs('assets/initCodeEditorField.js');
         }
     }
 }
コード例 #18
0
ファイル: GridController.php プロジェクト: Umz/ImpressPages
 public function index()
 {
     ipAddJs('Ip/Internal/Grid/assets/grid.js');
     ipAddJs('Ip/Internal/Grid/assets/gridInit.js');
     ipAddJs('Ip/Internal/Grid/assets/subgridField.js');
     $controllerClass = get_class($this);
     $controllerClassParts = explode('\\', $controllerClass);
     $aa = $controllerClassParts[count($controllerClassParts) - 2] . '.grid';
     $gateway = array('aa' => $aa);
     $variables = array('gateway' => ipActionurl($gateway));
     $content = ipView('Internal/Grid/view/placeholder.php', $variables)->render();
     return $content;
 }
コード例 #19
0
 /**
  * Index action adds an item to administration menu
  */
 public function index()
 {
     ipAddJs('view/assets/js/vendor/angular.js', 1);
     ipAddJs('view/assets/js/vendor/angular-animate.min.js');
     ipAddJs('view/assets/js/vendor/angular-sanitize.min.js');
     ipAddJs('view/assets/js/vendor/ngToast.min.js');
     ipAddJs('view/assets/js/Controllers/WidgetCtrl.js', 6);
     ipAddCss('view/assets/css/ngToast.min.css');
     $BasePath = ipConfig()->baseUrl();
     ipAddJsVariable('BASEPATH', $BasePath);
     $data = array();
     return ipView('view/main.php', $data)->render();
 }
コード例 #20
0
ファイル: Event.php プロジェクト: sspaeti/ImpressPages
 public static function ipBeforeController()
 {
     // Add elements that are necessary only in administration state
     if (ipIsManagementState()) {
         ipAddCss('assets/masonryGrid.css');
     }
     // Add Stylesheet
     ipAddCss('assets/masonryGridFront.css');
     // Add Javascript
     ipAddJs('assets/imagesloaded.pkgd.min.js');
     ipAddJs('assets/masonry.pkgd.min.js');
     ipAddJs('assets/masonryGrid.js');
 }
コード例 #21
0
ファイル: Event.php プロジェクト: sspaeti/ImpressPages
 public static function ipBeforeController()
 {
     if (!ipIsManagementState()) {
         $script = "\n  \n   \$(document).ready(function() {\n \n  if( \$('#SliderGall').hasClass('wc')){\n  \$('._item ipsItem').css('display', 'block');\n   \$('.bxslider').bxSlider({\n            auto: true,\n            mode: 'fade',\n            speed: 800,\n            captions: true,\n            autoHover: false,\n            startSlide: 1\n        });\n      console.log('WC public script class');  \n  }else if(\$('#SliderGall').hasClass('nc')){\n  \$('._item ipsItem').css('display', 'block');\n   \$('.bxslider').bxSlider({\n            auto: true,\n            mode: 'fade',\n            speed: 800,\n            autoHover: false,\n           \n            startSlide: 1\n        });\n       console.log('NC public script class');   \n  }else if(\$('#SliderGall').hasClass('np')){\n  \n   \$('._item ipsItem').css('display', 'block');\n   \$('.bxslider').bxSlider({\n            auto: true,\n            mode: 'fade',\n            speed: 800,\n            pager: false,\n            autoHover: false,\n            controls: false,\n            startSlide: 1\n            \n        });\n       console.log('NP public script class');   \n  }\n  \n      \n  });\n \n\n";
         ipAddJsContent('imageslider', $script);
         ipAddJs('assets/slider.js');
         ipAddJs('assets/jquery.bxslider.js');
         ipAddCss('assets/jquery.bxslider.css');
     } else {
         ipAddJs('assets/slider.js');
         ipAddJs('assets/jquery.bxslider.js');
         ipAddCss('assets/jquery.bxslider.css');
     }
 }
コード例 #22
0
ファイル: Helper.php プロジェクト: Umz/ImpressPages
 public static function initManagement()
 {
     $widgets = Service::getAvailableWidgets();
     $snippets = array();
     foreach ($widgets as $widget) {
         $snippetHtml = $widget->adminHtmlSnippet();
         if ($snippetHtml != '') {
             $snippets[] = $snippetHtml;
         }
     }
     ipAddJsVariable('ipWidgetSnippets', $snippets);
     ipAddJsVariable('ipContentInit', Model::initManagementData());
     ipAddJs('Ip/Internal/Core/assets/js/jquery-ui/jquery-ui.js');
     ipAddCss('Ip/Internal/Core/assets/js/jquery-ui/jquery-ui.css');
     if (ipConfig()->isDebugMode()) {
         ipAddJs('Ip/Internal/Content/assets/management/ipContentManagementInit.js');
         ipAddJs('Ip/Internal/Content/assets/management/content.js');
         ipAddJs('Ip/Internal/Content/assets/management/jquery.ip.contentManagement.js');
         ipAddJs('Ip/Internal/Content/assets/management/jquery.ip.widgetbutton.js');
         ipAddJs('Ip/Internal/Content/assets/management/jquery.ip.layoutModal.js');
         ipAddJs('Ip/Internal/Content/assets/management/jquery.ip.block.js');
         ipAddJs('Ip/Internal/Content/assets/management/jquery.ip.widget.js');
         ipAddJs('Ip/Internal/Content/assets/management/exampleContent.js');
         ipAddJs('Ip/Internal/Content/assets/management/drag.js');
         ipAddJs('Ip/Internal/Content/Widget/Columns/assets/Columns.js');
         ipAddJs('Ip/Internal/Content/Widget/File/assets/File.js');
         ipAddJs('Ip/Internal/Content/Widget/File/assets/jquery.ipWidgetFile.js');
         ipAddJs('Ip/Internal/Content/Widget/File/assets/jquery.ipWidgetFileContainer.js');
         ipAddJs('Ip/Internal/Content/Widget/Form/assets/Form.js');
         ipAddJs('Ip/Internal/Content/Widget/Form/assets/FormContainer.js');
         ipAddJs('Ip/Internal/Content/Widget/Form/assets/FormField.js');
         ipAddJs('Ip/Internal/Content/Widget/Form/assets/FormOptions.js');
         ipAddJs('Ip/Internal/Content/Widget/Html/assets/Html.js');
         ipAddJs('Ip/Internal/Content/Widget/Video/assets/Video.js');
         ipAddJs('Ip/Internal/Content/Widget/Image/assets/Image.js');
         ipAddJs('Ip/Internal/Content/Widget/Gallery/assets/Gallery.js');
         ipAddJs('Ip/Internal/Content/Widget/Text/assets/Text.js');
         ipAddJs('Ip/Internal/Content/Widget/Heading/assets/Heading.js');
         ipAddJs('Ip/Internal/Content/Widget/Heading/assets/HeadingModal.js');
         ipAddJs('Ip/Internal/Content/Widget/Map/assets/Map.js');
     } else {
         ipAddJs('Ip/Internal/Content/assets/management.min.js');
     }
     ipAddJs('Ip/Internal/Core/assets/js/jquery-tools/jquery.tools.ui.scrollable.js');
     ipAddJs('Ip/Internal/Content/assets/jquery.ip.uploadImage.js');
     ipAddJsVariable('isMobile', \Ip\Internal\Browser::isMobile());
     ipAddJsVariable('ipWidgetLayoutModalTemplate', ipView('view/widgetLayoutModal.php')->render());
 }
コード例 #23
0
 protected function init()
 {
     if (ipRequest()->getRequest('debug') !== NULL) {
         $_SESSION['install_debug'] = (int) ipRequest()->getRequest('debug');
     }
     if (!empty($_SESSION['install_debug'])) {
         error_reporting(E_ALL);
         ini_set('display_errors', 1);
     }
     if (empty($_SESSION['websiteId'])) {
         $_SESSION['websiteId'] = Helper::randString(32);
     }
     ipAddJs('Plugin/Install/assets/js/jquery.js');
     ipAddJs('Plugin/Install/assets/js/bootstrap.js');
     ipAddJs('Plugin/Install/assets/js/ModuleInstall.js');
     ipAddJs('Plugin/Install/assets/js/install.js');
 }
コード例 #24
0
ファイル: Event.php プロジェクト: Umz/ImpressPages
 public static function ipBeforeController()
 {
     if (ipIsManagementState() || ipRoute()->isAdmin() || ipRequest()->getQuery('ipDesignPreview')) {
         ipAddJs('Ip/Internal/Core/assets/js/jquery-ui/jquery-ui.js');
         ipAddJs('Ip/Internal/Repository/assets/ipRepository.js');
         ipAddJs('Ip/Internal/Repository/assets/ipRepositoryUploader.js');
         ipAddJs('Ip/Internal/Repository/assets/ipRepositoryAll.js');
         ipAddJs('Ip/Internal/Repository/assets/ipRepositoryBuy.js');
         ipAddJs('Ip/Internal/System/assets/market.js');
         ipAddJs('Ip/Internal/Core/assets/js/easyXDM/easyXDM.min.js');
         $marketUrl = ipConfig()->get('imageMarketUrl', 'http://market.impresspages.org/images-v1/');
         $popupData = array('marketUrl' => $marketUrl, 'allowUpload' => ipAdminPermission('Repository upload'), 'allowRepository' => ipAdminPermission('Repository'));
         ipAddJsVariable('ipRepositoryHtml', ipView('view/popup.php', $popupData)->render());
         ipAddJsVariable('ipRepositoryTranslate_confirm_delete', __('Are you sure you want to delete selected files?', 'Ip-admin'));
         ipAddJsVariable('ipRepositoryTranslate_delete_warning', __('Some of the selected files are still used somewhere on your website. Do you still want to remove them? ', 'Ip-admin'));
     }
 }
コード例 #25
0
ファイル: Event.php プロジェクト: Umz/ImpressPages
 public static function ipBeforeController()
 {
     if (ipIsManagementState()) {
         if (ipConfig()->isDebugMode()) {
             ipAddJs('Ip/Internal/InlineManagement/assets/src/inlineManagement.js');
             ipAddJs('Ip/Internal/InlineManagement/assets/src/inlineManagementControls.js');
             ipAddJs('Ip/Internal/InlineManagement/assets/src/inlineManagementImage.js');
             ipAddJs('Ip/Internal/InlineManagement/assets/src/inlineManagementLogo.js');
             ipAddJs('Ip/Internal/InlineManagement/assets/src/inlineManagementText.js');
             ipAddJs('Ip/Internal/InlineManagement/assets/src/jquery.fontselector.js');
         } else {
             ipAddJs('Ip/Internal/InlineManagement/assets/inlineManagement.min.js');
         }
         ipAddJsVariable('ipModuleInlineManagementControls', ipView('view/management/controls.php')->render());
         ipAddJs('Ip/Internal/Content/assets/jquery.ip.uploadImage.js');
         ipAddJs('Ip/Internal/Core/assets/js/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js');
         ipAddCss('Ip/Internal/Core/assets/js/bootstrap-colorpicker/css/bootstrap-colorpicker.css');
     }
 }
コード例 #26
0
ファイル: AdminController.php プロジェクト: Umz/ImpressPages
 public function index()
 {
     $administrators = Model::getAll();
     ipAddJs('Ip/Internal/Core/assets/js/angular.js');
     ipAddJs('Ip/Internal/Administrators/assets/administratorsController.js');
     foreach ($administrators as &$administrator) {
         unset($administrator['hash']);
         unset($administrator['resetSecret']);
         unset($administrator['resetTime']);
         $administrator['permissions'] = \Ip\Internal\AdminPermissionsModel::getUserPermissions($administrator['id']);
     }
     ipAddJsVariable('ipAdministrators', $administrators);
     ipAddJsVariable('ipAdministratorsAdminId', (int) ipAdminId());
     ipaddJsVariable('ipAvailablePermissions', \Ip\Internal\AdminPermissionsModel::availablePermissions());
     ipaddJsVariable('ipAdministratorId', ipAdminId());
     ipaddJsVariable('ipAdministratorsSuperAdminWarning', __('You will not be able to set other permissions for yourself!', 'Ip-admin', false));
     $data = array('createForm' => Helper::createForm(), 'updateForm' => Helper::updateForm());
     return ipView('view/layout.php', $data)->render();
 }
コード例 #27
0
ファイル: Event.php プロジェクト: Umz/ImpressPages
 public static function ipBeforeController()
 {
     //show admin submenu if needed
     if (ipRoute()->isAdmin()) {
         ipAddJs('Ip/Internal/Core/assets/js/jquery-ui/jquery-ui.js');
         ipAddCss('Ip/Internal/Core/assets/js/jquery-ui/jquery-ui.css');
         $submenu = Submenu::getSubmenuItems();
         $submenu = ipFilter('ipAdminSubmenu', $submenu);
         if ($submenu) {
             ipResponse()->setLayoutVariable('submenu', $submenu);
         }
     }
     // Show admin toolbar if admin is logged in:
     if (ipAdminId() && !ipRequest()->getRequest('pa') || ipRequest()->getRequest('aa') && ipAdminId()) {
         if (!ipRequest()->getQuery('ipDesignPreview') && !ipRequest()->getQuery('disableAdminNavbar')) {
             ipAddJs('Ip/Internal/Admin/assets/admin.js');
             ipAddJsVariable('ipAdminNavbar', static::getAdminNavbarHtml());
         }
     }
     // Show popup with autogenerated user information if needed
     $adminIsAutogenerated = ipStorage()->get('Ip', 'adminIsAutogenerated');
     if ($adminIsAutogenerated) {
         $adminId = \Ip\Internal\Admin\Backend::userId();
         $admin = \Ip\Internal\Administrators\Model::getById($adminId);
         ipAddJs('Ip/Internal/Admin/assets/adminIsAutogenerated.js');
         $data = array('adminUsername' => $admin['username'], 'adminPassword' => ipStorage()->get('Ip', 'adminIsAutogenerated'), 'adminEmail' => $admin['email']);
         ipAddJsVariable('ipAdminIsAutogenerated', ipView('view/adminIsAutoGenerated.php', $data)->render());
     }
     if (ipContent()->getCurrentPage()) {
         // initialize management
         if (ipIsManagementState()) {
             if (!ipRequest()->getQuery('ipDesignPreview') && !ipRequest()->getQuery('disableManagement')) {
                 \Ip\Internal\Content\Helper::initManagement();
             }
         }
         //show page content
         $response = ipResponse();
         $response->setDescription(\Ip\ServiceLocator::content()->getDescription());
         $response->setKeywords(ipContent()->getKeywords());
         $response->setTitle(ipContent()->getTitle());
     }
 }
コード例 #28
0
ファイル: Event.php プロジェクト: Umz/ImpressPages
 private static function includeResources($resourcesFolder)
 {
     if (is_dir(ipFile($resourcesFolder))) {
         $files = scandir(ipFile($resourcesFolder));
         if ($files === false) {
             return;
         }
         foreach ($files as $file) {
             if (is_dir(ipFile($resourcesFolder . $file)) && $file != '.' && $file != '..') {
                 static::includeResources(ipFile($resourcesFolder . $file));
                 continue;
             }
             if (strtolower(substr($file, -3)) == '.js') {
                 ipAddJs($resourcesFolder . $file);
             }
             if (strtolower(substr($file, -4)) == '.css') {
                 ipAddCss($resourcesFolder . $file);
             }
         }
     }
 }
コード例 #29
0
ファイル: SiteController.php プロジェクト: Umz/ImpressPages
 public function subscriptionPaymentSelection($key)
 {
     $data = Model::getPaymentData($key);
     $paymentMethods = Model::collectSubscriptionPaymentMethods($data);
     $paymentMethodName = ipRequest()->getPost('paymentMethod');
     if ($paymentMethodName) {
         //redirect to selected payment page
         foreach ($paymentMethods as $paymentMethod) {
             if ($paymentMethod->name() == $paymentMethodName) {
                 $paymentUrl = $paymentMethod->paymentUrl($data['data']);
                 return new \Ip\Response\Json(array('redirect' => $paymentUrl));
             }
         }
     }
     //display all available payment methods
     ipAddJs('assets/paymentSelection.js');
     ipAddCss('assets/payments.css');
     $response = ipView('view/selectPayment.php', array('paymentMethods' => $paymentMethods));
     $response = ipFilter('ipSubscriptionPaymentSelectPageResponse', $response, array('paymentKey' => $key));
     return $response;
 }
コード例 #30
0
ファイル: Event.php プロジェクト: sspaeti/ImpressPages
 /**
  * This method is launched before loading the controller.
  * Add JS and CSS files here.
  */
 public static function ipBeforeController()
 {
     if (!ipIsManagementState()) {
         $script = "\n\t\t\t\tvar ITEMS_PER_PAGE = \$('#paged').attr('rule');\n\t\t\t\tfunction pageselectCallback(page_index, jq){\n\t\t\t\t\tvar new_content = \$('#hiddenresult div.result').slice(page_index * ITEMS_PER_PAGE, (page_index + 1) * ITEMS_PER_PAGE).clone();\n\t\t\t\t\t\$('#Searchresult').html(new_content);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tfunction initPagination() {\n\t\t\t\t\t// count entries inside the hidden content\n\t\t\t\t\tvar num_entries = jQuery('#hiddenresult div.result').length;\n\t\t\t\t\t// Create content inside pagination element\n\t\t\t\t\t\$('#Pagination').pagination(num_entries, {\n\t\t\t\t\t\tcallback: pageselectCallback,\n\t\t\t\t\t\titems_per_page:ITEMS_PER_PAGE, // Show only one item per page\n\t\t\t\t\t\tnext_text:'»',\n\t\t\t\t\t\tprev_text:'«'\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t";
         $script2 = "\n\t\t\t\t\$(document).ready(function(){   \n\t\t\t\t\tconsole.log('Public Ready called - Comment Plugin.');\n\t\t\t\t\tinitPagination();\n\t\t\t\t\n\t\t\t\t});\t\n\t\t\t";
         $script3 = "\n\t\t\t\t\$(function(){   \n\t\t\t\t\tconsole.log('Ready Other version Comment...');\n\t\t\t\t\tinitPagination();\n\t\t\t\t\n\t\t\t\t});\t\n\t\t\t";
         ipAddJsContent('commentsReady', $script2, 10);
         ipAddJs('assets/script.js');
         ipAddJs('assets/pagination.js');
         ipAddJsContent('commentsPrepare', $script);
         ipAddCss('assets/comments.css');
         ipAddCss('assets/pagination.css');
         ipAddCss('assets/page.css');
     } else {
         ipAddJs('assets/script.js');
         ipAddJs('assets/pagination.js');
         ipAddJs('assets/callpage.js');
         ipAddCss('assets/comments.css');
         ipAddCss('assets/pagination.css');
         ipAddCss('assets/page.css');
     }
 }