Ignore:
Timestamp:
Mar 8, 2013, 7:18:00 PM (12 years ago)
Author:
mistic100
Message:

fix caddie button,
fix fatal error for Back2Front,
update ZeroClipboard,
fix breadcrumb and body_id,
unactive for mobile themes,
fix display issues

Location:
extensions/UserCollections
Files:
1 added
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserCollections/include/display_thumbnails.inc.php

    r20097 r21382  
    22defined('USER_COLLEC_PATH') or die('Hacking attempt!');
    33
    4 
    5 // caddie
    6 if (isset($_GET['uc_caddie']))
    7 {
    8   fill_caddie($page['items']);
    9   redirect($self_url);
    10 }
    114
    125// image order
     
    3730;';
    3831$page['items'] = array_from_query($query, 'id');
     32
     33// caddie
     34if (isset($_GET['uc_caddie']))
     35{
     36  fill_caddie($page['items']);
     37  redirect($self_url);
     38}
    3939
    4040// image order menu
     
    7878add_event_handler('loc_end_index_thumbnails', 'user_collections_thumbnails_in_collection', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
    7979
     80global $selection, $pictures;
    8081include(PHPWG_ROOT_PATH . 'include/category_default.inc.php');
    8182
  • extensions/UserCollections/include/events.inc.php

    r20141 r21382  
    1212  if ($tokens[0] == 'collections')
    1313  {
     14    add_event_handler('loc_begin_page_header', 'user_collections_page_header');
     15   
    1416    $page['section'] = 'collections';
    15     $page['title'] = '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator'].'<a href="'.USER_COLLEC_PUBLIC.'">'.l10n('Collections').'</a>';
     17    $page['section_title'] = '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator'].'<a href="'.USER_COLLEC_PUBLIC.'">'.l10n('Collections').'</a>';
     18    $page['title'] = l10n('Collections');
    1619   
    1720    if (in_array(@$tokens[1], array('edit','view','list')))
     
    2932    }
    3033  }
     34}
     35
     36function user_collections_page_header()
     37{
     38  global $page;
     39  $page['body_id'] = 'theCollectionPage';
    3140}
    3241
  • extensions/UserCollections/main.inc.php

    r20097 r21382  
    1010
    1111defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
     12
     13if (mobile_theme())
     14{
     15  return;
     16}
    1217
    1318global $conf, $prefixeTable;
  • extensions/UserCollections/template/edit.tpl

    r20090 r21382  
    11{combine_css path=$USER_COLLEC_PATH|@cat:"template/style.css"}
    2 {combine_script id='jquery.zclip' path=$USER_COLLEC_PATH|@cat:"template/resources/jquery.zclip.min.js"}
    3 {combine_script id='jquery.tipTip' path='themes/default/js/plugins/jquery.tipTip.minified.js'}
     2{combine_script id='ZeroClipboard' path=$USER_COLLEC_PATH|@cat:"template/resources/ZeroClipboard.min.js"}
    43
    54{combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'}
     
    87{footer_script require='jquery'}
    98{if $user_collections.allow_public}
    10   function bindZclip() {ldelim}
    11     jQuery("#publicURL .button").zclip({ldelim}
    12       path:'{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/ZeroClipboard.swf',
    13       copy:$("#publicURL .url").html(),
    14       afterCopy: function() {ldelim}
    15         $('.confirm').remove();
    16         $("#publicURL .url").select();
    17         $('<span class="confirm" style="display:none;">{'Copied'|@translate}</span>').appendTo("#publicURL")
    18           .fadeIn(400).delay(1000).fadeOut(400, function(){ldelim} $(this).remove(); });
    19       }
    20     });
    21     $("#publicURL .url").click(function() {ldelim}
    22       $(this).select();
    23     });
    24   }
     9ZeroClipboard.setDefaults( {ldelim} moviePath: "{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/ZeroClipboard.swf" } );
     10var clip = new ZeroClipboard();
     11clip.glue(jQuery("#publicURL .button").get());
     12clip.addEventListener('onMouseOver', function() {ldelim}
     13  clip.setText(jQuery("#publicURL .url").val());
     14});
     15clip.addEventListener('complete', function() {ldelim}
     16  jQuery('.confirm').remove();
     17  jQuery("#publicURL .url").select();
     18  jQuery('<span class="confirm" style="display:none;">{'Copied'|@translate}</span>').appendTo("#publicURL")
     19    .fadeIn(400).delay(1000).fadeOut(400, function(){ldelim} jQuery(this).remove(); });
     20});
    2521
    26   jQuery("input[name='public']").change(function() {ldelim}
    27     jQuery("#publicURL").fadeToggle("fast");
    28     bindZclip();
    29   });
    30   jQuery("#publicURL .button").tipTip({ldelim}
    31     delay: 0,
    32     defaultPosition: 'right'
    33   });
    34   {if $collection.PUBLIC}bindZclip();{/if}
     22jQuery("#publicURL .url").click(function() {ldelim}
     23  jQuery(this).select();
     24});
     25
     26jQuery("input[name='public']").change(function() {ldelim}
     27  jQuery("#publicURL").fadeToggle("fast");
     28});
    3529{/if}
    3630
    3731{if $collection.PUBLIC && $user_collections.allow_mails}
    38   $(window).load(function(){ldelim}
    39     $(".mail_colorbox_open").colorbox({ldelim}
     32  jQuery(window).load(function(){ldelim}
     33    jQuery(".mail_colorbox_open").colorbox({ldelim}
    4034      {if isset($uc_mail_errors)}open: true, transition:"none",{/if}
    4135      inline:true
    4236    });
    43     $(".mail_colorbox_close").click(function() {ldelim}
    44       $(".mail_colorbox_open").colorbox.close();
     37    jQuery(".mail_colorbox_close").click(function() {ldelim}
     38      jQuery(".mail_colorbox_open").colorbox.close();
    4539      return false;
    4640    })
    4741  });
    48   $("#mail_form").css('background-color', $("#the_page #content").css('background-color'));
     42  jQuery("#mail_form").css('background-color', jQuery("#the_page #content").css('background-color'));
    4943{/if}
    5044{/footer_script}
     
    8074    <label><input type="radio" name="public" value="0" {if not $collection.PUBLIC}checked="checked"{/if}> {'No'|@translate}</label>
    8175    <label><input type="radio" name="public" value="1" {if $collection.PUBLIC}checked="checked"{/if}> {'Yes'|@translate}</label>
    82     <span id="publicURL" {if not $collection.PUBLIC}style="display:none;"{/if}><span class="button" title="{'Copy to clipboard'|@translate}">&nbsp;</span><input type="text" class="url" value="{$collection.U_PUBLIC}" size="{$collection.U_PUBLIC|strlen}"></span>
     76    <span id="publicURL" {if not $collection.PUBLIC}style="display:none;"{/if}><!--
     77    --><span class="button" title="{'Copy to clipboard'|@translate}">&nbsp;</span><!--
     78    --><input type="text" class="url" value="{$collection.U_PUBLIC}" size="{$collection.U_PUBLIC|strlen}"><!--
     79  --></span>
    8380  </p>
    8481{/if}
  • extensions/UserCollections/template/style.css

    r20090 r21382  
    3636    border-right:none;
    3737    border-radius:3px 0 0 3px;
     38    cursor:pointer;
    3839  }
    3940  #publicURL .confirm {
  • extensions/UserCollections/template/thumbnails_css_js.tpl

    r20141 r21382  
    3131        else if (method == "remove") {ldelim}
    3232        {if $UC_IN_EDIT}
    33           $trigger.parent(".wrap1, .gthumb").hide("fast", function() {ldelim} $(this).remove() });
     33          $trigger.parent("li").hide("fast", function() {ldelim} $(this).remove() });
    3434          if (typeof batchdown_count != 'undefined') batchdown_count-=1;
    3535        {else}
Note: See TracChangeset for help on using the changeset viewer.