当前位置: 首页>>代码示例>>PHP>>正文


PHP CopixUrl::getResource方法代码示例

本文整理汇总了PHP中CopixUrl::getResource方法的典型用法代码示例。如果您正苦于以下问题:PHP CopixUrl::getResource方法的具体用法?PHP CopixUrl::getResource怎么用?PHP CopixUrl::getResource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CopixUrl的用法示例。


在下文中一共展示了CopixUrl::getResource方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: process

 public function process($pParams, $content)
 {
     extract($pParams);
     if (!isset($name)) {
         throw new CopixTemplateTagException("Manque nom");
     }
     $toReturn = "<div id=\"wiki_toolbar\" style=\"clear:both\">\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('**','**','" . _i18n("wiki|wiki.bold") . "');\" title=\"" . _i18n("wiki|wiki.bold") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/bold.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('//','//','" . _i18n("wiki|wiki.italic") . "');\" title=\"" . _i18n("wiki|wiki.italic") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/italic.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('__','__','" . _i18n("wiki|wiki.underline") . "');\" title=\"" . _i18n("wiki|wiki.underline") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/underline.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('   *','','" . _i18n("wiki|wiki.listitem") . "');\" title=\"" . _i18n("wiki|wiki.listitem") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/list.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('<del>','</del>','" . _i18n("wiki|wiki.strike") . "');\" title=\"" . _i18n("wiki|wiki.strike") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/strike.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('\n----\n','','');\" title=\"" . _i18n("wiki|wiki.hr") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/hr.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('\\'\\'','\\'\\'','" . _i18n("wiki|wiki.code") . "');\" title=\"" . _i18n("wiki|wiki.code") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/code.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:addHeader(1);\" title=\"" . _i18n("wiki|wiki.header", 1) . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/h1.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:addHeader(2);\" title=\"" . _i18n("wiki|wiki.header", 2) . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/h2.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:addHeader(3);\" title=\"" . _i18n("wiki|wiki.header", 3) . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/h3.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:addHeader(4);\" title=\"" . _i18n("wiki|wiki.header", 4) . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/h4.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:addHeader(5);\" title=\"" . _i18n("wiki|wiki.header", 5) . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/h5.png') . "\" /></a>\n";
     $toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:sendForPreview();\" title=\"" . _i18n("wiki|wiki.show.preview") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/preview.png') . "\" /></a>\n";
     $toReturn .= "</div>";
     $toReturn .= "\n<textarea class=\"noresizable\" id=\"wiki_area_content\" name=\"{$name}\"\n    cols=\"100\" rows=\"30\">{$content}\n</textarea>\n<div id=\"aj_wiki_prev\" style=\"display: none\">\n</div>\n\n        ";
     $urlofrenderer = _url('generictools|ajax|getwikipreview');
     CopixHTMLHeader::addJsCode("\nvar onPreviewMode = false;\nfunction sendForPreview()\n{\n    if(!onPreviewMode){\n        var borders=\$('wiki_area_content').getStyle('border');\n        var width=\$('wiki_area_content').getStyle('width');\n        \$('aj_wiki_prev').setStyles({\n            'border': borders,\n            'width' : width\n        });\n        var aj = new Ajax('" . $urlofrenderer . "',{\n            method : 'post',\n            update :'aj_wiki_prev',\n            data : 'torender='+\$('wiki_area_content').value\n        }).request();\n        onPreviewMode = true;\n        \$('wiki_area_content').setStyle('display','none')\n        \$('aj_wiki_prev').setStyle('display','block')\n    }else{\n        \$('wiki_area_content').setStyle('display','block');\n        \$('aj_wiki_prev').setStyle('display','none');\n        onPreviewMode = false;\n    }\n}\n\nfunction addHeader(n)\n{\n    var h=\"\";\n    if(n==1) h=\"======\";\n    if(n==2) h=\"=====\";\n    if(n==3) h=\"====\";\n    if(n==4) h=\"===\";\n    if(n==5) h=\"==\";\n\n    var editor = document.getElementById('wiki_area_content');\n    fontStyle(h+\" \",\" \"+h,\"Header\"+n);\n}\n\n/**\n * apply tagOpen/tagClose to selection in textarea, use sampleText instead\n * of selection if there is none copied and adapted from phpBB\n *\n * @author phpBB development team\n * @author MediaWiki development team\n * @author Andreas Gohr <andi@splitbrain.org>\n * @author Jim Raynor <jim_raynor@web.de>\n */\nfunction fontStyle(tagOpen, tagClose, sampleText)\n{\n  var txtarea = document.getElementById('wiki_area_content');\n  // IE\n  if(document.selection  && !is_gecko) {\n    var theSelection = document.selection.createRange().text;\n    var replaced = true;\n    if(!theSelection){\n      replaced = false;\n      theSelection=sampleText;\n    }\n    txtarea.focus();\n\n    // This has change\n    text = theSelection;\n    if(theSelection.charAt(theSelection.length - 1) == \" \"){// exclude ending space char, if any\n      theSelection = theSelection.substring(0, theSelection.length - 1);\n      r = document.selection.createRange();\n      r.text = tagOpen + theSelection + tagClose + \" \";\n    } else {\n      r = document.selection.createRange();\n      r.text = tagOpen + theSelection + tagClose;\n    }\n    if(!replaced){\n      r.moveStart('character',-text.length-tagClose.length);\n      r.moveEnd('character',-tagClose.length);\n    }\n    r.select();\n  // Mozilla\n  } else if(txtarea.selectionStart || txtarea.selectionStart == '0') {\n    var replaced = false;\n    var startPos = txtarea.selectionStart;\n    var endPos   = txtarea.selectionEnd;\n    if(endPos - startPos) replaced = true;\n    var scrollTop=txtarea.scrollTop;\n    var myText = (txtarea.value).substring(startPos, endPos);\n    if(!myText) { myText=sampleText;}\n    if(myText.charAt(myText.length - 1) == \" \"){ // exclude ending space char, if any\n      subst = tagOpen + myText.substring(0, (myText.length - 1)) + tagClose + \" \";\n    } else {\n      subst = tagOpen + myText + tagClose;\n    }\n    txtarea.value = txtarea.value.substring(0, startPos) + subst +\n                    txtarea.value.substring(endPos, txtarea.value.length);\n    txtarea.focus();\n\n    //set new selection\n    //modified by Patrice Ferlet\n    // - selection wasn't good for selected text replaced\n    txtarea.selectionStart=startPos+tagOpen.length;\n    txtarea.selectionEnd=startPos+tagOpen.length+myText.length;\n\n    txtarea.scrollTop=scrollTop;\n  // All others\n  } else {\n    var copy_alertText=alertText;\n    var re1=new RegExp(\"\\\$1\",\"g\");\n    var re2=new RegExp(\"\\\$2\",\"g\");\n    copy_alertText=copy_alertText.replace(re1,sampleText);\n    copy_alertText=copy_alertText.replace(re2,tagOpen+sampleText+tagClose);\n    var text;\n    if (sampleText) {\n      text=prompt(copy_alertText);\n    } else {\n      text=\"\";\n    }\n    if(!text) { text=sampleText;}\n    text=tagOpen+text+tagClose;\n    //append to the end\n    txtarea.value += text;\n\n    // in Safari this causes scrolling\n    if(!is_safari) {\n      txtarea.focus();\n    }\n\n  }\n  // reposition cursor if possible\n  if (txtarea.createTextRange) txtarea.caretPos = document.selection.createRange().duplicate();\n}\n        ");
     return $toReturn;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:26,代码来源:wikieditor.templatetag.php

示例2: process

 public function process($pParams)
 {
     extract($pParams);
     if (!isset($name)) {
         throw new CopixTemplateTagException('[AutoComplete] Required parameter name');
     }
     if (!isset($field)) {
         $field = $name;
     }
     if (!isset($id)) {
         $id = $name;
     }
     if (!isset($value)) {
         $value = "";
     }
     if (!isset($onSelect)) {
         $onSelect = "";
     }
     if (!isset($onRequest)) {
         $onRequest = '';
     }
     if (!isset($extra)) {
         $extra = '';
     }
     if (!isset($pParams['datasource'])) {
         $pParams['datasource'] = 'dao';
     }
     $toMaj = '';
     $onSelectTemp = '';
     if (isset($maj)) {
         $onSelectTemp .= "eleme.selected.id = 'selector_autocomplete';";
         foreach ($maj as $key => $field) {
             $onSelectTemp .= "\n                        \$\$('#selector_autocomplete .{$key}').each (function (el) {\n                            \$('{$field}').value = el.innerHTML;\n                        });\n                    ";
             $toMaj .= $key . ';';
         }
     }
     $onSelect = $onSelectTemp . $onSelect;
     $url = 'generictools|ajax|getAutoComplete';
     if (isset($pParams['url'])) {
         $url = $pParams['url'];
     }
     $length = isset($length) ? $length : 1;
     $pParams['view'] = isset($pParams['view']) ? $pParams['view'] : $field;
     $tab = array();
     foreach ($pParams as $key => $param) {
         $tab[$key] = $param;
     }
     $tab['nb'] = 10;
     $tab['tomaj'] = $toMaj;
     $js = new CopixJSWidget();
     $js->tag_autocomplete($id, $name, $length, $tab, _url($url), $js->function_(null, 'el', $onRequest), $js->function_(null, 'el,eleme,element', $onSelect));
     CopixHTMLHeader::addJSDOMReadyCode($js);
     CopixHTMLHeader::addJSLink(_resource('js/taglib/tag_autocomplete.js'));
     _eTag("mootools", array('plugin' => "observer;autocompleter"));
     $toReturn = '<input type="text" id="' . $name . '" name="' . $name . '" value="' . $value . '" ' . $extra . ' /><span id="autocompleteload_' . $name . '"><img src="' . CopixUrl::getResource('img/tools/load.gif') . '" /></span>';
     return $toReturn;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:57,代码来源:autocomplete.templatetag.php

示例3: smarty_function_help

/**
 * Smarty {help} function plugin
 *
 * Type:     function<br>
 * Name:     help<br>
 */
function smarty_function_help($params, &$smarty)
{
    if (empty($params['mode'])) {
        $smarty->trigger_error("mailto: missing 'text' parameter");
        return;
    } else {
        $mode = trim($params['mode']);
    }
    switch ($mode) {
        case 'tooltip':
            include_once COPIX_PROJECT_PATH . '../utils/copix/smarty_plugins/function.tooltip.php';
            $res = '';
            $text_tooltip = isset($params['text_i18n']) ? CopixI18N::get($params['text_i18n']) : $params['text'];
            $res .= smarty_function_tooltip(array('text' => '<img width="14" height="14" hspace="2" src="' . CopixUrl::getResource("img/aide/bulle.gif") . '" border="0" alt="' . htmlentities(CopixI18N::get('kernel|kernel.help')) . '" title="' . htmlentities(CopixI18N::get('kernel|kernel.help')) . '" />', 'text_tooltip' => $text_tooltip), $smarty);
            break;
    }
    return $res;
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:24,代码来源:function.help.php

示例4: smarty_function_user

/**
 * Smarty {user} function plugin
 *
 * Type:     function<br>
 * Name:     user<br>
 * Date:     06/04/2006
 * Purpose:  Affiche une personne en rendant éventuellement son nom cliquable pour détailler son profil, et éventuellement l'enveloppe pour lui écrire un minimail.<br>
 * Input:<br>
 *         - label = nom à afficher (nom, nom+prénom, login...)
 *         - userType = (optional) type d'utilisateur. Nécessaire pour rendre le label cliquable et afficher son profil
 *         - userId = (optional) id d'utilisateur. Nécessaire pour rendre le label cliquable et afficher son profil
 *         - dispMail = (optional) 1 pour afficher l'enveloppe permettant d'écrire un minimail
 *         - login = (optional) login de l'utilisateur. Nécessaire pour afficher l'enveloppe
 *         - linkAttribs = (optional) attributs HTML de la balise A HREF entourant le label
 *				 - assign   = (optional) name of the template variable we'll assign
 *                      the output to instead of displaying it directly
 *				 - fromLogin = a partir du login, se charge d'afficher les infos du compte
 * Examples:
 * <pre>
 * {user label="Marc Dupond"}
 * {user label="Marc Dupond" userType="USER_ENS" userId=1}
 * {user label="Marc Dupond" userType="USER_ENS" userId=1 login="mdupond" dispMail=1}
 * {user label="Marc Dupond" userType="USER_ENS" userId=1 login="mdupond" dispMail=1 linkAttribs='CLASS="link"'}
 * {user fromLogin="mbraton"}
 * </pre>
 * @version  1.0
 * @author   Christophe Beyer <cbeyer@cap-tic.fr>
 * @author   CAP-TIC
 * @param    array
 * @param    Smarty
 * @return   string
 */
function smarty_function_user($params, &$smarty)
{
    if (isset($params['fromLogin'])) {
    } elseif (empty($params['label'])) {
        //$smarty->trigger_error("mailto: missing 'label' parameter");
        return;
    } else {
        $label = trim($params['label']);
    }
    if (trim($params['fromLogin'])) {
        $params['fromLogin'] = trim($params['fromLogin']);
        $userInfo = Kernel::getUserInfo("LOGIN", $params['fromLogin']);
        if (count($userInfo) > 0) {
            //var_dump($userInfo);
            $label = trim($userInfo['prenom'] . ' ' . $userInfo['nom']);
            $params['userType'] = $userInfo['type'];
            $params['userId'] = $userInfo['id'];
            $params['login'] = $params['fromLogin'];
        } else {
            $label = $params['fromLogin'];
        }
    }
    if ($params['userType'] && $params['userId']) {
        // $res = '<A '.$params['linkAttribs'].' HREF="javascript:viewUser(\''.$params['userType'].'\', \''.$params['userId'].'\', \''.addslashes(htmlentities(CopixI18N::get ('annuaire|annuaire.profil.loading'))).'\');">'.$label.'</A>';
        $res = '<a ' . $params['linkAttribs'] . ' class="viewuser" user_type="' . $params['userType'] . '" user_id="' . $params['userId'] . '">' . $label . '</a>';
    } else {
        $res = $label;
    }
    if ($params['dispMail'] == 1 && $params['login']) {
        $url = CopixUrl::get('minimail||getNewForm', array('login' => $params['login']));
        $res .= '&nbsp;<A HREF="' . $url . '"><IMG WIDTH="12" HEIGHT="9" SRC="' . CopixUrl::getResource("img/minimail/new_minimail.gif") . '" ALT="' . htmlentities(CopixI18N::get('annuaire|annuaire.writeMinimail')) . '" TITLE="' . htmlentities(CopixI18N::get('annuaire|annuaire.writeMinimail')) . '" BORDER="0" /></A>';
    }
    if (isset($params['assign'])) {
        $smarty->assign($params['assign'], $res);
        return '';
    } else {
        return $res;
    }
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:71,代码来源:function.user.php

示例5: process

 public function process($pParams)
 {
     $size = '';
     if (isset($pParams['width'])) {
         $size .= ' width="' . $pParams['width'] . '"';
     }
     if (isset($pParams['height'])) {
         $size .= ' height="' . $pParams['height'] . '"';
     }
     $src = '';
     if (isset($pParams['resource'])) {
         $src = CopixUrl::getResource($pParams['resource']);
     }
     if (isset($pParams['id']) && $src == '') {
         if (!CopixModule::isEnabled('pictures')) {
             throw new CopixException('Vous devez activer le module pictures');
         }
         $arParams = array('picture_id' => $pParams['id']);
         if (isset($pParams['width'])) {
             $arParams['width'] = $pParams['width'];
         }
         if (isset($pParams['height'])) {
             $arParams['height'] = $pParams['height'];
         }
         $src = CopixUrl::get('pictures|default|getImage', $arParams);
     }
     $title = '';
     if (isset($pParams['title'])) {
         $title = $pParams['title'];
     }
     $alt = $title;
     if (isset($pParams['alt'])) {
         $alt = $pParams['alt'];
     }
     return '<img src="' . $src . '" alt="' . $alt . '" title="' . $title . '" ' . $size . ' />';
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:36,代码来源:copixpicture.templatetag.php

示例6: addImg

 public function addImg($iPath)
 {
     return CopixUrl::getResource('images/' . $iPath);
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:4,代码来源:enic.html.php

示例7: function

<script type="text/javascript">
<?php 
$js = enic::get('javascript');
echo $js->display();
?>
</script>

<script type="text/javascript">
$(document).ready(function(){
  $ = jQuery.noConflict();
/*
        var theme;
        // RMQ : getJSON use async mode and we need sync...
        $.ajax({
            url: '<?php 
echo CopixUrl::getResource("theme.conf.json");
?>
',
            async: false,
            dataType: 'json',
            success: function (data) { theme = data; }
        });
        dim = theme.dimensions.STD;

        $('<style type="text/css" media="screen">#main-wrapper {width:'+dim.main_width+'px}</style>').appendTo('head');
        $('<style type="text/css" media="print">#main-wrapper {width:100%}</style>').appendTo('head');

        // AUTOMATIC RESIZING
        $('#left').css('width', dim.left_width);
        $('#left').css('margin-right', -dim.left_width);
        $('#right').css('width', dim.right_width);
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:31,代码来源:scripts.php

示例8: testModuleContext

 public function testModuleContext()
 {
     $modulePrefix = CopixModule::getPath('copixtest') . 'www/';
     // Attention ici on teste getResourcePath
     $this->assertEquals($modulePrefix . 'img/fr_FR/module_fr_FR.jpg', CopixUrl::getResourcePath('|img/module_fr_FR.jpg'));
     $this->assertEquals($modulePrefix . 'img/fr/module_fr.jpg', CopixUrl::getResourcePath('|img/module_fr.jpg'));
     $this->assertEquals($modulePrefix . 'img/module.jpg', CopixUrl::getResourcePath('|img/module.jpg'));
     $this->assertEquals(CopixUrl::get() . 'img/notFound.jpg', CopixUrl::getResource('|img/notFound.jpg'));
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:9,代码来源:copixtest_copixurlresourcetest.class.php

示例9: process

 /**
  * Input:    name     = (required  name of the select box
  *           id       = (optional) id of SELECT element.
  *           values   = (optional) values to display the values captions will be
  *                        html_escaped, not the ids
  *           selected = (optional) id of the selected element
  *           assign   = (optional) name of the template variable we'll assign
  *                      the output to instead of displaying it directly
  *           emptyValues = id / value for the empty selection
  *           emptyShow   = [true] / false - wether to show or not the "emptyString"
  *           objectMap   = (optional) if given idProperty;captionProperty
  *           extra = (optional) if given, will be added directly in the select tag
  */
 public function process($pParams, $pContent = null)
 {
     extract($pParams);
     //input check
     if (empty($name)) {
         throw new CopixTemplateTagException("[plugin copixselect] parameter 'name' cannot be empty");
     }
     if (!empty($objectMap)) {
         $tab = explode(';', $objectMap);
         if (count($tab) != 2) {
             throw new CopixTemplateTagException("[plugin copixselect] parameter 'objectMap' must looks like idProp;captionProp");
         }
         $idProp = $tab[0];
         $captionProp = $tab[1];
         $shortCaptionProp = $captionProp;
         if (isset($tab[2])) {
             $shortCaptionProp = $tab[2];
         }
     }
     if (empty($extra)) {
         $extra = '';
     }
     if (empty($id)) {
         $id = $name;
     }
     if (empty($values)) {
         $values = array();
     }
     if (!is_array($values) && !$values instanceof Iterator) {
         $values = (array) $values;
     }
     if (empty($zIndex)) {
         $zIndex = '1000';
     }
     if (empty($heightDiv)) {
         $heightDiv = 'auto';
     } else {
         $heightDiv = intval($heightDiv) . 'px';
     }
     if (empty($widthDiv)) {
         $widthDiv = 'auto';
     } else {
         $widthDiv = intval($widthDiv) . 'px';
     }
     if (empty($width)) {
         $width = 'auto';
     } else {
         $width = intval($width) . 'px';
     }
     if (!isset($img)) {
         $img = 'img/tools/multiple.gif';
     }
     if (!isset($selected)) {
         $selected = '';
     }
     if (!isset($selectedIsIdentical)) {
         $selectedIsIdentical = false;
     }
     if (!isset($class)) {
         $class = 'copixselect';
     }
     $js = new CopixJSWidget();
     $toReturn = "\n        <span id='clicker_{$id}'>\n            <input id='caption{$id}' name='caption{$name}' type='text' readonly='readonly' class='{$class}' style='width:{$width};cursor:default;text-align:left;padding-left:3px;height:13px;' value ='' /><img src=" . CopixUrl::getResource('img/tools/multiple.gif') . " align='absbottom' vspace='1' alt='' />\n            <input id='{$id}' name='{$name}' type='hidden' class='{$class}' value ='{$selected}' />\n        </span>\n        <div class='{$class}' style='position:absolute;z-index:{$zIndex};display:none;width:{$widthDiv};height:{$heightDiv}' id='div{$id}'>\n            <table class='{$class}' style='width:{$widthDiv};'>";
     //each of the values.s
     $arValues = array();
     $toReturnValue = '';
     $event = "onmouseover = \"\$(this).setStyle('cursor','pointer');\$(this).setStyle ('background-color','#AAAAAA');\" onmouseout = \"\$(this).setStyle('background-color','white');\" onclick =\" \$('{$id}').value = \$(this).getProperty('rel');\$('caption{$id}').value = \$(this).innerHTML;\$('caption{$id}').fireEvent ('mouseleavezone');\" ";
     if (empty($objectMap)) {
         $arValues = $values;
         $compteur = 0;
         foreach ($values as $key => $caption) {
             if ($selectedIsIdentical && $selected === $key || !$selectedIsIdentical && $selected == $key) {
                 $js->_("caption" . $id)->value = $caption;
             }
             $toReturn .= "<tr>\n                                <td class='{$id}' rel='{$key}' " . $event . " >{$values}</td>\n                            </tr>";
         }
     } else {
         //if given an object mapping request.
         $compteur = 0;
         foreach ($values as $object) {
             if ($selectedIsIdentical && $selected === $object->{$idProp} || !$selectedIsIdentical && $selected == $object->{$idProp}) {
                 $js->_("caption" . $id)->value = $object->{$shortCaptionProp};
             }
             $arValues[$object->{$idProp}] = $object->{$captionProp};
             $toReturn .= "<tr>\n                                <td class='{$id}' rel='" . $object->{$idProp} . "' " . $event . " >" . $arValues[$object->{$idProp}] . "</td>\n                            </tr>";
         }
     }
//.........这里部分代码省略.........
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:101,代码来源:copixselect.templatetag.php

示例10: smarty_function_icon

/**
 * Icones pour differentes actions
 *
 * @author Christophe Beyer <cbeyer@cap-tic.fr>
 * @param string $action Action correspondante : modify,
 * @param string $title Titre de l'action. Sera place en TITLE sur l'image
 * @param boolean $legende Si on veut afficher la legende pluttot que l'image (<IMG...>). Par defaut : false
 * @since 2009/03/14
 */
function smarty_function_icon($params, &$smarty)
{
    $img = false;
    $folder = 'webicons2';
    switch ($params['action']) {
        /*
        case "modify" : $img = "Modify.png"; $title = "Modifier"; break;
        case "delete" : $img = "Delete.png"; $title = "Supprimer"; break;
        case "add" : $img = "Add.png"; $title = "Ajouter"; break;
        case "details" : $img = "Info.png"; $title = "D&eacute;tails"; break;
        case "search" : $img = "Search.png"; $title = "Rechercher"; break;
        case "stats" : $img = "Bar-Chart.png"; $title = "Stats"; break;
        case "back" : $img = "Back.png"; $title = "Retour"; break;
        case "warning" : $img = "Warning.png"; $title = "Warning"; break;
        case "next" : $img = "Next.png"; $title = "Suite"; break;
        */
        case "modify":
            $img = $folder . "/reply.gif";
            $title = "Modifier";
            break;
        case "delete":
            $img = $folder . "/action_delete.gif";
            $title = "Supprimer";
            break;
        case "add":
            $img = $folder . "/action_add.gif";
            $title = "Ajouter";
            break;
        case "details":
            $img = $folder . "/file.gif";
            $title = "D&eacute;tails";
            break;
        case "search":
            $img = $folder . "/search.gif";
            $title = "Rechercher";
            break;
        case "stats":
            $img = "webicons1/Bar-Chart.png";
            $title = "Stats";
            break;
        case "back":
            $img = $folder . "/arrow_back.gif";
            $title = "Retour";
            break;
        case "warning":
            $img = "webicons1/Warning.png";
            $title = "Warning";
            break;
        case "next":
            $img = $folder . "/arrow_next.gif";
            $title = "Suite";
            break;
        case "checked":
            $img = $folder . "/action_check.gif";
            $title = "";
            break;
        case "print":
            $img = "coquette3/printer.png";
            $title = "Imprimer";
            break;
    }
    $width = $height = 16;
    if ($params['size']) {
        list($width, $height) = explode('x', $params['size']);
    }
    $title = $params['title'] ? $params['title'] : $title;
    $res = '';
    $src = CopixUrl::getResource('img/' . $img);
    if ($img && $params['legende']) {
        $res = $title;
    } elseif ($img) {
        $res = '<img src="' . $src . '" width="' . $width . '" height="' . $height . '" alt="' . $img . '" title="' . $title . '" />';
    } else {
        $res = 'smarty_function_icon : ERROR (action=' . $params['action'] . ')';
    }
    if (isset($params['assign'])) {
        $smarty->assign($params['assign'], $res);
        return '';
    } elseif (isset($params['src'])) {
        return $src;
    } else {
        return $res;
    }
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:93,代码来源:function.icon.php

示例11:

" type="text/css"/>
<link rel="stylesheet" href="<?php 
echo CopixUrl::getResource("styles/core_custom.css");
?>
" type="text/css" />

<?php 
if (preg_match("/MSIE 6.0/i", $_SERVER["HTTP_USER_AGENT"])) {
    ?>
    <link rel="stylesheet" href="<?php 
    echo CopixUrl::getResource("styles/core_iehacks.css");
    ?>
" type="text/css"/>
    <link rel="stylesheet" href="<?php 
    echo CopixUrl::getResource("styles/core_ie6hacks.css");
    ?>
" type="text/css"/>
<?php 
}
if (preg_match("/MSIE 7.0/i", $_SERVER["HTTP_USER_AGENT"])) {
    ?>
    <link rel="stylesheet" href="<?php 
    echo CopixUrl::getResource("styles/core_iehacks.css");
    ?>
" type="text/css"/>
    <link rel="stylesheet" href="<?php 
    echo CopixUrl::getResource("styles/core_ie7hacks.css");
    ?>
" type="text/css"/>
<?php 
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:31,代码来源:styles.php

示例12: _resource

/**
 * Alias à CopixURL::getResource ();
 * @see CopixURL::getResource ()
 * @param	string	$pResourcePath	le chemin de la ressource que l'on souhaite aller chercher
 * @return string
 */
function _resource($pResourcePath)
{
    return CopixUrl::getResource($pResourcePath);
}
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:10,代码来源:shortcuts.lib.php

示例13: process


//.........这里部分代码省略.........
  *           objectMap   = (optional) if given idProperty;captionProperty
  *           extra = (optional) if given, will be added directly in the select tag
  */
 public function process($pParams, $pContent = null)
 {
     extract($pParams);
     //input check
     if (empty($name)) {
         throw new CopixTemplateTagException("[plugin multipleselect] parameter 'name' cannot be empty");
     }
     if (!empty($objectMap)) {
         $tab = explode(';', $objectMap);
         if (count($tab) != 2) {
             throw new CopixTemplateTagException("[plugin multipleselect] parameter 'objectMap' must looks like idProp;captionProp");
         }
         $idProp = $tab[0];
         $captionProp = $tab[1];
     }
     if (empty($extra)) {
         $extra = '';
     }
     if (empty($id)) {
         $id = $name;
     }
     if (empty($values)) {
         $values = array();
     }
     if (!is_array($values) && !$values instanceof Iterator) {
         $values = (array) $values;
     }
     if (empty($height)) {
         $height = 'auto';
     } else {
         $height = intval($height) . 'px';
     }
     if (empty($width)) {
         $width = 'auto';
     } else {
         $width = intval($width) . 'px';
     }
     if (!isset($img)) {
         $img = 'img/tools/multiple.gif';
     }
     //each of the values.
     $idDiv = 'divdata_' . $id;
     $arValues = array();
     $toReturnValue = '';
     if (empty($objectMap)) {
         $arValues = $values;
         $compteur = 0;
         foreach ($values as $key => $caption) {
             $selectedString = isset($selected) && in_array($key, is_array($selected) ? $selected : array($selected), true) ? ' checked="checked" ' : '';
             $currentId = uniqid('ch');
             $compteur++;
             $color = $compteur % 2 == 0 ? '#cccccc' : '#ffffff';
             $toReturnValue .= '<div class="multipleselect_checker_' . $id . '" rel="' . $id . '" style="width:auto;background-color:' . $color . ';color:black"><input type="checkbox" class="multipleselect_check_' . $id . '" rel="' . $id . '" id="' . $currentId . '" value="' . $key . '"' . $selectedString . ' /><label id="label_' . $currentId . '" for="' . $currentId . '" style="color:black">' . _copix_utf8_htmlentities($caption) . '</label><br /></div>';
         }
     } else {
         //if given an object mapping request.
         $compteur = 0;
         foreach ($values as $object) {
             $arValues[$object->{$idProp}] = $object->{$captionProp};
             $currentId = uniqid('check');
             $compteur++;
             $color = $compteur % 2 == 0 ? '#cccccc' : '#ffffff';
             $selectedString = array_key_exists('selected', $pParams) && in_array($object->{$idProp}, is_array($selected) ? $selected : array($selected)) ? ' checked="checked" ' : '';
             $toReturnValue .= '<div class="multipleselect_checker_' . $id . '" rel="' . $id . '" style="width:auto;background-color:' . $color . ';color:black"><input type="checkbox" class="multipleselect_check_' . $id . '" rel="' . $id . '" id="' . $currentId . '" value="' . $object->{$idProp} . '"' . $selectedString . ' /><label id="label_' . $currentId . '" for="' . $currentId . '" style="color:black">' . _copix_utf8_htmlentities($object->{$captionProp}) . '</label><br /></div>';
         }
     }
     _tag('mootools', array('plugin' => array('zone', 'overlayfix')));
     CopixHTMLHeader::addJSLink(_resource('js/taglib/multipleselect.js'));
     CopixHTMLHeader::addJsDomReadyCode('multipleselect ();', 'multipleselect');
     //proceed
     $value = '';
     $hidden = '';
     if (isset($selected) && is_array($selected)) {
         foreach ($selected as $select) {
             if ($value != null) {
                 $value .= ',';
             }
             $value .= isset($arValues[$select]) ? $arValues[$select] : '';
             $hidden .= '<input type="hidden" name="' . $name . '[]" value="' . $select . '" />';
         }
     } elseif (isset($selected)) {
         $value .= isset($arValues[$select]) ? $arValues[$selected] : '';
     }
     //Div caché pour avoir des paramètres disponible dans le DOM
     $toReturn = '<div style="display:none;" class="multipleselect_id" rel="' . $id . '"></div><div style="display:none;" id="name_' . $id . '" rel="' . $name . '"></div><div style="display:none;" id="height_' . $id . '" rel="' . $height . '"></div>';
     //Commence par un &nbsp; car bug d'alignement dans certains nav
     $noreset = false;
     if (isset($pParams['noreset']) && $pParams['noreset']) {
         $noreset = true;
     }
     $toReturn .= '<span id="div_' . $id . '" style="width:' . $width . ';vertical-align:center;" ><input type="text" id="input_' . $id . '" name="input_' . $name . '" value="' . $value . '" ' . $extra . ' style="width:' . $width . '" readonly="readonly" noreset="' . $noreset . '"/><img src="' . CopixUrl::getResource($img) . '" align="absbottom" vspace="1" alt="" /></span>';
     //Div contenant la liste
     $toReturn .= '<div id="' . $idDiv . '" style="margin:auto;visibility:hidden;top:1px;left:1px;position:absolute;z-index:9999;background-color:white;border:1px solid #bbbbbb">' . $toReturnValue . '</div>';
     //Div contenant les champs hidden permettant de passer les valeurs sélectionner
     $toReturn .= '<div id="hidden_' . $id . '" style="visibility:hidden;position:absolute">' . $hidden . '</div>';
     return $toReturn;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:101,代码来源:multipleselect.templatetag.php

示例14: process

 public function process($pParams)
 {
     if (!isset($pParams['zone'])) {
         new CopixTemplateTagException('zone');
     }
     $sessionVar = uniqid();
     $sessionZone = uniqid();
     CopixSession::set($sessionZone, $pParams['zone']);
     unset($pParams['zone']);
     CopixSession::set($sessionVar, $pParams);
     if (!isset($pParams['alt'])) {
         $pParams['alt'] = '';
     }
     if (!isset($pParams['imgtitle'])) {
         $pParams['imgtitle'] = '';
     }
     if (!isset($pParams['text'])) {
         $pParams['text'] = '';
     }
     if (!isset($pParams['displayimg'])) {
         $pParams['displayimg'] = true;
     }
     if (!isset($pParams['img'])) {
         $pParams['img'] = _resource('img/tools/information.png');
     }
     if (!isset($pParams['divclass'])) {
         $pParams['divclass'] = 'popupInformation';
     }
     if (!isset($pParams['handler'])) {
         $pParams['handler'] = 'onmouseover';
     }
     $id = uniqid('popupInformation');
     switch ($pParams['handler']) {
         case 'click':
             $toReturn = '<a rel="' . $id . '" id="div' . $id . '" href="javascript:void(null);">';
             $close = '</a>';
             break;
         default:
             //prend également en charge onmouseover qui est le handler par défaut.
             $toReturn = '<div rel="' . $id . '" id="div' . $id . '" class="divpopup" style="display:inline;">';
             $close = '</div>';
             break;
     }
     $toReturn .= $pParams['displayimg'] === true ? '<img src="' . $pParams['img'] . '" title="' . $pParams['imgtitle'] . '" alt="' . $pParams['alt'] . '" />' : '';
     $toReturn .= strlen($pParams['text']) ? $pParams['text'] : '';
     $toReturn .= isset($pParams['imgnext']) ? '<img src="' . $pParams['imgnext'] . '" />' : '';
     $toReturn .= $close;
     $width = 'auto';
     if (isset($pParams['width'])) {
         $width = $pParams['width'];
     }
     $toReturn .= '<div class="' . $pParams['divclass'] . '" id="' . $id . '" style="width:' . $width . ';display:none;" >';
     //$toReturn .= $pContent;
     $toReturn .= '</div>';
     $jsCode = "\nvar ajax_zone = {\n    getZone : function (pZone,pSession,pDiv) {\n        new Ajax('" . _url('generictools|ajax|getZone') . "', {\n                            method: 'post',\n                            update: pDiv,\n                            evalScripts : true,\n                            data: {'zone':pZone,'sessionvar':pSession}\n                        }).request();\n    }\n};\n";
     CopixHTMLHeader::addJSCode($jsCode, 'ajaxpopup');
     switch ($pParams['handler']) {
         case 'click':
             $jsCode = "\n                window.addEvent('domready',function () {\n                    var el = \$('div{$id}');\n                    var rel = \$(el.getProperty('rel'));\n                    var save{$id} = {\n                        click : false,\n                        flag : false,\n                        hide : function () {\n                            if (!save{$id}.flag) {\n                                rel.fireEvent('hide');\n                            }\n                        }\n                    };\n                    el.addEvent ('click', function (e) {\n                        save{$id}.click = true;\n                        rel.fireEvent('display');\n                    });\n                    el.addEvent('mouseleave', function () {\n                        if (save{$id}.click) {\n                            save{$id}.hide.delay(1000);\n                        }\n                    });\n                    rel.addEvent ('mouseleave', function () {\n                        rel.fireEvent('hide');\n                    });\n                    rel.addEvent ('mouseenter', function () {\n                        save{$id}.flag = true;\n                    });\n                    rel.addEvent ('display', function (e) {\n                        if (rel.getStyle('display') == 'none') {\n                            if (rel.innerHTML=='') {\n                                    rel.setHTML('<img src=\"" . CopixUrl::getResource('img/tools/load.gif') . "\" />');\n                                    ajax_zone.getZone('{$sessionZone}','{$sessionVar}',rel);\n                            }\n                            rel.setStyles({'left':(el.getLeft()+el.getSize().size.x)+'px','zIndex':'10'});\n\n                            rel.setStyle('display','');\n                            rel.fixdivShow.delay(200,rel);\n                        } else {\n                            rel.fixdivHide();\n                            rel.setStyle('display','none');\n                        }\n                    });\n                    rel.addEvent ('hide', function () {\n                        save{$id}.flag = false;\n                        save{$id}.click = false;\n                        rel.fixdivHide();\n                        rel.setStyle('display','none');\n                    });\n                });\n                ";
             break;
         default:
             $jsCode = "\n                 window.addEvent('domready',function () {\n                              el = \$('div{$id}');\n                             var rel = \$(el.getProperty('rel'));\n                             /*\n                             el.addEvent('trash',function () {\n                                rel.remove();\n                             });\n                             */\n\n                             rel.injectInside(document.body);\n                             el.addEvent('mouseenter', function (e) {\n                                if (rel.innerHTML=='') {\n                                    rel.setHTML('<img src=\"" . CopixUrl::getResource('img/tools/load.gif') . "\" />');\n                                    ajax_zone.getZone('{$sessionZone}','{$sessionVar}',rel)\n                                }\n                                var e = new Event(e);\n                                rel.fixdivShow();\n                                rel.setStyle('visibility','visible');\n                             });\n\n                             el.addEvent('mousemove', function (e) {\n                                var e = new Event(e);\n                                 rel.setStyles({\n                                    'position':'absolute',\n                                    'top' : (e.page.y+5)+'px',\n                                    'left' : (e.page.x+5)+'px'\n                                 });\n                             });\n\n                             el.addEvent('mouseleave', function (e) {\n                                 var e = new Event(e);\n                                 rel.fixdivHide();\n                                 rel.setStyle('visibility','hidden');\n                             });\n\n\n                });\n                 ";
     }
     CopixHTMLHeader::addJSCode($jsCode);
     _tag('mootools', array('plugin' => array('overlayfix')));
     return $toReturn;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:67,代码来源:ajax_popupinformation.templatetag.php

示例15:

    <?php 
include_once COPIX_PROJECT_PATH . "themes/default/styles.php";
?>
    <?php 
include_once COPIX_PROJECT_PATH . "themes/default/scripts.php";
?>
    <link rel="stylesheet" href="<?php 
echo CopixUrl::getResource("styles/popup.css");
?>
" type="text/css"/>
    <?php 
echo $HTML_HEAD;
?>
    <link rel="stylesheet" href="<?php 
echo CopixUrl::getResource("styles/core_custom.css");
?>
" type="text/css"/>

</head>

<body>

<div id="divUserProfil" onclick="hideUser();"></div>
<div id="ajaxDiv"></div>

<div id="content-popup" class="ink_blue">
    <?php 
echo $MAIN;
?>
</div>
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:30,代码来源:main_popup.php


注:本文中的CopixUrl::getResource方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。