Got rid of pop-out menus. Also got rid of no-longer-used "resequencing" code.
authorgfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Sat, 2 Oct 2010 19:57:51 +0000 (19:57 +0000)
committergfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Sat, 2 Oct 2010 19:57:51 +0000 (19:57 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@1027 6d9bc8c9-1ec2-4278-b937-99fde70a366f

conifer/static/main.css
conifer/static/menublocks.js [deleted file]
conifer/templates/components/site.xhtml
conifer/templates/feeds/site_feed_index.xhtml
conifer/templates/item/item_heading_detail.xhtml
conifer/templates/item/item_relocate.xhtml
conifer/templates/site_detail.xhtml
conifer/templates/site_join.xhtml

index baac96f..18ebded 100644 (file)
@@ -184,7 +184,7 @@ span.final_item { font-weight: bold; font-size: 110%; }
 .itemtree li { margin: 12px 8px; line-height: 115%; }
 .itemtree li .mainline { padding-left: 8px; }
 
-.itemtree li .author_pub { padding-left: 8px; font-size: 90%; margin: 4px 0 16px 0; color: #111; }
+.itemtree li .author_pub { padding-left: 8px; font-size: 90%; margin: 4px 0 4px 0; color: #111; }
 
 .itemtree .metalink { padding-left: 8px; color: gray; }
 .itemtree .metalink a {
@@ -219,7 +219,7 @@ span.final_item { font-weight: bold; font-size: 110%; }
 }
 
 li.item_HEADING .headingmainline {
-    margin-bottom: 12px;
+    margin-bottom: 4px;
 }
 
 li.item_HEADING .headingmainline  a.mainlink {
@@ -286,10 +286,9 @@ p.todo, div.todo { background-color: #fdd; padding: 6px; margin: 12px; border-le
     font-size: 80%; color: navy;
 }
 
-.menublockopener { margin-left: 0.25em; color: #d44 !important; font-weight: normal !important; }
-.menublock { color: gray; background-color: #844; font-size: 85%; padding: 4px 4px; margin-top: 2px; display: inline-block; }
-.menublock a { color: white; padding: 8px;  }
-.menublock a:hover { color: yellow; }
+.menublock { color: #da9; font-size: 80%; }
+.menublock a { color: #666; padding: 0 8px;  }
+.menublock a:hover { color: blue; }
 
 #sitebanner { background-color: #f2e4cc; margin: -12px -12px 12px -12px; padding: 8px; }
 #sitesearch { float: right; }
diff --git a/conifer/static/menublocks.js b/conifer/static/menublocks.js
deleted file mode 100644 (file)
index 7c3c01e..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-function init_blocks() {
-    $('span.menublock').each(make_opener);
-    $('div').click(hideblocks);
-}
-
-var LINGER = 200; // # milliseconds linger-time required to trigger menu
-var blocknum = 0;
-function make_opener() {
-    var menublock = $(this);
-    var blockid = 'menublock' + (blocknum++);
-    menublock.attr('id', blockid);
-    var opener = '<a class="menublockopener" onmouseout="maybe_cancelblock(\'' + blockid + '\');" onmouseover="maybe_openblock(\'' + blockid + '\');" href="javascript:maybe_openblock(\'' + blockid + '\');">&raquo;</a>';
-    menublock.before(opener);
-    menublock.hide();
-}
-
-function hideblocks() {
-    $('span.menublock').hide();
-}
-
-// the block we are scheduling to open (due to a mouseover).
-var block_to_open = null;
-
-function maybe_cancelblock(bid) {
-    // if it is not open yet, this will stop it from opening.
-    block_to_open = null;
-}
-
-function maybe_openblock(bid) {
-    // it's 'maybe' because it's cancellable. You have to linger for
-    // LINGER milliseconds for the open to happen; otherwise
-    // maybe_cancelblock() will prevent it.
-    block_to_open = bid;
-    var cmd = 'openblock("' + bid + '")';
-    setTimeout(cmd, LINGER);
-}
-
-function openblock(bid) {
-    if (!resequencing) {       // it's annoying during reseq.
-       if (block_to_open == bid) {
-           hideblocks();
-           $('#' + bid).fadeIn('fast');
-           block_to_open = null;
-       }
-    }
-}
-
-$(init_blocks);
-
-
-// fixme, I need to rename menublocks.js to something more like
-// 'site-item-stuff.js'.
-
-// this is some item resequencing code. 
-
-var resequencing = false;
-
-function doResequence() {
-    if (!resequencing)  {
-       $('.itemtree:nth(0)').sortable({axis:'y'});
-       $('.itemtree:nth(0) > .an_item').addClass('sort_item');
-       //$('#resequence_panel').after($('#ropanelmessage'));
-       $('#ropanelmessage').show();
-       $('#resequence_panel a').text($('#i18n-save-order').text());
-       resequencing = true;
-    } else {
-       $('.an_item').removeClass('sort_item');
-       $('#ropanelmessage').hide();
-       $('#resequence_panel a').text('...');
-       $('.itemtree').sortable('destroy');
-       resequencing = false;
-       // get the LI item ids. Send them to the server.
-       var new_sequence_str = '';
-       $('.an_item').each(function() { new_sequence_str += $(this).attr('id') + ' '; });
-       $.post('reseq', {'new_order':new_sequence_str}, 
-                  function() {
-                      $('#resequence_panel a').text($('#i18n-resequence-items').text());
-                      alert($('#i18n-new-order-saved').text());
-                  });
-    }
-};
-
-var xxx = null;
-
-function doToggleItemTree() {
-    if ($('.itemtree:hidden').length > 0) {
-       $('.itemtree:hidden').fadeIn(500);
-    } else {
-       $('.itemtree').not('.itemtree:nth(0)').fadeOut('slow');
-    }
-}
index 3c379a8..89bf021 100644 (file)
@@ -50,18 +50,24 @@ searchtext = _('search this site...')
       <div class="availability avail_nonphys" py:if="item.item_type != 'PHYS'">
       </div>
       <div class="mainline ${item.item_type=='HEADING' and 'headingmainline' or ''}">
-       <a href="${item.item_url()}" class="mainlink">${item}</a> 
-       <span class="menublock" py:if="not (item.item_type=='HEADING' and not edit)">
-
-         <!-- !I'm really sorry, this is ugly, but I want
-              non-breaking spaces here, so that on long-named items,
-              the links will stay togeter. A better way?  -->
-         <span py:if="item.needs_meta_link()"><a href="${item.item_url('meta')}">about&#160;this&#160;item</a>&#160;</span><span py:if="edit"><a href="${item.item_url('edit/')}">edit</a></span><span py:if="edit">&#160;<a href="${item.item_url('relocate/')}">relocate</a>&#160;<a href="${item.item_url('delete/')}">delete</a></span>
-       </span>
+               <a href="${item.item_url()}" class="mainlink">${item}</a> 
       </div>
       <div class="author_pub" py:if="item.author or item.publisher">
-       ${item.author}. ${item.publisher}.
+               ${item.author}. ${item.publisher}.
       </div>
+         <div>
+               <div class="menublock" py:if="not (item.item_type=='HEADING' and not edit)">
+                 <span py:if="item.needs_meta_link()">
+                       <a href="${item.item_url('meta')}">About this item</a>
+                       <span py:if="edit">&bull;</span>
+                 </span>
+                 <span py:if="edit">
+                       <a href="${item.item_url('edit/')}">Edit</a>
+                       &bull; <a href="${item.item_url('relocate/')}">Relocate</a>
+                       &bull; <a href="${item.item_url('delete/')}">Delete</a>
+                 </span>
+               </div>
+         </div>
       <!-- !to show a full tree, uncomment the following: -->
       ${show_tree(subs, edit)}
     </li>
@@ -130,20 +136,7 @@ searchtext = _('search this site...')
       </table>
       </div>
    </div>
-
-   <div py:def="item_resequence_panel()" py:strip="True">
-    <div id="resequence_panel" class="little_action_panel">
-      <a href="javascript:doResequence();">Resequence items</a>
-      <div id="ropanelmessage" style="clear: right; display: none;"
-          class="little_action_panel">Drag the items around. Then click Save Sequence, above.</div>
-    </div>
-    <div style="display: none;">
-      <span id="i18n-save-order">Save Sequence</span>
-      <span id="i18n-resequence-items">Resequence Items</span>
-      <span id="i18n-new-order-saved">The new sequence has been saved.</span>
-    </div>
-    </div>
-
+   
     <div py:def="offer_to_delete(item)" class="little_action_panel" py:if="item.id">
       <a href="../delete/">Delete this item</a>
     </div>
index 6c40f9a..d32a1ac 100644 (file)
@@ -8,7 +8,6 @@ title = _('Available Feeds')
   <xi:include href="../components/site.xhtml"/>
   <head>
     <title>${title}</title>
-    <script type="text/javascript" src="${ROOT}/static/menublocks.js"/>
   </head>
   <body>
     ${site_banner(site)}
index aa2b11a..553de59 100644 (file)
@@ -12,7 +12,6 @@ item_tree = site.item_tree(subtree=item)
   <xi:include href="../components/site.xhtml"/>
    <head>
     <title>${title}</title>
-    <script type="text/javascript" src="${ROOT}/static/menublocks.js"/>
   </head>
   <body>
     ${site_banner(site)}
@@ -26,7 +25,6 @@ item_tree = site.item_tree(subtree=item)
       <div>
        <a href="relocate/">Relocate this heading</a>
       </div>
-      <div>${item_resequence_panel()}</div>
     </div>
     ${nested_title(item)}
 
index 7bcad60..c4f9cab 100644 (file)
@@ -8,7 +8,6 @@ title = 'Move item under a different heading'
   <xi:include href="../components/site.xhtml"/>
    <head>
     <title>${title}</title>
-    <script type="text/javascript" src="${ROOT}/static/menublocks.js"/>
   </head>
   <body>
     ${site_banner(site)}
index 7b06b6e..1a26046 100644 (file)
@@ -11,7 +11,6 @@ is_joinable = site.is_joinable_by(request.user)
   <xi:include href="components/site.xhtml"/>
   <head>
     <title>${title}</title>
-    <script type="text/javascript" src="${ROOT}/static/menublocks.js"/>
   </head>
   <body>
     ${site_banner(site)}
index 592627c..cb152d3 100644 (file)
@@ -8,7 +8,6 @@ title = _('Join this site?')
   <xi:include href="components/site.xhtml"/>
   <head>
     <title>${title}</title>
-    <script type="text/javascript" src="${ROOT}/static/menublocks.js"/>
   </head>
   <body>
     ${site_banner(site)}