本文整理汇总了PHP中ipAddJs函数的典型用法代码示例。如果您正苦于以下问题:PHP ipAddJs函数的具体用法?PHP ipAddJs怎么用?PHP ipAddJs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ipAddJs函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ipBeforeController
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: index
public function index()
{
ipAddJs('assets/email.js');
ipAddCss('assets/email.css');
$previewModal = ipView('view/previewModal.php');
return parent::index() . $previewModal;
}
示例3: index
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: initConfig
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);
}
示例5: ipBeforeController
public static function ipBeforeController()
{
if (ipAdminId()) {
ipAddJs('assets/floatImage.js');
}
ipAddCss('assets/floatImage.css');
}
示例6: ipBeforeController
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');
}
}
示例7: ipBeforeController
public static function ipBeforeController()
{
if (ipAdminId()) {
ipAddJs('assets/FontAwesomeField.js');
ipAddCss('assets/FontAwesomeField.css');
}
ipAddCss('Plugin/FontAwesomeIcons/assets/css/font-awesome.min.css');
}
示例8: index
/**
* @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();
}
示例9: index
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;
}
示例10: index
/**
* 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();
}
示例11: initManagement
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());
}
示例12: init
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');
}
示例13: includeResources
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);
}
}
}
}
示例14: subscriptionPaymentSelection
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;
}