コード例 #1
0
ファイル: view.html.php プロジェクト: densem-2013/exikom
 /**
  * Method for display page.
  *
  * @param   boolean  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a JError object.
  */
 public function display($tpl = null)
 {
     $baseUrl = JURI::base(true);
     $document = JFactory::getDocument();
     JSNHtmlAsset::addScriptPath('mobilize', $baseUrl . '/components/com_mobilize/assets/js');
     JSNHtmlAsset::loadScript('mobilize/modules');
     $document->addStyleSheet(JURI::base(true) . '/components/com_mobilize/assets/css/mobilize.css');
     parent::display($tpl);
 }
コード例 #2
0
define('JSN_EXT_DOWNLOAD_UPDATE_URL', 'http://www.joomlashine.com/index.php?option=com_lightcart&controller=remoteconnectauthentication&task=authenticate&tmpl=component&upgrade=yes');
define('JSN_PATH_FRAMEWORK', dirname(__FILE__));
define('JSN_PATH_LIBRARIES', JSN_PATH_FRAMEWORK . '/libraries');
define('JSN_URL_ASSETS', JURI::root(true) . '/plugins/system/jsnframework/assets');
define('JSN_LASTUPDATE', 'jsn-lastupdate-');
define('JSN_LASTUPDATE_RESULT', 'jsn-lastupdate-result-');
define('CHECK_UPDATE_PERIOD', 86400);
define('REVIEW_POPUP_PERIOD', 1209600);
// Third-party templates
define('JSN_TEMPLATE_CLASSES_OVERWRITE', JSN_PATH_FRAMEWORK . '/libraries/template/overwrites/');
// Define necessary variables.
$baseUrl = JURI::base(true);
$rootUrl = JURI::root(true);
$application = JFactory::getApplication();
// Add base path that point to folder contains javascript files of the framework
JSNHtmlAsset::addScriptPath('jsn', 'joomlashine/js');
// Prepare config
foreach (JSNVersion::$products as $product) {
    JSNHtmlAsset::prepare($product, !$application->isSite());
}
// Predefine script libraries
if (JSNVersion::isJoomlaCompatible('3.2')) {
    JSNHtmlAsset::addScriptLibrary('jquery', '3rd-party/jquery/jquery.min.js');
}
if (JSNVersion::isJoomlaCompatible('3.0')) {
    JSNHtmlAsset::addScriptLibrary('jquery.ui', '3rd-party/jquery-ui/js/jquery-ui-1.9.0.custom.min', array('jquery'));
} else {
    JSNHtmlAsset::addScriptLibrary('jquery.ui', '3rd-party/jquery-ui/js/jquery-ui-1.8.16.custom.min', array('jquery'));
}
JSNHtmlAsset::addScriptLibrary('bootstrap', '3rd-party/bootstrap/js/bootstrap.min', array('jquery'));
JSNHtmlAsset::addScriptLibrary('jquery.cookie', '3rd-party/jquery-ck/jquery.ck', array('jquery'));
コード例 #3
0
ファイル: uniform.php プロジェクト: sillysachin/teamtogether
    /**
     * 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;
    }