Changeset 6818


Ignore:
Timestamp:
08/29/10 18:52:52 (9 years ago)
Author:
nikrou
Message:

Fix incompatibility with PY GVideo (and Charlies')
Fix problem when deleting last related tag

Location:
extensions/user_tags
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/user_tags/CHANGELOG

    r6813 r6818  
     1User Tags 0.3.1 - 2010-08-29 
     2================================ 
     3* Fix incompatibility with PY GVideo (and Charlies') 
     4* Fix problem when deleting last related tag 
     5 
    16User Tags 0.3.0 - 2010-08-28 
    27================================ 
  • extensions/user_tags/css/style.css

    r6813 r6818  
    1 #flash-messages{position:fixed;width:60%;display:none;top:30%;left:200px;font-size:.85em;} 
     1#flash-messages{position:fixed;width:60%;display:none;top:50%;left:200px;font-size:.85em;} 
    22#flash-messages div{margin-left:120px;min-height:30px;padding:10px;font-weight:bold;} 
    33#flash-messages div.errors{color:red;background-color:#ffe1e1;border:1px solid red;} 
  • extensions/user_tags/include/t4u_admin_action.inc.php

    r6813 r6818  
    2525 
    2626if (!empty($_GET['action']) && ($_GET['action']=='add')  
    27     && !empty($_POST['tags']) && $me->getPermission('add')) { 
     27    && isset($_POST['tags']) && $me->getPermission('add')) { 
    2828  include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 
    29    
     29 
     30  if (empty($_POST['tags'])) { 
     31    $_POST['tags'] = array(); 
     32  } 
    3033  $tag_ids = get_fckb_tag_ids($_POST['tags']); 
    3134  set_tags($tag_ids, $_POST['image_id']); 
     
    3336  if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) { 
    3437    header("Content-Type: application/json"); 
     38    $message['info'] = l10n('Tags updated'); 
    3539 
    36     $message['info'] = l10n('Tags updated'); 
    3740    echo json_encode($message); 
     41    Log::getInstance()->debug('message envoyé'); 
    3842    exit(); 
    3943  } else { 
  • extensions/user_tags/include/t4u_content.class.php

    r6813 r6818  
    5858    $template->set_filename('add_tags', T4U_TEMPLATE.'/add_tags.tpl'); 
    5959    $template->assign_var_from_handle('PLUGIN_PICTURE_BEFORE', 'add_tags'); 
     60 
     61    return $content; 
    6062  }     
    6163} 
  • extensions/user_tags/js/jquery.addtags.js

    r6813 r6818  
    1 eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(2($){$.c=2(s,1){$(s).l(\'\');$(s).Q().o(1).M(16).15(10)};$.Z.c=2(1){7.U(2(){T $.c(7,1)})};z 7})(V);2 I(1){b 9=\'\';i(1.G){9=\'<8 m="13">\'+1.G+\'</8>\'}X i(1.D){9=\'<8 m="Y">\'+1.D+\'</8>\'}i(9!=\'\'){$(\'W\').o(\'<8 5="B-u"></8>\');$(\'#B-u\').c(9)}}2 r(14){$(\'#3-E\').S(\'3-a\').11(\'a\');z}$(2(){b 4=\'<g 12="\'+6[\'L\']+\'" 17="J" 5="3-x-g">\';4+=\'<y 5="q" n="q">\';4+=N;4+=\'</y>\';4+=\'<k 5="3-P-5" j="C" n="R" f="\'+6[\'O\']+\'">\';4+=\'<k 5="3-K" j="C" n="K" f="\'+6[\'1p\']+\'">\';4+=\'<k 5="3-E" j="H" a="a" m="3-a" f="\'+h[\'1v\']+\'">\';4+=\'</g>\';i($(\'#w\').1w>0){$(\'#w v.1u\').o(\'<1t 5="3-1r" 1s="\'+6[\'18\']+\'" 1B="\'+h[\'A\']+\'">\').1D(\'1F\',h[\'A\']).1E(\'3-1C\').t(2(){$(7).1z(\'t\');b p=$(7).1A().1x(\'v.f\');b 1q=p.l();p.l(4);$(\'#q\').1e({1f:6[\'1d\'],1c:h[\'19\'],1a:F,1b:F,1g:d,1h:d,1n:d,1o:r,1m:r,1l:1i,1j:d});$(\'#3-x-g\').H(2(e){$.J(6[\'L\'],$(7).1k(),2(1){I(1)});e.1y()})})}});',62,104,'|data|function|t4u|newRow|id|path|this|div|message|disabled|var|flashMessage|true||value|form|vocab|if|type|input|html|class|name|append|tags_value|tags|t4u_onchange|source|click|messages|td|Tags|addtags|select|return|click_to_add_tags|flash|hidden|error|update|false|info|submit|t4u_form_sucess|post|referer|t4u_add_script|fadeIn|related_tags|t4u_image_id|image|hide|image_id|removeClass|new|each|jQuery|body|else|errors|fn|3000|removeAttr|action|infos|item|fadeOut|500|method|t4u_edit_icon|start_to_type|cache|filter_case|complete_text|t4u_get_script|fcbkcomplete|json_url|filter_hide|firstselected|100|newel|serialize|maxitems|onselect|filter_selected|onremove|t4u_referer|old_tags_value|edit|src|img|label|update_tags|length|find|preventDefault|unbind|parent|alt|clickable|attr|addClass|title'.split('|'),0,{})) 
     1eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(4($){$.l=4(x,3){$(x).p(\'\');$(x).V().t(3).19(1b).1a(11)};$.12.l=4(3){8.10(4(){Z $.l(8,3)})};P 8})(W);4 y(3){b d=\'X: \';$(\'#2-w\').A(\'2-7\').O(\'7\',\'7\');c(3.I){d=\'<9 v="Y">\'+3.I+\'</9>\'}13 c(3.L){d=\'<9 v="14">\'+3.L+\'</9>\'}c(d!=\'\'){$(\'#m q.f\').t(\'<9 6="M-G"></9>\');$(\'#M-G\').l(d)}}4 s(18){$(\'#2-w\').15(\'2-7\').16(\'7\');P}$(4(){b 5=\'<k 17="\'+a[\'z\']+\'" 1c="N" 6="2-B-k">\';5+=\'<D 6="g" n="g">\';5+=Q;5+=\'</D>\';5+=\'<o 6="2-U-6" u="K" n="T" f="\'+a[\'R\']+\'">\';5+=\'<o 6="2-J" u="K" n="J" f="\'+a[\'S\']+\'">\';5+=\'<o 6="2-w" u="F" 7="7" v="2-7" f="\'+j[\'1u\']+\'">\';5+=\'</k>\';c($(\'#m\').1A>0){$(\'#m q.1B\').t(\'<1z 6="2-1y" 1w="\'+a[\'1x\']+\'" 1D="\'+j[\'E\']+\'">\').O(\'1d\',j[\'E\']).A(\'2-1I\').C(4(){$(8).1K(\'C\');b r=$(8).1J().1H(\'q.f\');b 1E=r.p();r.p(5);$(\'#g\').1F({1C:a[\'1v\'],1j:j[\'1k\'],1i:H,1h:H,1e:h,1f:h,1g:h,1l:s,1m:s,1s:1t,1r:h});$(\'#2-B-k\').F(4(e){b i=$(8).1q();c(i.1n(\'g%1o%1p=\')==-1){i+=\'&g=\'}$.N(a[\'z\'],i,4(3){y(3)});e.1G()})})}});',62,109,'||t4u|data|function|newRow|id|disabled|this|div|path|var|if|message||value|tags|true|serialized_form|vocab|form|flashMessage|Tags|name|input|html|td|tags_value|t4u_onchange|append|type|class|update|source|t4u_form_sucess|t4u_add_script|addClass|addtags|click|select|click_to_add_tags|submit|messages|false|info|referer|hidden|error|flash|post|attr|return|related_tags|t4u_image_id|t4u_referer|image_id|image|hide|jQuery|Message|infos|new|each|3000|fn|else|errors|removeClass|removeAttr|action|item|fadeIn|fadeOut|500|method|title|filter_hide|firstselected|filter_selected|filter_case|cache|complete_text|start_to_type|onremove|onselect|lastIndexOf|5B|5D|serialize|newel|maxitems|100|update_tags|t4u_get_script|src|t4u_edit_icon|edit|img|length|label|json_url|alt|old_tags_value|fcbkcomplete|preventDefault|find|clickable|parent|unbind'.split('|'),0,{})) 
  • extensions/user_tags/main.inc.php

    r6813 r6818  
    2222/* 
    2323Plugin Name: User Tags 
    24 Version: 0.3.0 
     24Version: 0.3.1 
    2525Description: Allow visitors to add tag to images 
    2626Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=441 
Note: See TracChangeset for help on using the changeset viewer.