From: <die...@us...> - 2010-06-30 14:07:38
|
Revision: 2761 http://openutils.svn.sourceforge.net/openutils/?rev=2761&view=rev Author: diego_schivo Date: 2010-06-30 14:07:32 +0000 (Wed, 30 Jun 2010) Log Message: ----------- MEDIA-145 refactoring: moved js file into html page (avoid browser cache) Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html Removed Paths: ------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mediafolderview.js Deleted: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mediafolderview.js =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mediafolderview.js 2010-06-30 13:54:56 UTC (rev 2760) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mediafolderview.js 2010-06-30 14:07:32 UTC (rev 2761) @@ -1,202 +0,0 @@ -var MediaFolderView = new Class({ - - Implements: Options, - - initialize: function(options){ - this.setOptions(options); - if (Browser.Engine.name == 'trident' && Browser.Engine.version == 4) this.fixNavWidthIE6(); - else this.fixNavWidth(); - new MediaFolderView.BgSelectors('#navigation a.bg-selector'); - new MediaFolderView.Sorting('sorting', this.options); - new MediaFolderView.EditMenus('li.media .menuitem'); - new MediaFolderView.InfoTooltips('li.media .image'); - }, - - fixNavWidth: function(){ - var nav = $('navigation'); - if (nav) nav.setStyle('min-width', (this.calcTotWidth(nav.getElements('.voice')) + 20) + 'px'); - }, - - fixNavWidthIE6: function(){ - var nav = $('navigation'); - if (!nav) return; - var tabs = nav.getElements('.mediatab'); - $('bgselectorblock').setStyles({float: 'none', position: 'absolute', right: 0, top: 0}); - new Element('div', {styles: {float: 'left', width: (this.calcTotWidth(nav.getElements('.voice')) + 20) + 'px'}}) - .adopt(nav.getElements('.mediatab')) - .inject(nav); - }, - - calcTotWidth: function(items){ - var w = 0; - items.each(function(item){ - w += item.getSize().x; - }); - return w; - } -}); - -MediaFolderView.BgSelectors = new Class({ - - initialize: function(selectors){ - this.selectors = $$(selectors).addEvent('click', this.handleClick.bindWithEvent(this)); - this.previousValue = document.body.className.match(/bg-(\w+)/)[1]; - }, - - handleClick: function(e){ - e.stop(); - var selector = $(e.target); - var value = selector.className.match(/bg-selector\s+(\w+)(-active)?/)[1]; - if (value == this.previousValue) return; - if (this.previousValue) $(document.body).removeClass('bg-' + this.previousValue); - $(document.body).addClass('bg-' + value); - Cookie.write('bgselector', value, {duration: 30}); - this.selectors.each(function(item){ - if (item == selector) item.addClass(value + '-active'); - else if (this.previousValue) item.removeClass(this.previousValue + '-active'); - }, this); - this.previousValue = value; - } - -}); - -MediaFolderView.Sorting = new Class({ - - Implements: Options, - - initialize: function(select, options){ - this.select = $(select); - this.setOptions(options) - this.select.addEvent('change', this.handleSelectChange.bind(this)); - }, - - handleSelectChange: function(){ - Cookie.write('sorting', this.select.get('value'), {duration: 30}); - location.href = '?type=' + this.options.type + '&path=' + this.options.path; - } - -}); - -MediaFolderView.EditMenus = new Class({ - - initialize: function(triggers){ - $$(triggers).addEvent('click', this.handleTriggerClick.bindWithEvent(this)); - this.popup = new Element('div').addClass('menupopup').inject(document.body); - this.popup.addEvents({ - mouseenter: this.handlePopupEnter.bindWithEvent(this), - mousemove: this.handlePopupMove.bindWithEvent(this), - mouseleave: this.handlePopupLeave.bindWithEvent(this) - }); - }, - - handleTriggerClick: function(e){ - this.timer = $clear(this.timer); - var menuitem = $(e.target); - var menu = menuitem.getNext(); - if (menu != this.menu){ - this.hide(); - var width = menu.getStyle('width') - var content = new Element('div', {html: menu.get('html')}); - content.getElements('a span').setStyle('width', (width.toInt() - 30) + 'px') - var coords = menuitem.getCoordinates(); - this.popup - .empty() - .grab(content) - .setStyles({ - left: coords.left + 'px', - top: (coords.bottom + 5) + 'px', - width: width, - display: 'block' - }); - this.popup.setStyle('height', content.getSize().y + 'px'); - this.menu = menu; - } - }, - - handlePopupEnter: function(){ - this.timer = $clear(this.timer); - }, - - handlePopupMove: function(e){ - var t = $(e.target); - if (!this.popup.hasChild(t)) return; - if (this.li != null && (this.li == t || this.li.hasChild(t))) return; - if (this.li) this.li.removeClass('active'); - var tag = t.tagName.toLowerCase(); - var li = (tag == 'li' ? t : t.getParent('li')); - this.li = li; - if (!li) return; - li.addClass('active'); - if (Browser.Engine.name == 'trident'){ - var span = li.getElement('span'); - span.set('text', span.get('text')); - } - }, - - handlePopupLeave: function(e){ - if (!this.timer) this.timer = this.hide.delay(250, this); - }, - - hide: function(){ - if (this.menu){ - this.popup.setStyle('display', ''); - delete this.menu; - } - if (this.li){ - this.li.removeClass('active'); - delete this.li; - } - } - -}); - -MediaFolderView.InfoTooltips = new Class({ - - initialize: function(triggers){ - this.hideStarter = function(){ - this.hideTimer = this.hide.delay(250, this); - }.bind(this); - this.hideStopper = function(){ - if (this.hideTimer) this.hideTimer = $clear(this.hideTimer); - }.bind(this); - $$(triggers).each(function(trigger){ - var tooltip = trigger.tooltip(trigger.getElement('.details').get('html'), { - width: 170, - style: 'alert', - sticky: true, - mode: 'auto', - fixedPosition: true, - offset: {x: -20, y: 100}, - fx: false, - noClose: true - }); - trigger.addEvents({ - 'mouseleave': this.hideStarter, - 'mouseenter': this.hideStopper, - 'tooltipshow': this.handleShow.bind(this, trigger), - 'tooltiphide': this.handleHide.bind(this, trigger) - }); - tooltip.tooltip.addEvents({ - 'mouseenter': this.hideStopper, - 'mouseleave': this.hideStarter - }); - }, this); - }, - - handleShow: function(el){ - this.hideStopper(); - if (this.trigger) this.trigger.tooltip_hide(); - this.trigger = el; - }, - - handleHide: function(el){ - if (this.trigger == el) this.trigger = null; - }, - - hide: function(){ - if (!this.trigger) return; - this.trigger.tooltip_hide(); - this.trigger = null; - } - -}); \ No newline at end of file Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2010-06-30 13:54:56 UTC (rev 2760) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2010-06-30 14:07:32 UTC (rev 2761) @@ -15,8 +15,211 @@ <script type="text/javascript" src="${this.request.contextPath}/.resources/media/js/multibox/multibox.js"></script> <script type="text/javascript" src="${this.request.contextPath}/.resources/media/js/multibox/overlay.js"></script> <script type="text/javascript" src="${this.request.contextPath}/.resources/media/js/sexy-tooltips-1.1.js"></script> - <script type="text/javascript" src="${this.request.contextPath}/.resources/media/js/mediafolderview.js"></script> <script type="text/javascript"> +var MediaFolderView = new Class({ + + Implements: Options, + + initialize: function(options){ + this.setOptions(options); + if (Browser.Engine.name == 'trident' && Browser.Engine.version == 4) this.fixNavWidthIE6(); + else this.fixNavWidth(); + new MediaFolderView.BgSelectors('#navigation a.bg-selector'); + new MediaFolderView.Sorting('sorting', this.options); + new MediaFolderView.EditMenus('li.media .menuitem'); + new MediaFolderView.InfoTooltips('li.media .image'); + }, + + fixNavWidth: function(){ + var nav = $('navigation'); + if (nav) nav.setStyle('min-width', (this.calcTotWidth(nav.getElements('.voice')) + 20) + 'px'); + }, + + fixNavWidthIE6: function(){ + var nav = $('navigation'); + if (!nav) return; + var tabs = nav.getElements('.mediatab'); + $('bgselectorblock').setStyles({float: 'none', position: 'absolute', right: 0, top: 0}); + new Element('div', {styles: {float: 'left', width: (this.calcTotWidth(nav.getElements('.voice')) + 20) + 'px'}}) + .adopt(nav.getElements('.mediatab')) + .inject(nav); + }, + + calcTotWidth: function(items){ + var w = 0; + items.each(function(item){ + w += item.getSize().x; + }); + return w; + } +}); + +MediaFolderView.BgSelectors = new Class({ + + initialize: function(selectors){ + this.selectors = $$(selectors).addEvent('click', this.handleClick.bindWithEvent(this)); + this.previousValue = document.body.className.match(/bg-(\w+)/)[1]; + }, + + handleClick: function(e){ + e.stop(); + var selector = $(e.target); + var value = selector.className.match(/bg-selector\s+(\w+)(-active)?/)[1]; + if (value == this.previousValue) return; + if (this.previousValue) $(document.body).removeClass('bg-' + this.previousValue); + $(document.body).addClass('bg-' + value); + Cookie.write('bgselector', value, {duration: 30}); + this.selectors.each(function(item){ + if (item == selector) item.addClass(value + '-active'); + else if (this.previousValue) item.removeClass(this.previousValue + '-active'); + }, this); + this.previousValue = value; + } + +}); + +MediaFolderView.Sorting = new Class({ + + Implements: Options, + + initialize: function(select, options){ + this.select = $(select); + this.setOptions(options) + this.select.addEvent('change', this.handleSelectChange.bind(this)); + }, + + handleSelectChange: function(){ + Cookie.write('sorting', this.select.get('value'), {duration: 30}); + location.href = '?type=' + this.options.type + '&path=' + this.options.path; + } + +}); + +MediaFolderView.EditMenus = new Class({ + + initialize: function(triggers){ + $$(triggers).addEvent('click', this.handleTriggerClick.bindWithEvent(this)); + this.popup = new Element('div').addClass('menupopup').inject(document.body); + this.popup.addEvents({ + mouseenter: this.handlePopupEnter.bindWithEvent(this), + mousemove: this.handlePopupMove.bindWithEvent(this), + mouseleave: this.handlePopupLeave.bindWithEvent(this) + }); + }, + + handleTriggerClick: function(e){ + this.timer = $clear(this.timer); + var menuitem = $(e.target); + var menu = menuitem.getNext(); + if (menu != this.menu){ + this.hide(); + var width = menu.getStyle('width') + var content = new Element('div', {html: menu.get('html')}); + content.getElements('a span').setStyle('width', (width.toInt() - 30) + 'px') + var coords = menuitem.getCoordinates(); + this.popup + .empty() + .grab(content) + .setStyles({ + left: coords.left + 'px', + top: (coords.bottom + 5) + 'px', + width: width, + display: 'block' + }); + this.popup.setStyle('height', content.getSize().y + 'px'); + this.menu = menu; + } + }, + + handlePopupEnter: function(){ + this.timer = $clear(this.timer); + }, + + handlePopupMove: function(e){ + var t = $(e.target); + if (!this.popup.hasChild(t)) return; + if (this.li != null && (this.li == t || this.li.hasChild(t))) return; + if (this.li) this.li.removeClass('active'); + var tag = t.tagName.toLowerCase(); + var li = (tag == 'li' ? t : t.getParent('li')); + this.li = li; + if (!li) return; + li.addClass('active'); + if (Browser.Engine.name == 'trident'){ + var span = li.getElement('span'); + span.set('text', span.get('text')); + } + }, + + handlePopupLeave: function(e){ + if (!this.timer) this.timer = this.hide.delay(250, this); + }, + + hide: function(){ + if (this.menu){ + this.popup.setStyle('display', ''); + delete this.menu; + } + if (this.li){ + this.li.removeClass('active'); + delete this.li; + } + } + +}); + +MediaFolderView.InfoTooltips = new Class({ + + initialize: function(triggers){ + this.hideStarter = function(){ + this.hideTimer = this.hide.delay(250, this); + }.bind(this); + this.hideStopper = function(){ + if (this.hideTimer) this.hideTimer = $clear(this.hideTimer); + }.bind(this); + $$(triggers).each(function(trigger){ + var tooltip = trigger.tooltip(trigger.getElement('.details').get('html'), { + width: 170, + style: 'alert', + sticky: true, + mode: 'auto', + fixedPosition: true, + offset: {x: -20, y: 100}, + fx: false, + noClose: true + }); + trigger.addEvents({ + 'mouseleave': this.hideStarter, + 'mouseenter': this.hideStopper, + 'tooltipshow': this.handleShow.bind(this, trigger), + 'tooltiphide': this.handleHide.bind(this, trigger) + }); + tooltip.tooltip.addEvents({ + 'mouseenter': this.hideStopper, + 'mouseleave': this.hideStarter + }); + }, this); + }, + + handleShow: function(el){ + this.hideStopper(); + if (this.trigger) this.trigger.tooltip_hide(); + this.trigger = el; + }, + + handleHide: function(el){ + if (this.trigger == el) this.trigger = null; + }, + + hide: function(){ + if (!this.trigger) return; + this.trigger.tooltip_hide(); + this.trigger = null; + } + +}); + </script> + <script type="text/javascript"> [#list this.types as type] [#if type.name == this.type] [#assign currentType = type] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-07-01 06:41:53
|
Revision: 2769 http://openutils.svn.sourceforge.net/openutils/?rev=2769&view=rev Author: diego_schivo Date: 2010-07-01 06:41:46 +0000 (Thu, 01 Jul 2010) Log Message: ----------- MEDIA-145 <input> width Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css 2010-07-01 06:29:34 UTC (rev 2768) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css 2010-07-01 06:41:46 UTC (rev 2769) @@ -7,12 +7,12 @@ html,body,input,select { font-size: 10px; font-family: Verdana; - width: 98%; } -input,select { +input.text,select { padding: 2px; border: solid 1px #999; + width: 97%; } .row { @@ -49,7 +49,6 @@ float: left; display: inline; border: 0; - width: 30px; } .row .inner-row span { @@ -57,7 +56,6 @@ float: left; line-height: 15px; margin: 2px 0 0 0; - width: 70%; } #button-submit { Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl 2010-07-01 06:29:34 UTC (rev 2768) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl 2010-07-01 06:41:46 UTC (rev 2769) @@ -8,7 +8,7 @@ </#if> </label> </#if> - <input type="text" name="${filterKey}" value="" /> + <input type="text" name="${filterKey}" value="" class="text" /> <br /> <@rendersFilter filter.subfilters /> </div> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-07-01 07:05:25
|
Revision: 2771 http://openutils.svn.sourceforge.net/openutils/?rev=2771&view=rev Author: diego_schivo Date: 2010-07-01 07:05:18 +0000 (Thu, 01 Jul 2010) Log Message: ----------- MEDIA-145 refactoring ftl Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/empty.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/select.ftl Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html 2010-07-01 06:53:55 UTC (rev 2770) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html 2010-07-01 07:05:18 UTC (rev 2771) @@ -12,16 +12,19 @@ </head> <body> <form action="${this.request.contextPath}/media/search" target="mediaFolderView"> - <#macro rendersFilter filters> - <#list filters?keys as filterKey> - <#if filters[filterKey].control?? & filters[filterKey].control?length gt 0> - <#assign controlUrl>/search/freemarker/controls/${filters[filterKey].control}.ftl</#assign> - <#assign filter=filters[filterKey] > - <#include controlUrl /> - </#if> - </#list> - </#macro> - <@rendersFilter filters=this.configuration.filters /> + [#macro msgIfAvail key] + [#if !(this.msgs[key])?starts_with("???")]${this.msgs[key]}[#else]${key}[/#if] + [/#macro] + [#macro rendersFilter filters] + [#list filters?keys as filterKey] + [#if filters[filterKey].control?? & filters[filterKey].control?length gt 0] + [#assign controlUrl]/search/freemarker/controls/${filters[filterKey].control}.ftl[/#assign] + [#assign filter=filters[filterKey]] + [#include controlUrl /] + [/#if] + [/#list] + [/#macro] + [@rendersFilter filters=this.configuration.filters /] <input type="hidden" name="selectMedia" value="${this.selectMedia?string('true', 'false')}" /> Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl 2010-07-01 06:53:55 UTC (rev 2770) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl 2010-07-01 07:05:18 UTC (rev 2771) @@ -1,24 +1,12 @@ <div class="row"> [#if filter.label??] - <label for="${filterKey}"> - [#if !(this.msgs[filter.label])?starts_with("???")] - ${this.msgs[filter.label]} - [#else] - ${filter.label} - [/#if] - </label> + <label for="${filterKey}">[@msgIfAvail filter.label /]</label> [/#if] [#list filter.options as option] <div class="inner-row"> <input type="checkbox" name="${filterKey}" value="${option.value}" /> - <span> - [#if !(this.msgs[option.label])?starts_with("???")] - ${this.msgs[option.label]} - [#else] - ${option.label} - [/#if] - </span> + <span>[@msgIfAvail option.label /]</span> </div> [/#list] Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl 2010-07-01 06:53:55 UTC (rev 2770) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl 2010-07-01 07:05:18 UTC (rev 2771) @@ -1,12 +1,6 @@ <div class="row"> [#if filter.label??] - <label for="${filterKey}"> - [#if !(this.msgs[filter.label])?starts_with("???")] - ${this.msgs[filter.label]} - [#else] - ${filter.label} - [/#if] - </label> + <label for="${filterKey}">[@msgIfAvail filter.label /]</label> [/#if] <input type="text" name="${filterKey}" id="${filterKey}" value="" class="input-date" /> Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/empty.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/empty.ftl 2010-07-01 06:53:55 UTC (rev 2770) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/empty.ftl 2010-07-01 07:05:18 UTC (rev 2771) @@ -1,11 +1,5 @@ <div class="row"> [#if filter.label??] - <label for="${filterKey}"> - [#if !(this.msgs[filter.label])?starts_with("???")] - ${this.msgs[filter.label]} - [#else] - ${filter.label} - [/#if] - </label> + <label for="${filterKey}">[@msgIfAvail filter.label /]</label> [/#if] NOT READY </div> Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl 2010-07-01 06:53:55 UTC (rev 2770) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl 2010-07-01 07:05:18 UTC (rev 2771) @@ -1,12 +1,6 @@ <div class="row"> [#if filter.label??] - <label for="${filterKey}"> - [#if !(this.msgs[filter.label])?starts_with("???")] - ${this.msgs[filter.label]} - [#else] - ${filter.label} - [/#if] - </label> + <label for="${filterKey}">[@msgIfAvail filter.label /]</label> [/#if] <input type="text" name="${filterKey}" value="" class="text" /> Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl 2010-07-01 06:53:55 UTC (rev 2770) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl 2010-07-01 07:05:18 UTC (rev 2771) @@ -1,28 +1,12 @@ <div class="row"> [#if filter.label??] - <label for="${filterKey}"> - [#if !(this.msgs[filter.label])?starts_with("???")] - ${this.msgs[filter.label]} - [#else] - ${filter.label} - [/#if] - </label> + <label for="${filterKey}">[@msgIfAvail filter.label /]</label> [/#if] [#list filter.options as option] <div class="inner-row"> - [#if option.defaultValue?? & option.defaultValue] - <input type="radio" name="${filterKey}" value="${option.value}" checked="checked" /> - [#else] - <input type="radio" name="${filterKey}" value="${option.value}" /> - [/#if] - <span> - [#if !(this.msgs[option.label])?starts_with("???")] - ${this.msgs[option.label]} - [#else] - ${option.label} - [/#if] - </span> + <input type="radio" name="${filterKey}" value="${option.value}" [#if option.defaultValue?? & option.defaultValue]checked="checked"[/#if] /> + <span>[@msgIfAvail option.label /]</span> </div> [/#list] Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/select.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/select.ftl 2010-07-01 06:53:55 UTC (rev 2770) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/select.ftl 2010-07-01 07:05:18 UTC (rev 2771) @@ -1,29 +1,11 @@ <div class="row"> [#if filter.label??] - <label for="${filterKey}"> - [#if !(this.msgs[filter.label])?starts_with("???")] - ${this.msgs[filter.label]} - [#else] - ${filter.label} - [/#if] - </label> + <label for="${filterKey}">[@msgIfAvail filter.label /]</label> [/#if] <select name="${filterKey}" id="${filterKey}"> [#list filter.options as option] - [#if option.defaultValue?? & option.defaultValue] - <option value="${option.value}" selected="selected"> - [#else] - <option value="${option.value}"> - [/#if] - - [#if !(this.msgs[option.label])?starts_with("???")] - ${this.msgs[option.label]} - [#else] - ${option.label} - [/#if] - - </option> + <option value="${option.value}" [#if option.defaultValue?? & option.defaultValue]selected="selected"[/#if]>[@msgIfAvail option.label /]</option> [/#list] </select> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-07-01 07:07:01
|
Revision: 2772 http://openutils.svn.sourceforge.net/openutils/?rev=2772&view=rev Author: diego_schivo Date: 2010-07-01 07:06:55 +0000 (Thu, 01 Jul 2010) Log Message: ----------- MEDIA-145 magnolia font Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css 2010-07-01 07:05:18 UTC (rev 2771) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css 2010-07-01 07:06:55 UTC (rev 2772) @@ -4,11 +4,6 @@ line-height: 14px; } -html,body,input,select { - font-size: 10px; - font-family: Verdana; -} - input.text,select { padding: 2px; border: solid 1px #999; Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html 2010-07-01 07:05:18 UTC (rev 2771) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html 2010-07-01 07:06:55 UTC (rev 2772) @@ -10,7 +10,7 @@ <script type="text/javascript" src="${this.request.contextPath}/.resources/media/js/mootools-1.2-core.js"></script> <script type="text/javascript" src="${this.request.contextPath}/.resources/media/js/mootools-1.2-more.js"></script> </head> - <body> + <body id="mgnl"> <form action="${this.request.contextPath}/media/search" target="mediaFolderView"> [#macro msgIfAvail key] [#if !(this.msgs[key])?starts_with("???")]${this.msgs[key]}[#else]${key}[/#if] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-07-01 07:10:44
|
Revision: 2773 http://openutils.svn.sourceforge.net/openutils/?rev=2773&view=rev Author: diego_schivo Date: 2010-07-01 07:10:38 +0000 (Thu, 01 Jul 2010) Log Message: ----------- MEDIA-145 checkbox/radio clickable labels Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css 2010-07-01 07:06:55 UTC (rev 2772) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css 2010-07-01 07:10:38 UTC (rev 2773) @@ -46,11 +46,12 @@ border: 0; } -.row .inner-row span { +.row .inner-row label { display: inline; float: left; line-height: 15px; margin: 2px 0 0 0; + font-weight: normal; } #button-submit { Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl 2010-07-01 07:06:55 UTC (rev 2772) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl 2010-07-01 07:10:38 UTC (rev 2773) @@ -5,8 +5,8 @@ [#list filter.options as option] <div class="inner-row"> - <input type="checkbox" name="${filterKey}" value="${option.value}" /> - <span>[@msgIfAvail option.label /]</span> + <input type="checkbox" id="${filterKey}_${option.value}" name="${filterKey}" value="${option.value}" /> + <label for="${filterKey}_${option.value}">[@msgIfAvail option.label /]</span> </div> [/#list] Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl 2010-07-01 07:06:55 UTC (rev 2772) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl 2010-07-01 07:10:38 UTC (rev 2773) @@ -5,8 +5,8 @@ [#list filter.options as option] <div class="inner-row"> - <input type="radio" name="${filterKey}" value="${option.value}" [#if option.defaultValue?? & option.defaultValue]checked="checked"[/#if] /> - <span>[@msgIfAvail option.label /]</span> + <input type="radio" id="${filterKey}_${option.value}" name="${filterKey}" value="${option.value}" [#if option.defaultValue?? & option.defaultValue]checked="checked"[/#if] /> + <label for="${filterKey}_${option.value}">[@msgIfAvail option.label /]</span> </div> [/#list] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-07-01 17:30:29
|
Revision: 2784 http://openutils.svn.sourceforge.net/openutils/?rev=2784&view=rev Author: diego_schivo Date: 2010-07-01 17:30:23 +0000 (Thu, 01 Jul 2010) Log Message: ----------- MEDIA-145 paginator Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-07-01 15:50:00 UTC (rev 2783) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-07-01 17:30:23 UTC (rev 2784) @@ -114,11 +114,11 @@ } .paging { - clear: left; list-style: none outside none; - display: block; height: 24px; + margin: 0; padding: 10px 0 0 10px; + text-align: center; } .paging .page-current-true { @@ -141,7 +141,7 @@ .paging li { background-color: #EEEEEE; - float: left; + display: inline-block; height: 24px; margin: 1px; text-align: center; @@ -149,10 +149,10 @@ } .paging li a { - display: block; padding-top: 5px; text-decoration: none; vertical-align: middle; + float: left; width: 24px; } Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2010-07-01 15:50:00 UTC (rev 2783) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2010-07-01 17:30:23 UTC (rev 2784) @@ -186,7 +186,6 @@ width: 170, style: 'alert', sticky: true, - mode: 'tl', fixedPosition: true, offset: {x: -20, y: 100}, fx: false, @@ -376,6 +375,7 @@ </div> [#if this.pages?has_content && this.pages?size > 5] + <div style="clear: left;"> <ul class="paging"> [#list this.pages as page] <li class="page-current-${page.current?string} page-active-${page.active?string} ${page.cssclass}"> @@ -383,6 +383,7 @@ </li> [/#list] </ul> + </div> [/#if] <ul class="mediaList"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-07-02 06:38:02
|
Revision: 2785 http://openutils.svn.sourceforge.net/openutils/?rev=2785&view=rev Author: diego_schivo Date: 2010-07-02 06:37:56 +0000 (Fri, 02 Jul 2010) Log Message: ----------- MEDIA-145 fix tooltips in IE6 Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-07-01 17:30:23 UTC (rev 2784) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-07-02 06:37:56 UTC (rev 2785) @@ -39,15 +39,11 @@ float: right; } -#navigation #sortingblock,#navigation #bgselectorblock { +#navigation #bgselectorblock { float: right; margin-right: 10px; } -#navigation #bgselectorblock { - width: 48px; -} - #navigation .right a.bg-selector { padding-left: 16px; height: 16px; Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2010-07-01 17:30:23 UTC (rev 2784) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2010-07-02 06:37:56 UTC (rev 2785) @@ -347,9 +347,7 @@ <div class="voice right"> <a name="bg-white" href="#" class="bg-selector white [#if this.bgSelector == 'white']white-active[/#if]" title="${this.msgs.get('media.bgselector.white')}"><!-- --></a> </div> - </div> - <div id="sortingblock"> - <div class="voice right" style="padding-top: 3px;"> + <div class="voice right" style="margin-right: 10px; padding-top: 3px;"> <select id="sorting" name="sorting"> [#if this.request.requestURI?ends_with('/media-advsearch.html')] <option value="score"[#if this.sorting == 'score'] selected="selected"[/#if]>Score</option> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-07-02 07:18:34
|
Revision: 2786 http://openutils.svn.sourceforge.net/openutils/?rev=2786&view=rev Author: diego_schivo Date: 2010-07-02 07:18:28 +0000 (Fri, 02 Jul 2010) Log Message: ----------- MEDIA-145 cross-browser paginator Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-07-02 06:37:56 UTC (rev 2785) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-07-02 07:18:28 UTC (rev 2786) @@ -110,45 +110,37 @@ } .paging { - list-style: none outside none; - height: 24px; - margin: 0; - padding: 10px 0 0 10px; - text-align: center; + border-collapse: collapse; + margin: 10px auto 0; } -.paging .page-current-true { +.paging td { + padding: 0 2px; +} + +.paging .page-current-true a { background-color: #006699; font-weight: bold; } -.paging li.page-active-false { - background-color: #EEEEEE; +.paging td a,.paging .page-active-false a { + background-color: #F8F8F8; font-weight: normal; + text-align: center; } -.paging li.page-active-false a,.paging li.page-active-false a:visited { - color: #CCCCCC; -} - .paging .page-current-true a,.paging .page-current-true a:visited { color: #FFFFFF; } -.paging li { - background-color: #EEEEEE; - display: inline-block; - height: 24px; - margin: 1px; - text-align: center; - width: 24px; +.paging .page-active-false a,.paging .page-active-false a:visited { + color: #CCCCCC; } -.paging li a { - padding-top: 5px; - text-decoration: none; - vertical-align: middle; +.paging td a { float: left; + line-height: 24px; + text-decoration: none; width: 24px; } Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2010-07-02 06:37:56 UTC (rev 2785) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2010-07-02 07:18:28 UTC (rev 2786) @@ -374,13 +374,15 @@ [#if this.pages?has_content && this.pages?size > 5] <div style="clear: left;"> - <ul class="paging"> + <table class="paging"> + <tr> [#list this.pages as page] - <li class="page-current-${page.current?string} page-active-${page.active?string} ${page.cssclass}"> + <td class="page-current-${page.current?string} page-active-${page.active?string} ${page.cssclass}"> <a href="${page.url}">${page.label}</a> - </li> + </td> [/#list] - </ul> + </tr> + </table> </div> [/#if] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-07-02 08:40:33
|
Revision: 2793 http://openutils.svn.sourceforge.net/openutils/?rev=2793&view=rev Author: diego_schivo Date: 2010-07-02 08:40:26 +0000 (Fri, 02 Jul 2010) Log Message: ----------- MEDIA-145 i18n Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties 2010-07-02 08:29:44 UTC (rev 2792) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties 2010-07-02 08:40:26 UTC (rev 2793) @@ -78,6 +78,8 @@ buttons.ok=Ok buttons.cancel=Cancel +buttons.date=Date +buttons.search=Search dialog.filenopreview.extensions=Valid file extensions: dialog.filenopreview.error.extension=File extension for field {0} not valid Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties 2010-07-02 08:29:44 UTC (rev 2792) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties 2010-07-02 08:40:26 UTC (rev 2793) @@ -79,6 +79,8 @@ buttons.ok=Ok buttons.cancel=Annulla +buttons.date=Data +buttons.search=Cerca dialog.filenopreview.extensions=Estensioni valide: dialog.filenopreview.error.extension=Estensione del file per il campo {0} non valida Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html 2010-07-02 08:29:44 UTC (rev 2792) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html 2010-07-02 08:40:26 UTC (rev 2793) @@ -29,7 +29,7 @@ <input type="hidden" name="selectMedia" value="${this.selectMedia?string('true', 'false')}" /> <div class="row"> - <input type="submit" name="submit" value="Search" id="button-submit"/> + <input type="submit" name="submit" value="${this.msgs['buttons.search']}" id="button-submit"/> </div> </form> </body> Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl 2010-07-02 08:29:44 UTC (rev 2792) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl 2010-07-02 08:40:26 UTC (rev 2793) @@ -4,7 +4,7 @@ [/#if] <input type="text" name="${filterKey}" id="${filterKey}" value="" class="input-date" /> - <span class="mgnlControlButton" id="butt_${filterKey}" onclick="cal_butt_${filterKey}.show()">Date</span> + <span class="mgnlControlButton" id="butt_${filterKey}" onclick="cal_butt_${filterKey}.show()">${this.msgs['buttons.date']}</span> <script type="text/javascript"> // <![CDATA[ var cal_butt_${filterKey} = Calendar.setup({ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-09-01 17:32:31
|
Revision: 2995 http://openutils.svn.sourceforge.net/openutils/?rev=2995&view=rev Author: diego_schivo Date: 2010-09-01 17:32:22 +0000 (Wed, 01 Sep 2010) Log Message: ----------- MEDIA-166 Style the "sort by" select: javascript replacement Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html Added Paths: ----------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/images/myselect.gif trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/images/select-left.png trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/images/select-right.png trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/mooSelecta.css trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mooSelecta.js trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mootools-1.2.4-core.js trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mootools-1.2.4.4-more.js Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-09-01 15:09:21 UTC (rev 2994) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-09-01 17:32:22 UTC (rev 2995) @@ -78,6 +78,10 @@ background-position: 0 -80px; } +#navigation select#sorting { + width: 150px; +} + .voice a,.voice a:visited,.voice a:hover { text-decoration: none; color: #333; Added: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/images/myselect.gif =================================================================== (Binary files differ) Property changes on: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/images/myselect.gif ___________________________________________________________________ Added: svn:mime-type + image/gif Added: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/images/select-left.png =================================================================== (Binary files differ) Property changes on: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/images/select-left.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/images/select-right.png =================================================================== (Binary files differ) Property changes on: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/images/select-right.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/mooSelecta.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/mooSelecta.css (rev 0) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/mooSelecta.css 2010-09-01 17:32:22 UTC (rev 2995) @@ -0,0 +1,132 @@ +body{ background-color:#FFF;font-family:Verdana;font-size:12px;line-height:1.2} + +div.formLeft { + width: 170px; + padding-top: 4px; + float: left; + text-align: right; + padding-right: 5px; +} + +div.formLeft label.orange_title { + float: right; +} + +div.formLeft label.orange_title { + float: right; +} +div.formRight { + float: left; + width: 370px; + min-height: 25px; +} +.left { + float: left; +} +.cur { + _cursor: hand; + cursor: pointer; +} + +.orange_title { + color: #f60; + font-weight: bold; + font-size: 14px; + display: inline; + float: left; + padding-bottom: 4px; +} + +div.selectaTrigger { + font-weight: bold; + height: 20px; + background: url(images/myselect.gif) no-repeat top right; + border-left: 1px solid #000; + padding-right: 30px; + padding-left: 5px; + padding-top: 5px; + overflow: hidden; +} + +select.selecta { + height: 25px; +} + +div.selectaWrapper { + border: 1px solid #000; + border-top: 0; + position: absolute; + z-index: 10000; + background: white; + overflow: hidden; + overflow-y: auto; +} +div.selectaOption { + padding: 4px; + padding-bottom: 2px; + padding-top: 2px; + border-bottom: 1px solid #eee; + clear: both; +} +div.selectaOptionSelected { + background: #ffffcf; +} +div.selectaOptionOver { + background: yellow; +} + +div.selecta2 { + background: url(images/select-right.png) no-repeat right center; + font-weight: bold; + height: 18px; + padding-top: 3px; + padding-left: 4px; + padding-right: 20px; + overflow: hidden; + color: white; +} + +div.selecta2Wrapper { + border: 1px solid #b6b7bf; + border-top: 0px; + padding: 2px; + background: #f2f2f2; + overflow: hidden; + overflow-y: auto; + position: absolute; +} + +div.selecta2Option { + padding: 2px; + padding-left: 4px; + + clear: both; + background: #fff; + color: #555; + font-weight: bold; +} + +div.selecta2OptionSelected { + background: #666; + color: #ffffcf; + +} +div.selecta2OptionOver { + background: #444; + color: #ffffcf; +} + + + +.shadowy { + -moz-box-shadow: 1px 1px 2px #000; + -webkit-box-shadow: 1px 1px 2px #000; + box-shadow: 1px 1px 2px #000; +} + +#debug { + background: red; + color: yellow; + padding: 5px; + margin: 5px; +} \ No newline at end of file Property changes on: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/mooSelecta.css ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mooSelecta.js =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mooSelecta.js (rev 0) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mooSelecta.js 2010-09-01 17:32:22 UTC (rev 2995) @@ -0,0 +1,424 @@ +/* +--- +description: mooSelecta, select element styling replacement + +license: + MIT-style + +authors: +- Dimitar Christoff + +requires: + core/1.2.4: '*' + +provides: [Element] + +... +*/ + +var mooSelecta = new Class({ + + version: 1.2, + + updated: "29/03/2010 15:47:49", + + + Implements: [Options,Events], + + // default options + // don't change these here but on the instance (unless you want to) + options: { + selector: "selecta", // class / selector for selects to convert + triggerClass: "selectaTrigger", // class of the replacement div + triggerPadding: 30+5, // compensate for left/right padding of text + triggerBeforeImage: "", // advanced styling of trigger like a round image + triggerBeforeImageWidth: 0, // need to compensate width + triggerBeforeImageHeight: 0, // and know height. + wrapperClass: "selectaWrapper", // popup wrapper class + wrapperWidthAdjustment: 0, // you can add or substract to width if not matching, use +/- value + wrapperShadow: "shadowy", // extra class applied to wrapper, like one with box-shadow + wrapperHeight: 0, // maximum allowed height for dropdown before it scrolls + optionClass: "selectaOption", // base class of indivdual options + optionClassSelected: "selectaOptionSelected", // pre-selected value class + optionClassOver: "selectaOptionOver", // onmouseover option class + allowTextSelect: false, // experimental to stop accdiental text selection + // these are keycodes that correspond to alpha numerics on most ISO keyboards for index lookups of options + allowedKeyboardCodes: [48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90], + useClickListener: true // binds click events to check for clicks away from dropdown. + }, + + Binds: ["_bindClickListener"], + + // internal hashed collection of managed selects + selects: {}, + + // hash that references options per select for keycode lookups + optionList: {}, + + // false or contains a pointer to the last select that has opened the menu + focused: false, + + initialize: function(options) { + // start everything. + this.setOptions(options); + + // locate and apply selects to all required ones. + var selects = $$('select.'+this.options.selector); + + if (!selects.length) + return "nothing to do, selector came up empty!"; + + selects.each(this.replaceSelect.bind(this)); + + // convert object to hash + this.selects = new Hash(this.selects); + + // bind mouseclicks and keytyping + this.bindListeners(); + }, + + replaceSelect: function(el) { + // public method that replaces selects + var el = document.id(el); // adds uid. + + if (!el) return; + + // gets existing element's width to use + var width = el.getSize().x; + + // default selected to go into wrapper + var selectedOption = el.getElements("option").filter(function(op) { + return op.getProperty("selected"); + }); + + // clean up old instances. + if (el.retrieve("triggerElement")) + el.retrieve("triggerElement").dispose(); + if (el.retrieve("wrapper")) + el.retrieve("wrapper").dispose(); + + + // build the top visible element + el.store("triggerElement", new Element("div", { + "class": this.options.triggerClass, + styles: { + width: width - this.options.triggerPadding + } + }).inject(el, "after").addClass("cur")); // cur is a class that changes cursor to a clicky one. + + // re-adjust width after the trigger has been done so wrapper can match it. + width = el.retrieve("triggerElement").getSize().x - 2 - this.options.triggerBeforeImageWidth + this.options.wrapperWidthAdjustment; + + // build the menu wrapper + + // if we have an image to pre-pend, add it. + if (this.options.triggerBeforeImage.length) { + new Element("div", { + styles: { + float: "left", + position: (Browser.Engine.trident4) ? "absolute" : "relative", + background: "url("+this.options.triggerBeforeImage+") no-repeat", + width: this.options.triggerBeforeImageWidth, + height: this.options.triggerBeforeImageHeight + } + }).inject(el.retrieve("triggerElement"), "before"); + } + + // create the options wrapper + el.store("wrapper", new Element("div", { + "class": this.options.wrapperClass, + styles: { + width: width, + zIndex: 10000 + } + }).inject(el.retrieve("triggerElement"), "after").addClass(this.options.wrapperShadow)); + + // now hide the original selects off-screen + // this is so the tab indexing and by-label focus works and hands us back contol. + el.set({ + styles: { + position: "absolute", + left: -1000 + }, + events: { + focus: function() { + if (this.focused) + this._hideOptions(); + + this.focused = el; + this._toggleOptions(el); + + }.bind(this), + blur: function(e) { + if (this.focused == el) + this._toggleOptions(el); + }.bind(this) + } + }); + + // handle labels so they don't interfere by launching a semi-full event. + var lbl = document.getElement("label[for="+el.get("id")+"]"); + if (el.get("id") && lbl) { + lbl.addEvent("click", function(e) { + new Event(e).stop(); + el.fireEvent("focus"); + }); + } + + + // get all options and port them to wrapper + el.getElements('option').each(function(option) { + var selected = false; + if (option.getProperty("selected")) { + el.retrieve("triggerElement").set("html", option.get("text")); + selected = true; + } + this._addOption(option, el, selected); + }, this); + + // figure out height of wrapper and reduce if needed + if (this.options.wrapperHeight) { // if greater than 0 care about this + var height = el.retrieve("wrapper").getSize().y; + if (height > this.options.wrapperHeight) { + el.retrieve("wrapper").setStyles({ + height: this.options.wrapperHeight + }); + } + } + + // hide the menu by default. + el.retrieve("wrapper").setStyle("display", "none"); + + // attach a click event to trigger element + el.retrieve("triggerElement").addEvents({ + click: function(e) { + new Event(e).stop(); + // toggler, click on opened closes it. + el.fireEvent((this.focused == el) ? "blur" : "focus"); + }.bind(this) + }); + + // export the managed select to the hash + if (el.uid && el) + this.selects[el.uid] = el; + + }, // end .replaceSelect(); + + bindListeners: function() { + // setup valrious click / key events + + if (this.options.useClickListener) + document.addEvent("click", this._bindClickListener); + + document.addEvents({ + // keyboard listener + keydown: function(e) { + var e = new Event(e); + + // if no menu is currently open, don't do anything. + if (!this.focused) + return; + + switch(e.code) { + case 40: // down arrow option navigation + new Event(e).stop(); + // ops should really be cached outside here + var ops = this.focused.retrieve("wrapper").getElements("div."+this.options.optionClass), done = false; + + ops.each(function(el, i) { + if (ops.length-1 == i || done) + return; + + if (el.hasClass(this.options.optionClassSelected)) { + ops.removeClass(this.options.optionClassOver); + ops[i+1].addClass(this.options.optionClassSelected).addClass(this.options.optionClassOver); + el.removeClass(this.options.optionClassSelected); + done = true; + } + }, this); + + + break; + case 38: // up arrow option navigation + new Event(e).stop(); + var ops = this.focused.retrieve("wrapper").getElements("div."+this.options.optionClass), done = false; + + ops.each(function(el, i) { + if (done) + return; + + if (el.hasClass(this.options.optionClassSelected)) { + if (i > 0) { + ops.removeClass(this.options.optionClassOver); + ops[i-1].addClass(this.options.optionClassSelected).addClass(this.options.optionClassOver); + el.removeClass(this.options.optionClassSelected); + } + done = true; + } + }, this); + + + break; + case 13: // enter + new Event(e).stop(); + this.focused.retrieve("wrapper").getElements("div."+this.options.optionClassSelected).fireEvent("click"); + break; + case 9: // tabbed out, blur auto... + this._hideOptions(this.focused); + break; + case 34: + case 35: + // go to last option via pgdn or end + new Event(e).stop(); + var old = this.focused; + this.focused.retrieve("wrapper").getElements("div."+this.options.optionClass).getLast().fireEvent("click"); + old.fireEvent("focus"); + + break; + case 33: + case 36: + // go to first option via pgup or home + new Event(e).stop(); + var old = this.focused; + this.focused.retrieve("wrapper").getElement("div."+this.options.optionClass).fireEvent("click"); + old.fireEvent("focus"); + + break; + default: + // the "other" keys. + + var old = this.focused, ops = this.focused.retrieve("wrapper").getElements("div."+this.options.optionClass); + + // is is alpha numeric allowed? + if (this.options.allowedKeyboardCodes.contains(e.code)) { + // loop through current option texts array cache for matches + var matchingKeys = []; + var selected = false; + + var applicable = this.optionList["k"+this.focused.uid].filter(function(el, index) { + if (ops[index].hasClass(this.options.optionClassSelected)) selected = index; + var match = el.indexOf(e.key) == 0; + if (match) + matchingKeys.push(index); + return match; + }, this); + + if (applicable.length) { + if (!matchingKeys.contains(selected)) { + selected = matchingKeys[0]; + } + else { + if (ops[selected+1] && matchingKeys.contains(selected+1)) { + selected++; + } + else { + selected = matchingKeys[0]; + } + + } + + ops[selected].fireEvent("click"); + old.fireEvent("focus"); + done = true; + } + } + else { + // do nothing or disable comment to see other keys you may like to bind. + // console.log(e.code, e.key); + } + break; + } + }.bind(this) + }); + }, // end .bindListeners() + + _bindClickListener: function(e) { + // listens for client clicks away from triggers and closes like real selects do when user loses interest + var e = new Event(e); + + // using a collection which saves a click on an element that's not extended with .hasClass + if ($$(e.target).hasClass(this.options.triggerClass).contains(false)) { + this._hideOptions(); + } + }, + + _addOption: function(option, el, selected) { + // internal method called by replaceSelect that adds each option as a div within the wrapper + var text = option.get("text").trim(); + if (!text.length) + text = " "; + + // store options relevant to element uid. + var oldList = this.optionList["k" + el.uid] || []; + oldList.push(text.toLowerCase()); + var tempObj = {}; + tempObj["k" + el.uid] = oldList; + $extend(this.optionList, tempObj); + // end store + + var opDiv = new Element("div", { + "class": this.options.optionClass, + html: text, + events: { + mouseenter: function() { + opDiv.addClass(this.options.optionClassOver); + }.bind(this), + mouseleave: function() { + opDiv.removeClass(this.options.optionClassOver); + }.bind(this), + click: function(e) { + if (e && e.type && e.stop) + e.stop(); + + // menu stuff visual + el.retrieve("wrapper").getChildren().removeClass(this.options.optionClassSelected); + opDiv.addClass(this.options.optionClassSelected); + el.retrieve("triggerElement").set("html", opDiv.get("text")); + + // now handle change in the real select + el.set("value", opDiv.retrieve("value")).fireEvent("change", e); + this._toggleOptions(el); + }.bind(this) + } + }).store("value", option.get("value")).inject(el.retrieve("wrapper")).addClass("cur"); + + if (selected) + opDiv.addClass(this.options.optionClassSelected); + + }, + + _toggleOptions: function(el) { + // toggles visibility on click + var vis = el.retrieve("wrapper").getStyle("display"); + el.retrieve("wrapper").setStyle("display", (vis == "none") ? "block" : "none").getChildren().removeClass(this.options.optionClassOver); + this.focused = (vis != "none") ? false : el; + + // scroll to selected from .toElement in core but w/o a fx.slide instance + var parent = el.retrieve("wrapper").getPosition(this.options.overflown); + var target = el.retrieve("wrapper").getElement("div." + this.options.optionClassSelected).getPosition(this.options.overflown); + el.retrieve("wrapper").scrollTo(target.x - parent.x, target.y - parent.y); + this._clearSelection(); + }, + + _hideOptions: function() { + // private called on cleanup / away click + this.selects.getValues().each(function(el) { + if (el.retrieve("wrapper").getStyle("display") != "none") + el.fireEvent("blur"); + el.retrieve("wrapper").setStyle("display", "none"); + el.focused = false; + }); + }, + + _clearSelection: function() { + // removes document selection + if (this.options.allowTextSelect || Browser.Engine.trident4) // not sure how IE6 does this + return; + + if (document.selection && document.selection.empty) { + document.selection.empty(); + } else if (window.getSelection) { + window.getSelection().removeAllRanges(); + } + } +}); // endClass Property changes on: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mooSelecta.js ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mootools-1.2.4-core.js =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mootools-1.2.4-core.js (rev 0) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mootools-1.2.4-core.js 2010-09-01 17:32:22 UTC (rev 2995) @@ -0,0 +1,4329 @@ +/* +--- + +script: Core.js + +description: The core of MooTools, contains all the base functions and the Native and Hash implementations. Required by all the other scripts. + +license: MIT-style license. + +copyright: Copyright (c) 2006-2008 [Valerio Proietti](http://mad4milk.net/). + +authors: The MooTools production team (http://mootools.net/developers/) + +inspiration: +- Class implementation inspired by [Base.js](http://dean.edwards.name/weblog/2006/03/base/) Copyright (c) 2006 Dean Edwards, [GNU Lesser General Public License](http://opensource.org/licenses/lgpl-license.php) +- Some functionality inspired by [Prototype.js](http://prototypejs.org) Copyright (c) 2005-2007 Sam Stephenson, [MIT License](http://opensource.org/licenses/mit-license.php) + +provides: [Mootools, Native, Hash.base, Array.each, $util] + +... +*/ + +var MooTools = { + 'version': '1.2.4', + 'build': '0d9113241a90b9cd5643b926795852a2026710d4' +}; + +var Native = function(options){ + options = options || {}; + var name = options.name; + var legacy = options.legacy; + var protect = options.protect; + var methods = options.implement; + var generics = options.generics; + var initialize = options.initialize; + var afterImplement = options.afterImplement || function(){}; + var object = initialize || legacy; + generics = generics !== false; + + object.constructor = Native; + object.$family = {name: 'native'}; + if (legacy && initialize) object.prototype = legacy.prototype; + object.prototype.constructor = object; + + if (name){ + var family = name.toLowerCase(); + object.prototype.$family = {name: family}; + Native.typize(object, family); + } + + var add = function(obj, name, method, force){ + if (!protect || force || !obj.prototype[name]) obj.prototype[name] = method; + if (generics) Native.genericize(obj, name, protect); + afterImplement.call(obj, name, method); + return obj; + }; + + object.alias = function(a1, a2, a3){ + if (typeof a1 == 'string'){ + var pa1 = this.prototype[a1]; + if ((a1 = pa1)) return add(this, a2, a1, a3); + } + for (var a in a1) this.alias(a, a1[a], a2); + return this; + }; + + object.implement = function(a1, a2, a3){ + if (typeof a1 == 'string') return add(this, a1, a2, a3); + for (var p in a1) add(this, p, a1[p], a2); + return this; + }; + + if (methods) object.implement(methods); + + return object; +}; + +Native.genericize = function(object, property, check){ + if ((!check || !object[property]) && typeof object.prototype[property] == 'function') object[property] = function(){ + var args = Array.prototype.slice.call(arguments); + return object.prototype[property].apply(args.shift(), args); + }; +}; + +Native.implement = function(objects, properties){ + for (var i = 0, l = objects.length; i < l; i++) objects[i].implement(properties); +}; + +Native.typize = function(object, family){ + if (!object.type) object.type = function(item){ + return ($type(item) === family); + }; +}; + +(function(){ + var natives = {'Array': Array, 'Date': Date, 'Function': Function, 'Number': Number, 'RegExp': RegExp, 'String': String}; + for (var n in natives) new Native({name: n, initialize: natives[n], protect: true}); + + var types = {'boolean': Boolean, 'native': Native, 'object': Object}; + for (var t in types) Native.typize(types[t], t); + + var generics = { + 'Array': ["concat", "indexOf", "join", "lastIndexOf", "pop", "push", "reverse", "shift", "slice", "sort", "splice", "toString", "unshift", "valueOf"], + 'String': ["charAt", "charCodeAt", "concat", "indexOf", "lastIndexOf", "match", "replace", "search", "slice", "split", "substr", "substring", "toLowerCase", "toUpperCase", "valueOf"] + }; + for (var g in generics){ + for (var i = generics[g].length; i--;) Native.genericize(natives[g], generics[g][i], true); + } +})(); + +var Hash = new Native({ + + name: 'Hash', + + initialize: function(object){ + if ($type(object) == 'hash') object = $unlink(object.getClean()); + for (var key in object) this[key] = object[key]; + return this; + } + +}); + +Hash.implement({ + + forEach: function(fn, bind){ + for (var key in this){ + if (this.hasOwnProperty(key)) fn.call(bind, this[key], key, this); + } + }, + + getClean: function(){ + var clean = {}; + for (var key in this){ + if (this.hasOwnProperty(key)) clean[key] = this[key]; + } + return clean; + }, + + getLength: function(){ + var length = 0; + for (var key in this){ + if (this.hasOwnProperty(key)) length++; + } + return length; + } + +}); + +Hash.alias('forEach', 'each'); + +Array.implement({ + + forEach: function(fn, bind){ + for (var i = 0, l = this.length; i < l; i++) fn.call(bind, this[i], i, this); + } + +}); + +Array.alias('forEach', 'each'); + +function $A(iterable){ + if (iterable.item){ + var l = iterable.length, array = new Array(l); + while (l--) array[l] = iterable[l]; + return array; + } + return Array.prototype.slice.call(iterable); +}; + +function $arguments(i){ + return function(){ + return arguments[i]; + }; +}; + +function $chk(obj){ + return !!(obj || obj === 0); +}; + +function $clear(timer){ + clearTimeout(timer); + clearInterval(timer); + return null; +}; + +function $defined(obj){ + return (obj != undefined); +}; + +function $each(iterable, fn, bind){ + var type = $type(iterable); + ((type == 'arguments' || type == 'collection' || type == 'array') ? Array : Hash).each(iterable, fn, bind); +}; + +function $empty(){}; + +function $extend(original, extended){ + for (var key in (extended || {})) original[key] = extended[key]; + return original; +}; + +function $H(object){ + return new Hash(object); +}; + +function $lambda(value){ + return ($type(value) == 'function') ? value : function(){ + return value; + }; +}; + +function $merge(){ + var args = Array.slice(arguments); + args.unshift({}); + return $mixin.apply(null, args); +}; + +function $mixin(mix){ + for (var i = 1, l = arguments.length; i < l; i++){ + var object = arguments[i]; + if ($type(object) != 'object') continue; + for (var key in object){ + var op = object[key], mp = mix[key]; + mix[key] = (mp && $type(op) == 'object' && $type(mp) == 'object') ? $mixin(mp, op) : $unlink(op); + } + } + return mix; +}; + +function $pick(){ + for (var i = 0, l = arguments.length; i < l; i++){ + if (arguments[i] != undefined) return arguments[i]; + } + return null; +}; + +function $random(min, max){ + return Math.floor(Math.random() * (max - min + 1) + min); +}; + +function $splat(obj){ + var type = $type(obj); + return (type) ? ((type != 'array' && type != 'arguments') ? [obj] : obj) : []; +}; + +var $time = Date.now || function(){ + return +new Date; +}; + +function $try(){ + for (var i = 0, l = arguments.length; i < l; i++){ + try { + return arguments[i](); + } catch(e){} + } + return null; +}; + +function $type(obj){ + if (obj == undefined) return false; + if (obj.$family) return (obj.$family.name == 'number' && !isFinite(obj)) ? false : obj.$family.name; + if (obj.nodeName){ + switch (obj.nodeType){ + case 1: return 'element'; + case 3: return (/\S/).test(obj.nodeValue) ? 'textnode' : 'whitespace'; + } + } else if (typeof obj.length == 'number'){ + if (obj.callee) return 'arguments'; + else if (obj.item) return 'collection'; + } + return typeof obj; +}; + +function $unlink(object){ + var unlinked; + switch ($type(object)){ + case 'object': + unlinked = {}; + for (var p in object) unlinked[p] = $unlink(object[p]); + break; + case 'hash': + unlinked = new Hash(object); + break; + case 'array': + unlinked = []; + for (var i = 0, l = object.length; i < l; i++) unlinked[i] = $unlink(object[i]); + break; + default: return object; + } + return unlinked; +}; + + +/* +--- + +script: Browser.js + +description: The Browser Core. Contains Browser initialization, Window and Document, and the Browser Hash. + +license: MIT-style license. + +requires: +- /Native +- /$util + +provides: [Browser, Window, Document, $exec] + +... +*/ + +var Browser = $merge({ + + Engine: {name: 'unknown', version: 0}, + + Platform: {name: (window.orientation != undefined) ? 'ipod' : (navigator.platform.match(/mac|win|linux/i) || ['other'])[0].toLowerCase()}, + + Features: {xpath: !!(document.evaluate), air: !!(window.runtime), query: !!(document.querySelector)}, + + Plugins: {}, + + Engines: { + + presto: function(){ + return (!window.opera) ? false : ((arguments.callee.caller) ? 960 : ((document.getElementsByClassName) ? 950 : 925)); + }, + + trident: function(){ + return (!window.ActiveXObject) ? false : ((window.XMLHttpRequest) ? ((document.querySelectorAll) ? 6 : 5) : 4); + }, + + webkit: function(){ + return (navigator.taintEnabled) ? false : ((Browser.Features.xpath) ? ((Browser.Features.query) ? 525 : 420) : 419); + }, + + gecko: function(){ + return (!document.getBoxObjectFor && window.mozInnerScreenX == null) ? false : ((document.getElementsByClassName) ? 19 : 18); + } + + } + +}, Browser || {}); + +Browser.Platform[Browser.Platform.name] = true; + +Browser.detect = function(){ + + for (var engine in this.Engines){ + var version = this.Engines[engine](); + if (version){ + this.Engine = {name: engine, version: version}; + this.Engine[engine] = this.Engine[engine + version] = true; + break; + } + } + + return {name: engine, version: version}; + +}; + +Browser.detect(); + +Browser.Request = function(){ + return $try(function(){ + return new XMLHttpRequest(); + }, function(){ + return new ActiveXObject('MSXML2.XMLHTTP'); + }, function(){ + return new ActiveXObject('Microsoft.XMLHTTP'); + }); +}; + +Browser.Features.xhr = !!(Browser.Request()); + +Browser.Plugins.Flash = (function(){ + var version = ($try(function(){ + return navigator.plugins['Shockwave Flash'].description; + }, function(){ + return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version'); + }) || '0 r0').match(/\d+/g); + return {version: parseInt(version[0] || 0 + '.' + version[1], 10) || 0, build: parseInt(version[2], 10) || 0}; +})(); + +function $exec(text){ + if (!text) return text; + if (window.execScript){ + window.execScript(text); + } else { + var script = document.createElement('script'); + script.setAttribute('type', 'text/javascript'); + script[(Browser.Engine.webkit && Browser.Engine.version < 420) ? 'innerText' : 'text'] = text; + document.head.appendChild(script); + document.head.removeChild(script); + } + return text; +}; + +Native.UID = 1; + +var $uid = (Browser.Engine.trident) ? function(item){ + return (item.uid || (item.uid = [Native.UID++]))[0]; +} : function(item){ + return item.uid || (item.uid = Native.UID++); +}; + +var Window = new Native({ + + name: 'Window', + + legacy: (Browser.Engine.trident) ? null: window.Window, + + initialize: function(win){ + $uid(win); + if (!win.Element){ + win.Element = $empty; + if (Browser.Engine.webkit) win.document.createElement("iframe"); //fixes safari 2 + win.Element.prototype = (Browser.Engine.webkit) ? window["[[DOMElement.prototype]]"] : {}; + } + win.document.window = win; + return $extend(win, Window.Prototype); + }, + + afterImplement: function(property, value){ + window[property] = Window.Prototype[property] = value; + } + +}); + +Window.Prototype = {$family: {name: 'window'}}; + +new Window(window); + +var Document = new Native({ + + name: 'Document', + + legacy: (Browser.Engine.trident) ? null: window.Document, + + initialize: function(doc){ + $uid(doc); + doc.head = doc.getElementsByTagName('head')[0]; + doc.html = doc.getElementsByTagName('html')[0]; + if (Browser.Engine.trident && Browser.Engine.version <= 4) $try(function(){ + doc.execCommand("BackgroundImageCache", false, true); + }); + if (Browser.Engine.trident) doc.window.attachEvent('onunload', function(){ + doc.window.detachEvent('onunload', arguments.callee); + doc.head = doc.html = doc.window = null; + }); + return $extend(doc, Document.Prototype); + }, + + afterImplement: function(property, value){ + document[property] = Document.Prototype[property] = value; + } + +}); + +Document.Prototype = {$family: {name: 'document'}}; + +new Document(document); + + +/* +--- + +script: Array.js + +description: Contains Array Prototypes like each, contains, and erase. + +license: MIT-style license. + +requires: +- /$util +- /Array.each + +provides: [Array] + +... +*/ + +Array.implement({ + + every: function(fn, bind){ + for (var i = 0, l = this.length; i < l; i++){ + if (!fn.call(bind, this[i], i, this)) return false; + } + return true; + }, + + filter: function(fn, bind){ + var results = []; + for (var i = 0, l = this.length; i < l; i++){ + if (fn.call(bind, this[i], i, this)) results.push(this[i]); + } + return results; + }, + + clean: function(){ + return this.filter($defined); + }, + + indexOf: function(item, from){ + var len = this.length; + for (var i = (from < 0) ? Math.max(0, len + from) : from || 0; i < len; i++){ + if (this[i] === item) return i; + } + return -1; + }, + + map: function(fn, bind){ + var results = []; + for (var i = 0, l = this.length; i < l; i++) results[i] = fn.call(bind, this[i], i, this); + return results; + }, + + some: function(fn, bind){ + for (var i = 0, l = this.length; i < l; i++){ + if (fn.call(bind, this[i], i, this)) return true; + } + return false; + }, + + associate: function(keys){ + var obj = {}, length = Math.min(this.length, keys.length); + for (var i = 0; i < length; i++) obj[keys[i]] = this[i]; + return obj; + }, + + link: function(object){ + var result = {}; + for (var i = 0, l = this.length; i < l; i++){ + for (var key in object){ + if (object[key](this[i])){ + result[key] = this[i]; + delete object[key]; + break; + } + } + } + return result; + }, + + contains: function(item, from){ + return this.indexOf(item, from) != -1; + }, + + extend: function(array){ + for (var i = 0, j = array.length; i < j; i++) this.push(array[i]); + return this; + }, + + getLast: function(){ + return (this.length) ? this[this.length - 1] : null; + }, + + getRandom: function(){ + return (this.length) ? this[$random(0, this.length - 1)] : null; + }, + + include: function(item){ + if (!this.contains(item)) this.push(item); + return this; + }, + + combine: function(array){ + for (var i = 0, l = array.length; i < l; i++) this.include(array[i]); + return this; + }, + + erase: function(item){ + for (var i = this.length; i--; i){ + if (this[i] === item) this.splice(i, 1); + } + return this; + }, + + empty: function(){ + this.length = 0; + return this; + }, + + flatten: function(){ + var array = []; + for (var i = 0, l = this.length; i < l; i++){ + var type = $type(this[i]); + if (!type) continue; + array = array.concat((type == 'array' || type == 'collection' || type == 'arguments') ? Array.flatten(this[i]) : this[i]); + } + return array; + }, + + hexToRgb: function(array){ + if (this.length != 3) return null; + var rgb = this.map(function(value){ + if (value.length == 1) value += value; + return value.toInt(16); + }); + return (array) ? rgb : 'rgb(' + rgb + ')'; + }, + + rgbToHex: function(array){ + if (this.length < 3) return null; + if (this.length == 4 && this[3] == 0 && !array) return 'transparent'; + var hex = []; + for (var i = 0; i < 3; i++){ + var bit = (this[i] - 0).toString(16); + hex.push((bit.length == 1) ? '0' + bit : bit); + } + return (array) ? hex : '#' + hex.join(''); + } + +}); + + +/* +--- + +script: Function.js + +description: Contains Function Prototypes like create, bind, pass, and delay. + +license: MIT-style license. + +requires: +- /Native +- /$util + +provides: [Function] + +... +*/ + +Function.implement({ + + extend: function(properties){ + for (var property in properties) this[property] = properties[property]; + return this; + }, + + create: function(options){ + var self = this; + options = options || {}; + return function(event){ + var args = options.arguments; + args = (args != undefined) ? $splat(args) : Array.slice(arguments, (options.event) ? 1 : 0); + if (options.event) args = [event || window.event].extend(args); + var returns = function(){ + return self.apply(options.bind || null, args); + }; + if (options.delay) return setTimeout(returns, options.delay); + if (options.periodical) return setInterval(returns, options.periodical); + if (options.attempt) return $try(returns); + return returns(); + }; + }, + + run: function(args, bind){ + return this.apply(bind, $splat(args)); + }, + + pass: function(args, bind){ + return this.create({bind: bind, arguments: args}); + }, + + bind: function(bind, args){ + return this.create({bind: bind, arguments: args}); + }, + + bindWithEvent: function(bind, args){ + return this.create({bind: bind, arguments: args, event: true}); + }, + + attempt: function(args, bind){ + return this.create({bind: bind, arguments: args, attempt: true})(); + }, + + delay: function(delay, bind, args){ + return this.create({bind: bind, arguments: args, delay: delay})(); + }, + + periodical: function(periodical, bind, args){ + return this.create({bind: bind, arguments: args, periodical: periodical})(); + } + +}); + + +/* +--- + +script: Number.js + +description: Contains Number Prototypes like limit, round, times, and ceil. + +license: MIT-style license. + +requires: +- /Native +- /$util + +provides: [Number] + +... +*/ + +Number.implement({ + + limit: function(min, max){ + return Math.min(max, Math.max(min, this)); + }, + + round: function(precision){ + precision = Math.pow(10, precision || 0); + return Math.round(this * precision) / precision; + }, + + times: function(fn, bind){ + for (var i = 0; i < this; i++) fn.call(bind, i, this); + }, + + toFloat: function(){ + return parseFloat(this); + }, + + toInt: function(base){ + return parseInt(this, base || 10); + } + +}); + +Number.alias('times', 'each'); + +(function(math){ + var methods = {}; + math.each(function(name){ + if (!Number[name]) methods[name] = function(){ + return Math[name].apply(null, [this].concat($A(arguments))); + }; + }); + Number.implement(methods); +})(['abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'exp', 'floor', 'log', 'max', 'min', 'pow', 'sin', 'sqrt', 'tan']); + + +/* +--- + +script: String.js + +description: Contains String Prototypes like camelCase, capitalize, test, and toInt. + +license: MIT-style license. + +requires: +- /Native + +provides: [String] + +... +*/ + +String.implement({ + + test: function(regex, params){ + return ((typeof regex == 'string') ? new RegExp(regex, params) : regex).test(this); + }, + + contains: function(string, separator){ + return (separator) ? (separator + this + separator).indexOf(separator + string + separator) > -1 : this.indexOf(string) > -1; + }, + + trim: function(){ + return this.replace(/^\s+|\s+$/g, ''); + }, + + clean: function(){ + return this.replace(/\s+/g, ' ').trim(); + }, + + camelCase: function(){ + return this.replace(/-\D/g, function(match){ + return match.charAt(1).toUpperCase(); + }); + }, + + hyphenate: function(){ + return this.replace(/[A-Z]/g, function(match){ + return ('-' + match.charAt(0).toLowerCase()); + }); + }, + + capitalize: function(){ + return this.replace(/\b[a-z]/g, function(match){ + return match.toUpperCase(); + }); + }, + + escapeRegExp: function(){ + return this.replace(/([-.*+?^${}()|[\]\/\\])/g, '\\$1'); + }, + + toInt: function(base){ + return parseInt(this, base || 10); + }, + + toFloat: function(){ + return parseFloat(this); + }, + + hexToRgb: function(array){ + var hex = this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/); + return (hex) ? hex.slice(1).hexToRgb(array) : null; + }, + + rgbToHex: function(array){ + var rgb = this.match(/\d{1,3}/g); + return (rgb) ? rgb.rgbToHex(array) : null; + }, + + stripScripts: function(option){ + var scripts = ''; + var text = this.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi, function(){ + scripts += arguments[1] + '\n'; + return ''; + }); + if (option === true) $exec(scripts); + else if ($type(option) == 'function') option(scripts, text); + return text; + }, + + substitute: function(object, regexp){ + return this.replace(regexp || (/\\?\{([^{}]+)\}/g), function(match, name){ + if (match.charAt(0) == '\\') return match.slice(1); + return (object[name] != undefined) ? object[name] : ''; + }); + } + +}); + + +/* +--- + +script: Hash.js + +description: Contains Hash Prototypes. Provides a means for overcoming the JavaScript practical impossibility of extending native Objects. + +license: MIT-style license. + +requires: +- /Hash.base + +provides: [Hash] + +... +*/ + +Hash.implement({ + + has: Object.prototype.hasOwnProperty, + + keyOf: function(value){ + for (var key in this){ + if (this.hasOwnProperty(key) && this[key] === value) return key; + } + return null; + }, + + hasValue: function(value){ + return (Hash.keyOf(this, value) !== null); + }, + + extend: function(properties){ + Hash.each(properties || {}, function(value, key){ + Hash.set(this, key, value); + }, this); + return this; + }, + + combine: function(properties){ + Hash.each(properties || {}, function(value, key){ + Hash.include(this, key, value); + }, this); + return this; + }, + + erase: function(key){ + if (this.hasOwnProperty(key)) delete this[key]; + return this; + }, + + get: function(key){ + return (this.hasOwnProperty(key)) ? this[key] : null; + }, + + set: function(key, value){ + if (!this[key] || this.hasOwnProperty(key)) this[key] = value; + return this; + }, + + empty: function(){ + Hash.each(this, function(value, key){ + delete this[key]; + }, this); + return this; + }, + + include: function(key, value){ + if (this[key] == undefined) this[key] = value; + return this; + }, + + map: function(fn, bind){ + var results = new Hash; + Hash.each(this, function(value, key){ + results.set(key, fn.call(bind, value, key, this)); + }, this); + return results; + }, + + filter: function(fn, bind){ + var results = new Hash; + Hash.each(this, function(value, key){ + if (fn.call(bind, value, key, this)) results.set(key, value); + }, this); + return results; + }, + + every: function(fn, bind){ + for (var key in this){ + if (this.hasOwnProperty(key) && !fn.call(bind, this[key], key)) return false; + } + return true; + }, + + some: function(fn, bind){ + for (var key in this){ + if (this.hasOwnProperty(key) && fn.call(bind, this[key], key)) return true; + } + return false; + }, + + getKeys: function(){ + var keys = []; + Hash.each(this, function(value, key){ + keys.push(key); + }); + return keys; + }, + + getValues: function(){ + var values = []; + Hash.each(this, function(value){ + values.push(value); + }); + return values; + }, + + toQueryString: function(base){ + var queryString = []; + Hash.each(this, function(value, key){ + if (base) key = base + '[' + key + ']'; + var result; + switch ($type(value)){ + case 'object': result = Hash.toQueryString(value, key); break; + case 'array': + var qs = {}; + value.each(function(val, i){ + qs[i] = val; + }); + result = Hash.toQueryString(qs, key); + break; + default: result = key + '=' + encodeURIComponent(value); + } + if (value != undefined) queryString.push(result); + }); + + return queryString.join('&'); + } + +}); + +Hash.alias({keyOf: 'indexOf', hasValue: 'contains'}); + + +/* +--- + +script: Event.js + +description: Contains the Event Class, to make the event object cross-browser. + +license: MIT-style license. + +requires: +- /Window +- /Document +- /Hash +- /Array +- /Function +- /String + +provides: [Event] + +... +*/ + +var Event = new Native({ + + name: 'Event', + + initialize: function(event, win){ + win = win || window; + var doc = win.document; + event = event || win.event; + if (event.$extended) return event; + this.$extended = true; + var type = event.type; + var target = event.target || event.srcElement; + while (target && target.nodeType == 3) target = target.parentNode; + + if (type.test(/key/)){ + var code = event.which || event.keyCode; + var key = Event.Keys.keyOf(code); + if (type == 'keydown'){ + var fKey = code - 111; + if (fKey > 0 && fKey < 13) key = 'f' + fKey; + } + key = key || String.fromCharCode(code).toLowerCase(); + } else if (type.match(/(click|mouse|menu)/i)){ + doc = (!doc.compatMode || doc.compatMode == 'CSS1Compat') ? doc.html : doc.body; + var page = { + x: event.pageX || event.clientX + doc.scrollLeft, + y: event.pageY || event.clientY + doc.scrollTop + }; + var client = { + x: (event.pageX) ? event.pageX - win.pageXOffset : event.clientX, + y: (event.pageY) ? event.pageY - win.pageYOffset : event.clientY + }; + if (type.match(/DOMMouseScroll|mousewheel/)){ + var wheel = (event.wheelDelta) ? event.wheelDelta / 120 : -(event.detail || 0) / 3; + } + var rightClick = (event.which == 3) || (event.button == 2); + var related = null; + if (type.match(/over|out/)){ + switch (type){ + case 'mouseover': related = event.relatedTarget || event.fromElement; break; + case 'mouseout': related = event.relatedTarget || event.toElement; + } + if (!(function(){ + while (related && related.nodeType == 3) related = related.parentNode; + return true; + }).create({attempt: Browser.Engine.gecko})()) related = false; + } + } + + return $extend(this, { + event: event, + type: type, + + page: page, + client: client, + rightClick: rightClick, + + wheel: wheel, + + relatedTarget: related, + target: target, + + code: code, + key: key, + + shift: event.shiftKey, + control: event.ctrlKey, + alt: event.altKey, + meta: event.metaKey + }); + } + +}); + +Event.Keys = new Hash({ + 'enter': 13, + 'up': 38, + 'down': 40, + 'left': 37, + 'right': 39, + 'esc': 27, + 'space': 32, + 'backspace': 8, + 'tab': 9, + 'delete': 46 +}); + +Event.implement({ + + stop: function(){ + return this.stopPropagation().preventDefault(); + }, + + stopPropagation: function(){ + if (this.event.stopPropagation) this.event.stopPropagation(); + else this.event.cancelBubble = true; + return this; + }, + + preventDefault: function(){ + if (this.event.preventDefault) this.event.preventDefault(); + else this.event.returnValue = false; + return this; + } + +}); + + +/* +--- + +script: Class.js + +description: Contains the Class Function for easily creating, extending, and implementing reusable Classes. + +license: MIT-style license. + +requires: +- /$util +- /Native +- /Array +- /String +- /Function +- /Number +- /Hash + +provides: [Class] + +... +*/ + +function Class(params){ + + if (params instanceof Function) params = {initialize: params}; + + var newClass = function(){ + Object.reset(this); + if (newClass._prototyping) return this; + this._current = $empty; + var value = (this.initialize) ? this.initialize.apply(this, arguments) : this; + delete this._current; delete this.caller; + return value; + }.extend(this); + + newClass.implement(params); + + newClass.constructor = Class; + newClass.prototype.constructor = newClass; + + return newClass; + +}; + +Function.prototype.protect = function(){ + this._protected = true; + return this; +}; + +Object.reset = function(object, key){ + + if (key == null){ + for (var p in object) Object.reset(object, p); + return object; + } + + delete object[key]; + + switch ($type(object[key])){ + case 'object': + var F = function(){}; + F.prototype = object[key]; + var i = new F; + object[key] = Object.reset(i); + break; + case 'array': object[key] = $unlink(object[key]); break; + } + + return object; + +}; + +new Native({name: 'Class', initialize: Class}).extend({ + + instantiate: function(F){ + F._prototyping = true; + var proto = new F; + delete F._prototyping; + return proto; + }, + + wrap: function(self, key, method){ + if (method._origin) method = method._origin; + + return function(){ + if (method._protected && this._current == null) throw new Error('The method "' + key + '" cannot be called.'); + var caller = this.caller, current = this._current; + this.caller = current; this._current = arguments.callee; + var result = method.apply(this, arguments); + this._current = current; this.caller = caller; + return result; + }.extend({_owner: self, _origin: method, _name: key}); + + } + +}); + +Class.implement({ + + implement: function(key, value){ + + if ($type(key) == 'object'){ + for (var p in key) this.implement(p, key[p]); + return this; + } + + var mutator = Class.Mutators[key]; + + if (mutator){ + value = mutator.call(this, value); + if (value == null) return this; + } + + var proto = this.prototype; + + switch ($type(value)){ + + case 'function': + if (value._hidden) return this; + proto[key] = Class.wrap(this, key, value); + break; + + case 'object': + var previous = proto[key]; + if ($type(previous) == 'object') $mixin(previous, value); + else proto[key] = $unlink(value); + break; + + case 'array': + proto[key] = $unlink(value); + break; + + default: proto[key] = value; + + } + + return this; + + } + +}); + +Class.Mutators = { + + Extends: function(parent){ + + this.parent = parent; + this.prototype = Class.instantiate(parent); + + this.implement('parent', function(){ + var name = this.caller._name, previous = this.caller._owner.parent.prototype[name]; + if (!previous) throw new Error('The method "' + name + '" has no parent.'); + return previous.apply(this, arguments); + }.protect()); + + }, + + Implements: function(items){ + $splat(items).each(function(item){ + if (item instanceof Function) item = Class.instantiate(item); + this.implement(item); + }, this); + + } + +}; + + +/* +--- + +script: Class.Extras.js + +description: Contains Utility Classes that can be implemented into your own Classes to ease the execution of many common tasks. + +license: MIT-style license. + +requires: +- /Class + +provides: [Chain, Events, Options] + +... +*/ + +var Chain = new Class({ + + $chain: [], + + chain: function(){ + this.$chain.extend(Array.flatten(arguments)); + return this; + }, + + callChain: function(){ + return (this.$chain.length) ? this.$chain.shift().apply(this, arguments) : false; + }, + + clearChain: function(){ + this.$chain.empty(); + return this; + } + +}); + +var Events = new Class({ + + $events: {}, + + addEvent: function(type, fn, internal){ + type = Events.removeOn(type); + if (fn != $empty){ + this.$events[type] = this.$events[type] || []; + this.$events[type].include(fn); + if (internal) fn.internal = true; + } + return this; + }, + + addEvents: function(events){ + for (var type in events) this.addEvent(type, events[type]); + return this; + }, + + fireEvent: function(type, args, delay){ + type = Events.removeOn(type); + if (!this.$events || !this.$events[type]) return this; + this.$events[type].each(function(fn){ + fn.create({'bind': this, 'delay': delay, 'arguments': args})(); + }, this); + return this; + }, + + removeEvent: function(type, fn){ + type = Events.removeOn(type); + if (!this.$events[type]) return this; + if (!fn.internal) this.$events[type].erase(fn); + return this; + }, + + removeEvents: function(events){ + var type; + if ($type(events) == 'object'){ + for (type in events) this.removeEvent(type, events[type]); + return this; + } + if (events) events = Events.removeOn(events); + for (type in this.$events){ + if (events && events != type) continue; + var fns = this.$events[type]; + for (var i = fns.length; i--; i) this.removeEvent(type, fns[i]); + } + return this; + } + +}); + +Events.removeOn = function(string){ + return string.replace(/^on([A-Z])/, function(full, first){ + return first.toLowerCase(); + }); +}; + +var Options = new Class({ + + setOptions: function(){ + this.options = $merge.run([this.options].extend(arguments)); + if (!this.addEvent) return this; + for (var option in this.options){ + if ($type(this.options[option]) != 'function' || !(/^on[A-Z]/).test(option)) continue; + this.addEvent(option, this.options[option]); + delete this.options[option]; + } + return this; + } + +}); + + +/* +--- + +script: Element.js + +description: One of the most important items in MooTools. Contains the dollar function, the dollars function, and an handful of cross-browser, time-saver methods to let you easily work with HTML Elements. + +license: MIT-style license. + +requires: +- /Window +- /Document +- /Array +- /String +- /Function +- /Number +- /Hash + +provides: [Element, Elements, $, $$, Iframe] + +... +*/ + +var Element = new Native({ + + name: 'Element', + + legacy: window.Element, + + initialize: function(tag, props){ + var konstructor = Element.Constructors.get(tag); + if (konstructor) return konstructor(props); + if (typeof tag == 'string') return document.newElement(tag, props); + return document.id(tag).set(props); + }, + + afterImplement: function(key, value){ + Element.Prototype[key] = value; + if (Array[key]) return; + Elements.implement(key, function(){ + var items = [], elements = true; + for (var i = 0, j = this.length; i < j; i++){ + var returns = this[i][key].apply(this[i], arguments); + items.push(returns); + if (elements) elements = ($type(returns) == 'element'); + } + return (elements) ? new Elements(items) : items; + }); + } + +}); + +Element.Prototype = {$family: {name: 'element'}}; + +Element.Constructors = new Hash; + +var IFrame = new Native({ + + name: 'IFrame', + + generics: false, + + initialize: function(){ + var params = Array.link(arguments, {properties: Object.type, iframe: $defined}); + var props = params.properties || {}; + var iframe = document.id(params.iframe); + var onload = props.onload || $empty; + delete props.onload; + props.id = props.name = $pick(props.id, props.name, iframe ? (iframe.id || iframe.name) : 'IFrame_' + $time()); + iframe = new Element(iframe || 'iframe', props); + var onFrameLoad = function(){ + var host = $try(function(){ + return iframe.contentWindow.location.host; + }); + if (!host || host == window.location.host){ + var win = new Window(iframe.contentWindow); + new Document(iframe.contentWindow.document); + $extend(win.Element.prototype, Element.Prototype); + } + onload.call(iframe.contentWindow, iframe.contentWindow.document); + }; + var contentWindow = $try(function(){ + return iframe.contentWindow; + }); + ((contentWindow && contentWindow.document.body) || window.frames[props.id]) ? onFrameLoad() : iframe.addListener('load', onFrameLoad); + return iframe; + } + +}); + +var Elements = new Native({ + + initialize: function(elements, options){ + options = $extend({ddup: true, cash: true}, options); + elements = elements || []; + if (options.ddup || options.cash){ + var uniques = {}, returned = []; + for (var i = 0, l = elements.length; i < l; i++){ + var el = document.id(elements[i], !options.cash); + if (options.ddup){ + if (uniques[el.uid]) continue; + uniques[el.uid] = true; + } + if (el) returned.push(el); + } + elements = returned; + } + return (options.cash) ? $extend(elements, this) : elements; + } + +}); + +Elements.implement({ + + filter: function(filter, bind){ + if (!filter) return this; + return new Elements(Array.filter(this, (typeof filter == 'string') ? function(item){ + return item.match(filter); + } : filter, bind)); + } + +}); + +Document.implement({ + + newElement: function(tag, props){ + if (Browser.Engine.trident && props){ + ['name', 'type', 'checked'].each(function(attribute){ + if (!props[attribute]) return; + tag += ' ' + attribute + '="' + props[attribute] + '"'; + if (attribute != 'checked') delete props[attribute]; + }); + tag = '<' + tag + '>'; + } + return document.id(this.createElement(ta... [truncated message content] |
From: <die...@us...> - 2010-09-07 17:33:26
|
Revision: 3000 http://openutils.svn.sourceforge.net/openutils/?rev=3000&view=rev Author: diego_schivo Date: 2010-09-07 17:33:20 +0000 (Tue, 07 Sep 2010) Log Message: ----------- MEDIA-164 empty image Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/dialog/selectMedia.ftl Added Paths: ----------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/assets/empty.gif Modified: trunk/openutils-mgnlmedia/src/main/resources/dialog/selectMedia.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/dialog/selectMedia.ftl 2010-09-07 17:15:47 UTC (rev 2999) +++ trunk/openutils-mgnlmedia/src/main/resources/dialog/selectMedia.ftl 2010-09-07 17:33:20 UTC (rev 3000) @@ -1,3 +1,4 @@ +[#assign emptyThumbnailUrl = '${request.contextPath}/.resources/media/assets/empty.gif'] [#if !alreadyrendered] <script type="text/javascript"> // <![CDATA[ @@ -39,7 +40,7 @@ document.getElementById("dispRemBtn"+ name).style.display = "block"; document.getElementById("dispSel"+ name).style.display = "none"; - document.getElementById("dispRem"+ name + "Img").src = ""; + document.getElementById("dispRem"+ name + "Img").src = "${emptyThumbnailUrl}"; document.getElementById("dispRem"+ name + "Img").src = thumbnailurl; // reset with in case of old binary values @@ -91,7 +92,7 @@ title="Select media" style="height: 106px; width: 106px; display: table-cell; vertical-align: middle; text-align: center; color:#396101; text-decoration:none"> <span style="vertical-align: middle;"></span> - <img id="dispRem${name}Img" src="${thumbnailUrl!''}" + <img id="dispRem${name}Img" src="${thumbnailUrl!emptyThumbnailUrl}" style="text-align:center; border: none; vertical-align: middle; display:[#if thumbnailUrl?exists] inline [#else] none [/#if]; [#if binaryfield?exists] width: 106px; height: 106px[/#if]" alt="" /> Added: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/assets/empty.gif =================================================================== (Binary files differ) Property changes on: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/assets/empty.gif ___________________________________________________________________ Added: svn:mime-type + image/gif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-09-10 13:24:54
|
Revision: 3024 http://openutils.svn.sourceforge.net/openutils/?rev=3024&view=rev Author: diego_schivo Date: 2010-09-10 13:24:47 +0000 (Fri, 10 Sep 2010) Log Message: ----------- MEDIA-177 pagesize buttons Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-09-10 13:16:07 UTC (rev 3023) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-09-10 13:24:47 UTC (rev 3024) @@ -44,36 +44,44 @@ margin-right: 10px; } -#navigation .right a.bg-selector { +#navigation .right a.bg-selector,#navigation .right a.pagesize-selector { padding-left: 16px; height: 16px; line-height: 10px; - background: transparent url(images/bg-selectors.png) no-repeat scroll left top; + background: transparent none no-repeat scroll left top; text-indent: -10000px; overflow: hidden; display: block; float: left; } -#navigation .right a.white-active { +#navigation .right a.bg-selector { + background-image: url(images/bg-selectors.png); +} + +#navigation .right a.pagesize-selector { + background-image: url(images/pagesize-selectors.png); +} + +#navigation .right a.white-active,#navigation .right a.pagesize1-active { font-weight: bold; background-position: 0 -16px; } -#navigation .right a.transparent { +#navigation .right a.transparent,#navigation .right a.pagesize2 { background-position: 0 -32px; } -#navigation .right a.transparent-active { +#navigation .right a.transparent-active,#navigation .right a.pagesize2-active { font-weight: bold; background-position: 0 -48px; } -#navigation .right a.black { +#navigation .right a.black,#navigation .right a.pagesize3 { background-position: 0 -64px; } -#navigation .right a.black-active { +#navigation .right a.black-active,#navigation .right a.pagesize3-active { font-weight: bold; background-position: 0 -80px; } Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2010-09-10 13:16:07 UTC (rev 3023) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2010-09-10 13:24:47 UTC (rev 3024) @@ -340,6 +340,15 @@ <div class="voice right"> <a name="bg-white" href="#" class="bg-selector white [#if this.bgSelector == 'white']white-active[/#if]" title="${this.msgs.get('media.bgselector.white')}"><!-- --></a> </div> + <div class="voice right" style="margin-right: 10px;"> + <a name="pagesize3" href="#" class="pagesize-selector pagesize3"><!-- --></a> + </div> + <div class="voice right"> + <a name="pagesize2" href="#" class="pagesize-selector pagesize2"><!-- --></a> + </div> + <div class="voice right"> + <a name="pagesize1" href="#" class="pagesize-selector pagesize1"><!-- --></a> + </div> <div class="voice right" style="margin-right: 10px; padding-top: 3px;"> <select id="sorting" name="sorting"> [#if this.request.requestURI?ends_with('/media-advsearch.html')] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-09-10 16:14:26
|
Revision: 3039 http://openutils.svn.sourceforge.net/openutils/?rev=3039&view=rev Author: diego_schivo Date: 2010-09-10 16:14:19 +0000 (Fri, 10 Sep 2010) Log Message: ----------- css refactoring Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-09-10 16:11:13 UTC (rev 3038) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-09-10 16:14:19 UTC (rev 3039) @@ -103,6 +103,11 @@ visibility: hidden; } +#navigation .sortingcontainer { + margin-right: 10px; + padding-top: 3px; +} + .voice a,.voice a:visited,.voice a:hover { text-decoration: none; color: #333; Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2010-09-10 16:11:13 UTC (rev 3038) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2010-09-10 16:14:19 UTC (rev 3039) @@ -365,7 +365,7 @@ <div class="voice right"> <a name="pagesize1" href="#" class="pagesize-selector size1 [#if this.pagesizeSelector == 'size1']size1-active[/#if]"><!-- --></a> </div> - <div class="voice right" style="margin-right: 10px; padding-top: 3px;"> + <div class="voice right sortingcontainer"> <select id="sorting" name="sorting"> [#if this.request.requestURI?ends_with('/media-advsearch.html')] <option value="score"[#if this.sorting == 'score'] selected="selected"[/#if]>${this.msgs.get('media.sorting.score')}</option> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2010-09-11 18:39:34
|
Revision: 3070 http://openutils.svn.sourceforge.net/openutils/?rev=3070&view=rev Author: fgiust Date: 2010-09-11 18:39:27 +0000 (Sat, 11 Sep 2010) Log Message: ----------- MEDIA-176 maintain the active page after editing a media Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mootools-1.2.4.4-more.js trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaBrowserPage.html Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mootools-1.2.4.4-more.js =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mootools-1.2.4.4-more.js 2010-09-11 18:14:46 UTC (rev 3069) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/mootools-1.2.4.4-more.js 2010-09-11 18:39:27 UTC (rev 3070) @@ -2238,4 +2238,218 @@ }); -})(); \ No newline at end of file +})(); + + +/* +--- + +script: String.QueryString.js + +description: Methods for dealing with URI query strings. + +license: MIT-style license + +authors: +- Sebastian MarkbÃ¥ge, Aaron Newton, Lennart Pilon, Valerio Proietti + +requires: +- core:1.2.4/Array +- core:1.2.4/String +- /MooTools.More + +provides: [String.QueryString] + +... +*/ + +String.implement({ + + parseQueryString: function(){ + var vars = this.split(/[&;]/), res = {}; + if (vars.length) vars.each(function(val){ + var index = val.indexOf('='), + keys = index < 0 ? [''] : val.substr(0, index).match(/[^\]\[]+/g), + value = decodeURIComponent(val.substr(index + 1)), + obj = res; + keys.each(function(key, i){ + var current = obj[key]; + if(i < keys.length - 1) + obj = obj[key] = current || {}; + else if($type(current) == 'array') + current.push(value); + else + obj[key] = $defined(current) ? [current, value] : value; + }); + }); + return res; + }, + + cleanQueryString: function(method){ + return this.split('&').filter(function(val){ + var index = val.indexOf('='), + key = index < 0 ? '' : val.substr(0, index), + value = val.substr(index + 1); + return method ? method.run([key, value]) : $chk(value); + }).join('&'); + } + +}); + +/* +--- + +script: URI.js + +description: Provides methods useful in managing the window location and uris. + +license: MIT-style license + +authors: +- Sebastian Markbåge +- Aaron Newton + +requires: +- core:1.2.4/Selectors +- /String.QueryString + +provides: URI + +... +*/ + +var URI = new Class({ + + Implements: Options, + + options: { + /*base: false*/ + }, + + regex: /^(?:(\w+):)?(?:\/\/(?:(?:([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)?(\.\.?$|(?:[^?#\/]*\/)*)([^?#]*)(?:\?([^#]*))?(?:#(.*))?/, + parts: ['scheme', 'user', 'password', 'host', 'port', 'directory', 'file', 'query', 'fragment'], + schemes: {http: 80, https: 443, ftp: 21, rtsp: 554, mms: 1755, file: 0}, + + initialize: function(uri, options){ + this.setOptions(options); + var base = this.options.base || URI.base; + if(!uri) uri = base; + + if (uri && uri.parsed) this.parsed = $unlink(uri.parsed); + else this.set('value', uri.href || uri.toString(), base ? new URI(base) : false); + }, + + parse: function(value, base){ + var bits = value.match(this.regex); + if (!bits) return false; + bits.shift(); + return this.merge(bits.associate(this.parts), base); + }, + + merge: function(bits, base){ + if ((!bits || !bits.scheme) && (!base || !base.scheme)) return false; + if (base){ + this.parts.every(function(part){ + if (bits[part]) return false; + bits[part] = base[part] || ''; + return true; + }); + } + bits.port = bits.port || this.schemes[bits.scheme.toLowerCase()]; + bits.directory = bits.directory ? this.parseDirectory(bits.directory, base ? base.directory : '') : '/'; + return bits; + }, + + parseDirectory: function(directory, baseDirectory) { + directory = (directory.substr(0, 1) == '/' ? '' : (baseDirectory || '/')) + directory; + if (!directory.test(URI.regs.directoryDot)) return directory; + var result = []; + directory.replace(URI.regs.endSlash, '').split('/').each(function(dir){ + if (dir == '..' && result.length > 0) result.pop(); + else if (dir != '.') result.push(dir); + }); + return result.join('/') + '/'; + }, + + combine: function(bits){ + return bits.value || bits.scheme + '://' + + (bits.user ? bits.user + (bits.password ? ':' + bits.password : '') + '@' : '') + + (bits.host || '') + (bits.port && bits.port != this.schemes[bits.scheme] ? ':' + bits.port : '') + + (bits.directory || '/') + (bits.file || '') + + (bits.query ? '?' + bits.query : '') + + (bits.fragment ? '#' + bits.fragment : ''); + }, + + set: function(part, value, base){ + if (part == 'value'){ + var scheme = value.match(URI.regs.scheme); + if (scheme) scheme = scheme[1]; + if (scheme && !$defined(this.schemes[scheme.toLowerCase()])) this.parsed = { scheme: scheme, value: value }; + else this.parsed = this.parse(value, (base || this).parsed) || (scheme ? { scheme: scheme, value: value } : { value: value }); + } else if (part == 'data') { + this.setData(value); + } else { + this.parsed[part] = value; + } + return this; + }, + + get: function(part, base){ + switch(part){ + case 'value': return this.combine(this.parsed, base ? base.parsed : false); + case 'data' : return this.getData(); + } + return this.parsed[part] || ''; + }, + + go: function(){ + document.location.href = this.toString(); + }, + + toURI: function(){ + return this; + }, + + getData: function(key, part){ + var qs = this.get(part || 'query'); + if (!$chk(qs)) return key ? null : {}; + var obj = qs.parseQueryString(); + return key ? obj[key] : obj; + }, + + setData: function(values, merge, part){ + if (typeof values == 'string'){ + data = this.getData(); + data[arguments[0]] = arguments[1]; + values = data; + } else if (merge) { + values = $merge(this.getData(), values); + } + return this.set(part || 'query', Hash.toQueryString(values)); + }, + + clearData: function(part){ + return this.set(part || 'query', ''); + } + +}); + +URI.prototype.toString = URI.prototype.valueOf = function(){ + return this.get('value'); +}; + +URI.regs = { + endSlash: /\/$/, + scheme: /^(\w+):/, + directoryDot: /\.\/|\.$/ +}; + +URI.base = new URI(document.getElements('base[href]', true).getLast(), {base: document.location}); + +String.implement({ + + toURI: function(options){ + return new URI(this, options); + } + +}); \ No newline at end of file Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaBrowserPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaBrowserPage.html 2010-09-11 18:14:46 UTC (rev 3069) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaBrowserPage.html 2010-09-11 18:39:27 UTC (rev 3070) @@ -8,6 +8,8 @@ <!--[if lte IE 7]> <link rel="stylesheet" type="text/css" href="${this.request.contextPath}/.resources/media/css/ie-fix.css" /> <![endif]--> + <script type="text/javascript" src="${this.request.contextPath}/.resources/media/js/mootools-1.2.4-core.js"></script> + <script type="text/javascript" src="${this.request.contextPath}/.resources/media/js/mootools-1.2.4.4-more.js"></script> <script type="text/javascript" src="${this.request.contextPath}/.resources/ext/ext-base.js"></script> <script type="text/javascript" src="${this.request.contextPath}/.resources/ext/ext-all.js"></script> <script type="text/javascript" src="${this.request.contextPath}/.resources/media/js/miframe.js"></script> @@ -242,6 +244,14 @@ { url += "&mediaType=" + mediaType; } + + var olduri = frames['mediaFolderView'].location.href.parseQueryString(); + + if (olduri['page'] != undefined) + { + url += "&page=" + olduri['page']; + } + frames['mediaFolderView'].location.href = url; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2010-09-12 07:33:04
|
Revision: 3071 http://openutils.svn.sourceforge.net/openutils/?rev=3071&view=rev Author: fgiust Date: 2010-09-12 07:32:58 +0000 (Sun, 12 Sep 2010) Log Message: ----------- better sizing of select media windows Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/dialog/selectMedia.ftl trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/images/toolbar-background-light.png trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/MediaField.js Modified: trunk/openutils-mgnlmedia/src/main/resources/dialog/selectMedia.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/dialog/selectMedia.ftl 2010-09-11 18:39:27 UTC (rev 3070) +++ trunk/openutils-mgnlmedia/src/main/resources/dialog/selectMedia.ftl 2010-09-12 07:32:58 UTC (rev 3071) @@ -20,7 +20,7 @@ } [/#if] var selectMediaWin = - window.open(url, 'selectMedia', "width=800,height=500,scrollbars=no,status=yes,resizable=yes"); + window.open(url, 'selectMedia', "width=840,height=560,scrollbars=no,status=yes,resizable=yes"); selectMediaWin.opener = window; } Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-09-11 18:39:27 UTC (rev 3070) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2010-09-12 07:32:58 UTC (rev 3071) @@ -21,12 +21,15 @@ .tabsrow1 { height: 28px; background: #E4F5C9 url(images/toolbar-background.png) repeat-x top left; + overflow: hidden; + min-width: 400px; } .tabsrow2 { display: block; clear: both; height: 30px; + min-width: 400px; } .separator { @@ -141,7 +144,7 @@ .paging { border-collapse: collapse; - margin: 6px 20px 0 0; + margin: 6px 20px 4px 0; } .paging td { Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/images/toolbar-background-light.png =================================================================== (Binary files differ) Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/MediaField.js =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/MediaField.js 2010-09-11 18:39:27 UTC (rev 3070) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/MediaField.js 2010-09-12 07:32:58 UTC (rev 3071) @@ -8,7 +8,7 @@ window.setNewMedia = function(nodeid, uuid, file, thumb){ this.setValue(uuid); }.createDelegate(this); - mgnlOpenWindow('/.magnolia/pages/mediaBrowser.html?nodeid=' + name + '&selectMedia=true&mgnlCK=' + mgnlGetCacheKiller(), 800, 500); + mgnlOpenWindow('/.magnolia/pages/mediaBrowser.html?nodeid=' + name + '&selectMedia=true&mgnlCK=' + mgnlGetCacheKiller(), 840, 560); } }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2011-01-13 15:22:39
|
Revision: 3239 http://openutils.svn.sourceforge.net/openutils/?rev=3239&view=rev Author: diego_schivo Date: 2011-01-13 15:22:33 +0000 (Thu, 13 Jan 2011) Log Message: ----------- PIRMEDIA-202 path search Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.media.config.search.xml trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.media.config.search.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.media.config.search.xml 2011-01-13 15:18:29 UTC (rev 3238) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.media.config.search.xml 2011-01-13 15:22:33 UTC (rev 3239) @@ -781,13 +781,13 @@ <sv:value>net.sourceforge.openutils.mgnlmedia.media.advancedsearch.SearchFilterPath</sv:value> </sv:property> <sv:property sv:name="control" sv:type="String"> - <sv:value>input</sv:value> + <sv:value>path</sv:value> </sv:property> <sv:property sv:name="jcr:createdBy" sv:type="String"> <sv:value>admin</sv:value> </sv:property> <sv:property sv:name="label" sv:type="String"> - <sv:value>config.search.filters.basePath</sv:value> + <sv:value>config.search.filters.path</sv:value> </sv:property> <sv:node sv:name="MetaData"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> @@ -806,7 +806,7 @@ <sv:value>2010-02-15T17:07:44.717+01:00</sv:value> </sv:property> <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2011-01-13T12:15:37.701+01:00</sv:value> + <sv:value>2011-01-13T16:19:54.870+01:00</sv:value> </sv:property> </sv:node> </sv:node> Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties 2011-01-13 15:18:29 UTC (rev 3238) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties 2011-01-13 15:22:33 UTC (rev 3239) @@ -155,4 +155,4 @@ config.search.filters.options.notpublished=Not published config.search.filters.uuid=UUID config.search.filters.modified=Modified since -config.search.filters.basePath=Base path +config.search.filters.path=Path Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties 2011-01-13 15:18:29 UTC (rev 3238) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties 2011-01-13 15:22:33 UTC (rev 3239) @@ -158,4 +158,4 @@ config.search.filters.options.notpublished=Non pubblicati config.search.filters.uuid=UUID config.search.filters.modified=Modificato dal -config.search.filters.basePath=Path base +config.search.filters.path=Percorso This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2011-01-28 14:57:53
|
Revision: 3295 http://openutils.svn.sourceforge.net/openutils/?rev=3295&view=rev Author: fgiust Date: 2011-01-28 14:57:47 +0000 (Fri, 28 Jan 2011) Log Message: ----------- minor improvement to the advanced search form layout Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.media.config.search.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.media.config.search.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.media.config.search.xml 2011-01-28 14:12:53 UTC (rev 3294) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.media.config.search.xml 2011-01-28 14:57:47 UTC (rev 3295) @@ -885,7 +885,7 @@ <sv:value>2011-01-13T18:16:55.733+01:00</sv:value> </sv:property> </sv:node> - <sv:node sv:name="score"> + <sv:node sv:name="dateasc"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:contentNode</sv:value> </sv:property> @@ -893,19 +893,16 @@ <sv:value>mix:lockable</sv:value> </sv:property> <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>4fb64a66-fd01-4b2a-a3b5-b77384928c92</sv:value> + <sv:value>e90110b7-088a-4e4c-a442-3b6a5dc08c05</sv:value> </sv:property> - <sv:property sv:name="defaultValue" sv:type="String"> - <sv:value>true</sv:value> - </sv:property> <sv:property sv:name="jcr:createdBy" sv:type="String"> <sv:value>admin</sv:value> </sv:property> <sv:property sv:name="label" sv:type="String"> - <sv:value>media.sorting.score</sv:value> + <sv:value>media.sorting.date.asc</sv:value> </sv:property> <sv:property sv:name="value" sv:type="String"> - <sv:value>score</sv:value> + <sv:value>CREATIONDATE_ASC</sv:value> </sv:property> <sv:node sv:name="MetaData"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> @@ -924,11 +921,11 @@ <sv:value>2010-02-18T15:38:57.738+01:00</sv:value> </sv:property> <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2011-01-13T18:27:45.480+01:00</sv:value> + <sv:value>2011-01-13T18:29:34.076+01:00</sv:value> </sv:property> </sv:node> </sv:node> - <sv:node sv:name="dateasc"> + <sv:node sv:name="datedesc"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:contentNode</sv:value> </sv:property> @@ -936,16 +933,16 @@ <sv:value>mix:lockable</sv:value> </sv:property> <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>e90110b7-088a-4e4c-a442-3b6a5dc08c05</sv:value> + <sv:value>ff93da80-13b1-4540-a986-88e1d00f9910</sv:value> </sv:property> <sv:property sv:name="jcr:createdBy" sv:type="String"> <sv:value>admin</sv:value> </sv:property> <sv:property sv:name="label" sv:type="String"> - <sv:value>media.sorting.date.asc</sv:value> + <sv:value>media.sorting.date.desc</sv:value> </sv:property> <sv:property sv:name="value" sv:type="String"> - <sv:value>CREATIONDATE_ASC</sv:value> + <sv:value>CREATIONDATE_DESC</sv:value> </sv:property> <sv:node sv:name="MetaData"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> @@ -964,11 +961,11 @@ <sv:value>2010-02-18T15:38:57.738+01:00</sv:value> </sv:property> <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2011-01-13T18:29:34.076+01:00</sv:value> + <sv:value>2011-01-13T18:29:57.510+01:00</sv:value> </sv:property> </sv:node> </sv:node> - <sv:node sv:name="datedesc"> + <sv:node sv:name="nameasc"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:contentNode</sv:value> </sv:property> @@ -976,16 +973,16 @@ <sv:value>mix:lockable</sv:value> </sv:property> <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>ff93da80-13b1-4540-a986-88e1d00f9910</sv:value> + <sv:value>c4403c34-da6e-4f94-96e2-ae335c0dbe28</sv:value> </sv:property> <sv:property sv:name="jcr:createdBy" sv:type="String"> <sv:value>admin</sv:value> </sv:property> <sv:property sv:name="label" sv:type="String"> - <sv:value>media.sorting.date.desc</sv:value> + <sv:value>media.sorting.name.asc</sv:value> </sv:property> <sv:property sv:name="value" sv:type="String"> - <sv:value>CREATIONDATE_DESC</sv:value> + <sv:value>FILENAME_ASC</sv:value> </sv:property> <sv:node sv:name="MetaData"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> @@ -1004,11 +1001,11 @@ <sv:value>2010-02-18T15:38:57.738+01:00</sv:value> </sv:property> <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2011-01-13T18:29:57.510+01:00</sv:value> + <sv:value>2011-01-13T18:30:23.868+01:00</sv:value> </sv:property> </sv:node> </sv:node> - <sv:node sv:name="nameasc"> + <sv:node sv:name="namedesc"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:contentNode</sv:value> </sv:property> @@ -1016,16 +1013,16 @@ <sv:value>mix:lockable</sv:value> </sv:property> <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>c4403c34-da6e-4f94-96e2-ae335c0dbe28</sv:value> + <sv:value>ba28c1d8-5fe5-4ad6-b981-1c114200ae4f</sv:value> </sv:property> <sv:property sv:name="jcr:createdBy" sv:type="String"> <sv:value>admin</sv:value> </sv:property> <sv:property sv:name="label" sv:type="String"> - <sv:value>media.sorting.name.asc</sv:value> + <sv:value>media.sorting.name.desc</sv:value> </sv:property> <sv:property sv:name="value" sv:type="String"> - <sv:value>FILENAME_ASC</sv:value> + <sv:value>FILENAME_DESC</sv:value> </sv:property> <sv:node sv:name="MetaData"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> @@ -1044,11 +1041,11 @@ <sv:value>2010-02-18T15:38:57.738+01:00</sv:value> </sv:property> <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2011-01-13T18:30:23.868+01:00</sv:value> + <sv:value>2011-01-13T18:30:40.241+01:00</sv:value> </sv:property> </sv:node> </sv:node> - <sv:node sv:name="namedesc"> + <sv:node sv:name="score"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:contentNode</sv:value> </sv:property> @@ -1056,16 +1053,19 @@ <sv:value>mix:lockable</sv:value> </sv:property> <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>ba28c1d8-5fe5-4ad6-b981-1c114200ae4f</sv:value> + <sv:value>4fb64a66-fd01-4b2a-a3b5-b77384928c92</sv:value> </sv:property> + <sv:property sv:name="defaultValue" sv:type="String"> + <sv:value>true</sv:value> + </sv:property> <sv:property sv:name="jcr:createdBy" sv:type="String"> <sv:value>admin</sv:value> </sv:property> <sv:property sv:name="label" sv:type="String"> - <sv:value>media.sorting.name.desc</sv:value> + <sv:value>media.sorting.score</sv:value> </sv:property> <sv:property sv:name="value" sv:type="String"> - <sv:value>FILENAME_DESC</sv:value> + <sv:value>score</sv:value> </sv:property> <sv:node sv:name="MetaData"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> @@ -1084,7 +1084,7 @@ <sv:value>2010-02-18T15:38:57.738+01:00</sv:value> </sv:property> <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2011-01-13T18:30:40.241+01:00</sv:value> + <sv:value>2011-01-13T18:27:45.480+01:00</sv:value> </sv:property> </sv:node> </sv:node> Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css 2011-01-28 14:12:53 UTC (rev 3294) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css 2011-01-28 14:57:47 UTC (rev 3295) @@ -39,6 +39,7 @@ display: inline; margin: 2px 0; overflow: hidden; + white-space: nowrap; } .row .input-date { @@ -53,16 +54,14 @@ float: left; display: inline; border: 0; - width: auto; + width: 10px; } .row .inner-row label { - display: inline; - float: left; + display: block; line-height: 15px; - margin: 2px 0 0 0; + margin: 2px 0 0 20px; font-weight: normal; - width: 46%; } #button-submit { Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties 2011-01-28 14:12:53 UTC (rev 3294) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties 2011-01-28 14:57:47 UTC (rev 3295) @@ -112,8 +112,8 @@ media.sorting.creationdate=Creation date media.sorting.title=Title -media.sorting.date.asc=Date, older first -media.sorting.date.desc=Date, newer first +media.sorting.date.asc=Date ↓ +media.sorting.date.desc=Date ↑ media.sorting.name.asc=Name A-Z media.sorting.name.desc=Name Z-A Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties 2011-01-28 14:12:53 UTC (rev 3294) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties 2011-01-28 14:57:47 UTC (rev 3295) @@ -115,8 +115,8 @@ media.sorting.creationdate=Data di creazione media.sorting.title=Titolo -media.sorting.date.asc=Data, dal meno recente -media.sorting.date.desc=Data, dal pi\u00F9 recente +media.sorting.date.asc=Data ↓ +media.sorting.date.desc=Data ↑ media.sorting.name.asc=Nome A-Z media.sorting.name.desc=Nome Z-A This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2011-02-04 16:10:24
|
Revision: 3302 http://openutils.svn.sourceforge.net/openutils/?rev=3302&view=rev Author: diego_schivo Date: 2011-02-04 16:10:17 +0000 (Fri, 04 Feb 2011) Log Message: ----------- PIRMEDIA-205 button "Save as playlist" Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css 2011-02-04 15:38:59 UTC (rev 3301) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/advancedSearch.css 2011-02-04 16:10:17 UTC (rev 3302) @@ -68,10 +68,12 @@ font-weight: normal; } -#button-submit { +.button-submit { border: 1px outset #999; float: right; display: inline; width: auto; - margin: 0 15px 15px 0; + margin: 0 10px 15px 0; + font-size: 11px; + font-weight: bold; } \ No newline at end of file Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties 2011-02-04 15:38:59 UTC (rev 3301) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages.properties 2011-02-04 16:10:17 UTC (rev 3302) @@ -83,6 +83,7 @@ buttons.date=Date buttons.search=Search buttons.select=Select +buttons.saveAsPlaylist=Save as playlist dialog.filenopreview.extensions=Valid file extensions: dialog.filenopreview.error.extension=File extension for field {0} not valid Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties 2011-02-04 15:38:59 UTC (rev 3301) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties 2011-02-04 16:10:17 UTC (rev 3302) @@ -84,6 +84,7 @@ buttons.date=Data buttons.search=Cerca buttons.select=Seleziona +buttons.saveAsPlaylist=Salva come playlist dialog.filenopreview.extensions=Estensioni valide: dialog.filenopreview.error.extension=Estensione del file per il campo {0} non valida Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html 2011-02-04 15:38:59 UTC (rev 3301) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html 2011-02-04 16:10:17 UTC (rev 3302) @@ -31,7 +31,8 @@ <input type="hidden" name="selectMedia" value="${this.selectMedia?string('true', 'false')}" /> <div class="row"> - <input type="submit" name="submit" value="${this.msgs['buttons.search']}" id="button-submit"/> + <input type="submit" name="submit" value="${this.msgs['buttons.search']}" class="button-submit"/> + <input type="submit" name="saveAsPlaylist" value="${this.msgs['buttons.saveAsPlaylist']}" class="button-submit"/> </div> </form> </body> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2011-02-16 18:26:30
|
Revision: 3342 http://openutils.svn.sourceforge.net/openutils/?rev=3342&view=rev Author: diego_schivo Date: 2011-02-16 18:26:23 +0000 (Wed, 16 Feb 2011) Log Message: ----------- MEDIA-218 search fields initialization Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaBrowserPage.html trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/path.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/select.ftl Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaBrowserPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaBrowserPage.html 2011-02-16 17:59:28 UTC (rev 3341) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaBrowserPage.html 2011-02-16 18:26:23 UTC (rev 3342) @@ -137,7 +137,7 @@ setTimeout(function() { setTreeCollapsed(false); frames['mediaTreeView'].location.href = getTreeUrl(); - frames['advancedSearchView'].location.href = "${this.request.contextPath}/.magnolia/pages/media-advsearchform.html?selectMedia="+selectMedia+"&playlistUUID=${this.playlistUUID!''}"; + frames['advancedSearchView'].location.href = "${this.request.contextPath}/.magnolia/pages/media-advsearchform.html?selectMedia="+selectMedia+"&playlistUUID=${this.playlistUUID!''}&query=hello&type=video&type=document"; if (openPath != null && openPath != "null" && openPath.length > 0) { reloadFolder(openPath); Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl 2011-02-16 17:59:28 UTC (rev 3341) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/checkbox.ftl 2011-02-16 18:26:23 UTC (rev 3342) @@ -5,7 +5,7 @@ [#list filter.options as option] <div class="inner-row"> - <input type="checkbox" id="${filterKey}_${option.value}" name="${filterKey}" value="${option.value}" /> + <input type="checkbox" id="${filterKey}_${option.value}" name="${filterKey}" value="${option.value}"[#if ((this.request.getParameterValues(filterKey)![])?seq_contains(option.value))] checked="checked"[/#if] /> <label for="${filterKey}_${option.value}">[@msgIfAvail option.label /]</span> </div> [/#list] Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl 2011-02-16 17:59:28 UTC (rev 3341) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/date.ftl 2011-02-16 18:26:23 UTC (rev 3342) @@ -3,7 +3,7 @@ <label for="${filterKey}">[@msgIfAvail filter.label /]</label> [/#if] - <input type="text" name="${filterKey}" id="${filterKey}" value="" class="input-date" /> + <input type="text" name="${filterKey}" id="${filterKey}" value="${this.request.getParameter(filterKey)!''}" class="input-date" /> <span class="mgnlControlButton" id="butt_${filterKey}" onclick="cal_butt_${filterKey}.show()">${this.msgs['buttons.date']}</span> <script type="text/javascript"> // <![CDATA[ Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl 2011-02-16 17:59:28 UTC (rev 3341) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/input.ftl 2011-02-16 18:26:23 UTC (rev 3342) @@ -3,7 +3,7 @@ <label for="${filterKey}">[@msgIfAvail filter.label /]</label> [/#if] - <input type="text" name="${filterKey}" value="" class="text" /> + <input type="text" name="${filterKey}" value="${this.request.getParameter(filterKey)!''}" class="text" /> <br /> [@rendersFilter filter.subfilters /] Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/path.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/path.ftl 2011-02-16 17:59:28 UTC (rev 3341) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/path.ftl 2011-02-16 18:26:23 UTC (rev 3342) @@ -3,7 +3,7 @@ <label for="${filterKey}">[@msgIfAvail filter.label /]</label> [/#if] - <input type="text" name="${filterKey}" id="${filterKey}" value="" class="input-path" /> + <input type="text" name="${filterKey}" id="${filterKey}" value="${this.request.getParameter(filterKey)!''}" class="input-path" /> <span class="mgnlControlButton" id="butt_${filterKey}" onclick="mgnlDialogLinkOpenBrowser('${filterKey}', 'media', '')">${this.msgs['buttons.select']}</span> [@rendersFilter filter.subfilters /] Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl 2011-02-16 17:59:28 UTC (rev 3341) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/radio.ftl 2011-02-16 18:26:23 UTC (rev 3342) @@ -5,7 +5,7 @@ [#list filter.options as option] <div class="inner-row"> - <input type="radio" id="${filterKey}_${option.value}" name="${filterKey}" value="${option.value}" [#if option.defaultValue?? & option.defaultValue]checked="checked"[/#if] /> + <input type="radio" id="${filterKey}_${option.value}" name="${filterKey}" value="${option.value}" [#if (!this.request.getParameter(filterKey)?has_content & option.defaultValue?? & option.defaultValue) || (this.request.getParameter(filterKey)?has_content & this.request.getParameter(filterKey) == option.value)]checked="checked"[/#if] /> <label for="${filterKey}_${option.value}">[@msgIfAvail option.label /]</span> </div> [/#list] Modified: trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/select.ftl =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/select.ftl 2011-02-16 17:59:28 UTC (rev 3341) +++ trunk/openutils-mgnlmedia/src/main/resources/search/freemarker/controls/select.ftl 2011-02-16 18:26:23 UTC (rev 3342) @@ -5,7 +5,7 @@ <select name="${filterKey}" id="${filterKey}"> [#list filter.options as option] - <option value="${option.value}" [#if option.defaultValue?? & option.defaultValue]selected="selected"[/#if]>[@msgIfAvail option.label /]</option> + <option value="${option.value}" [#if (!this.request.getParameter(filterKey)?has_content & option.defaultValue?? & option.defaultValue) || (this.request.getParameter(filterKey)?has_content & this.request.getParameter(filterKey) == option.value)]selected="selected"[/#if]>[@msgIfAvail option.label /]</option> [/#list] </select> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mol...@us...> - 2011-05-06 15:15:05
|
Revision: 3446 http://openutils.svn.sourceforge.net/openutils/?rev=3446&view=rev Author: molaschi Date: 2011-05-06 15:14:56 +0000 (Fri, 06 May 2011) Log Message: ----------- MEDIA-226 Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag Added Paths: ----------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/crop.tag trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/crop/ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/crop/crop.js Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2011-05-03 12:35:16 UTC (rev 3445) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2011-05-06 15:14:56 UTC (rev 3446) @@ -35,6 +35,12 @@ ]]> </example> </tag-file> + <tag-file> + <description>Allow editors to crop (zoom and pan) an image</description> + <display-name>Crop Tag</display-name> + <name>crop</name> + <path>/META-INF/tags/media/crop.tag</path> + </tag-file> <function> <description>Get the media module instance.</description> <display-name>module</display-name> @@ -327,4 +333,11 @@ <function-class>net.sourceforge.openutils.mgnlmedia.media.tags.el.MediaEl</function-class> <function-signature>java.util.Iterator mediaNodesInPlaylist(java.lang.Object)</function-signature> </function> + <function> + <description></description> + <display-name>replaceParam</display-name> + <name>replaceParam</name> + <function-class>net.sourceforge.openutils.mgnlmedia.media.tags.el.MediaEl</function-class> + <function-signature>java.lang.String replaceParam(java.lang.String, java.lang.String)</function-signature> + </function> </taglib> \ No newline at end of file Added: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/crop.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/crop.tag (rev 0) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/crop.tag 2011-05-06 15:14:56 UTC (rev 3446) @@ -0,0 +1,132 @@ +<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:cms="urn:jsptld:cms-taglib" + xmlns:c="urn:jsptld:http://java.sun.com/jsp/jstl/core" xmlns:media="http://net.sourceforge.openutils/mgnlMedia" + xmlns:cmsfn="http://www.magnolia.info/tlds/cmsfn-taglib.tld" xmlns:fn="http://java.sun.com/jsp/jstl/functions"> + <jsp:directive.attribute name="property" required="true" rtexprvalue="true" type="java.lang.String" /> + <jsp:directive.attribute name="width" required="true" rtexprvalue="true" type="java.lang.Integer" /> + <jsp:directive.attribute name="height" required="true" rtexprvalue="true" type="java.lang.Integer" /> + <jsp:directive.attribute name="item" required="false" rtexprvalue="true" type="java.lang.Object" /> + <jsp:directive.attribute name="node" required="false" rtexprvalue="true" type="java.lang.String" /> + <jsp:directive.attribute name="jqueryui" required="false" rtexprvalue="true" type="java.lang.Boolean" /> + <jsp:directive.attribute name="jquery" required="false" rtexprvalue="true" type="java.lang.Boolean" /> + <jsp:directive.attribute name="loadjs" required="false" rtexprvalue="true" type="java.lang.Boolean" /> + <jsp:directive.attribute name="isEditMode" required="false" rtexprvalue="true" type="java.lang.Boolean" /> + <c:set var="isEditMode" value="${empty isEditMode ? mgnl.editMode and cmsfn:canEdit() : isEditMode}" /> + <c:if test="${isEditMode}"> + <c:set var="uuidBrandLink" value="uuid=${param.uuid}&" /> + </c:if> + <c:if test="${empty node}"> + <c:set var="node" value="${content.handle}" /> + </c:if> + <cms:setNode path="${node}" var="pzcNode" /> + <c:if test="${empty item}"> + <c:set var="item" value="${pzcNode[property]}" /> + </c:if> + <c:set var="loadjs" value="${empty loadjs ? true : loadjs}" /> + <c:set var="itemNode" value="${media:node(item)}" /> + <c:choose> + <c:when test="${(media:width(itemNode) ge width) and (media:height(itemNode) ge height)}"> + <c:set var="property" value="${property}_pzc" /> + <c:set var="pzcId" value="${node}.${property}" /> + <c:set var="pzcProperties" value="${pzcNode[property]}" /> + <c:if test="${isEditMode and (empty pzcJsIncluded or not pzcJsIncluded)}"> + <script type="text/javascript"> var crop_app_ctx = '${pageContext.request.contextPath}';</script> + <c:if test="${loadjs}"> + <c:if test="${empty jquery or jquery}"> + <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"><!-- --> + </script> + </c:if> + <c:if test="${empty jqueryui or jqueryui}"> + <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js"><!-- --> + </script> + </c:if> + <script type="text/javascript" src="${pageContext.request.contextPath}/.resources/media/js/crop/crop.js"><!-- --> + </script> + </c:if> + <c:set var="pzcJsIncluded" value="${true}" scope="request" /> + </c:if> + <c:choose> + <c:when + test="${((mgnl.editMode and cmsfn:canEdit()) or (not empty isEditMode and isEditMode)) and param.pzcId eq pzcId}"> + <c:set var="cropScriptRequired" value="${true}" scope="request" /> + <c:set var="size" value="${media:size(media:node(item), 'original')}" /> + <c:if test="${empty pzcProperties}"> + <c:set var="pzcProperties" value="100|0|0" /> + </c:if> + <c:set var="pzcParams" value="${fn:split(pzcProperties, '|')}" /> + <c:set var="zoom" value="${(0 + pzcParams[0]) / 100}" /> + <c:set var="zoomW" value="${zoom * size[0]}" /> + <c:set var="zoomH" value="${zoom * size[1]}" /> + <c:set var="marginX" value="${size[0] - zoomW}" /> + <c:set var="marginY" value="${size[1] - zoomH}" /> + <c:set var="panX" value="${size[0] - width - pzcParams[1] - marginX}" /><!-- zoomW - width}" /> --> + <c:set var="panY" value="${size[1] - height - pzcParams[2] - marginY}" /> + <div id="${pzcId}" class="pzc" + style="width:${width}px;height:${height}px;padding:0;margin:0;border:0;position:relative" data-width="${size[0]}" + data-height="${size[1]}" data-property="${property}" data-node="${node}"> + <div class="pzcMask" style="overflow:hidden;width:100%;height:100%;padding:0;margin:0;border:0;position:relative"> + <div class="pzcContainment" + style="width:${2 * size[0] - width}px;height:${2 * size[1] - height}px;left:${width - size[0]}px;top:${height - size[1]}px;padding:0;margin:0;border:0;position:relative"> + <div class="pzcMedia" + style="left:${panX}px;top:${panY}px;width:${zoomW}px;height:${zoomH}px;padding: ${marginY}px ${marginX}px;margin:0;border:0;position:absolute"> + <img src="${appCtx}${media:url(media:node(item))}" style="width:100%;height:100%" /> + </div> + </div> + </div> + <a class="pzcEdit pzcExit" href="${media:replaceParam('pzcId', '')}" title="exit" + style="position:absolute;right:5px;top:5px;background:#000 url(${appCtx}/.resources/media/icons/crop/exit.png) center center no-repeat;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;width:24px;height:24px;"> + <!-- --> + </a> + <a class="pzcEdit pzcSave" href="${media:replaceParam('pzcId', '')}" title="save" + style="position:absolute;right:5px;top:34px;background:#000 url(${appCtx}/.resources/media/icons/crop/save.png) center center no-repeat;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;width:24px;height:24px;"> + <!-- --> + </a> + <div class="pzcZoomPanel" + style="display:none;position:absolute;border:none;padding:10px;bottom:20px;left:50%;margin-left:-20px;width:40px;text-align:center;background:#000;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;color:#fff;font-size:16px;font-family:Verdana;line-height:20px;height:20px;"><!-- --> + </div> + <div class="pzcSlider" + style="position:absolute;padding:0;margin:5px;width:100px;height:7px;bottom:0px;left:50%;margin-left:-50px;border:solid 1px #999"><!-- --> + </div> + </div> + </c:when> + <c:otherwise> + <c:set var="res" value="p${width}x${height}" /> + <c:if test="${not empty pzcProperties}"> + <c:set var="res" value="${res};pzc=${pzcProperties},quality=1" /> + </c:if> + <c:choose> + <c:when test="${((mgnl.editMode and cmsfn:canEdit()) or (not empty isEditMode and isEditMode))}"> + <div id="${pzcId}" + style="overflow:hidden;width:${width}px;height:${height}px;border:0;margin:0;padding:0;position:relative"> + <img src="${appCtx}${media:urlres(media:node(item), res)}" /> + <!-- <media:media item="${item}" width="${width}" height="${height}" resize="crop" />--> + <a class="pzcEdit" href="${media:replaceParam('pzcId', pzcId)}" title="edit" + style="position:absolute;right:5px;top:5px;background:#000 url(${appCtx}/.resources/media/icons/crop/edit.png) center center no-repeat;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;width:24px;height:24px;"> + <!-- --> + </a> + <c:if test="${not empty pzcProperties}"> + <a class="pzcEdit pzcDelete" href="${media:replaceParam('pzcId', '')}" title="reset" id="${node}.${property}" + style="position:absolute;right:5px;top:34px;background:#000 url(${appCtx}/.resources/media/icons/crop/delete.png) center center no-repeat;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;width:24px;height:24px;"> + <!-- --> + </a> + </c:if> + </div> + </c:when> + <c:otherwise> + <c:set var="res" value="${res}" /> + <img src="${appCtx}${media:urlres(media:node(item), res)}" /> + </c:otherwise> + </c:choose> + </c:otherwise> + </c:choose> + </c:when> + <c:otherwise> + <span + style="width:${width - 30}px;height:${height - 30}px;position:relative;border:none;display:block;padding:15px;margin:0;font-size:12px;color:#fff;font-family:Arial;background-color:#C0C0C0;"> + Selected media is too small. + <br /> + Choose media with minimum size of + <b>${width}x${height}</b> + </span> + </c:otherwise> + </c:choose> +</jsp:root> \ No newline at end of file Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2011-05-03 12:35:16 UTC (rev 3445) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2011-05-06 15:14:56 UTC (rev 3446) @@ -19,7 +19,9 @@ fit: makes the new image to fit into required resolution. nocrop: makes the new image to contain the required resolution. crop: makes the new image to contain the required res and the crop the simmetric bands that outfit resolution. -fitbands: makes the new image to fit into required res and fills empty areas with background color you pass to in 'parameter' attribute as hex value of 'background' parameter"/> +fitbands: makes the new image to fit into required res and fills empty areas with background color you pass to in 'parameter' attribute as hex value of 'background' parameter. +pzc: apply zoom and crop to image as specified by the pzc parameter (value must be built with the pattern zoom|pan x|pan y, i.e pzc:80|220|125). If no pzc parameter is found the crop mode is applied to image."/> + <jsp:directive.attribute name="parameters" required="false" rtexprvalue="true" description="parameters to pass to image processor as couples key=value joined by commas "/> <jsp:directive.attribute name="ignoreDim" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if true the img element will be rendered without width and height attributes "/> <jsp:directive.attribute name="autoPlay" required="false" rtexprvalue="true" type="java.lang.Boolean" description="auto starts the player without waiting for user play command"/> @@ -30,6 +32,11 @@ <jsp:directive.attribute name="videoImagePreview" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if set to true, the tag will not insert the player for videos but only a preview image. For videos or mp3s it needs the following scripts loaded in page: <ul><li>.resources/media/js/mootools-1.2-core.js</li><li>.resources/media/js/mootools-1.2-more.js</li><li>.resources/media/js/mootools-1.2-swfobject.js</li></ul>"/> <jsp:directive.attribute name="controlbar" required="false" rtexprvalue="true" type="java.lang.String" description="defines controlbar position. Possible values are: 'none' (for hiding), 'over', 'bottom', 'top'. If not set, this value will be 'bottom' by default." /> <jsp:directive.attribute name="share" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if set to true the pluging share-1 is show"/> + <jsp:directive.attribute name="crop" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if true, the zoom and crop mode is enabled on the media. The cropProperty attribute is mandatory"/> + <jsp:directive.attribute name="cropProperty" required="false" rtexprvalue="true" type="java.lang.String" description="the name of the property where (with '_pzc' suffix) zoom and crop informations are saved "/> + <jsp:directive.attribute name="cropJs" required="false" rtexprvalue="true" type="java.lang.Boolean" description="whether to load crop js files. Defaults to true. If false you have to manually include jquery, jquery ui and (before closing body tag) /.resources/media/js/crop/crop.js" /> + <jsp:directive.attribute name="cropJquery" required="false" rtexprvalue="true" type="java.lang.Boolean" description="whether to load jquery library or not. Defaults to true; if cropJs is false jquery is not loaded" /> + <jsp:directive.attribute name="cropJqueryUI" required="false" rtexprvalue="true" type="java.lang.Boolean" description="whether to load jquery UI library or not. Defaults to true; if cropJs is false jquery ui is not loaded" /> <c:if test="${empty item}"> <c:if test="${empty node}"> @@ -60,11 +67,15 @@ <c:set var="mediamodule" value="${media:module()}"/> <c:set var="player" value="${mediamodule.player}" /> </c:if> + <c:set var="crop" value="${empty crop ? false : crop}" /> <c:set value="${media:node(item)}" var="mediaNode" /> <c:choose> <c:when test="${!empty mediaNode}"> <cms:setNode var="media" content="${mediaNode}" /> <c:choose> + <c:when test="${crop and (media.type eq 'image' or media.type eq 'wallpaper' or videoImagePreview)}"> + <media:crop item="${media}" width="${width}" height="${height}" property="${cropProperty}" jquery="${cropJquery}" jqueryui="${cropJqueryUI}" loadjs="${cropJs}" /> + </c:when> <c:when test="${media.type eq 'image' or media.type eq 'wallpaper' or videoImagePreview}"> <c:choose> <c:when test="${width eq 0 and height eq 0}"> @@ -83,6 +94,9 @@ <c:when test="${resize eq 'fit'}"> <c:set var="controlChar" value="l" /> </c:when> + <c:when test="${resize eq 'pzc'}"> + <c:set var="controlChar" value="p" /> + </c:when> </c:choose> <c:if test="${width eq 0}"> <c:set var="controlChar" value="l" /> Added: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/crop/crop.js =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/crop/crop.js (rev 0) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/js/crop/crop.js 2011-05-06 15:14:56 UTC (rev 3446) @@ -0,0 +1,173 @@ +(function($) { + function init(container, params) { + var media = container.find(".pzcMedia"); + var mediaImg = container.find(".pzcMedia img"); + var pczZoomPanel = container.find(".pzcZoomPanel"); + var pzcSlider = container.find(".pzcSlider"); + + var modified = false; + + $(media).draggable( { + containment : 'parent', + cursor : 'move', + refreshPositions : true, + start : function() { + modified = true; + } + }); + + var width = container.width(); + var height = container.height(); + + var imgW = parseInt(container.attr('data-width')); + var imgH = parseInt(container.attr('data-height')); + var property = container.attr('data-property'); + var node = container.attr('data-node'); + + var actZoom = Math.min( + parseInt(100 * $(".pzcMedia img").width() / imgW), 100); + var minZoom = Math.max(parseInt(100 * width / imgW), parseInt(100 + * height / imgH)); + + if (width < 100) { + pzcSlider.css( { + width : '' + (width - 10) + 'px', + 'margin-left' : '-' + ((width - 10) / 2) + 'px' + }); + } + + pczZoomPanel.html('' + actZoom + '%'); + + container.find(".pzcExit").click( + function() { + return !modified + || confirm("Are you sure to exit without saving?"); + }); + + container.find(".pzcSave").click( + function() { + var href = $(this).attr('href'); + $.ajax( { + url : crop_app_ctx + '/media/pzc', + data : { + zoom : actZoom, + x : Math.floor(container.offset().left + - mediaImg.offset().left), + y : Math.floor(container.offset().top + - mediaImg.offset().top), + id : property, + handle : node + }, + // type : 'HEAD', + error : function(err) { + alert(err); + }, + success : function(msg) { + location.href = href; + } + }); + return false; + }); + + var zoomFn = function(zoom) { + actZoom = zoom; + pczZoomPanel.html('' + actZoom + '%'); + var w = parseInt(actZoom * imgW / 100); + var h = parseInt(w * imgH / imgW); + if (w >= width && h >= height) { + var newLeft = width - w; + var newTop = height - h; + var left = parseInt(media.css('left')); + var top = parseInt(media.css('top')); + left = (left > w - width) ? w - width : left; + top = (top > h - height) ? h - height : top; + $(".pzcMedia").css( { + width : '' + w + 'px', + height : '' + h + 'px', + left : '' + left + 'px', + top : '' + top + 'px', + padding : '' + (imgH - h) + 'px ' + (imgW - w) + 'px' + }); + } + } + + pzcSlider.slider( { + min : minZoom, + max : 100, + value : actZoom, + slide : function(event, ui) { + modified = true; + zoomFn(ui.value); + } + }); + pzcSlider.fadeTo('slow', 0.4); + pzcSlider.mouseenter(function() { + pzcSlider.fadeTo('slow', 1.0); + pczZoomPanel.fadeTo('slow', 0.7); + }); + pzcSlider.mouseleave(function() { + pzcSlider.fadeTo('slow', 0.4); + pczZoomPanel.fadeTo('slow', 0); + }); + + // zoomFn(actZoom); + } + ; + + $.fn.mgnlMediaPZC = function(params) { + var params = $.extend( { + /* + * defaultOpened : 1, tabLinks : '.tablinks a[href^=#]', tabContents : + * '.tab section' + */ + }, params); + this.each(function(i, el) { + init($(el), params); + }); + return this; + }; + +})($); + +$('head') + .append( + '<link type="text/css" rel="stylesheet" href="'+ crop_app_ctx +'/.resources/media/css/crop/pzc.css" />'); +$('head') + .append( + '<link type="text/css" rel="stylesheet" href="'+ crop_app_ctx +'/.resources/media/css/crop/jquery-ui-1.8.12.custom.css" />'); + +var refreshMediaPZC = function() { + $(".pzc").mgnlMediaPZC(); + $(".pzcEdit").fadeTo('slow', 0.4); + $(".pzcEdit").mouseenter(function() { + $(this).fadeTo('slow', 1.0); + }); + $(".pzcEdit").mouseleave(function() { + $(this).fadeTo('slow', 0.4); + }); + $(".pzcDelete").click(function() { + var href = $(this).attr('href'); + var aId = $(this).attr('id'); + var node = aId.split('.')[0]; + var property = aId.split('.')[1]; + $.ajax( { + url : crop_app_ctx +'/media/pzc', + data : { + command : 'delete', + id : property, + handle : node + }, + // type : 'HEAD', + error : function(err) { + alert(err); + }, + success : function(msg) { + location.href = href; + } + }); + return false; + }); +} + +$(document).ready(refreshMediaPZC); +$(document).ajaxSuccess(refreshMediaPZC); \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2011-05-22 18:51:51
|
Revision: 3489 http://openutils.svn.sourceforge.net/openutils/?rev=3489&view=rev Author: fgiust Date: 2011-05-22 18:51:45 +0000 (Sun, 22 May 2011) Log Message: ----------- better (slighlty better) layout for the media menu in case of long links Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2011-05-22 18:20:17 UTC (rev 3488) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-resources/media/css/folderView.css 2011-05-22 18:51:45 UTC (rev 3489) @@ -375,7 +375,7 @@ .mediaStatus0,.mediaStatus1 { opacity: 0.75; - filter: alpha(opacity = 75); + filter: alpha(opacity = 75); } div.sexy-tooltip { @@ -398,7 +398,7 @@ background-color: #ffffff; border: 1px solid #cfcfcf; opacity: 0.90; - filter: alpha(opacity = 90); + filter: alpha(opacity = 90); -moz-box-shadow: 3px 3px 3px #666; -webkit-box-shadow: 3px 3px 3px #666; box-shadow: 3px 3px 3px #666; @@ -441,10 +441,17 @@ } ul.mediamenu li,ul.mediamenu li a { - height: 20px; + min-height: 20px; cursor: pointer; + background-repeat: no-repeat; + background-position: 2px 2px; } +ul.mediamenu li a { + background-image: url("../icons/ico16-link_go.png"); + padding-left: 22px; +} + #scrollablecontent { overflow-y: scroll; height: 600px; Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2011-05-22 18:20:17 UTC (rev 3488) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2011-05-22 18:51:45 UTC (rev 3489) @@ -436,59 +436,50 @@ <ul class="mediamenu"> [#if media.writable] <li> - <a href="javascript:$empty()" onclick="openDialog('${media.handle}')" title="${this.msgs.get('media.edit')}"> - <img src="${this.request.contextPath}/.resources/media/icons/ico16-edit.png" alt="" /> - <span>${this.msgs.get('media.edit')}</span> + <a href="javascript:$empty()" onclick="openDialog('${media.handle}')" title="${this.msgs.get('media.edit')}" style="background-image: url('${this.request.contextPath}/.resources/media/icons/ico16-edit.png');"> + ${this.msgs.get('media.edit')} </a> </li> <li> - <a href="javascript:$empty()" onclick="deleteMedia('${media.handle}')" title="${this.msgs.get('media.delete')}"> - <img src="${this.request.contextPath}/.resources/icons/16/delete2.gif" alt="" /> - <span>${this.msgs.get('media.delete')}</span> + <a href="javascript:$empty()" onclick="deleteMedia('${media.handle}')" title="${this.msgs.get('media.delete')}" style="background-image: url('${this.request.contextPath}/.resources/icons/16/delete2.gif');"> + ${this.msgs.get('media.delete')} </a> </li> <li> - <a href="javascript:$empty()" onclick="openMediaTree('move','${media.handle}')" title="${this.msgs.get('media.move')}"> - <img src="${this.request.contextPath}/.resources/icons/16/up_down.gif" alt="" /> - <span>${this.msgs.get('media.move')}</span> + <a href="javascript:$empty()" onclick="openMediaTree('move','${media.handle}')" title="${this.msgs.get('media.move')}" style="background-image: url('${this.request.contextPath}/.resources/icons/16/up_down.gif');"> + ${this.msgs.get('media.move')} </a> </li> <li> - <a href="javascript:$empty()" onclick="openMediaTree('copy','${media.handle}')" title="${this.msgs.get('media.copy')}"> - <img src="${this.request.contextPath}/.resources/icons/16/copy.gif" alt="" /> - <span>${this.msgs.get('media.copy')}</span> + <a href="javascript:$empty()" onclick="openMediaTree('copy','${media.handle}')" title="${this.msgs.get('media.copy')}" style="background-image: url('${this.request.contextPath}/.resources/icons/16/copy.gif');"> + ${this.msgs.get('media.copy')} </a> </li> [#else] <li> - <a> - <img src="${this.request.contextPath}/.resources/media/icons/ico16-edit_inactive.png" alt="" /> + <a style="background-image: url('${this.request.contextPath}/.resources/media/icons/ico16-edit_inactive.png');"> <span style="display:block; clear:left;"><!-- --></span> </a> </li> <li> - <a> - <img src="${this.request.contextPath}/.resources/icons/16/delete2_inactive.gif" alt="" /> + <a style="background-image: url('${this.request.contextPath}/.resources/icons/16/delete2_inactive.gif');"> <span style="display:block; clear:left;"><!-- --></span> </a> </li> <li> - <a> - <img src="${this.request.contextPath}/.resources/icons/16/up_down_inactive.gif" alt="" /> + <a style="background-image: url('${this.request.contextPath}/.resources/icons/16/up_down_inactive.gif');"> <span style="display:block; clear:left;"><!-- --></span> </a> </li> <li> - <a> - <img src="${this.request.contextPath}/.resources/icons/16/copy_inactive.gif" alt="" /> + <a style="background-image: url('${this.request.contextPath}/.resources/icons/16/copy_inactive.gif');"> <span style="display:block; clear:left;"><!-- --></span> </a> </li> [/#if] [#if !media.external] <li> - <a href="?command=download&path=${media.handle}"> - <img src="${this.request.contextPath}/.resources/media/icons/ico16-download.png" alt="" /> + <a href="?command=download&path=${media.handle}" style="background-image: url('${this.request.contextPath}/.resources/media/icons/ico16-download.png');"> <span>${this.msgs.get('media.download')}</span> </a> </li> @@ -496,31 +487,27 @@ [#if !this.singleInstance] [#if media.canPublish] <li> - <a href="javascript:$empty()" onclick="performAction('activate', '${media.handle}','')" title="${this.msgs.get('media.activate')}"> - <img src="${this.request.contextPath}/.resources/icons/16/arrow_right_green.gif" alt="" /> - <span>${this.msgs.get('media.activate')}</span> + <a href="javascript:$empty()" onclick="performAction('activate', '${media.handle}','')" title="${this.msgs.get('media.activate')}" style="background-image: url('${this.request.contextPath}/.resources/icons/16/arrow_right_green.gif');"> + ${this.msgs.get('media.activate')} </a> </li> [#else] <li> - <a title="${this.msgs.get('media.activate')}" class="disabled"> - <img src="${this.request.contextPath}/.resources/media/icons/ico16-arrow_right_inactive.png" alt="" /> - <span>${this.msgs.get('media.activate')}</span> + <a title="${this.msgs.get('media.activate')}" class="disabled" style="background-image: url('${this.request.contextPath}/.resources/media/icons/ico16-arrow_right_inactive.png');"> + ${this.msgs.get('media.activate')} </a> </li> [/#if] [#if media.canPublish && media.metaData.activationStatus = 2] <li> - <a href="javascript:$empty()" onclick="performAction('deactivate', '${media.handle}','')" title="${this.msgs.get('media.deactivate')}"> - <img src="${this.request.contextPath}/.resources/icons/16/arrow_left_red.gif" border="0" /> - <span>${this.msgs.get('media.deactivate')}</span> + <a href="javascript:$empty()" onclick="performAction('deactivate', '${media.handle}','')" title="${this.msgs.get('media.deactivate')}" style="background-image: url('${this.request.contextPath}/.resources/icons/16/arrow_left_red.gif');"> + ${this.msgs.get('media.deactivate')} </a> </li> [#else] <li> - <a title="${this.msgs.get('media.deactivate')}" class="disabled"> - <img src="${this.request.contextPath}/.resources/icons/16/arrow_left_red_inactive.gif" alt="" /> - <span>${this.msgs.get('media.deactivate')}</span> + <a title="${this.msgs.get('media.deactivate')}" class="disabled" style="background-image: url('${this.request.contextPath}/.resources/icons/16/arrow_left_red_inactive.gif');"> + ${this.msgs.get('media.deactivate')} </a> </li> [/#if] @@ -532,12 +519,11 @@ [#else] <span class="tips menuitem">${this.msgs.get('media.pages')} (${media.usedInWebPages?size})</span> <div class="pages menu" style="display: none;"> - <ul class="mediamenu"> + <ul class="mediamenu medialinks"> [#list media.usedInUris as uri] <li> <a href="${this.request.contextPath}${uri}" target="_blank"> - <img src="${this.request.contextPath}/.resources/media/icons/ico16-link_go.png" alt="" /> - <span>${uri}</span> + ${uri} </a> </li> [/#list] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |