/**
  * Method to do additional instant update according config change
  *
  * @param	string	Name of changed config parameter
  * @param	mixed	Recent config parameter value
  * @return	void
  */
 protected function instantUpdate($name, $value)
 {
     $input = JFactory::getApplication()->input;
     if ($name == 'disable_all_messages') {
         // Get name of messages table
         $table = '#__jsn_' . substr(JRequest::getCmd('option'), 4) . '_messages';
         // Enable/disable all messages
         $db = JFactory::getDbo();
         $db->setQuery("UPDATE `{$table}` SET published = " . (1 - $value) . " WHERE 1");
         $db->query();
     } elseif ($name == 'languagemanager') {
         // Get variable
         $lang = $input->getVar('languagemanager', array(), 'default', 'array');
         // Install backend languages
         if (isset($lang['a'])) {
             JSNFactory::import('components.com_poweradmin.helpers.language');
             JSNLanguageHelper::installSupportedExtLangs($lang['a']);
             JSNUtilsLanguage::install($lang['a']);
         }
         // Install frontend languages
         if (isset($lang['s'])) {
             JSNUtilsLanguage::install($lang['s'], true);
         }
     } else {
         return parent::instantUpdate($name, $value);
     }
     return true;
 }
Beispiel #2
0
 /**
  * Method to get the field input markup.
  *
  * @return  string  The field input markup.
  *
  * @since   11.1
  */
 protected function getInput()
 {
     $columnTableFormData = JSNUniformHelper::getFormData();
     $arrayTranslated = array();
     $html = "<div class=\"jsn-master\"><div id=\"page-loading\" class=\"jsn-bgloading\"><i class=\"jsn-icon32 jsn-icon-loading\"></i></div><div class=\"jsn-bootstrap menu-items\"><input type='hidden' id='uniform_field' name='" . $this->name . "' value='" . $this->value . "' /><ul class=\"jsn-items-list ui-sortable hide\" id=\"form_field\">";
     $html .= "</ul></div></div>";
     JSNHtmlAsset::loadScript('uniform/menusubmissions', array('value' => $this->value, 'name' => 'uniform_listField', 'columnTableFormData' => $columnTableFormData, 'language' => JSNUtilsLanguage::getTranslated($arrayTranslated)));
     return $html;
 }
Beispiel #3
0
 /**
  * Method to render HTML markup for a form as declared in an JForm object.
  *
  * @param   object  $form       JForm object.
  * @param   string  $nameSpace  Prefix field name with the given name-space, e.g. jform[params]
  *
  * @return  string  Generated HTML markup.
  */
 public static function render($form, $nameSpace = '')
 {
     $html = array();
     // Get fieldsets
     foreach ($form->getFieldsets() as $fieldset) {
         if (isset($fieldset->skipRender) and (int) $fieldset->skipRender) {
             continue;
         }
         // Get fieldset attributes
         $tag = isset($fieldset->markupTag) ? strtolower($fieldset->markupTag) : 'fieldset';
         $label = $tag == 'fieldset' ? 'legend' : 'h4';
         $class = isset($fieldset->class) ? ' class="' . $fieldset->class . '"' : '';
         // Generate open tag
         $html[] = "<{$tag}{$class}>";
         // Generate form legend if declared
         if ($fieldset->label) {
             $html[] = "\t<{$label}" . ($label == 'h4' ? ' class="jsn-section-header"' : '') . '>' . JText::_($fieldset->label) . "</{$label}>";
         }
         foreach ($form->getFieldset($fieldset->name) as $field) {
             // Generate field container ID
             $id = ' id="' . $field->id . '-container' . '"';
             if ($field->label) {
                 // Initialize field label markup
                 if (strpos($field->label, 'class=') === false) {
                     $label = str_replace('<label', '<label class="control-label"', $field->label);
                 } else {
                     $label = strpos($field->label, 'control-label') === false ? preg_replace('/<label(\\s+[^>]*)class="([^"]*)"([^>]*)>/', '<label\\1class="control-label \\2"\\3>', $field->label) : $field->label;
                 }
                 // Initialize field label tooltips
                 if (strpos($label, ' hasTip')) {
                     $label = preg_replace(array('/ hasTip/', '/title="[^:]*::/'), array('', 'original-title="'), $label);
                 }
                 // Generate markup for input field with field label
                 $html[] = "\t" . '<div' . $id . ' class="control-group">' . $label . '<div class="controls">' . $field->input . '</div></div>';
             } else {
                 // Generate markup for input field without field label
                 $html[] = "\t" . "<div{$id}>{$field->input}</div>";
             }
         }
         // Generate close tag
         $html[] = "</{$tag}>";
     }
     // Finalize form markup
     $html = implode("\n", $html);
     // Set name-space prefix
     if (!empty($nameSpace)) {
         $html = str_replace('name="jform[', 'name="' . $nameSpace . '[', $html);
     }
     // Setup tooltips
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-tipsy/tipsy.css');
     JSNHtmlAsset::loadScript('jsn/tooltips');
     // Setup form validation
     JSNHtmlAsset::loadScript('jsn/validate', array('id' => 'jsn-config-form', 'lang' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_INVALID_VALUE_TYPE', 'JSN_EXTFW_ERROR_FORM_VALIDATION_FAILED', 'JSN_EXTFW_SYSTEM_CUSTOM_ASSETS_INVALID'))));
     return $html;
 }
Beispiel #4
0
 /**
  * Add nesscessary JS & CSS files
  *
  * @return void
  */
 private function _addAssets()
 {
     $objJSNMedia = JSNISFactory::getObj('classes.jsn_is_media');
     JSNHtmlAsset::addScript(JURI::root(true) . '/media/jui/js/jquery.min.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/conflict.js');
     JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ck/jquery.ck.js');
     JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-jwysiwyg/jquery.wysiwyg.js');
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-jwysiwyg/jquery.wysiwyg.css');
     JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ui/js/jquery-ui-1.9.0.custom.min.js');
     !class_exists('JSNBaseHelper') or JSNBaseHelper::loadAssets();
     $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/imageshow.css');
     $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/image_selector.css');
     JSNHtmlAsset::loadScript('imageshow/joomlashine/showlist', array('pathRoot' => JURI::root(), 'language' => JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_OK', 'JSN_IMAGESHOW_CLOSE'))));
 }
Beispiel #5
0
 /**
  * Display method.
  *
  * @param   string  $tpl  The name of the template file to parse.
  *
  * @return	void
  */
 public function display($tpl = null)
 {
     // Get config declaration
     $configDeclaration = $this->get('Form');
     // Pass data to view
     $this->assignRef('config', $configDeclaration);
     // Load assets
     JSNBaseHelper::loadAssets();
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-tipsy/tipsy.css');
     JSNHtmlAsset::loadScript('jsn/core', array('lang' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_GENERAL_LOADING', 'JSN_EXTFW_GENERAL_CLOSE'))));
     JSNHtmlAsset::loadScript('jsn/config');
     // Display the template
     parent::display($tpl);
 }
Beispiel #6
0
 /**
  * Fetches the button HTML code.
  *
  * @param   string   $type       Unused string.
  * @param   string   $ref        The name of the help screen (its key reference).
  * @param   boolean  $com        Use the help file in the component directory.
  * @param   string   $override   Use this URL instead of any other.
  * @param   string   $component  Name of component to get Help (null for current component)
  *
  * @return  string
  *
  * @since   2.5
  */
 public function fetchButton($type = 'JSNHelpButton', $name = '', $text = '', $url = '', $width = 640, $height = 480, $top = 0, $left = 0, $onClose = '')
 {
     //JHTML::_('behavior.modal', 'a.jsn-is-helper-modal');
     JSNHtmlAsset::loadScript('imageshow/joomlashine/help', array('pathRoot' => JURI::root(), 'language' => JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_OK', 'JSN_IMAGESHOW_CLOSE', 'JSN_IMAGESHOW_SAVE', 'JSN_IMAGESHOW_CANCEL'))));
     $text = JText::_('JTOOLBAR_HELP');
     $class = $this->fetchIconClass('help');
     $doTask = $this->_getCommand($name, $url, $width, $height, $top, $left);
     //$html = "<a href=\"#\" rel='{\"size\": {\"x\": 500, \"y\": 350}}' class=\"toolbar jsn-is-modal\">\n";
     $html = "<a class=\"jsn-is-helper-modal\" href=\"javascript: void(0);\">\n";
     $html .= "<span class=\"{$class}\">\n";
     $html .= "</span>\n";
     $html .= "{$text}\n";
     $html .= "</a>\n";
     return $html;
 }
Beispiel #7
0
 /**
  * Add the libraries css and javascript
  *
  * @return void
  */
 private function _addAssets()
 {
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-tipsy/tipsy.css');
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-jwysiwyg/jquery.wysiwyg-0.9.css');
     $formAction = $this->_config->get('form_action');
     $this->_document->addScriptDeclaration(" var currentAction = {$formAction}; ");
     $arrayTranslated = array('JSN_UNIFORM_BUTTON_SAVE', 'JSN_UNIFORM_BUTTON_CANCEL', 'JSN_UNIFORM_EMAIL_SUBMITTER_TITLE', 'JSN_UNIFORM_EMAIL_ADDRESS_TITLE', 'JSN_UNIFORM_YOU_CAN_NOT_HIDE_THE_COPYLINK', 'JSN_UNIFORM_UPGRADE_EDITION_TITLE', 'JSN_UNIFORM_UPGRADE_EDITION', 'JSN_UNIFORM_SELECT_THE_ACTION_TO_TAKE_AFTER', 'JSN_UNIFORM_SET_THE_FOLDER_TO_STORE', 'JSN_SAMPLE_DISABLE_SHOW_COPYRIGHT_DES');
     JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map', array('jquery', 'jquery.ui'));
     JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map.services', array('jquery', 'jquery.ui', 'uniform/libs/googlemaps/jquery.ui.map'));
     JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map.extensions', array('jquery', 'jquery.ui', 'uniform/libs/googlemaps/jquery.ui.map'));
     JSNHtmlAsset::addScript('http://maps.google.com/maps/api/js?sensor=false&libraries=places');
     $edition = defined('JSN_UNIFORM_EDITION') ? strtolower(JSN_UNIFORM_EDITION) : "free";
     echo JSNHtmlAsset::loadScript('jsn/core', array('lang' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_GENERAL_LOADING', 'JSN_EXTFW_GENERAL_CLOSE'))), true);
     echo JSNHtmlAsset::loadScript('jsn/config', array('language' => array('JSN_EXTFW_GENERAL_CLOSE' => JText::_('JSN_EXTFW_GENERAL_CLOSE'))), true);
     echo JSNHtmlAsset::loadScript('uniform/configuration', array('language' => JSNUtilsLanguage::getTranslated($arrayTranslated), 'edition' => $edition), true);
 }
 /**
  * Add the libraries css and javascript
  *
  * @return void
  * 
  * @since	1.6
  */
 private function _addAssets()
 {
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-ui/css/ui-bootstrap/jquery-ui-1.9.0.custom.css');
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/bootstrap/css/bootstrap.min.css');
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/joomlashine/css/jsn-gui.css');
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/joomlashine/css/jsn-view-launchpad.css');
     JSNHtmlAsset::addStyle(JURI::base(true) . '/components/com_uniform/assets/css/uniform.css');
     if (preg_match('/msie/i', $_SERVER['HTTP_USER_AGENT'])) {
         JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-ui/css/ui-bootstrap/jquery-ui-1.8.16.ie.css');
     }
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-ui/css/ui-bootstrap/jquery-ui-1.9.0.custom.css');
     $arrayTranslated = array('JSN_UNIFORM_UPGRADE_EDITION_TITLE', 'JSN_UNIFORM_LAUNCHPAD_PLUGIN_SYNTAX', 'JSN_UNIFORM_YOU_MUST_SELECT_SOME_FORM', 'JSN_UNIFORM_EDIT_SELECTED_FORM', 'JSN_UNIFORM_LAUNCHPAD_PLUGIN_SYNTAX_DES', 'JSN_UNIFORM_YOU_HAVE_REACHED_THE_LIMITATION_OF_3_FORM_IN_FREE_EDITION', 'JSN_UNIFORM_UPGRADE_EDITION');
     $edition = defined('JSN_UNIFORM_EDITION') ? JSN_UNIFORM_EDITION : "free";
     JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery/jquery-1.8.2.js');
     JSNHtmlAsset::addScriptLibrary('jquery.ui', '3rd-party/jquery-ui/js/jquery-ui-1.9.0.custom.min', array('jquery'));
     echo JSNHtmlAsset::loadScript('uniform/launchpad', array('baseZeroClipBoard' => JSN_URL_ASSETS . '/3rd-party/jquery-zeroclipboard/ZeroClipboard.swf', 'edition' => $edition, 'language' => JSNUtilsLanguage::getTranslated($arrayTranslated)), true);
 }
Beispiel #9
0
 /**
  * Load extra assets.
  *
  * @return void
  */
 private function _addAssets()
 {
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-tipsy/tipsy.css');
     $templateReplyTo = isset($this->_item->template_reply_to) ? $this->_item->template_reply_to : '';
     $this->_document->addScriptDeclaration(" var templateRelyTo = '{$templateReplyTo}'");
     $viewLayout = JFactory::getApplication()->input->getWord('layout', 'default');
     $session = JFactory::getSession();
     $seesionQueue = $session->get('application.queue');
     JSNHtmlAsset::registerDepends('uniform/libs/jquery.placeholder', array('jquery'));
     JSNHtmlAsset::addScript(JSN_UNIFORM_ASSETS_URI . '/js/jsn.jquery.noconflict.js');
     $language = array('JSN_UNIFORM_NO_FIELD_DES', 'JSN_UNIFORM_NO_FIELD', 'JSN_UNIFORM_NO_EMAIL_DES', 'JSN_UNIFORM_SELECTED', 'JSN_UNIFORM_NO_EMAIL', 'JSN_UNIFORM_SELECT_FIELD', 'JSN_UNIFORM_SELECT_FIELDS', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_FROM_0', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_REPLY_TO_0', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_SUBJECT_0', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_FROM_1', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_REPLY_TO_1', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_SUBJECT_1');
     if ($viewLayout == "default") {
         echo JSNHtmlAsset::loadScript('uniform/emailsettings', array('language' => JSNUtilsLanguage::getTranslated($language), 'editor' => JFactory::getConfig()->get('editor')), true);
     } else {
         echo JSNHtmlAsset::loadScript('uniform/configemailsettings', array('language' => JSNUtilsLanguage::getTranslated($language)), true);
     }
     if (!empty($seesionQueue[0]['message'])) {
         $this->_document->addScriptDeclaration(' window.parent.jQuery.closeModalBox(); ');
     }
 }
Beispiel #10
0
    /**
     * Get the messages list markup.
     *
     * @return  string
     */
    protected function getInput()
    {
        $token = JFactory::getSession()->getFormToken();
        // Preset output
        $model = JModelLegacy::getInstance('plugins', 'imageshowmodel');
        $items = $model->getData();
        $html[] = '<table class="table table-bordered">';
        $html[] = '<thead>
				<tr>
					<th width="20" nowrap="nowrap" class="center">#</th>
					<th class="title" nowrap="nowrap">' . JText::_('MAINTENANCE_THEME_THEME_NAME') . '</th>
					<th width="80" nowrap="nowrap" class="center">' . JText::_('MAINTENANCE_THEME_THEME_VERSION') . '</th>
					<th width="80" nowrap="nowrap" class="center">' . JText::_('MAINTENANCE_THEME_ACTIONS') . '</th>
				</tr>
			</thead><tbody>';
        if (count($items)) {
            for ($i = 0, $count = count($items); $i < $count; $i++) {
                $row = $items[$i];
                $html[] = '<tr>';
                $html[] = '<td class="center">' . ($i + 1) . '</td>';
                $html[] = '<td>' . $row->name . '</td>';
                $html[] = '<td class="center">' . $row->version . '</td>';
                $html[] = '<td class="actionprofile center">';
                if (JFile::exists(JPATH_PLUGINS . DS . 'jsnimageshow' . DS . $row->element . DS . 'views' . DS . 'maintenance' . DS . 'tmpl' . DS . 'default_theme_parameters.php')) {
                    $html[] = '<a rel=\'{"size": {"x": 400, "y": 500}}\' href="index.php?option=com_imageshow&controller=maintenance&type=themeparameters&theme_name=' . $row->element . '&tmpl=component" class="jsn-icon16 jsn-icon-pencil jsn-is-form-modal" name="' . JText::_('MAINTENANCE_THEME_PARAMETER_SETTINGS') . '" title="' . JText::_('MAINTENANCE_THEME_EDIT_SETTINGS') . '"></a>&nbsp;';
                }
                if ($count) {
                    $html[] = '<a href="javascript: void(0);" rel=\'' . json_encode(array('theme_id' => $row->extension_id, 'theme_name' => $row->element, 'token' => $token)) . '\' class="jsn-icon16 jsn-icon-trash jsn-is-delete-theme"> </a>';
                } else {
                    $html[] = '<a class="jsn-icon16 jsn-icon-trash disabled" title="' . JText::_('MAINTENANCE_THEME_YOU_CAN_NOT_DELETE_THE_ONLY_THEME_IN_THE_LIST') . '"> </a>';
                }
                $html[] = '</td>';
                $html[] = '</tr>';
            }
        }
        $html[] = '</tbody></table>';
        $html[] = JSNHtmlAsset::loadScript('imageshow/joomlashine/maintenance', array('pathRoot' => JURI::root(), 'language' => JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_SAVE', 'JSN_IMAGESHOW_CLOSE', 'JSN_IMAGESHOW_CONFIRM'))), true);
        return implode($html);
    }
    public static function about($products = array())
    {
        // Get extension manifest cache
        $info = JSNUtilsXml::loadManifestCache();
        // Add assets
        JSNHtmlAsset::loadScript('jsn/about', array('language' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_ABOUT_SEE_OTHERS_MODAL_TITLE', 'JSN_EXTFW_GENERAL_CLOSE'))));
        // Generate markup
        $html[] = '
<div id="jsn-about" class="jsn-page-about">
<div class="jsn-bootstrap">';
        $html[] = self::aboutInfo($info, $products);
        $html[] = '
	<div class="jsn-product-support">';
        $html[] = self::aboutHelp();
        $html[] = self::aboutFeedback();
        $html[] = '
	</div>
</div>
</div>
<div class="clr"></div>';
        echo implode($html);
    }
Beispiel #12
0
 /**
  * Method to get the field input markup for a media selector.
  *
  * @return  string  The field input markup.
  */
 protected function getInput()
 {
     // Preset output
     $html = array();
     // Initialize variables
     $editable = isset($this->element['editable']) ? (string) $this->element['editable'] : '';
     $clearButton = isset($this->element['clearButton']) ? (string) $this->element['clearButton'] : '';
     $mediaRoot = isset($this->element['directory']) ? (string) $this->element['directory'] : '';
     $selectorLink = JURI::root() . 'plugins/system/jsnframework/libraries/joomlashine/choosers/media/index.php' . '?component=' . JFactory::getApplication()->input->getCmd('option') . '&root=' . trim($mediaRoot, '/') . '&current=' . $this->value . '&element=' . $this->id . '&handler=JSNMediaUpdateField';
     // Load script to handle selection update
     $html[] = JSNHtmlAsset::loadScript('jsn/media', array('url' => $selectorLink, 'field' => "#{$this->id}", 'language' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_CONFIG_CLICK_TO_SELECT'))), true);
     // Initialize attributes
     $class = ' class="' . (isset($this->element['class']) ? (string) $this->element['class'] : 'jsn-input-large-fluid') . '"';
     $disabled = $editable ? '' : ' disabled="disabled"';
     // Generate clear button
     $clear = '';
     if ($clearButton) {
         $clear = '<button class="btn inline" type="button">' . JText::_('JSN_EXTFW_GENERAL_CLEAR') . '</button>';
     }
     // Generate markup
     $html[] = '<div class="input-append row-fluid">' . '<input type="text" id="' . $this->id . '" name="' . $this->name . '" value="' . $this->value . '"' . $class . $disabled . ' />' . '<button class="btn" type="button">...</button>' . $clear . '</div>';
     return implode($html);
 }
Beispiel #13
0
 /**
  * Add nesscessary JS & CSS files
  *
  * @return void
  */
 private function _addAssets()
 {
     JHTML::_('behavior.modal', 'a.modal');
     JHTML::_('behavior.tooltip');
     $JVersion = new JVersion();
     $JVersion = $JVersion->getShortVersion();
     if (version_compare($JVersion, '3.3', '>=')) {
         $document = JFactory::getDocument();
         $js = "(function(\$) {\n\t\t\t\$(window).load(function ()\n\t\t\t{\n\t\t\t\tSqueezeBox.initialize({});\n\t\t\t\tSqueezeBox.assign(\$('a.jsn-modal').get(), {\n\t\t\t\t\tparse: 'rel'\n\t\t\t\t});\n\t\t\t});\n\t\t\t})((typeof JoomlaShine != 'undefined' && typeof JoomlaShine.jQuery != 'undefined') ? JoomlaShine.jQuery : jQuery);";
         $document->addScriptDeclaration($js);
     } else {
         JHTML::_('behavior.modal', 'a.jsn-modal');
     }
     $objJSNMedia = JSNISFactory::getObj('classes.jsn_is_media');
     !class_exists('JSNBaseHelper') or JSNBaseHelper::loadAssets();
     $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/imageshow.css');
     $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/view.showcase.css');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/imageshow.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/installshowcasethemes.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/installdefault.js');
     JSNHtmlAsset::addScript(JURI::root(true) . '/media/jui/js/jquery.min.js');
     $objJSNMedia->addScript(JUri::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/conflict.js');
     JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ui/js/jquery-ui-1.9.0.custom.min.js');
     JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ck/jquery.ck.js');
     JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-stickyfloat/stickyFloat.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/jquery.imageshow.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/slider.js');
     //$objJSNMedia->addStyleSheet();
     $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/jquery/colorpicker/css/colorpicker.css');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/jquery/colorpicker/js/colorpicker.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/jsn.jquery.noconflict.js');
     JSNHtmlAsset::loadScript('imageshow/joomlashine/showlist', array('pathRoot' => JURI::root(), 'language' => JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_OK', 'JSN_IMAGESHOW_CLOSE', 'JSN_IMAGESHOW_SAVE', 'JSN_IMAGESHOW_CANCEL'))));
 }
/**
 * @version    $Id: default_profile_picasa.php 16082 2012-09-17 03:13:08Z giangnd $
 * @package    JSN.ImageShow
 * @author     JoomlaShine Team <*****@*****.**>
 * @copyright  Copyright (C) 2012 JoomlaShine.com. All Rights Reserved.
 * @license    GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
 *
 * Websites: http://www.joomlashine.com
 * Technical Support:  Feedback - http://www.joomlashine.com/contact-us/get-support.html
 *
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$externalSourceID = JRequest::getInt('external_source_id');
$objJSNPicasaSelect = JSNISFactory::getObj('sourcepicasa.classes.jsn_is_picasaselect', null, null, 'jsnplugin');
$params = JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_SAVE', 'JSN_IMAGESHOW_CLOSE', 'JSN_IMAGESHOW_CONFIRM'));
?>
<script type="text/javascript">
var objISMaintenance = null;
require(['imageshow/joomlashine/maintenance'], function (JSNISMaintenance) {
	objISMaintenance = new JSNISMaintenance({
		language: <?php 
echo json_encode($params);
?>
	});
});

require(['jquery'], function ($) {
	$(function () {
		function onSubmit(ciframe, imageSourceLink)
		{
Beispiel #15
0
 /**
  * Add the libraries css and javascript
  *
  * @return void
  *
  * @since    1.6
  */
 protected function addAssets()
 {
     // Initialize variables
     $config = JSNConfigHelper::get();
     $jUri = JURI::getInstance();
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-colorpicker/css/colorpicker.css');
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-gradientpicker/jquery.gradientPicker.css');
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/joomlashine/css/jsn-advanced-parameters.css');
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-select2/select2.css');
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/codemirror/lib/codemirror.css');
     $device = "mobilize";
     $links = ($links = $jUri->getScheme()) . (empty($links) ? '' : '://');
     if (substr($config->get("link_{$device}"), 0, 1) == '/') {
         $links .= $jUri->getHost() . $config->get("link_{$device}");
     } else {
         $links .= $config->get("link_{$device}") . JURI::root(true);
     }
     // Setup text translation
     $arrayTranslated = array('JSN_MOBILIZE_SWITCHER_TITLE', 'JSN_MOBILIZE_YOU_CAN_NOT_HIDE_THE_COPYLINK', 'JSN_MOBILIZE_SWITCHER_SETTINGS', 'JSN_MOBILIZE_CANCEL', 'JSN_MOBILIZE_SAVE', 'JSN_MOBILIZE_ALIGNMENT', 'JSN_MOBILIZE_SELECT_THEME', 'JSN_MOBILIZE_SELECT', 'JSN_MOBILIZE_CLEAR', 'JSN_MOBILIZE_IMAGE_ALT', 'JSN_MOBILIZE_IMAGE_URL', 'JSN_MOBILIZE_ENABLE_MOBILIZE_MENU_LINK', 'JSN_MOBILIZE_ENABLE_MOBILIZE_SEARCH_LINK', 'JSN_MOBILIZE_ENABLE_MOBILIZE_LOGIN_LINK', 'JSN_MOBILIZE_CHANGE', 'JSN_MOBILIZE_CLICK_SELECT', 'JSN_MOBILIZE_TITLE_SMARTPHONE', 'JSN_MOBILIZE_TITLE_TABLET', 'JSN_MOBILIZE_TYPE_POSITION', 'JSN_MOBILIZE_TYPE_MODULE', 'JSN_MOBILIZE_SELECT_MENU', 'JSN_MOBILIZE_SELECT_MODULE', 'JSN_MOBILIZE_SELECTED_MODULE', 'JSN_MOBILIZE_CLOSE', 'JSN_MOBILIZE_SELECT_LOGO', 'JSN_MOBILIZE_SELECT_STYLE', 'JSN_MOBILIZE_SELECT_POSITION', 'JSN_MOBILIZE_SELECT_MODULE', 'JSN_MOBILIZE_ENABLE_MOBILIZE_SWITCHER_LINK', 'JSN_MOBILIZE_ADD_ELEMENT', 'JSN_MOBILIZE_ADD_MODULE', 'JSN_MOBILIZE_ADD_POSITION', 'JSN_MOBILIZE_IMAGE_FILE', 'JSN_MOBILIZE_YES', 'JSN_MOBILIZE_NO', 'JSN_MOBILIZE_CONFIRM_LOAD_STYLE', 'JSN_MOBILIZE_SWITCH_TO_WEB_UI_FOR_MOBILIZE', 'JSN_MOBILIZE_STYLE_SETTINGS_IS_AVAILABLE_ONLY_IN_PRO_EDITION', 'JSN_MOBILIZE_UPGRADE_NOW', 'JSN_MOBILIZE_LINK_SOCIAL', 'JSN_MOBILIZE_DELETE', 'JSN_MOBILIZE_BROWSER', 'JSN_MOBILIZE_UPLOAD', 'JSN_MOBILIZE_UPGRADE_EDITION_TITLE', 'JSN_MOBILIZE_UPGRADE_EDITION', 'JSN_MOBILIZE_ADD_ELEMENT_IS_AVAILABLE_ONLY_IN_PRO_EDITION');
     // Initialize Javascript
     $edition = defined('JSN_MOBILIZE_EDITION') ? JSN_MOBILIZE_EDITION : "free";
     echo JSNHtmlAsset::loadScript('mobilize/profile', array('editions' => $edition, 'pathRoot' => JURI::root(), 'defaultTemplate' => $this->_defaultTempateSite, 'language' => JSNUtilsLanguage::getTranslated($arrayTranslated), 'listMenu' => $this->_menuType, 'listModule' => $this->_Modules, 'mobilizeLink' => $links, 'configuration' => isset($this->_items['configuration']) ? $this->_items['configuration'] : ''), true);
     JSNMobilizeHelper::loadAssets();
 }
Beispiel #16
0
 /**
  * Additional instant update according to configuration change.
  *
  * @param   string  $name   Name of changed config parameter.
  * @param   mixed   $value  Recent config parameter value.
  *
  * @return  void
  */
 protected function instantUpdate($name, $value)
 {
     // Get input object
     $input = JFactory::getApplication()->input;
     // Update message publishing state
     if ($name == 'messagelist') {
         // Get variables
         $before = $input->getVar('messagelist', array(), 'default', 'array');
         $after = $input->getVar('messages', array(), 'default', 'array');
         // Update message configuration
         JSNUtilsMessage::saveConfig($before, $after);
     } elseif ($name == 'languagemanager') {
         // Get variable
         $lang = $input->getVar('languagemanager', array(), 'default', 'array');
         // Install backend languages
         if (isset($lang['a'])) {
             JSNUtilsLanguage::install($lang['a']);
         }
         // Install frontend languages
         if (isset($lang['s'])) {
             JSNUtilsLanguage::install($lang['s'], true);
         }
     } elseif ($name == 'permissions' and count($value = $input->getVar('permissions'))) {
         // Prepare permission value for saving
         foreach ($value as $action => $groups) {
             foreach ($groups as $group => $permission) {
                 if (!in_array($value[$action][$group], array('0', '1'))) {
                     unset($value[$action][$group]);
                 }
             }
         }
         // Initialize variables
         $component = $input->getCmd('option');
         $rules = new JAccessRules($value);
         $asset = JTable::getInstance('asset');
         if (!$asset->loadByName($component)) {
             $root = JTable::getInstance('asset');
             $root->loadByName('root.1');
             $asset->name = $component;
             $asset->title = $component;
             $asset->setLocation($root->id, 'last-child');
         }
         $asset->rules = (string) $rules;
         try {
             $asset->check();
             $asset->store();
         } catch (Exception $e) {
             throw $e;
         }
     }
 }
Beispiel #17
0
 /**
  * Add nesscessary JS & CSS files
  *
  * @return void
  */
 private function _addAssets()
 {
     JHTML::_('behavior.tooltip');
     $objJSNMedia = JSNISFactory::getObj('classes.jsn_is_media');
     !class_exists('JSNBaseHelper') or JSNBaseHelper::loadAssets();
     $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/imageshow.css');
     $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/showlist.css');
     $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/image_selector.css');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/imageshow.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/installimagesources.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/installdefault.js');
     JSNHtmlAsset::addScript(JURI::root(true) . '/media/jui/js/jquery.min.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/conflict.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/jquery/jquery.contextmenu.r2.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/jquery/jquery.overridden.layout-latest.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/window.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/jquery.imageshow.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/slider.js');
     JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ck/jquery.ck.js');
     JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-topzindex/jquery.topzindex.js');
     JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ui/js/jquery-ui-1.9.0.custom.min.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/lang.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/imagegrid.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/tree.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/jsn.jquery.noconflict.js');
     JSNHtmlAsset::loadScript('imageshow/joomlashine/showlist', array('pathRoot' => JURI::root(), 'language' => JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_OK', 'JSN_IMAGESHOW_CLOSE', 'JSN_IMAGESHOW_SAVE', 'JSN_IMAGESHOW_CANCEL'))));
 }
Beispiel #18
0
    /**
     * Get the markup for data restore form.
     *
     * @return  string
     */
    protected function getInput()
    {
        // Get session
        $session = JFactory::getSession();
        $restoreResult = $session->get('JSNISRestore');
        // Preset output
        $html = array();
        // Generate data backup form
        $html[] = '<form name="JSNDataRestoreForm" action="' . JRoute::_('index.php') . '" method="POST" enctype="multipart/form-data" onsubmit="return false;">';
        $html[] = '<fieldset>';
        $html[] = '<legend>' . JText::_('JSN_EXTFW_DATA_RESTORE') . '</legend>';
        if (!is_array($restoreResult)) {
            $html[] = '<div class="control-group">
								<label class="control-label">' . JText::_('JSN_EXTFW_DATA_RESTORE_FILE') . ':</label>
								<div class="controls">
									<input name="datarestore" type="file" size="70" class="input-file" />
								</div>
							</div>
						<div class="form-actions">
							<div class="jsn-bootstrap"></div>
							<button class="btn btn-primary" value="' . ($this->element['task'] ? (string) $this->element['task'] : 'data.restore') . '" disabled="disabled" track-change="yes" ajax-request="disabled">' . JText::_('JSN_EXTFW_DATA_RESTORE_BUTTON') . '</button>
						</div>';
        } else {
            $html[] = '<div>';
            $html[] = '<p id="jsn-restore-result">' . JText::_('MAINTENANCE_RESTORE_RESULT_HEADER') . '</p><ul>';
            if (is_array($restoreResult) && !$restoreResult['extractFile']) {
                $html[] = '<li>';
                $html[] = JText::_('MAINTENANCE_RESTORE_EXTRACT_BACKUP_FILE') . '<span class="jsn-icon16 jsn-icon-remove">&nbsp;</span><p id="jsn-restore-extract-failure">' . $restoreResult['message'] . '</p>';
                $html[] = '</li>';
            } else {
                $html[] = '<li>';
                $html[] = JText::_('MAINTENANCE_RESTORE_EXTRACT_BACKUP_FILE') . '<span class="jsn-icon16 jsn-icon-ok">&nbsp;</span>';
                $html[] = '</li>';
                $html[] = '<li id="jsn-restore-data-wrap">';
                $html[] = JText::_('MAINTENANCE_RESTORE_RESTORE_DATA');
                if ($restoreResult['requiredSourcesNeedInstall'] || $restoreResult['requiredThemesNeedInstall']) {
                    $html[] = '<span class="jsn-restore-icon-failure jsn-icon16 jsn-icon-remove">&nbsp;</span>';
                    $html[] = '<div id="jsn-restore-data" class="jsn-restore-icon-process">';
                    $html[] = '<img src="components/com_imageshow/assets/images/icons-16/icon-16-loading-circle.gif"/>';
                    $html[] = '</div>';
                    $html[] = '<div class="jsn-restore-warning">';
                    $html[] = '<div id="jsn-restore-install-required-warning">';
                    $html[] = '<p>' . JText::_('MAINTENANCE_RESTORE_IMAGESOURCES_AND_THEMES_REQUIRED') . '</p>';
                    $html[] = '<ul id="jsn-restore-list-required-install">';
                    foreach ($restoreResult['requiredSourcesNeedInstall'] as $source) {
                        $html[] = '<li>' . $source->name . ' </li>';
                    }
                    foreach ($restoreResult['requiredThemesNeedInstall'] as $theme) {
                        $html[] = '<li>' . $theme->name . ' </li>';
                    }
                    $html[] = '</ul>';
                    if (isset($restoreResult['requiredInstallData']['commercial']) && $restoreResult['requiredInstallData']['commercial']) {
                    } else {
                        $html[] = '<p>';
                        $html[] = '<a class="jsn-link-action" href="javascript: void(0);"
									onclick="JSNISInstallDefault.restoreInstall(' . htmlspecialchars(json_encode($restoreResult['requiredInstallData']), ENT_COMPAT, 'UTF-8') . ');">' . JText::_('MAINTENANCE_RESTORE_INSTALL_ALL_REQUIRED_PLUGINS') . '</a>';
                        $html[] = '</p>';
                    }
                    $html[] = '</div>';
                    $html[] = '<ul class="jsn-restore-install-required">';
                    if (count($restoreResult['requiredSourcesNeedInstall'])) {
                        $html[] = '<li id="jsn-restore-required-sources">';
                        $html[] = JText::_('MAINTENANCE_RESTORE_INSTALL_REQUIRED_IMAGE_SOURCES') . '.';
                        $html[] = '<div class="jsn-restore-icon-process">';
                        $html[] = '<img src="components/com_imageshow/assets/images/icons-16/icon-16-loading-circle.gif"/>';
                        $html[] = '</div>';
                        $html[] = '<span class="jsn-restore-change-text" id="jsn-restore-source-change-text"></span>';
                        $html[] = '<span class="jsn-icon16 jsn-icon-ok">&nbsp;</span>';
                        $html[] = '</li>';
                    }
                    if (count($restoreResult['requiredThemesNeedInstall'])) {
                        $html[] = '<li id="jsn-restore-required-themes">';
                        $html[] = JText::_('MAINTENANCE_RESTORE_INSTALL_REQUIRED_IMAGE_THEMES') . '.';
                        $html[] = '<div class="jsn-restore-icon-process">';
                        $html[] = '<img src="components/com_imageshow/assets/images/icons-16/icon-16-loading-circle.gif"/>';
                        $html[] = '</div>';
                        $html[] = '<span class="jsn-restore-change-text" id="jsn-restore-theme-change-text"></span>';
                        $html[] = '<span class="jsn-icon16 jsn-icon-ok">&nbsp;</span>';
                        $html[] = '</li>';
                    }
                    $html[] = '</div>';
                    $html[] = '</ul>';
                } else {
                    $html[] = '<span class="jsn-icon16 jsn-icon-ok">&nbsp;</span>';
                }
                $html[] = '</li>';
                $html[] = '</ul>';
                $html[] = '<div id="jsn-restore-database-success"' . ($restoreResult['error'] == false ? ' style="display:block;"' : '') . '>';
                $html[] = '<hr />';
                $html[] = '<h3 class="jsn-text-success">' . JText::_('MAINTENANCE_RESTORE_RESTORE_DATABASE_SUCCESS') . '</h3>';
                $html[] = '<p>' . JText::_('MAINTENANCE_RESTORE_OPERATE_ON_DATA') . '</p>';
                $html[] = '</div>';
                $html[] = '<div id="jsn-restore-buttons" class="form-actions' . (!$restoreResult['error'] ? ' jsn-restore-installing-success' : '') . '">';
                $html[] = '<a href="javascript: void(0);" class="btn btn-primary" id="jsn-restore-finish-button" type="button" value="' . JText::_('MAINTENANCE_RESTORE_FINISH') . '" name="button_backup_restore">' . JText::_('MAINTENANCE_RESTORE_FINISH') . '</a>';
                $html[] = '<a href="javascript: void(0);" class="btn btn-primary" id="jsn-restore-button-cancel" type="button" value="' . JText::_('MAINTENANCE_RESTORE_CANCEL') . '" name="button_backup_restore">' . JText::_('MAINTENANCE_RESTORE_CANCEL') . '</a>';
                $html[] = '</div>';
                $html[] = '</div>';
            }
        }
        $html[] = '<input type="hidden" name="' . $this->name . '" value="JSN_CONFIG_SKIP_SAVING" />';
        $html[] = '</fieldset>';
        $html[] = '</form>';
        $html[] = JSNHtmlAsset::loadScript('imageshow/joomlashine/maintenance', array('pathRoot' => JURI::root(), 'language' => JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_SAVE', 'JSN_IMAGESHOW_CLOSE', 'JSN_IMAGESHOW_CONFIRM', 'MAINTENANCE_SOURCE_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_IMAGE_SOURCE_PROFILE'))), true);
        return implode($html);
    }
    /**
     * Get the markup for sample data installation form.
     *
     * @return  string
     */
    protected function getInput()
    {
        // Preset output
        $html = array();
        $objJSNUtil = JSNISFactory::getObj('classes.jsn_is_utils');
        $auto = $objJSNUtil->checkEnvironmentDownload();
        // Get input object
        $input = JFactory::getApplication()->input;
        // Generate data backup form
        $html[] = '<script type="text/javascript">';
        $html[] = 'function setButtonState(form)
		{
			if(form.agree_install_sample.checked)
			{
				form.button_installation_data.disabled = false;
				$(form.button_installation_data).removeClass(\'disabled\');
			}
			else
			{
				form.button_installation_data.disabled = true;
				$(form.button_installation_data).addClass(\'disabled\');
			}
		}';
        $html[] = '</script>';
        if ($auto) {
            $html[] = '<div id="jsn-sample-data">';
            $html[] = '<div class="alert alert-warning" id="jsn-sample-data-text-alert">';
            $html[] = '<p><span class="label label-important">' . JText::_('MAINTENANCE_SAMPLE_DATA_WARNING') . '</span></p>';
            $html[] = JText::_('MAINTENANCE_SAMPLE_DATA_INSTALL_SUGGESTION');
            $html[] = '</div>';
            $html[] = '<div id="jsn-sample-data-install">';
            $html[] = '<form action="index.php" method="post" enctype="multipart/form-data">';
            $html[] = '<div id="jsn-start-installing-sampledata">';
            $html[] = '<div class="control-group">';
            $html[] = '<label for="agree_install_sample_local" class="checkbox">';
            $html[] = '<input onclick="return setButtonState(this.form);" type="checkbox" name="agree_install_sample" id="agree_install_sample_local" value="1" />';
            $html[] = '<strong>' . JText::_('MAINTENANCE_SAMPLE_DATA_AGREE_INSTALL_SAMPLE_DATA') . '</strong>';
            $html[] = '</label>';
            $html[] = '</div>';
            $html[] = '<div class="form-actions">';
            $html[] = '<button class="btn btn-primary disabled agree_install_sample_local" type="button" ajax-request="yes" name="button_installation_data" onclick="JSNISSampleData.installSampleData(); return false;" disabled="disabled">' . JText::_('MAINTENANCE_SAMPLE_DATA_INSTALL_SAMPLE_DATA') . '</button>';
            $html[] = '</div>';
            $html[] = '</div>';
            $html[] = '<div id="jsn-installing-sampledata">';
            $html[] = '<p>' . JText::_('MAINTENANCE_SAMPLE_DATA_AFTER_DOWNLOAD_SUGGESTION') . '</p>';
            $html[] = '<ul>';
            $html[] = '<li id="jsn-download-sample-data-package-title">' . JText::_('MAINTENANCE_SAMPLE_DATA_DOWNLOAD_SAMPLE_DATA_PACKAGE') . '.';
            $html[] = '<span class="jsn-icon16 jsn-icon-loading" id="jsn-downloading-sampledata"></span>';
            $html[] = '<span class="jsn-icon16 jsn-icon-ok" id="jsn-download-sampledata-success"></span>';
            $html[] = '<span class="jsn-icon16 jsn-icon-remove" id="jsn-span-unsuccessful-downloading-sampledata"></span>';
            $html[] = '<br />';
            $html[] = '<p id="jsn-span-unsuccessful-downloading-sampledata-message" class="jsn-text-important"></p>';
            $html[] = '</li>';
            $html[] = '<li id="jsn-install-sample-data-package-title">' . JText::_('MAINTENANCE_SAMPLE_DATA_INSTALL_SAMPLE_DATA') . '.';
            $html[] = '<span class="jsn-icon16 jsn-icon-loading" id="jsn-span-installing-sampledata-state"></span>';
            $html[] = '<span class="jsn-icon16 jsn-icon-ok" id="jsn-span-successful-installing-sampledata"></span>';
            $html[] = '<span class="jsn-icon16 jsn-icon-remove" id="jsn-install-sampledata-unsuccessful"></span>';
            $html[] = '<br />';
            $html[] = '<p id="jsn-span-unsuccessful-installing-sampledata-message" class="jsn-text-important"></p>';
            $html[] = '<div class="jsn-sampledata-warnings-text" id="jsn-sampledata-warnings">';
            $html[] = '<ul id="jsn-sampledata-ul-warnings">';
            $html[] = '</ul>';
            $html[] = '<p id="jsn-sampledata-link-install-all-requried-plugins"><a id="jsn-sampledata-a-link-install-all-requried-plugins" rel="{handler: \'iframe\', size: {x: 450, y: 250}}" onclick="JSNISSampleData.installAllRequiredPlugins(false);" class="jsn-link-action">' . JText::_('MAINTENANCE_SAMPLE_DATA_INSTALL_ALL_REQUIRED_PLUGINS') . '</a></p>';
            $html[] = '</div>';
            $html[] = '</li>';
            $html[] = '</ul>';
            $html[] = '</div>';
            $html[] = '<div id="jsn-installing-sampledata-unsuccessfully">';
            $html[] = '<div class="form-actions">';
            $html[] = '<a class="btn btn-primary" href="javascript: void(0);" onclick="window.top.location=\'index.php?option=com_imageshow&view=maintenance&s=maintenance&g=data\';">' . JText::_('MAINTENANCE_SAMPLE_DATA_CANCEL') . '</a>';
            $html[] = '</div>';
            $html[] = '</div>';
            $html[] = '<div id="jsn-installing-sampledata-successfully">';
            $html[] = '<hr />';
            $html[] = '<h3 class="jsn-text-success">' . JText::_('MAINTENANCE_SAMPLE_DATA_SAMPLE_DATA_IS_SUCCESSFULLY_INSTALLED') . '</h3>';
            $html[] = '<p>' . JText::_('MAINTENANCE_SAMPLE_DATA_CONGRATULATIONS_NOW_YOU_CAN_OPERATE_ON_SAMPLE_SHOWLISTS_AND_SHOWCASES') . '</p>';
            $html[] = '<div class="form-actions">';
            $html[] = '<a class="btn btn-primary agree_install_sample_local" href="javascript: void(0);" onclick="window.top.location=\'index.php?option=com_imageshow\';">' . JText::_('MAINTENANCE_SAMPLE_DATA_FINISH') . '</a>';
            $html[] = '</div>';
            $html[] = '</div>';
            $html[] = '<input type="hidden" name="sample_download_url" id="sample_download_url" value="' . (string) $this->element['download-url'] . '" />';
            $html[] = '</form>';
            $html[] = '</div>';
            $html[] = '</div>';
        } else {
            /// manuall sample data
            $subAction = JRequest::getVar('sub_action');
            $session = JFactory::getSession();
            $uploadIdentifier = md5('upload_sampledata_package');
            $packagenameIdentifier = md5('sampledata_package_name');
            if ($subAction == 'cancelintallation') {
                $session->set($uploadIdentifier, false, 'jsnimageshow');
                $session->set($packagenameIdentifier, '', 'jsnimageshow');
            }
            $sessionValue = $session->get($uploadIdentifier, false, 'jsnimageshow');
            $packageName = $session->get($packagenameIdentifier, '', 'jsnimageshow');
            $html[] = '<div id="jsn-manuall-sample-data">';
            if (!$sessionValue) {
                $html[] = '<div class="alert alert-warning">';
                $html[] = '<p><span class="label label-important">' . JText::_('MAINTENANCE_SAMPLE_DATA_WARNING') . '</span></p>';
                $html[] = JText::_('MAINTENANCE_SAMPLE_DATA_INSTALL_SUGGESTION');
                $html[] = '</div>';
            }
            $html[] = '<div id="jsn-sample-data-install">';
            $html[] = '<form action="index.php?option=com_imageshow&controller=maintenance" method="post" enctype="multipart/form-data">';
            if (!$sessionValue) {
                $html[] = '<div class="jsn-manual-installation">';
                $html[] = '<ul>';
                $html[] = '<li>1. ' . JText::_('MANUAL_DOWNLOAD_INSTALLATION_PACKAGE') . ': <a class="btn" href="' . (string) $this->element['download-url'] . ' "><span>' . JText::_('MANUAL_DOWNLOAD') . '</span></a></li>';
                $html[] = '<li>2. ' . JText::_('MANUAL_SELECT_DOWNLOADED_PACKAGE') . ': <input id="sample_data_input_file" size="40" type="file" name="install_package" /></li>';
                $html[] = '</ul>';
                $html[] = '</div>';
                $html[] = '<div id="jsn-start-installing-sampledata">';
                $html[] = '<p>';
                $html[] = '<label for="agree_install_sample_local" class="checkbox">';
                $html[] = '<input onclick="return setButtonState(this.form);" type="checkbox" name="agree_install_sample" id="agree_install_sample_local" value="1" />';
                $html[] = '<strong>' . JText::_('MAINTENANCE_SAMPLE_DATA_AGREE_INSTALL_SAMPLE_DATA') . '</strong>';
                $html[] = '</label>';
                $html[] = '</p>';
                $html[] = '<div class="form-actions">';
                $html[] = '<button class="btn btn-primary agree_install_sample_local disabled" type="submit" name="button_installation_data" value="maintenance.installsampledatamanually" disabled="disabled">' . JText::_('MAINTENANCE_SAMPLE_DATA_INSTALL_SAMPLE_DATA') . '</button>';
                $html[] = '</div>';
                $html[] = '</div>';
                $html[] = '<input type="hidden" name="method_install_sample_data" value="manually" />';
                $html[] = '</form>';
            } else {
                $html[] = '<script type="text/javascript">
				window.addEvent(\'domready\', function() {
					$(\'jsn-installing-sampledata\').setStyle(\'display\', \'block\');
					$(\'jsn-downloading-sampledata\').setStyle(\'display\', \'none\');
					$(\'jsn-download-sampledata-success\').setStyle(\'display\', \'inline-block\');
					$(\'jsn-install-sample-data-package-title\').setStyle(\'display\', \'list-item\');
					JSNISSampleDataInstallSampleDataName = \'' . trim($packageName) . '\';
					JSNISSampleDataManual.installPackage(\'' . trim($packageName) . '\');
				});
				</script>';
                $html[] = '<div id="jsn-installing-sampledata">';
                $html[] = '<p>' . JText::_('MAINTENANCE_SAMPLE_DATA_AFTER_DOWNLOAD_SUGGESTION') . '</p>';
                $html[] = '<ul>';
                $html[] = '<li id="jsn-download-sample-data-package-title">' . JText::_('MAINTENANCE_SAMPLE_DATA_UPLOAD_SAMPLE_DATA_PACKAGE') . ' .<span class="jsn-icon jsn-icon-loading" id="jsn-downloading-sampledata">&nbsp;</span><span class="jsn-icon16 jsn-icon-ok" id="jsn-download-sampledata-success">&nbsp;</span><span class="jsn-icon jsn-icon-failed" id="jsn-span-unsuccessful-downloading-sampledata" style="display:none;">&nbsp;</span><br />
							<p id="jsn-span-unsuccessful-downloading-sampledata-message"></p></li>';
                $html[] = '<li id="jsn-install-sample-data-package-title">' . JText::_('MAINTENANCE_SAMPLE_DATA_INSTALL_SAMPLE_DATA') . '.<span class="jsn-icon16 jsn-icon-loading" id="jsn-span-installing-sampledata-state">&nbsp;</span><span class="jsn-icon16 jsn-icon-ok" id="jsn-span-successful-installing-sampledata">&nbsp;</span><span class="jsn-icon16 jsn-icon-remove" id="jsn-install-sampledata-unsuccessful">&nbsp;</span><br />
							<p id="jsn-span-unsuccessful-installing-sampledata-message" class="jsn-text-important"></p>
							<div id="jsn-installing-sampledata_install_requried_plugin">
								<form action="index.php?option=com_imageshow&controller=maintenance&type=data" method="post" name="installPluignForm" enctype="multipart/form-data">
									<input id="pluign_file" size="75%" type="file" name="pluign_file" />
									<div class="form-actions">
										<button class="btn btn-primary agree_install_sample_local" type="submit" name="button_installation_data" value="maintenance.installRequiredPlugin">' . JText::_('MAINTENANCE_SAMPLE_DATA_INSTALL_REQUIRED_PLUGIN') . '</button>
										<button class="btn" type="button" name="button_installation_sampledata_unsuccessfully" onclick="window.top.location=\'index.php?option=com_imageshow&view=maintenance&s=maintenance&g=data&sub_action=cancelintallation#data-sample-installation\';">' . JText::_('MAINTENANCE_SAMPLE_DATA_CANCEL') . '</button>
									</div>
									<input type="hidden" name="method_install_sample_data" value="manually" />
									<input type="hidden" name="element_type" id="element_type" value="" />
								</form>
							</div>
						</li>';
                $html[] = '</ul>';
                $html[] = '</div>';
                $html[] = '<div id="jsn-installing-sampledata-unsuccessfully">
								<div class="form-actions">
									<button class="btn btn-primary" type="button" name="button_installation_sampledata_unsuccessfully" onclick="window.top.location=\'index.php?option=com_imageshow&view=maintenance&s=maintenance&g=data&sub_action=cancelintallation#data-sample-installation\';">' . JText::_('MAINTENANCE_SAMPLE_DATA_CANCEL') . '</button>
								</div>
							</div>';
                $html[] = '<div id="jsn-installing-sampledata-successfully">
								<hr>
								<h3 class="jsn-text-success">' . JText::_('MAINTENANCE_SAMPLE_DATA_SAMPLE_DATA_IS_SUCCESSFULLY_INSTALLED') . ' </h3>
								<p>' . JText::_('MAINTENANCE_SAMPLE_DATA_CONGRATULATIONS_NOW_YOU_CAN_OPERATE_ON_SAMPLE_SHOWLISTS_AND_SHOWCASES') . '</p>
								<div class="form-actions">
									<button class="btn btn-primary agree_install_sample_local" type="button" name="button_installation_sampledata_finish" onclick="window.top.location=\'index.php?option=com_imageshow\';">' . JText::_('MAINTENANCE_SAMPLE_DATA_FINISH') . '</button>
								</div>
							</div>';
            }
            $html[] = '</div></div>';
        }
        //////////////////
        $html[] = JSNHtmlAsset::loadScript('jsn/data', array('language' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_GENERAL_STILL_WORKING', 'JSN_EXTFW_GENERAL_PLEASE_WAIT'))), true);
        return implode($html);
    }
Beispiel #20
0
$framework->load(array('element' => 'jsnframework', 'type' => 'plugin', 'folder' => 'system'));
if ($framework->extension_id and !$framework->enabled) {
    try {
        // Enable our extension framework
        $framework->enabled = 1;
        $framework->store();
        // Execute handler for system event bypassed while our extension framework is disabled
        require_once JPATH_ROOT . '/plugins/system/jsnframework/jsnframework.php';
        $dispatcher = class_exists('JEventDispatcher', false) ? JEventDispatcher::getInstance() : JDispatcher::getInstance();
        $framework = new PlgSystemJSNFramework($dispatcher);
        $framework->onAfterInitialise();
    } catch (Exception $e) {
        JFactory::getApplication()->enqueueMessage($e->getMessage(), 'warning');
    }
}
// Get admin component directory
$path = dirname(__FILE__);
// Load constant definition file
require_once "{$path}/defines.pagebuilder.php";
// Import JoomlaShine base MVC classes
require_once "{$path}/libraries/joomlashine/base/model.php";
require_once "{$path}/libraries/joomlashine/base/view.php";
require_once "{$path}/libraries/joomlashine/base/controller.php";
// Setup necessary include paths
JTable::addIncludePath("{$path}/tables");
JSNBaseModel::addIncludePath("{$path}/models");
JSNBaseModel::addTablePath("{$path}/tables");
JHtml::addIncludePath("{$path}/elements/html");
// Load default language
!class_exists('JSNUtilsLanguage') or !method_exists('JSNUtilsLanguage', 'loadDefault') or JSNUtilsLanguage::loadDefault();
Beispiel #21
0
 /**
  * Add nesscessary JS & CSS files
  *
  * @return void
  */
 private function _addAssets()
 {
     $input = JFactory::getApplication()->input;
     $objJSNMedia = JSNISFactory::getObj('classes.jsn_is_media');
     !class_exists('JSNBaseHelper') or JSNBaseHelper::loadAssets();
     $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/imageshow.css');
     $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/view.maintenance.css');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/imageshow.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/sampledata.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/sampledatamanual.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/installimagesources.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/installshowcasethemes.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/installdefault.js');
     JSNHtmlAsset::addScript(JURI::root(true) . '/media/jui/js/jquery.min.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/conflict.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/jquery.imageshow.js');
     JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ui/js/jquery-ui-1.9.0.custom.min.js');
     JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ck/jquery.ck.js');
     JSNHtmlAsset::loadScript('imageshow/joomlashine/maintenance', array('pathRoot' => JURI::root(), 'group' => $input->getCmd('g'), 'language' => JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_SAVE', 'JSN_IMAGESHOW_CLOSE', 'JSN_IMAGESHOW_CONFIRM', 'MAINTENANCE_SOURCE_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_IMAGE_SOURCE_PROFILE'))));
 }
Beispiel #22
0
 /**
  * Add the libraries css and javascript
  *
  * @return void
  *
  * @since    1.6
  */
 protected function addAssets()
 {
     JSNHtmlAsset::addStyle(array(JURI::base(true) . '/components/com_uniform/assets/js/libs/colorpicker/css/colorpicker.css', JSN_URL_ASSETS . '/3rd-party/jquery-jwysiwyg/jquery.wysiwyg-0.9.css', JURI::base(true) . '/components/com_uniform/assets/js/libs/select2/select2.css', JSN_URL_ASSETS . '/3rd-party/codemirror/lib/codemirror.css', JSN_URL_ASSETS . '/3rd-party/jquery-tipsy/tipsy.css'));
     if (JPluginHelper::isEnabled('editors', 'tinymce') == true) {
         JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/tinymce.min.js');
         JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/table/plugin.min.js');
         JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/link/plugin.min.js');
         JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/image/plugin.min.js');
         JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/code/plugin.min.js');
         JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/hr/plugin.min.js');
         JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/charmap/plugin.min.js');
         JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/autolink/plugin.min.js');
         JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/lists/plugin.min.js');
         JSNHtmlAsset::addStyle(JUri::root(true) . '/media/editors/tinymce/plugins/importcss/plugin.min.js');
         JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/themes/modern/theme.min.js');
         JSNHtmlAsset::addStyle(JUri::root(true) . '/media/editors/tinymce/skins/lightgray/content.inline.min.css');
         JSNHtmlAsset::addStyle(JUri::root(true) . '/media/editors/tinymce/skins/lightgray/content.min.css');
         JSNHtmlAsset::addStyle(JUri::root(true) . '/media/editors/tinymce/skins/lightgray/skin.min.css');
         JSNHtmlAsset::addStyle(JUri::root(true) . '/media/editors/tinymce/skins/lightgray/skin.ie7.min.css');
     }
     $formSubmitter = isset($this->_item->form_submitter) ? json_decode($this->_item->form_submitter) : "";
     $formAction = 0;
     $formActionData = '';
     if (!empty($this->formAction)) {
         $formAction = $this->formAction;
         $formActionData = isset($this->formActionData) ? $this->formActionData : '';
     }
     $arrayTranslated = array('JSN_UNIFORM_MOVE_UP_CONTAINER', 'JSN_UNIFORM_MOVE_DOWN_CONTAINER', 'JSN_UNIFORM_ADD_CONTAINER_COLUMN', 'JSN_UNIFORM_DELETE_CONTAINER', 'JSN_UNIFORM_DELETE_CONTAINER_COLUMN', 'JSN_UNIFORM_CONFIRM_DELETE_CONTAINER', 'JSN_UNIFORM_CONFIRM_DELETE_CONTAINER_COLUMN', 'JSN_UNIFORM_COLOR_CONFIRM_RESET', 'JSN_UNIFORM_COLOR_CONFIRM_DELETE', 'JSN_UNIFORM_COLOR_CONFIRM_EXISTS', 'JSN_UNIFORM_ALL_FORM_FIELD_ARE_HIDDEN', 'JSN_UNIFORM_ALL_FORM_FIELD_ARE_DISPLAYED', 'TITLES', 'JSN_UNIFORM_DATE_HOUR_TEXT', 'JSN_UNIFORM_DATE_MINUTE_TEXT', 'JSN_UNIFORM_DATE_CLOSE_TEXT', 'JSN_UNIFORM_DATE_PREV_TEXT', 'JSN_UNIFORM_DATE_NEXT_TEXT', 'JSN_UNIFORM_DATE_CURRENT_TEXT', 'JSN_UNIFORM_DATE_MONTH_JANUARY', 'JSN_UNIFORM_DATE_MONTH_FEBRUARY', 'JSN_UNIFORM_DATE_MONTH_MARCH', 'JSN_UNIFORM_DATE_MONTH_APRIL', 'JSN_UNIFORM_DATE_MONTH_MAY', 'JSN_UNIFORM_DATE_MONTH_JUNE', 'JSN_UNIFORM_DATE_MONTH_JULY', 'JSN_UNIFORM_DATE_MONTH_AUGUST', 'JSN_UNIFORM_DATE_MONTH_SEPTEMBER', 'JSN_UNIFORM_DATE_MONTH_OCTOBER', 'JSN_UNIFORM_DATE_MONTH_NOVEMBER', 'JSN_UNIFORM_DATE_MONTH_DECEMBER', 'JSN_UNIFORM_DATE_MONTH_JANUARY_SHORT', 'JSN_UNIFORM_DATE_MONTH_FEBRUARY_SHORT', 'JSN_UNIFORM_DATE_MONTH_MARCH_SHORT', 'JSN_UNIFORM_DATE_MONTH_APRIL_SHORT', 'JSN_UNIFORM_DATE_MONTH_MAY_SHORT', 'JSN_UNIFORM_DATE_MONTH_JUNE_SHORT', 'JSN_UNIFORM_DATE_MONTH_JULY_SHORT', 'JSN_UNIFORM_DATE_MONTH_AUGUST_SHORT', 'JSN_UNIFORM_DATE_MONTH_SEPTEMBER_SHORT', 'JSN_UNIFORM_DATE_MONTH_OCTOBER_SHORT', 'JSN_UNIFORM_DATE_MONTH_NOVEMBER_SHORT', 'JSN_UNIFORM_DATE_MONTH_DECEMBER_SHORT', 'JSN_UNIFORM_DATE_DAY_SUNDAY', 'JSN_UNIFORM_DATE_DAY_MONDAY', 'JSN_UNIFORM_DATE_DAY_TUESDAY', 'JSN_UNIFORM_DATE_DAY_WEDNESDAY', 'JSN_UNIFORM_DATE_DAY_THURSDAY', 'JSN_UNIFORM_DATE_DAY_FRIDAY', 'JSN_UNIFORM_DATE_DAY_SATURDAY', 'JSN_UNIFORM_DATE_DAY_SUNDAY_SHORT', 'JSN_UNIFORM_DATE_DAY_MONDAY_SHORT', 'JSN_UNIFORM_DATE_DAY_TUESDAY_SHORT', 'JSN_UNIFORM_DATE_DAY_WEDNESDAY_SHORT', 'JSN_UNIFORM_DATE_DAY_THURSDAY_SHORT', 'JSN_UNIFORM_DATE_DAY_FRIDAY_SHORT', 'JSN_UNIFORM_DATE_DAY_SATURDAY_SHORT', 'JSN_UNIFORM_DATE_DAY_SUNDAY_MIN', 'JSN_UNIFORM_DATE_DAY_MONDAY_MIN', 'JSN_UNIFORM_DATE_DAY_TUESDAY_MIN', 'JSN_UNIFORM_DATE_DAY_WEDNESDAY_MIN', 'JSN_UNIFORM_DATE_DAY_THURSDAY_MIN', 'JSN_UNIFORM_DATE_DAY_FRIDAY_MIN', 'JSN_UNIFORM_DATE_DAY_SATURDAY_MIN', 'JSN_UNIFORM_DATE_DAY_WEEK_HEADER', 'JSN_UNIFORM_EMAIL_SETTINGS', 'JSN_UNIFORM_SELECT_MENU_ITEM', 'JSN_UNIFORM_SELECT_ARTICLE', 'JSN_UNIFORM_FORM_APPEARANCE', 'JSN_UNIFORM_SELECT', 'JSN_UNIFORM_SAVE', 'JSN_UNIFORM_CANCEL', 'JSN_UNIFORM_ADD_FIELD', 'JSN_UNIFORM_BUTTON_SAVE', 'JSN_UNIFORM_BUTTON_CANCEL', 'JSN_UNIFORM_CONFIRM_CONVERTING_FORM', 'JSN_UNIFORM_UPGRADE_EDITION_TITLE', 'JSN_UNIFORM_YOU_HAVE_REACHED_THE_LIMITATION_OF_10_FIELD_IN_FREE_EDITION', 'JSN_UNIFORM_YOU_HAVE_REACHED_THE_LIMITATION_OF_1_PAGE_IN_FREE_EDITION', 'JSN_UNIFORM_UPGRADE_EDITION', 'JSN_UNIFORM_CONFIRM_SAVE_FORM', 'JSN_UNIFORM_NO_EMAIL', 'JSN_UNIFORM_NO_EMAIL_DES', 'JSN_UNIFORM_CONFIRM_DELETING_A_FIELD', 'JSN_UNIFORM_CONFIRM_DELETING_A_FIELD_DES', 'JSN_UNIFORM_BTN_BACKUP', 'JSN_UNIFORM_IF_CHECKED_VALUE_DUPLICATION', 'JSN_UNIFORM_EMAIL_SUBMITTER_TITLE', 'JSN_UNIFORM_EMAIL_ADDRESS_TITLE', 'JSN_UNIFORM_LAUNCHPAD_PLUGIN_SYNTAX', 'JSN_UNIFORM_LAUNCHPAD_PLUGIN_SYNTAX_DES', 'JSN_UNIFORM_FORM_LIMIT_FILE_EXTENSIONS', 'JSN_UNIFORM_FOR_SECURITY_REASONS_FOLLOWING_FILE_EXTENSIONS', 'JSN_UNIFORM_FORM_LIMIT_FILE_SIZE', 'STREET_ADDRESS', 'ADDRESS_LINE_2', 'CITY', 'POSTAL_ZIP_CODE', 'STATE_PROVINCE_REGION', 'FIRST', 'MIDDLE', 'LAST', 'COUNTRY', 'JSN_UNIFORM_ALLOW_USER_CHOICE', 'JSN_UNIFORM_SET_ITEM_PLACEHOLDER', 'JSN_UNIFORM_SET_ITEM_PLACEHOLDER_DES', 'JSN_UNIFORM_SHOW_DATE_FORMAT', 'JSN_UNIFORM_SHOW_TIME_FORMAT', 'JSN_UNIFORM_ENABLE_RANGE_SELECTION', 'JSN_UNIFORM_YOU_CAN_NOT_HIDE_THE_COPYLINK', 'JSN_UNIFORM_CUSTOM_DATE_FORMAT', 'JSN_UNIFORM_LIST_ELEMENT_DESCRIPTION_LABEL', 'JSN_UNIFORM_MULTIPLE_CHOICE_ELEMENT_DESCRIPTION_LABEL', 'JSN_UNIFORM_IDENTIFICATION_CODE_ELEMENT_DESCRIPTION_LABEL', 'JSN_UNIFORM_NO_FIELD_DES', 'JSN_UNIFORM_NO_FIELD', 'JSN_UNIFORM_NO_EMAIL_DES', 'JSN_UNIFORM_SELECTED', 'JSN_UNIFORM_NO_EMAIL', 'JSN_UNIFORM_SELECT_FIELD', 'JSN_UNIFORM_SELECT_FIELDS', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_FROM_0', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_REPLY_TO_0', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_SUBJECT_0', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_FROM_1', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_REPLY_TO_1', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_SUBJECT_1');
     $params = JComponentHelper::getParams('com_media');
     $listEx = '';
     $extensions = $params->get('upload_extensions');
     if ($extensions) {
         $extensions = explode(",", $extensions);
         $exs = array();
         foreach ($extensions as $ex) {
             $exs[] = strtolower($ex);
         }
         $listEx = implode(", ", array_unique($exs));
     }
     $extensions = str_replace(",", ", ", $extensions);
     $limitSize = $params->get('upload_maxsize');
     $configSizeSever = (int) ini_get('post_max_size');
     if ($limitSize > $configSizeSever) {
         $limitSize = $configSizeSever;
     }
     if ($limitSize > (int) ini_get('upload_max_filesize')) {
         $limitSize = (int) ini_get('upload_max_filesize');
     }
     $session = JFactory::getSession();
     $openArticle = JRequest::getVar('opentarticle', '');
     $this->pageContent = $session->get('page_content', '', 'form-design-' . $this->_item->form_id);
     $this->edition = defined('JSN_UNIFORM_EDITION') ? strtolower(JSN_UNIFORM_EDITION) : "free";
     JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map', array('jquery', 'jquery.ui'));
     JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map.services', array('jquery', 'jquery.ui', 'uniform/libs/googlemaps/jquery.ui.map'));
     JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map.extensions', array('jquery', 'jquery.ui', 'uniform/libs/googlemaps/jquery.ui.map'));
     $uri = JUri::getInstance();
     JSNHtmlAsset::addScript($uri->getScheme() . '://maps.google.com/maps/api/js?sensor=false&libraries=places');
     JSNHtmlAsset::registerDepends('uniform/libs/jquery.tmpl', array('jquery'));
     JSNHtmlAsset::registerDepends('uniform/libs/jquery-ui-timepicker-addon', array('jquery', 'jquery.ui'));
     JSNHtmlAsset::registerDepends('uniform/libs/jquery.placeholder', array('jquery'));
     JSNHtmlAsset::registerDepends('uniform/libs/colorpicker/js/colorpicker', array('jquery'));
     JSNHtmlAsset::registerDepends('uniform/libs/select2/select2', array('jquery'));
     JSNHtmlAsset::registerDepends('uniform/layout', array('jquery', 'jquery.ui'));
     JSNHtmlAsset::addScript(JSN_UNIFORM_ASSETS_URI . '/js/jsn.jquery.noconflict.js');
     $titleForm = isset($_GET['form']) ? $_GET['form'] : '';
     echo JSNHtmlAsset::loadScript('uniform/form', array('urlBase' => JURI::base(), 'pathRoot' => JURI::root(), 'opentArticle' => $openArticle, 'baseZeroClipBoard' => JSN_URL_ASSETS . '/3rd-party/jquery-zeroclipboard/ZeroClipboard.swf', 'pageContent' => $this->pageContent, 'edition' => $this->edition, 'checkSubmitModal' => $this->checkSubmitModal, 'urlAction' => $this->urlAction, 'form_style' => $this->_item->form_style, 'dataEmailSubmitter' => $formSubmitter, 'language' => JSNUtilsLanguage::getTranslated($arrayTranslated), 'formActionData' => $formActionData, 'formAction' => $formAction, 'limitEx' => $listEx, 'limitSize' => $limitSize, 'titleForm' => $titleForm), true);
 }
Beispiel #23
0
    /**
     * Get the markup for sample data installation form.
     *
     * @return  string
     */
    protected function getInput()
    {
        // Preset output
        $html = array();
        // Get input object
        $input = JFactory::getApplication()->input;
        // Generate data backup form
        $html[] = '
<form name="JSNDataInstallSample" action="' . JRoute::_('index.php') . '" method="POST" onsubmit="return false;">
	<div id="jsn-data-install-sample-action">
		<div class="alert alert-warning">
			<p><span class="label label-important">' . JText::_('JSN_EXTFW_GENERAL_WARNING') . '</span></p>
			' . JText::_((string) $this->element['warning-message']) . '
		</div>
		<div class="control-group">
			<label for="jsn-data-install-sample-agreement" class="checkbox">
				<input id="jsn-data-install-sample-agreement" name="installsample[agree]" value="1" type="checkbox" />
				<strong>' . JText::_((string) $this->element['confirm-message']) . '</strong>
			</label>
		</div>
		<div class="form-actions">
			<button id="jsn-data-install-sample-button" class="btn btn-primary" value="' . ($this->element['task'] ? (string) $this->element['task'] : 'data.installSample') . '" track-change="yes" ajax-request="yes" disabled="disabled">' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_BUTTON') . '</button>
		</div>
	</div>
	<div id="jsn-data-install-sample-indicator" style="display: none;">
		<p>' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_START') . '</p>
		<ul>
			<li id="jsn-data-install-sample-downloading">
				' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_START_DOWNLOADING') . '
				<span id="jsn-data-install-sample-downloading-indicator" class="jsn-icon16 jsn-icon-loading"></span>
				<span id="jsn-data-install-sample-downloading-notice" class="jsn-processing-message"></span>
				<br />
				<p id="jsn-data-install-sample-downloading-unsuccessful-message" class="jsn-text-important">
					' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_DOWNLOAD_FAIL') . '
				</p>
			</li>
			<li id="jsn-data-install-sample-installing" style="display: none;">
				' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_START_INSTALLING') . '
				<span id="jsn-data-install-sample-installing-indicator" class="jsn-icon16 jsn-icon-loading"></span>
				<span id="jsn-data-install-sample-installing-notice" class="jsn-processing-message"></span>
				<br />
				<p id="jsn-data-install-sample-installing-unsuccessful-message" class="jsn-text-important"></p>
				<div id="jsn-data-install-sample-installing-warnings" class="alert alert-warning">
					<p><span class="label label-important">' . JText::_('JSN_EXTFW_GENERAL_WARNING') . '</span></p>
				</div>
			</li>
		</ul>
	</div>
	<div id="jsn-data-install-sample-manual-installation" style="display: none;">
		<ol>
			<li>1. ' . JText::_('JSN_EXTFW_DATA_MANUAL_DOWNLOAD') . ': <a href="' . (string) $this->element['download-url'] . '" class="btn"><span>' . JText::_('JSN_EXTFW_GENERAL_DOWNLOAD') . '</span></a></li>
			<li>2. ' . JText::_('JSN_EXTFW_DATA_MANUAL_INSTALL') . ': <input type="file" name="sampleDataPackage" size="40" /></li>
		</ol>
		<div class="form-actions">
			<button class="btn btn-primary">' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_BUTTON') . '</button>
		</div>
	</div>
	<div id="jsn-data-install-sample-successfully" style="display: none;">
		<hr>
		<h3 class="jsn-text-success">' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_SUCCESS') . '</h3>
		<p>' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_SUCCESS_MESSAGE') . '</p>
	</div>
	<input type="hidden" name="installSampleStep" value="" />
	<input type="hidden" name="sampleDownloadUrl" value="' . (string) $this->element['download-url'] . '" />
	<input type="hidden" name="' . $this->name . '" value="JSN_CONFIG_SKIP_SAVING" />
</form>
';
        // Load script to handle remote sample data installation
        $html[] = JSNHtmlAsset::loadScript('jsn/data', array('language' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_GENERAL_STILL_WORKING', 'JSN_EXTFW_GENERAL_PLEASE_WAIT'))), true);
        return implode($html);
    }
Beispiel #24
0
<?php 
        }
    }
    if (isset($fieldset->form->actions)) {
        ?>
		<div class="form-actions">
			<div class="jsn-bootstrap"></div>
<?php 
        foreach ($fieldset->form->actions as $action) {
            ?>
			<button class="btn btn-primary" <?php 
            echo 'value="' . $action->task . '"' . ($action->track ? ' track-change="yes"' : '') . ($action->ajax ? ' ajax-request="yes"' : '');
            ?>
>
				<?php 
            echo JText::_($action->label);
            ?>
</button>
<?php 
        }
        ?>
		</div>
<?php 
    }
    ?>
	</fieldset>
<?php 
}
// Setup form validation
echo JSNHtmlAsset::loadScript('jsn/validate', array('id' => 'jsn-config-form', 'lang' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_INVALID_VALUE_TYPE', 'JSN_EXTFW_ERROR_FORM_VALIDATION_FAILED', 'JSN_EXTFW_SYSTEM_CUSTOM_ASSETS_INVALID'))), true);
    /**
     * Get the language manager markup.
     *
     * @return  string
     */
    protected function getInput()
    {
        // Generate field container id
        $id = str_replace('_', '-', $this->id) . '-field';
        // Preset output
        $html[] = '
<style type="text/css">
	#' . $id . ' {
		position: relative;
	}
	.jsn-bootstrap #' . $id . ' label.checkbox a:hover {
		text-decoration: inherit;
	}
	.jsn-bootstrap #' . $id . ' .alert {
		position: absolute;
		top: 0;
		left: 50%;
		white-space: nowrap;
	}
	.jsn-bootstrap #' . $id . ' .alert ul {
		margin-bottom: 0;
	}
	.ui-dialog-buttonpane .ui-dialog-buttonset button.jsn-loading {
		display: inline-block;
		border: 0;
		padding: 0;
		width: 42px;
		height: 42px;
		background: url(../plugins/system/jsnframework/assets/joomlashine/images/icons-32/icon-32-loading-circle.gif) 50% 50% no-repeat;
		font-size: 0;
	}
</style>
<p class="item-title">' . JText::_('JSN_EXTFW_LANGUAGE_SELECT') . '</p>';
        foreach ($this->getOptions() as $lang) {
            // Initialize variables
            $component = JFactory::getApplication()->input->getCmd('option');
            $langText = JText::_('JSN_EXTFW_LANGUAGE_' . strtoupper(str_replace('-', '', $lang)));
            $editLink = JUri::root() . 'plugins/system/jsnframework/libraries/joomlashine/editors/language/index.php?component=' . $component;
            $revertLink = $editLink . '&task=post.revert';
            // Check necessary attributes
            $aChecked = JSNUtilsLanguage::installed($lang) ? ' checked="checked"' : '';
            $aDisabled = (!JSNUtilsLanguage::installable($lang) or JSNUtilsLanguage::installed($lang) or !JSNUtilsLanguage::supported($lang)) ? ' disabled="disabled"' : '';
            $aEditable = JSNUtilsLanguage::installed($lang) ? ' <a href="javascript:void(0)" data-source="' . $editLink . '&client=admin&lang=' . $lang . '" title="' . JText::_('JSN_EXTFW_EDITORS_LANG_CLICK_TO_EDIT') . '" class="jsn-language-editor icon16 icon-pencil"></a>' : '';
            $aRevert = JSNUtilsLanguage::edited($lang) ? '<a href="javascript:void(0)" action="' . $revertLink . '&client=admin&lang=' . $lang . '" title="' . JText::_('JSN_EXTFW_EDITORS_LANG_CLICK_TO_REVERT') . '" class="jsn-language-revert icon16 icon-refresh"></a>' : '';
            $sChecked = JSNUtilsLanguage::installed($lang, true) ? ' checked="checked"' : '';
            $sDisabled = (!JSNUtilsLanguage::installable($lang, true) or JSNUtilsLanguage::installed($lang, true) or !JSNUtilsLanguage::supported($lang, true)) ? ' disabled="disabled"' : '';
            $sEditable = JSNUtilsLanguage::installed($lang, true) ? ' <a href="javascript:void(0)" data-source="' . $editLink . '&client=site&lang=' . $lang . '" title="' . JText::_('JSN_EXTFW_EDITORS_LANG_CLICK_TO_EDIT') . '" class="jsn-language-editor icon16 icon-pencil"></a>' : '';
            $sRevert = JSNUtilsLanguage::edited($lang, true) ? '<a href="javascript:void(0)" action="' . $revertLink . '&client=site&lang=' . $lang . '" title="' . JText::_('JSN_EXTFW_EDITORS_LANG_CLICK_TO_REVERT') . '" class="jsn-language-revert icon16 icon-refresh"></a>' : '';
            // Generate markup for language manager
            $html[] = '
<div class="jsn-language-item ' . $lang . '">
	<span class="jsn-icon24 jsn-icon-flag ' . strtolower($lang) . '"></span>
	<label class="checkbox">
		<input type="checkbox" name="languagemanager[a][]" value="' . $lang . '"' . $aDisabled . $aChecked . ' />
		<span>' . $lang . ' - ' . $langText . ' (' . JText::_('JADMINISTRATOR') . ')</span>' . " {$aEditable} {$aRevert}" . '
	</label>
	<label class="checkbox">
		<input type="checkbox" name="languagemanager[s][]" value="' . $lang . '"' . $sDisabled . $sChecked . ' />
		<span>' . $lang . ' - ' . $langText . ' (' . JText::_('JSITE') . ')</span>' . " {$sEditable} {$sRevert}" . '
	</label>
</div>';
        }
        $html[] = '
<input type="hidden" name="' . $this->name . '" value="JSN_CONFIG_SKIP_SAVING" />
<div class="clearbreak"></div>
';
        // Load language editor script
        $html[] = JSNHtmlAsset::loadScript('jsn/languagemanager', array('editSelector' => 'a.jsn-language-editor', 'revertSelector' => 'a.jsn-language-revert', 'language' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_EDITORS_LANG', 'JSN_EXTFW_EDITORS_LANG_REVERT_CONFIRM', 'JSN_EXTFW_EDITORS_LANG_LAST_REVERT_FAIL', 'JSN_EXTFW_EDITORS_LANG_REVERT_SUCCESS'))), true);
        return implode($html);
    }
Beispiel #26
0
 /**
  * Add nesscessary JS & CSS files
  *
  * @return void
  */
 private function _addAssets()
 {
     $objJSNMedia = JSNISFactory::getObj('classes.jsn_is_media');
     !class_exists('JSNBaseHelper') or JSNBaseHelper::loadAssets();
     JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/joomlashine/css/jsn-view-launchpad.css');
     $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/imageshow.css');
     $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/showlist.css');
     $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/cpanel.css');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/imageshow.js');
     //$objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/zeroclipboard/ZeroClipboard.js');
     JSNHtmlAsset::addScript(JURI::root(true) . '/media/jui/js/jquery.min.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/conflict.js');
     JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ui/js/jquery-ui-1.9.0.custom.min.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/window.js');
     JSNHtmlAsset::loadScript('imageshow/joomlashine/launchpad', array('pathRoot' => JURI::root(), 'language' => JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_OK', 'JSN_IMAGESHOW_CLOSE', 'CPANEL_PLUGIN_SYNTAX_DETAILS', 'CPANEL_GO', 'CPANEL_EDIT_SELECTED_SHOWCASE', 'CPANEL_YOU_MUST_SELECT_SOME_SHOWCASE_TO_EDIT', 'CPANEL_EDIT_SELECTED_SHOWLIST', 'CPANEL_YOU_MUST_SELECT_SOME_SHOWLIST_TO_EDIT', 'JSN_IMAGESHOW_SAVE'))));
 }
    /**
     * Get the messages list markup.
     *
     * @return  string
     */
    protected function getInput()
    {
        // Preset output
        $token = JFactory::getSession()->getFormToken();
        $objJSNSource = JSNISFactory::getObj('classes.jsn_is_source');
        $objJSNProfile = JSNISFactory::getObj('classes.jsn_is_profile');
        $sources = $objJSNSource->getListSources();
        $items = array();
        if (count($sources)) {
            for ($i = 0, $count = count($sources); $i < $count; $i++) {
                $source = $sources[$i];
                if ($source->type == ('external' || 'internal')) {
                    $source->profiles = $objJSNProfile->getProfiles('', $source->identified_name);
                }
                $items[] = $source;
            }
        }
        $html[] = '<table class="table table-bordered">';
        $html[] = '<thead>
				<tr>
					<th width="20" nowrap="nowrap" class="center">#</th>
					<th class="title" nowrap="nowrap">' . JText::_("TITLE") . '</th>
					<th width="80" nowrap="nowrap" class="center">' . JText::_('MAINTENANCE_SOURCE_VERSION') . '</th>
					<th width="80" nowrap="nowrap" class="center">' . JText::_('ACTION') . '</th>
				</tr>
			</thead><tbody>';
        if (count($items)) {
            for ($i = 0, $count = count($items); $i < $count; $i++) {
                $row = $items[$i];
                if ($row->type != 'folder') {
                    $manifest = json_decode($row->pluginInfo->manifest_cache);
                    $html[] = '<tr>';
                    $html[] = '<td class="center">' . ($i + 1) . '</td>';
                    $html[] = '<td>';
                    $html[] = $row->title;
                    if ($row->type == 'external' && count($row->profiles)) {
                        $html[] = '<span class="jsn-image-source-seperator">|</span>';
                        $html[] = '<a href="javascript: void(0);" class="jsn-link-action jsn-is-view-profile" rel=\'' . json_encode(array('container_id' => 'jsn-image-source-profile-item-' . $row->identified_name)) . '\'>';
                        $html[] = '<span class="jsn-image-source-open-profile">' . JText::_('MAINTENANCE_SOURCE_SEE_PROFILES') . '</span>';
                        $html[] = '<span class="jsn-image-source-close-profile">' . JText::_('MAINTENANCE_SOURCE_CLOSE') . '</span>';
                    }
                    $html[] = '</td>';
                    $html[] = '<td class="center">' . $manifest->version . '</td>';
                    $html[] = '<td class="actionprofile center">';
                    if (JFile::exists(JPATH_PLUGINS . DS . 'jsnimageshow' . DS . $row->pluginInfo->element . DS . 'views' . DS . 'maintenance' . DS . 'tmpl' . DS . 'default_profile_parameters.php')) {
                        $html[] = '<a rel=\'{"size": {"x": 400, "y": 500}}\' href="index.php?option=com_imageshow&controller=maintenance&type=profileparameters&source_type=' . $row->pluginInfo->element . '&tmpl=component" class="jsn-icon16 jsn-icon-pencil jsn-is-form-modal" name="' . JText::_('MAINTENANCE_SOURCE_PARAMETER_SETTINGS') . '" title="' . JText::_('MAINTENANCE_SOURCE_EDIT_SETTINGS') . '"></a>&nbsp;';
                    }
                    if ($count) {
                        $html[] = '<a href="javascript: void(0);" rel=\'' . json_encode(array('source_id' => $row->pluginInfo->extension_id, 'token' => $token)) . '\' class="jsn-icon16 jsn-icon-trash jsn-is-delete-source"> </a>';
                    } else {
                        $html[] = '<a class="jsn-icon16 jsn-icon-trash disabled" title="' . JText::_('MAINTENANCE_SOURCE_YOU_CAN_NOT_DELETE_THE_ONLY_SOURCE_IN_THE_LIST') . '"> </a>';
                    }
                    if (count($row->profiles)) {
                        for ($z = 0, $countz = count($row->profiles); $z < $countz; $z++) {
                            $profile = $row->profiles[$z];
                            $profile->token = $token;
                            $html[] = '<tr class="jsn-image-source-profile-item-' . $row->identified_name . ' jsn-image-source-profile-close">';
                            $html[] = '<td></td>';
                            $html[] = '<td class="jsn-image-source-profile-title">';
                            $html[] = $profile->external_source_profile_title;
                            $html[] = '<span class="jsn-image-source-seperator">|</span>';
                            $html[] = '<a class="jsn-is-view-modal jsn-link-action" rel=\'{"size": {"x": 500, "y": 300}}\' href="index.php?option=com_imageshow&controller=showlist&task=elements&tmpl=component&limit=0&external_source_id=' . $profile->external_source_id . '&image_source_name=' . $profile->image_source_name . '" name="' . JText::_('SHOWLIST_IMAGE_SOURCE_PROFILE_SHOWLISTS') . '">';
                            $html[] = JText::_('MAINTENANCE_SOURCE_SEE_SHOWLISTS');
                            $html[] = '</a></td>';
                            $html[] = '<td></td>';
                            $html[] = '<td align="center" class="center actionprofile" nowrap="nowrap">';
                            $html[] = '<a name="' . JText::_('MAINTENANCE_SOURCE_PROFILE_SETTINGS') . '" rel=\'{"size": {"x": 400, "y": 500}}\' href="index.php?option=com_imageshow&controller=maintenance&type=editprofile&source_type=' . $profile->image_source_name . '&tmpl=component&external_source_id=' . $profile->external_source_id . '&count_showlist=' . $profile->totalshowlist . '" class="jsn-icon16 jsn-icon-pencil jsn-is-profile-form-modal" title="' . JText::_('EDIT') . '"></a>&nbsp';
                            $html[] = '<a rel=\'' . json_encode($profile) . '\' href="javascript: void(0);" class="jsn-icon16 jsn-icon-trash jsn-is-delete-profile" title="' . JText::_('DELETE') . '"></a>';
                            $html[] = '</td></tr>';
                        }
                    }
                    $html[] = '</td>';
                    $html[] = '</tr>';
                }
            }
        }
        $html[] = '</tbody></table>';
        $html[] = JSNHtmlAsset::loadScript('imageshow/joomlashine/maintenance', array('pathRoot' => JURI::root(), 'language' => JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_SAVE', 'JSN_IMAGESHOW_CLOSE', 'JSN_IMAGESHOW_CONFIRM', 'MAINTENANCE_SOURCE_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_IMAGE_SOURCE_PROFILE'))), true);
        return implode($html);
    }
Beispiel #28
0
 /**
  * Add nesscessary JS & CSS files
  *
  * @return void
  */
 private function _addAssets()
 {
     $objJSNMedia = JSNISFactory::getObj('classes.jsn_is_media');
     !class_exists('JSNBaseHelper') or JSNBaseHelper::loadAssets();
     $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/imageshow.css');
     $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/mediamanager.css');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/imageshow.js');
     JSNHtmlAsset::addScript(JURI::root(true) . '/media/jui/js/jquery.min.js');
     $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/conflict.js');
     JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ui/js/jquery-ui-1.9.0.custom.min.js');
     JSNHtmlAsset::loadScript('imageshow/joomlashine/showcases', array('pathRoot' => JURI::root(), 'language' => JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_OK', 'JSN_IMAGESHOW_CLOSE', 'CPANEL_UPGRADE_TO_PRO_EDITION_FOR_MORE', 'UPGRADE_TO_PRO_EDITION', 'JSN_IMAGESHOW_SHOWCASE_YOU_HAVE_REACHED_THE_LIMITATION_OF_3_SHOWCASES_IN_FREE_EDITION'))));
 }
Beispiel #29
0
    /**
     * Get select Form
     *
     * @param   string    $name          Name form
     *
     * @param   int       $id            Id form
     *
     * @param   boolean   $btn           Button
     *
     * @param   string    $value         Value form
     *
     * @param   boolean   $checkVersion  Check version joomla
     *
     * @return  html code
     */
    public static function getSelectForm($name, $id = null, $view = "", $value = null, $checkVersion = false)
    {
        $enabledCSS = 'hide';
        $menuid = JRequest::getInt('id');
        $formID = $value;
        $db = JFactory::getDBO();
        $query = $db->getQuery(true);
        //build the list of categories
        $query->select('uf.form_title AS text, uf.form_id AS id')->from('#__jsn_uniform_forms AS uf')->where('uf.form_state = 1');
        $db->setQuery($query);
        $data = $db->loadObjectList();
        $results[] = JHTML::_('select.option', '0', '- ' . JText::_('JSN_UNIFORM_SELECT_FORM') . ' -', 'id', 'text');
        $results = array_merge($results, $data);
        JSNUniformHelper::addAssets($checkVersion);
        JSNHtmlAsset::addStyle(JURI::base(true) . '/components/com_uniform/assets/css/uniform.css');
        $arrayTranslated = array('JSN_UNIFORM_UPGRADE_EDITION_TITLE', 'JSN_UNIFORM_YOU_HAVE_REACHED_THE_LIMITATION_OF_3_FORM_IN_FREE_EDITION_0', 'JSN_UNIFORM_UPGRADE_EDITION');
        $edition = defined('JSN_UNIFORM_EDITION') ? JSN_UNIFORM_EDITION : "free";
        $baseUrl = JURI::base(true);
        JSNHtmlAsset::addScriptPath('uniform', $baseUrl . '/components/com_uniform/assets/js');
        JSNHtmlAsset::addScriptPath('uniform/3rd', $baseUrl . '/components/com_uniform/assets/3rd-party');
        if ($data) {
            $enabledCSS = '';
            if (!$menuid && !$formID) {
                $value = $data[0]->id;
            }
        }
        if ($view == "content") {
            $listForm = JHTML::_('select.genericList', $results, $name, 'title="' . (!$data ? JText::_('JSN_UNIFORM_DO_NOT_HAVE_ANY_FORM') : '') . '" class="jform_request_form_id"', 'id', 'text');
            $html = '<div class="jsn-uniform-plg-editor-container jsn-bootstrap">
						<div class="jsn-uniform-plg-editor-wrapper">
							<h3 class="jsn-section-header">' . JText::_('JSN_UNIFORM_MODULE_LIST_FORM_DES') . '</h3>
							<div class="setting">
								<ul>
									<li>
										<label style="float:left;">' . JText::_('JSN_UNIFORM_MODULE_LIST_FORM') . '</label>
										' . $listForm . '
											<a id="form-icon-edit"  action="article" href="javascript: void(0);" target="_blank" title="' . JText::_('JSN_UNIFORM_EDIT_SELECTED_FORM') . '"><span class="jsn-icon16 jsn-icon-pencil"></span></a>
											<a id="form-icon-add" action="article" href="javascript: void(0);" title="' . JText::_('JSN_UNIFORM_CREATE_NEW_FORM') . '"><span class="jsn-icon16 jsn-icon-plus"></span></a>
									</li>
								</ul>
							</div>
							<div class="insert">
								<div class="form-actions">
									<button disabled="disabled" id="select-forms" onclick="" name="button_installation_data" type="button" class="btn">' . JText::_('JSN_UNIFORM_BTN_SELECTED') . '</button>
								</div>
							</div>
						</div>
					</div>';
            $html .= JSNHtmlAsset::loadScript('uniform/menuform', array('edition' => $edition, 'language' => JSNUtilsLanguage::getTranslated($arrayTranslated)), true);
            return $html;
        } else {
            if ($view == "menuform") {
                $listForm = JHTML::_('select.genericList', $results, $name, 'title="' . (!$data ? JText::_('JSN_UNIFORM_DO_NOT_HAVE_ANY_FORM') : '') . '" class="jform_request_form_id"', 'id', 'text', $value, $id);
                $html = "<div id='jsn-form-icon-warning'>";
                $html .= $listForm;
                $html .= "<span id =\"form-icon-warning\" class='{$enabledCSS}' title=\"" . JText::_('JSN_UNIFORM_FIELD_DES_FORM_WARNING') . "\"><span class=\"jsn-icon16 jsn-icon-warning-sign\"></span></span>";
                $html .= "<a id=\"form-icon-edit\" href=\"javascript: void(0);\" target=\"_blank\" title=\"" . JText::_('JSN_UNIFORM_EDIT_SELECTED_FORM') . "\"><span class=\"jsn-icon16 jsn-icon-pencil\"></span></a>";
                $html .= "<a id=\"form-icon-add\" href=\"javascript: void(0);\" title=\"" . JText::_('JSN_UNIFORM_CREATE_NEW_FORM') . "\"><span class=\"jsn-icon16 jsn-icon-plus\"></span></a>";
                $html .= "<span id='select-forms'></span>";
            } else {
                if ($view == "menusubmissions") {
                    $listForm = JHTML::_('select.genericList', $results, $name, 'title="' . (!$data ? JText::_('JSN_UNIFORM_DO_NOT_HAVE_ANY_FORM') : '') . '" class="jform_request_form_id"', 'id', 'text', $value);
                    $html = "<div id='jsn-form-icon-warning'>";
                    $html .= $listForm;
                    $html .= "<span id =\"form-icon-warning\" class='{$enabledCSS}' title=\"" . JText::_('JSN_UNIFORM_FIELD_DES_FORM_WARNING') . "\"><span class=\"jsn-icon16 jsn-icon-warning-sign\"></span></span>";
                    $html .= "</div>";
                    //JSNHtmlAsset::loadScript('uniform/menusubmissions', array('language' => JSNUtilsLanguage::getTranslated($arrayTranslated)));
                    return $html;
                }
            }
        }
        $html .= "</div><div id=\"jsn-modal\"></div>" . JSNHtmlAsset::loadScript('uniform/menuform', array('edition' => $edition, 'language' => JSNUtilsLanguage::getTranslated($arrayTranslated)), true);
        return $html;
    }
Beispiel #30
-3
 /**
  * Ask user to review JoomlaShine product on JED.
  *
  * @return  void
  */
 private function askForReview()
 {
     // Continue only if this is admin page of JoomlaShine product
     if (self::$_app->isAdmin() and in_array($this->option, JSNVersion::$products)) {
         // Get product options
         $config = JSNConfigHelper::get($this->option);
         if ($config->get('review_popup', 1)) {
             // Get time difference
             $time = time();
             $last = $config->get('last_ask_for_review', 0);
             if ($last == 0) {
                 $last = filemtime(JPATH_ROOT . "/administrator/components/{$this->option}/" . substr($this->option, 4) . '.xml');
             }
             // Check if it's time to ask for review
             if ($time - $last >= REVIEW_POPUP_PERIOD) {
                 // Load script to popup a modal ask user for review
                 JSNHtmlAsset::loadScript('jsn/askforreview', array('url' => JUri::root() . "plugins/system/jsnframework/libraries/joomlashine/choosers/review/index.php?component={$this->option}", 'language' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_CHOOSERS_REVIEW_ON_JED'))));
                 // Get config model
                 $model = new JSNConfigModel();
                 // Store time of last popup
                 $form = $model->getForm(array(), true, JPATH_ROOT . '/administrator/components/' . $this->option . '/config.xml');
                 $data = array('last_ask_for_review' => $time);
                 try {
                     // Save new configuration
                     $model->save($form, $data);
                 } catch (Exception $e) {
                     // Do nothing as this is a background process
                 }
             }
         }
     }
 }