From 130e40309816c28ea592975fe19c81cd2ee5c770 Mon Sep 17 00:00:00 2001 From: gfawcett Date: Sat, 2 Oct 2010 19:57:51 +0000 Subject: [PATCH] Got rid of pop-out menus. Also got rid of no-longer-used "resequencing" code. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@1027 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- conifer/static/main.css | 11 ++- conifer/static/menublocks.js | 91 ------------------------ conifer/templates/components/site.xhtml | 39 +++++----- conifer/templates/feeds/site_feed_index.xhtml | 1 - conifer/templates/item/item_heading_detail.xhtml | 2 - conifer/templates/item/item_relocate.xhtml | 1 - conifer/templates/site_detail.xhtml | 1 - conifer/templates/site_join.xhtml | 1 - 8 files changed, 21 insertions(+), 126 deletions(-) delete mode 100644 conifer/static/menublocks.js diff --git a/conifer/static/main.css b/conifer/static/main.css index baac96f..18ebded 100644 --- a/conifer/static/main.css +++ b/conifer/static/main.css @@ -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 index 7c3c01e..0000000 --- a/conifer/static/menublocks.js +++ /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 = '»'; - 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'); - } -} diff --git a/conifer/templates/components/site.xhtml b/conifer/templates/components/site.xhtml index 3c379a8..89bf021 100644 --- a/conifer/templates/components/site.xhtml +++ b/conifer/templates/components/site.xhtml @@ -50,18 +50,24 @@ searchtext = _('search this site...')
- ${item} - - - - about this item edit relocate delete - + ${item}
- ${item.author}. ${item.publisher}. + ${item.author}. ${item.publisher}.
+
+ +
${show_tree(subs, edit)} @@ -130,20 +136,7 @@ searchtext = _('search this site...') - -
-
- Resequence items - -
-
- Save Sequence - Resequence Items - The new sequence has been saved. -
-
- +
Delete this item
diff --git a/conifer/templates/feeds/site_feed_index.xhtml b/conifer/templates/feeds/site_feed_index.xhtml index 6c40f9a..d32a1ac 100644 --- a/conifer/templates/feeds/site_feed_index.xhtml +++ b/conifer/templates/feeds/site_feed_index.xhtml @@ -8,7 +8,6 @@ title = _('Available Feeds') ${title} -