[open-ils-commits] r1027 - in servres/trunk/conifer: static templates templates/components templates/feeds templates/item (gfawcett)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Oct 2 15:57:56 EDT 2010
Author: gfawcett
Date: 2010-10-02 15:57:51 -0400 (Sat, 02 Oct 2010)
New Revision: 1027
Removed:
servres/trunk/conifer/static/menublocks.js
Modified:
servres/trunk/conifer/static/main.css
servres/trunk/conifer/templates/components/site.xhtml
servres/trunk/conifer/templates/feeds/site_feed_index.xhtml
servres/trunk/conifer/templates/item/item_heading_detail.xhtml
servres/trunk/conifer/templates/item/item_relocate.xhtml
servres/trunk/conifer/templates/site_detail.xhtml
servres/trunk/conifer/templates/site_join.xhtml
Log:
Got rid of pop-out menus. Also got rid of no-longer-used "resequencing" code.
Modified: servres/trunk/conifer/static/main.css
===================================================================
--- servres/trunk/conifer/static/main.css 2010-10-02 19:57:48 UTC (rev 1026)
+++ servres/trunk/conifer/static/main.css 2010-10-02 19:57:51 UTC (rev 1027)
@@ -184,7 +184,7 @@
.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 @@
}
li.item_HEADING .headingmainline {
- margin-bottom: 12px;
+ margin-bottom: 4px;
}
li.item_HEADING .headingmainline a.mainlink {
@@ -286,10 +286,9 @@
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; }
Deleted: servres/trunk/conifer/static/menublocks.js
===================================================================
--- servres/trunk/conifer/static/menublocks.js 2010-10-02 19:57:48 UTC (rev 1026)
+++ servres/trunk/conifer/static/menublocks.js 2010-10-02 19:57:51 UTC (rev 1027)
@@ -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 + '\');">»</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');
- }
-}
Modified: servres/trunk/conifer/templates/components/site.xhtml
===================================================================
--- servres/trunk/conifer/templates/components/site.xhtml 2010-10-02 19:57:48 UTC (rev 1026)
+++ servres/trunk/conifer/templates/components/site.xhtml 2010-10-02 19:57:51 UTC (rev 1027)
@@ -50,18 +50,24 @@
<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 this item</a> </span><span py:if="edit"><a href="${item.item_url('edit/')}">edit</a></span><span py:if="edit"> <a href="${item.item_url('relocate/')}">relocate</a> <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">•</span>
+ </span>
+ <span py:if="edit">
+ <a href="${item.item_url('edit/')}">Edit</a>
+ • <a href="${item.item_url('relocate/')}">Relocate</a>
+ • <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 @@
</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>
Modified: servres/trunk/conifer/templates/feeds/site_feed_index.xhtml
===================================================================
--- servres/trunk/conifer/templates/feeds/site_feed_index.xhtml 2010-10-02 19:57:48 UTC (rev 1026)
+++ servres/trunk/conifer/templates/feeds/site_feed_index.xhtml 2010-10-02 19:57:51 UTC (rev 1027)
@@ -8,7 +8,6 @@
<xi:include href="../components/site.xhtml"/>
<head>
<title>${title}</title>
- <script type="text/javascript" src="${ROOT}/static/menublocks.js"/>
</head>
<body>
${site_banner(site)}
Modified: servres/trunk/conifer/templates/item/item_heading_detail.xhtml
===================================================================
--- servres/trunk/conifer/templates/item/item_heading_detail.xhtml 2010-10-02 19:57:48 UTC (rev 1026)
+++ servres/trunk/conifer/templates/item/item_heading_detail.xhtml 2010-10-02 19:57:51 UTC (rev 1027)
@@ -12,7 +12,6 @@
<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 @@
<div>
<a href="relocate/">Relocate this heading</a>
</div>
- <div>${item_resequence_panel()}</div>
</div>
${nested_title(item)}
Modified: servres/trunk/conifer/templates/item/item_relocate.xhtml
===================================================================
--- servres/trunk/conifer/templates/item/item_relocate.xhtml 2010-10-02 19:57:48 UTC (rev 1026)
+++ servres/trunk/conifer/templates/item/item_relocate.xhtml 2010-10-02 19:57:51 UTC (rev 1027)
@@ -8,7 +8,6 @@
<xi:include href="../components/site.xhtml"/>
<head>
<title>${title}</title>
- <script type="text/javascript" src="${ROOT}/static/menublocks.js"/>
</head>
<body>
${site_banner(site)}
Modified: servres/trunk/conifer/templates/site_detail.xhtml
===================================================================
--- servres/trunk/conifer/templates/site_detail.xhtml 2010-10-02 19:57:48 UTC (rev 1026)
+++ servres/trunk/conifer/templates/site_detail.xhtml 2010-10-02 19:57:51 UTC (rev 1027)
@@ -11,7 +11,6 @@
<xi:include href="components/site.xhtml"/>
<head>
<title>${title}</title>
- <script type="text/javascript" src="${ROOT}/static/menublocks.js"/>
</head>
<body>
${site_banner(site)}
Modified: servres/trunk/conifer/templates/site_join.xhtml
===================================================================
--- servres/trunk/conifer/templates/site_join.xhtml 2010-10-02 19:57:48 UTC (rev 1026)
+++ servres/trunk/conifer/templates/site_join.xhtml 2010-10-02 19:57:51 UTC (rev 1027)
@@ -8,7 +8,6 @@
<xi:include href="components/site.xhtml"/>
<head>
<title>${title}</title>
- <script type="text/javascript" src="${ROOT}/static/menublocks.js"/>
</head>
<body>
${site_banner(site)}
More information about the open-ils-commits
mailing list