Changeset 16008


Ignore:
Timestamp:
06/24/12 21:15:21 (7 years ago)
Author:
grum
Message:

feature:2635- compatibility with Piwigo 2.4

Location:
extensions/ASearchEngine
Files:
2 added
12 edited

Legend:

Unmodified
Added
Removed
  • extensions/ASearchEngine/ase_aip.class.inc.php

    r15360 r16008  
    6363      GPCRequestBuilder::loadJSandCSS(); 
    6464    } 
    65     add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS')); 
    66     GPCCss::applyGpcCss(); 
     65  } 
     66 
     67  public function loadCSS() 
     68  { 
     69    global $template; 
     70 
     71    parent::loadCSS(); 
     72    GPCCore::addUI('gpcCSS'); 
     73    GPCCore::addHeaderCSS('ase.css', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles().".css"); 
    6774  } 
    6875 
     
    138145    global $template; 
    139146 
    140     GPCCore::addHeaderCSS('categorySelector', 'plugins/GrumPluginClasses/css/categorySelector_'.$template->get_themeconf('name').'.css'); 
    141     GPCCore::addHeaderCSS('tagSelector', 'plugins/GrumPluginClasses/css/tagSelector_'.$template->get_themeconf('name').'.css'); 
    142  
     147    GPCCore::addUI('inputTag,categorySelector'); 
    143148 
    144149    $template->set_filename('body_page', 
  • extensions/ASearchEngine/ase_ajax.php

    r7207 r16008  
    2525   */ 
    2626  if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']=''; 
    27   if(preg_match('/^admin\./i', $_REQUEST['ajaxfct'])) 
    28   { 
    29     define('IN_ADMIN', true); 
    30   } 
     27  if(preg_match('/^admin\./i', $_REQUEST['ajaxfct'])) define('IN_ADMIN', true); 
     28  if(!defined('AJAX_CALL')) define('AJAX_CALL', true); 
     29 
    3130 
    3231  // the common.inc.php file loads all the main.inc.php plugins files 
     
    5958      global $user; 
    6059 
    61       if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']=''; 
     60      GPCAjax::checkToken(); 
    6261 
    6362      // check if asked function is valid 
    64       if(!($_REQUEST['ajaxfct']=='admin.config.setConfig' 
    65            )) $_REQUEST['ajaxfct']=''; 
     63      if(!($_REQUEST[GPC_AJAX]=='admin.config.setConfig' 
     64           )) $_REQUEST[GPC_AJAX]=''; 
    6665 
    67       if(preg_match('/^admin\./i', $_REQUEST['ajaxfct']) and !is_admin()) $_REQUEST['ajaxfct']=''; 
     66      if(preg_match('/^admin\./i', $_REQUEST[GPC_AJAX]) and !is_admin()) $_REQUEST[GPC_AJAX]=''; 
    6867 
    6968 
    70       if($_REQUEST['ajaxfct']!='') 
     69      if($_REQUEST[GPC_AJAX]!='') 
    7170      { 
    7271 
     
    8281      $result="<p class='errors'>An error has occured</p>"; 
    8382 
    84       switch($_REQUEST['ajaxfct']) 
     83      switch($_REQUEST[GPC_AJAX]) 
    8584      { 
    8685        case 'admin.config.setConfig': 
    87           $result=$this->ajax_gmaps_admin_mapsGetList(); 
    8886          break; 
    8987      } 
  • extensions/ASearchEngine/ase_pip.class.inc.php

    r15360 r16008  
    2323  const SEARCH_SECTION = 'ASearch'; 
    2424  protected $sectionPage; 
    25   protected $css2; 
    2625 
    2726  public function __construct($prefixeTable, $filelocation) 
    2827  { 
     28    global $template; 
     29 
    2930    parent::__construct($prefixeTable, $filelocation); 
    30     $this->css2 = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles()."2.css",10); 
    3131    $this->loadConfig(); 
    3232 
     
    7272 
    7373      add_event_handler('init', array(&$this, 'applyJS')); 
    74       add_event_handler('loc_begin_page_header', array(&$this->css2, 'applyCSS'), 9); // have to be loaded before other css file (event level from GPCCore=10) 
    7574      add_event_handler('user_init', array(&$this, 'load_lang')); 
    7675    } 
    7776  } 
    7877 
    79  
     78  public function loadCSS() 
     79  { 
     80    GPCCore::addHeaderCSS('ase.css2', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles()."2.css",9);  // have to be loaded before other css file (event level from GPCCore=10) 
     81  } 
    8082 
    8183  /* ------------------------------------------------------------------------- 
     
    104106    $file=PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'local/css/ASE'.$theme.'.css'; 
    105107    if(file_exists(GPCCore::getPiwigoSystemPath().'/'.$file)) GPCCore::addHeaderCSS('ASE2', $file, 45); 
     108 
     109/* 
     110    $template->set_filename('ASEheader', dirname(__FILE__)."/templates/search_page_header.tpl"); 
     111    $template->block_html_head(null, $template->parse('ASEheader', true), null, null); 
     112    */ 
    106113  } 
    107114 
     
    116123    $template->assign('TITLE', $page['title']); 
    117124 
     125    GPCCore::AddUI('inputTag,categorySelector'); 
     126 
    118127    $template->clear_assign(array('U_MODE_CREATED', 'U_MODE_POSTED')); 
    119128 
     
    122131     * (all content are managed with ajax) 
    123132     */ 
     133 
     134    $template->assign( 
     135      array( 
     136        'derivative_params' =>trigger_event('get_index_derivative_params', ImageStdParams::get_by_type( pwg_get_session_var('index_deriv', IMG_THUMB) ) ) 
     137      ) 
     138    ); 
    124139 
    125140    $template->set_filename('ASEmain', dirname(__FILE__)."/templates/search_page.tpl"); 
  • extensions/ASearchEngine/ase_root.class.inc.php

    r15360 r16008  
    1414  --------------------------------------------------------------------------- */ 
    1515  include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'); 
    16   include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCCss.class.inc.php'); 
    1716 
    1817  class ASE_root extends CommonPlugin 
    1918  { 
    20     protected $css; 
    21  
    2219    public function __construct($prefixeTable, $filelocation) 
    2320    { 
     
    2623      parent::__construct($prefixeTable, $filelocation); 
    2724      $this->section_name=$this->getPluginNameFiles(); 
    28  
    29       $this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css"); 
    3025    } 
    3126 
     
    3530    } 
    3631 
    37     public function initEvents() 
    38     { 
    39     } 
    4032 
    4133 
  • extensions/ASearchEngine/main.inc.php

    r15360 r16008  
    8585global $prefixeTable; 
    8686 
    87 if(defined('IN_ADMIN')) 
     87if(!defined('AJAX_CALL')) 
    8888{ 
    89   //ASE admin interface loaded and active only if in admin page 
    90   include_once("ase_aim.class.inc.php"); 
    91   $obj=new ASE_AIM($prefixeTable, __FILE__); 
    92   $obj->initEvents(); 
    93 } 
    94 else 
    95 { 
    96   if(CommonPlugin::checkGPCRelease(ASE_GPC_NEEDED)) 
     89  if(defined('IN_ADMIN')) 
    9790  { 
    98     //ASE public interface loaded and active only if in public page 
    99     include_once("ase_pip.class.inc.php"); 
    100     $obj=new ASE_PIP($prefixeTable, __FILE__); 
     91    //ASE admin interface loaded and active only if in admin page 
     92    include_once("ase_aim.class.inc.php"); 
     93    $obj=new ASE_AIM($prefixeTable, __FILE__); 
     94    $obj->initEvents(); 
     95  } 
     96  else 
     97  { 
     98    if(CommonPlugin::checkGPCRelease(ASE_GPC_NEEDED) and !mobile_theme()) 
     99    { 
     100      //ASE public interface loaded and active only if in public page 
     101      include_once("ase_pip.class.inc.php"); 
     102      $obj=new ASE_PIP($prefixeTable, __FILE__); 
     103    } 
    101104  } 
    102105} 
  • extensions/ASearchEngine/templates/ase_dialog_category_choose.tpl

    r15360 r16008  
    1 {combine_script id="gpc.categorySelector" path="plugins/GrumPluginClasses/js/ui.categorySelector.js" require='jquery,jquery.ui'} 
    2 {combine_css path="plugins/GrumPluginClasses/css/categorySelector.css"} 
    3  
    41{literal} 
    52<style type='text/css'> 
  • extensions/ASearchEngine/templates/ase_dialog_tag_choose.tpl

    r15360 r16008  
    1 {combine_script id="gpc.tagSelector" path="plugins/GrumPluginClasses/js/ui.tagSelector.js" require='jquery,jquery.ui'} 
    2  
    31{literal} 
    42 
     
    4846              if(checkValidity()) 
    4947              { 
    50                 dialogOptions.values.tags=$("#iBDTagTags").tagSelector('value'); 
     48                dialogOptions.values.tags=$("#iBDTagTags").inputTag('value'); 
    5149                dialogOptions.values.method=$('[name=fBDTagMethod]:checked').val(); 
    5250 
     
    7270    ); 
    7371 
    74     $("#iBDTagTags").tagSelector( 
     72    $("#iBDTagTags").inputTag( 
    7573      { 
     74        serverUrl:"plugins/GrumPluginClasses/gpc_ajax.php", 
    7675        listMaxWidth:400, 
    7776        listMaxHeight:350, 
     
    102101    returned=true; 
    103102 
    104     if($('#iBDTagTags').tagSelector('numberOfTags')==0) 
     103    if($('#iBDTagTags').inputTag('numberOfTags')==0) 
    105104    { 
    106105      $('#iBDTagTags').addClass('error'); 
     
    172171    } 
    173172 
    174     $("#iBDTagTags").tagSelector('value', 'clear').tagSelector('value', dialogOptions.values.tags); 
     173    $("#iBDTagTags").inputTag('value', 'clear').inputTag('value', dialogOptions.values.tags); 
    175174    $('#iBDTagMethodAND').attr('checked', dialogOptions.values.method=='AND'); 
    176175    $('#iBDTagMethodOR').attr('checked', dialogOptions.values.method=='OR'); 
  • extensions/ASearchEngine/templates/search_page.tpl

    r7328 r16008  
     1{html_style} 
     2ul.rbResultList li td.rbResultItemImg 
     3{ldelim} 
     4  width:{$derivative_params->max_width()}px; 
     5  height:{$derivative_params->max_height()}px; 
     6} 
     7{/html_style} 
     8 
    19{$ase_search_page} 
  • extensions/ASearchEngine/themes/Sylvia/ASESylvia.css

    r15360 r16008  
    3030 
    3131 
    32 .ui-category-selector-arrow { color:#FF3333; } 
     32.ui-category-selector-arrow { 
     33  background-image: url("buttons.png"); 
     34  background-position: -30px -30px; 
     35  background-repeat: no-repeat; 
     36  border: 0 none; 
     37  border-radius: 2px 2px 2px 2px; 
     38} 
     39.ui-category-selector-arrow:hover { 
     40  background-position: -30px -15px; 
     41} 
     42 
    3343li.ui-category-selector-item:hover, li.ui-tag-selector-list-item:hover { background-color:#303030; } 
    3444.ui-category-selector-selected-item { background-color:#777777; } 
     45 
     46li.ui-category-selector-item div { margin:0;} 
     47li.ui-category-selector-item div.ui-category-selector-name { top:-1px; position:relative;} 
     48li.ui-category-selector-item div.ui-category-selector-status { margin:1px; } 
     49#iASECategoryCategory div.ui-category-selector-check { 
     50  position:relative; 
     51} 
     52 
    3553.ui-category-selector-expandable-item { background-image:url(expand.png); } 
    3654.ui-category-selector-collapsable-item { background-image:url(collapse.png); } 
     
    5674  background:#666666; 
    5775} 
    58 .iconEdit { background:url(edit.png) no-repeat 0 0 transparent; } 
    59 .iconDelete { background:url(delete.png) no-repeat 0 0 transparent; } 
    60 .iconMove { background:url(move.png) no-repeat 0 0 transparent; } 
    61 .iconSwitchCondition  { background:url(switch.png) no-repeat 0 0 transparent; } 
     76 
     77 
     78.iconSwitchCondition, 
     79.iconMove, 
     80.iconEdit, 
     81.iconDelete { 
     82  background:url(buttons.png) no-repeat 0 0 transparent; 
     83  -moz-border-radius:2px; 
     84  -webkit-border-radius:2px; 
     85  -khtml-border-radius:2px; 
     86  border-radius:2px; 
     87} 
     88 
     89 
     90.iconEdit { 
     91  background-position:-240px -15px; 
     92} 
     93.iconDelete { 
     94  background-position:-255px -15px; 
     95} 
     96.iconMove { 
     97  background-position:-285px -15px; 
     98} 
     99.iconSwitchCondition { 
     100  background-position:-300px -15px; 
     101} 
     102.iconEdit:hover { 
     103  background-position:-240px 0px; 
     104} 
     105.iconDelete:hover { 
     106  background-position:-255px 0px; 
     107} 
     108.iconMove:hover { 
     109  background-position:-285px 0px; 
     110} 
     111.iconSwitchCondition:hover { 
     112  background-position:-300px 0px; 
     113} 
     114 
     115 
    62116.cbItemMultiple { border:1px solid #666666; } 
    63117.cbItemOverGroup { border:1px dotted #666666; } 
     
    97151} 
    98152 
    99 .ui-category-selector-arrow { 
    100   background:none repeat scroll 0 0 #666666; 
    101   border-color:#999999 #444444 #444444 #999999; 
    102   color:#FF3363; 
    103 } 
    104  
    105 .ui-category-selector-arrow-active { 
    106   border-color:#444444 #999999 #999999 #444444; 
    107 } 
    108153 
    109154 
     
    116161  background-image:url(sTipArrows.png); 
    117162} 
    118  
     163div#iMenuCriterions div#iMenuCItems { margin-left:0px; margin-top:-2px;} 
    119164 
    120165/* AMD specific CSS */ 
  • extensions/ASearchEngine/themes/clear/ASEclear.css

    r15360 r16008  
    2828.ui-datepicker td:hover { background-color:#EEEEEE; } 
    2929.ui-datepicker td.ui-datepicker-current-day { background-color:#D3D3D3; } 
    30 .ui-category-selector-arrow { color:#005E89; } 
     30.ui-category-selector-arrow { 
     31  border: 0 none; 
     32  border-radius: 2px 2px 2px 2px; 
     33} 
    3134li.ui-category-selector-item:hover, li.ui-tag-selector-list-item:hover { background-color:#EEEEEE; color:#858460; } 
    3235.ui-category-selector-selected-item { background-color:#D3D3D3; } 
     36li.ui-category-selector-item div { margin:0;} 
     37li.ui-category-selector-item div.ui-category-selector-name { top:-1px; position:relative;} 
     38li.ui-category-selector-item div.ui-category-selector-status { margin:1px; } 
     39#iASECategoryCategory div.ui-category-selector-check { 
     40  position:relative; 
     41} 
     42 
     43 
    3344.ui-category-selector-expandable-item { background-image:url(expand.png); } 
    3445.ui-category-selector-collapsable-item { background-image:url(collapse.png); } 
     
    5869.cbItemMultiple { border:1px solid #999999; } 
    5970.cbItemOverGroup { border:1px dotted #999999; } 
    60  
     71.iconMove, .iconEdit, .iconDelete, .iconSwitchCondition { 
     72  cursor: pointer; 
     73  display: inline-block; 
     74  height: 18px; 
     75  width: 18px; 
     76} 
    6177 
    6278 
  • extensions/ASearchEngine/themes/dark/ASEdark.css

    r15360 r16008  
    2828.ui-datepicker td:hover { background-color:gray; color:fff48e; } 
    2929.ui-datepicker td.ui-datepicker-current-day { background-color:#505050; color:#fff48e; } 
    30 .ui-category-selector-arrow { color:#000000; } 
     30.ui-category-selector-arrow { 
     31  border: 0 none; 
     32  border-radius: 2px 2px 2px 2px; 
     33} 
    3134li.ui-category-selector-item:hover, li.ui-tag-selector-list-item:hover  { background-color:gray; color:#fff48e; } 
    3235.ui-category-selector-selected-item { background-color:#505050; color:#fff48e; } 
     36 
     37li.ui-category-selector-item div { margin:0;} 
     38li.ui-category-selector-item div.ui-category-selector-name { top:-1px; position:relative;} 
     39li.ui-category-selector-item div.ui-category-selector-status { margin:1px; } 
     40#iASECategoryCategory div.ui-category-selector-check { 
     41  position:relative; 
     42} 
     43 
    3344.ui-category-selector-expandable-item { background-image:url(expand_b.png); } 
    3445.ui-category-selector-collapsable-item { background-image:url(collapse_b.png); } 
     
    6172.cbItemMultiple { border:1px solid gray; } 
    6273.cbItemOverGroup { border:1px dotted gray; } 
     74.iconMove, .iconEdit, .iconDelete, .iconSwitchCondition { 
     75  cursor: pointer; 
     76  display: inline-block; 
     77  height: 18px; 
     78  width: 18px; 
     79} 
     80 
    6381 
    6482.cbButtons { color:#000000; border:1px solid gray; z-index:510; } 
     
    133151  background-image:url(sTipArrows.png); 
    134152} 
     153div#iMenuCriterions div#iMenuCItems { margin-left:-1px; margin-top:-2px;} 
    135154 
    136155 
  • extensions/ASearchEngine/themes/elegant/ASEelegant.css

    r15360 r16008  
    5656  background:#D3D3D3; 
    5757} 
    58 .iconEdit { background:url(edit.png) no-repeat 0 0 transparent; } 
    59 .iconDelete { background:url(delete.png) no-repeat 0 0 transparent; } 
    60 .iconMove { background:url(move.png) no-repeat 0 0 transparent; } 
    61 .iconSwitchCondition  { background:url(switch.png) no-repeat 0 0 transparent; } 
     58 
     59 
     60.iconSwitchCondition, 
     61.iconMove, 
     62.iconEdit, 
     63.iconDelete { 
     64  background:url(buttons_gpc.png) no-repeat 0 0 transparent; 
     65  -moz-border-radius:2px; 
     66  -webkit-border-radius:2px; 
     67  -khtml-border-radius:2px; 
     68  border-radius:2px; 
     69} 
     70 
     71 
     72.iconEdit { 
     73  background-position:-240px -15px; 
     74} 
     75.iconDelete { 
     76  background-position:-255px -15px; 
     77} 
     78.iconMove { 
     79  background-position:-285px -15px; 
     80} 
     81.iconSwitchCondition { 
     82  background-position:-300px -15px; 
     83} 
     84.iconEdit:hover { 
     85  background-position:-240px 0px; 
     86} 
     87.iconDelete:hover { 
     88  background-position:-255px 0px; 
     89} 
     90.iconMove:hover { 
     91  background-position:-285px 0px; 
     92} 
     93.iconSwitchCondition:hover { 
     94  background-position:-300px 0px; 
     95} 
     96 
     97 
    6298.cbItemMultiple { border:1px solid #666666; } 
    6399.cbItemOverGroup { border:1px dotted #666666; } 
     
    85121 
    86122.ui-category-selector-arrow { 
    87   color:#005E89; 
     123  background-image: url("buttons_gpc.png"); 
     124  background-position: -30px -30px; 
     125  background-repeat: no-repeat; 
     126  border: 0 none; 
     127  border-radius: 2px 2px 2px 2px; 
     128} 
     129.ui-category-selector-arrow:hover { 
     130  background-position: -30px -15px; 
    88131} 
    89132 
     
    105148} 
    106149 
     150li.ui-category-selector-item div { margin:0;} 
     151li.ui-category-selector-item div.ui-category-selector-name { top:-1px; position:relative;} 
     152li.ui-category-selector-item div.ui-category-selector-status { margin:1px; } 
     153#iASECategoryCategory div.ui-category-selector-check { 
     154  position:relative; 
     155} 
    107156 
    108157/* --- */ 
     
    120169} 
    121170 
    122 .ui-category-selector-arrow { 
    123   background:none repeat scroll 0 0 #999999; 
    124   border-color:#DDDDDD #666666 #666666 #DDDDDD; 
    125   color:#ffffff; 
    126 } 
    127  
    128 .ui-category-selector-arrow-active { 
    129   border-color:#666666 #DDDDDD #DDDDDD #666666; 
    130 } 
    131171 
    132172.cSimpleTipContent { 
     
    137177.cSimpleTipArrow { 
    138178  background-image:url(sTipArrows.png); 
     179} 
     180div#iMenuCriterions div#iMenuCItems { margin-left:-1px; margin-top:-1px;} 
     181 
     182div.ui-dialog-content li.valueItems { 
     183  background:#555555; 
     184  color:#cccccc; 
    139185} 
    140186 
Note: See TracChangeset for help on using the changeset viewer.