diff --git a/typo3/contrib/extjs/locale/ext-lang-am.js b/typo3/contrib/extjs/locale/ext-lang-am.js index eb8b5463dacbb5c56e5c2a342a3382d5b245979e..1538933531b5f026d10546d83315d8454bd9b385 100644 --- a/typo3/contrib/extjs/locale/ext-lang-am.js +++ b/typo3/contrib/extjs/locale/ext-lang-am.js @@ -4,356 +4,356 @@ * licensing@sencha.com * http://www.sencha.com/license */ -/** - * List compiled by Tewodros Wondimu on the extjs.com forums Oct 18, 2010. - * - * Amharic Translations - */ - -Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">እያስገባ áŠá‹‰...</div>'; - -if(Ext.DataView){ - Ext.DataView.prototype.emptyText = ""; -} - -if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} áˆáˆáŒ¥ ረድá {1}"; -} - -if(Ext.LoadMask){ - Ext.LoadMask.prototype.msg = "እያስገባ áŠá‹‰..."; -} - -Date.shortMonthNames = [ - "መስከ", - "ጥቅáˆ", - "ህዳáˆ", - "ታህሳ", - "ጥáˆ", - "የካቲ", - "መጋቢ", - "ሚያዚ", - "áŒáŠ•á‰¦", - "ሰኔ", - "áˆáˆáˆŒ", - "áŠáˆƒáˆ´", - "ጷáŒáˆœ" -]; - - -Date.monthNames = [ - "መስከረáˆ", - "ጥቅáˆá‰µ", - "ህዳáˆ", - "ታህሳስ", - "ጥáˆ", - "የካቲት", - "መጋቢት", - "ሚያዚያ", - "áŒáŠ•á‰¦á‰µ", - "ሰኔ", - "áˆáˆáˆŒ", - "áŠáˆƒáˆ´", - "ጷáŒáˆœ" -]; - -Date.getShortMonthName = function(month) { - return Date.monthNames[month].substring(0, 3); -}; - -Date.monthNumbers = { - "መስከረáˆ" : 0, - "ጥቅáˆá‰µ" : 1, - "ህዳáˆ" : 2, - "ታህሳስ" : 3, - "ጥáˆ" : 4, - "የካቲት" : 5, - "መጋቢት" : 6, - "ሚያዚያ" : 7, - "áŒáŠ•á‰¦á‰µ" : 8, - "ሰኔ" : 9, - "áˆáˆáˆŒ" : 10, - "áŠáˆƒáˆ´" : 11, - "ጷáŒáˆœ" : 12 -}; - -Date.getMonthNumber = function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; -}; - -Date.dayNames = [ - "እáˆá‹µ", - "ሰኞ", - "ማáŠáˆ°áŠž", - "ዓሮብ", - "áˆáˆ™áˆµ", - "አáˆá‰¥", - "ቅዳሜ" -]; - -Date.getShortDayName = function(day) { - return Date.dayNames[day].substring(0, 3); -}; - -Date.parseCodes.S.s = "(?:st|nd|rd|th)"; - -if(Ext.MessageBox){ - Ext.MessageBox.buttonText = { - ok : "á‹áˆáŠ•", - cancel : "ሰáˆá‹", - yes : "አዎ", - no : "የለሠ/ አá‹" - }; -} - -if(Ext.util.Format){ - Ext.util.Format.date = function(v, format){ - if(!v) return ""; - if(!(v instanceof Date)) v = new Date(Date.parse(v)); - return v.dateFormat(format || "ወ/ቀ/አ"); - }; -} - -if(Ext.DatePicker){ - Ext.apply(Ext.DatePicker.prototype, { - todayText : "ዛሬ", - minText : "á‹áˆ„ ቀን ከመጨረሻ ትንሹ ቀን በáŠá‰µ áŠá‹‰", - maxText : "á‹áˆ„ ቀን ከመጨረሻ ትáˆá‰ ቀን በáŠá‰µ áŠá‹‰", - disabledDaysText : "", - disabledDatesText : "", - monthNames : Date.monthNames, - dayNames : Date.dayNames, - nextText : 'የሚቀጥለዉ ወáˆ(መቆጣጣሪያ á‰áˆá+ቀáŠ)', - prevText : 'ያለáˆá‹‰ ወáˆ(መቆጣጣሪያ á‰áˆá+áŒáˆ«)', - monthYearText : 'ወሠáˆáˆ¨áŒ¥ (አመት ለመለወጥ መቆጣጣሪያ á‰áˆá+ወደላá‹/ወደታች)', - todayTip : "{0} (የቦታ á‰áˆá)", - format : "d/m/Y", - okText : "á‹áˆáŠ•", - cancelText : "ሰáˆá‹", - startDay : 0 - }); -} - -if(Ext.PagingToolbar){ - Ext.apply(Ext.PagingToolbar.prototype, { - beforePageText : "ገáˆáŒ½", - afterPageText : "የ {0}", - firstText : "የመጀመሪያዉ ገáˆáŒ½", - prevText : "ያለáˆá‹‰ ገáˆáŒ½", - nextText : "የሚቀጥለዉ ገáˆáŒ½", - lastText : "የመጨረሻዉ ገáˆáŒ½", - refreshText : "ከáˆáˆµ", - displayMsg : "{0} - {1} ሲያሳዠከ {2}", - emptyMsg : 'የሚታዠዳታ የለáˆ' - }); -} - -if(Ext.form.BasicForm){ - Ext.form.BasicForm.prototype.waitTitle = "እባáŠá‹ŽáŠ• á‹áŒ ብá‰..." -} - -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "የዚህ መስአእሴት የተሳሳተ áŠá‹‰"; -} - -if(Ext.form.TextField){ - Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "የዚህ መስአየመጨረሻ ትንሽ áˆá‹áˆ˜á‰µ {0} áŠá‹‰", - maxLengthText : "የዚህ መስአየመጨረሻ ትáˆá‰… áˆá‹áˆ˜á‰µ {0} áŠá‹‰", - blankText : "á‹áˆ„ መስአአስáˆáˆ‹áŒŠ áŠá‹‰", - regexText : "", - emptyText : null - }); -} - -if(Ext.form.NumberField){ - Ext.apply(Ext.form.NumberField.prototype, { - decimalSeparator : ".", - decimalPrecision : 2, - minText : "የዚህ መስአየመጨረሻ ትንሽ እሴት {0} áŠá‹‰", - maxText : "የዚህ መስአየመጨረሻ ትáˆá‰… እሴት {0} áŠá‹‰", - nanText : "{0} የተሳሳተ á‰áŒ¥áˆ áŠá‹‰" - }); -} - -if(Ext.form.DateField){ - Ext.apply(Ext.form.DateField.prototype, { - disabledDaysText : "ቦá‹áŠ—ሠ/ ስራ አá‰áˆŸáˆ", - disabledDatesText : "ቦá‹áŠ—ሠ/ ስራ አá‰áˆŸáˆ", - minText : "እዚ እሴት ዉስጥ ያለዉ ቀን ከ{0} በሑአላ መሆን አለበት", - maxText : "እዚ እሴት ዉስጥ ያለዉ ቀን ከ{0} በáŠá‰µ መሆን አለበት", - invalidText : "{0} የተሳሳተ ቀን áŠá‹‰ - በዚህ ቅáˆá€á‰µ መሆን አለበት {1}", - format : "d/m/y", - altFormats : "d/m/Y|d/m/y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d", - startDay : 0 - }); -} - -if(Ext.form.ComboBox){ - Ext.apply(Ext.form.ComboBox.prototype, { - loadingText : "እያስገባ áŠá‹‰...", - valueNotFoundText : "አáˆá‰°á‹ˆáˆ°áŠáˆ" - }); -} - -if(Ext.form.VTypes){ - Ext.apply(Ext.form.VTypes, { - emailText : 'á‹áˆ„ እሴት ኢሜá‹áˆ መሆን አለበት - በዚህ ቅáˆá€á‰µ መሆን አለበት "user@example.com"', - urlText : 'á‹áˆ„ እሴት ዩአáˆáŠ¤áŠ• መሆን አለበት - በዚህ ቅáˆá€á‰µ መሆን አለበት "http:/'+'/www.example.com"', - alphaText : 'á‹áˆ„ እሴት መያዠያለበት ቃላትና _ ብቻ áŠá‹‰', - alphanumText : 'á‹áˆ„ እሴት መያዠያለበት ቃላትᤠá‰áŒ¥áˆáŠ“ _ ብቻ áŠá‹‰' - }); -} - -if(Ext.form.HtmlEditor){ - Ext.apply(Ext.form.HtmlEditor.prototype, { - createLinkText : 'እባኮትን ለዚ ዩአáˆáŠ¤áŠ• አገናአአስገባ:', - buttonTips : { - bold : { - title: 'ደማቅ (መቆጣጣሪያ á‰áˆá+B)', - text: 'የተመረጠዉን ጽáˆá አድáˆá‰…::', - cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' - }, - italic : { - title: 'ሰያá (መቆጣጣሪያ á‰áˆá+I)', - text: 'የተመረጠዉን ጽáˆá ሰያá አድáˆáŒ::', - cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' - }, - underline : { - title: 'መስመረáŒáˆáŒŒ (መቆጣጣሪያ á‰áˆá+U)', - text: 'የተመረጠዉን ጽáˆá ከáŒáˆáŒŒ አስáˆáˆ::', - cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' - }, - increasefontsize : { - title: 'ጽáˆá‰áŠ• አሳድáŒ', - text: 'ቅáˆáŒ¸ á‰áˆáŠ አሳድገáŒ::', - cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' - }, - decreasefontsize : { - title: 'ጽáˆá‰áŠ• አሳንስ', - text: 'ቅáˆáŒ¸ á‰áˆáŠ አሳንስ::', - cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' - }, - backcolor : { - title: 'ጽáˆá áˆáˆ¨áŒ¥ ቀለáˆ', - text: 'የተመረጠዉን ጽáˆá ዳራ ቀለሠለዉጥ::', - cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' - }, - forecolor : { - title: 'ቅáˆáŒ¸ á‰áˆáŠ ቀለáˆ', - text: 'የተመረጠዉን ጽáˆá ቀለሠለዉጥ::', - cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' - }, - justifyleft : { - title: 'ጽáˆá áŒáˆ« አሰáˆá', - text: 'ጽáˆá‰áŠ• ወደáŒáˆ« አሰáˆá::', - cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' - }, - justifycenter : { - title: 'ጽáˆá አማáŠáˆ', - text: 'አáˆá‰³áŠ¢á‹‰ ላዠጽáˆá‰áŠ• አማáŠáˆ::', - cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' - }, - justifyright : { - title: 'ጽáˆá ቀአአሰáˆá', - text: 'ጽáˆá‰áŠ• ወደቀአአሰáˆá::', - cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' - }, - insertunorderedlist : { - title: 'áŠáŒ¥á‰ áˆáˆáŠá‰µ á‹áˆá‹áˆ', - text: 'áŠáŒ¥á‰ áˆáˆáŠá‰µ á‹áˆá‹áˆ ጀáˆáˆ::', - cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' - }, - insertorderedlist : { - title: 'á‰áŒ¥áˆ«á‹Š á‹áˆá‹áˆ', - text: 'á‰áŒ¥áˆ«á‹Š á‹áˆá‹áˆ ጀáˆáˆ::', - cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' - }, - createlink : { - title: 'áŒˆá… áŠ áŒˆáŠ“áŠ', - text: 'የተመረጠዉን ጽáˆá áŒˆá… áŠ áŒˆáŠ“áŠ áŠ á‹µáˆáŒ::', - cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' - }, - sourceedit : { - title: 'áˆáŠ•áŒ አáˆá‰µáŠ¥', - text: 'ወደ áˆáŠ•áŒ አáˆá‰µáŠ¥ áˆáŠá‰³ ቀá‹áˆ::', - cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' - } - } - }); -} - -if(Ext.grid.GridView){ - Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "ሽቅብ á‹°áˆá‹µáˆ", - sortDescText : "á‰áˆá‰áˆ á‹°áˆá‹µáˆ", - columnsText : "አáˆá‹¶á‰½" - }); -} - -if(Ext.grid.GroupingView){ - Ext.apply(Ext.grid.GroupingView.prototype, { - emptyGroupText : '(ማንáˆ)', - groupByText : 'በዚ መስአቦድን', - showGroupsText : 'በቡድን አሳá‹' - }); -} - -if(Ext.grid.PropertyColumnModel){ - Ext.apply(Ext.grid.PropertyColumnModel.prototype, { - nameText : "ስáˆ", - valueText : "እሴት ", - dateFormat : "m/j/Y", - trueText: "እሙን", - falseText: "áˆáˆ°á‰µ" - }); -} - -if(Ext.grid.BooleanColumn){ - Ext.apply(Ext.grid.BooleanColumn.prototype, { - trueText : "እሙን", - falseText : "áˆáˆ°á‰µ", - undefinedText: ' ' - }); -} - -if(Ext.grid.NumberColumn){ - Ext.apply(Ext.grid.NumberColumn.prototype, { - format : '0,000.00' - }); -} - -if(Ext.grid.DateColumn){ - Ext.apply(Ext.grid.DateColumn.prototype, { - format : 'm/d/Y' - }); -} - -if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ - Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "መጠን ለመቀá‹áˆ ጎትት::", - collapsibleSplitTip : "መጠን ለመቀá‹áˆ ጎትት:: ለመደበቅ áˆáˆˆá‰´ ጠቅ አድáˆáŒ::" - }); -} - -if(Ext.form.TimeField){ - Ext.apply(Ext.form.TimeField.prototype, { - minText : "እዚህ መስአዉስጥ ያለዉ ሰዓት ከ{0} እኩሠወá‹áˆ በáŠáˆ‹ መሆን አለበት", - maxText : "እዚህ መስአዉስጥ ያለዉ ሰዓት ከ{0} እኩሠወá‹áˆ በáŠá‰µ መሆን አለበት", - invalidText : "{0} የተሳሳተ ሰዓት áŠá‹‰", - format : "g:i A", - altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H" - }); -} - -if(Ext.form.CheckboxGroup){ - Ext.apply(Ext.form.CheckboxGroup.prototype, { - blankText : "እዚህ ቡድን ዉስጥ ቢያንስ አንድ á‹“á‹áŠá‰µ መáˆáˆ¨áŒ¥ አለብህ" - }); -} - -if(Ext.form.RadioGroup){ - Ext.apply(Ext.form.RadioGroup.prototype, { - blankText : "እዚህ ቡድን ዉስጥ ቢያንስ አንድ á‹“á‹áŠá‰µ መáˆáˆ¨áŒ¥ አለብህ" - }); -} +/** + * List compiled by Tewodros Wondimu on the extjs.com forums Oct 18, 2010. + * + * Amharic Translations + */ + +Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">እያስገባ áŠá‹‰...</div>'; + +if(Ext.DataView){ + Ext.DataView.prototype.emptyText = ""; +} + +if(Ext.grid.GridPanel){ + Ext.grid.GridPanel.prototype.ddText = "{0} áˆáˆáŒ¥ ረድá {1}"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "እያስገባ áŠá‹‰..."; +} + +Date.shortMonthNames = [ + "መስከ", + "ጥቅáˆ", + "ህዳáˆ", + "ታህሳ", + "ጥáˆ", + "የካቲ", + "መጋቢ", + "ሚያዚ", + "áŒáŠ•á‰¦", + "ሰኔ", + "áˆáˆáˆŒ", + "áŠáˆƒáˆ´", + "ጷáŒáˆœ" +]; + + +Date.monthNames = [ + "መስከረáˆ", + "ጥቅáˆá‰µ", + "ህዳáˆ", + "ታህሳስ", + "ጥáˆ", + "የካቲት", + "መጋቢት", + "ሚያዚያ", + "áŒáŠ•á‰¦á‰µ", + "ሰኔ", + "áˆáˆáˆŒ", + "áŠáˆƒáˆ´", + "ጷáŒáˆœ" +]; + +Date.getShortMonthName = function(month) { + return Date.monthNames[month].substring(0, 3); +}; + +Date.monthNumbers = { + "መስከረáˆ" : 0, + "ጥቅáˆá‰µ" : 1, + "ህዳáˆ" : 2, + "ታህሳስ" : 3, + "ጥáˆ" : 4, + "የካቲት" : 5, + "መጋቢት" : 6, + "ሚያዚያ" : 7, + "áŒáŠ•á‰¦á‰µ" : 8, + "ሰኔ" : 9, + "áˆáˆáˆŒ" : 10, + "áŠáˆƒáˆ´" : 11, + "ጷáŒáˆœ" : 12 +}; + +Date.getMonthNumber = function(name) { + return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; +}; + +Date.dayNames = [ + "እáˆá‹µ", + "ሰኞ", + "ማáŠáˆ°áŠž", + "ዓሮብ", + "áˆáˆ™áˆµ", + "አáˆá‰¥", + "ቅዳሜ" +]; + +Date.getShortDayName = function(day) { + return Date.dayNames[day].substring(0, 3); +}; + +Date.parseCodes.S.s = "(?:st|nd|rd|th)"; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "á‹áˆáŠ•", + cancel : "ሰáˆá‹", + yes : "አዎ", + no : "የለሠ/ አá‹" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "ወ/ቀ/አ"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "ዛሬ", + minText : "á‹áˆ„ ቀን ከመጨረሻ ትንሹ ቀን በáŠá‰µ áŠá‹‰", + maxText : "á‹áˆ„ ቀን ከመጨረሻ ትáˆá‰ ቀን በáŠá‰µ áŠá‹‰", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'የሚቀጥለዉ ወáˆ(መቆጣጣሪያ á‰áˆá+ቀáŠ)', + prevText : 'ያለáˆá‹‰ ወáˆ(መቆጣጣሪያ á‰áˆá+áŒáˆ«)', + monthYearText : 'ወሠáˆáˆ¨áŒ¥ (አመት ለመለወጥ መቆጣጣሪያ á‰áˆá+ወደላá‹/ወደታች)', + todayTip : "{0} (የቦታ á‰áˆá)", + format : "d/m/Y", + okText : "á‹áˆáŠ•", + cancelText : "ሰáˆá‹", + startDay : 0 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "ገáˆáŒ½", + afterPageText : "የ {0}", + firstText : "የመጀመሪያዉ ገáˆáŒ½", + prevText : "ያለáˆá‹‰ ገáˆáŒ½", + nextText : "የሚቀጥለዉ ገáˆáŒ½", + lastText : "የመጨረሻዉ ገáˆáŒ½", + refreshText : "ከáˆáˆµ", + displayMsg : "{0} - {1} ሲያሳዠከ {2}", + emptyMsg : 'የሚታዠዳታ የለáˆ' + }); +} + +if(Ext.form.BasicForm){ + Ext.form.BasicForm.prototype.waitTitle = "እባáŠá‹ŽáŠ• á‹áŒ ብá‰..." +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "የዚህ መስአእሴት የተሳሳተ áŠá‹‰"; +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "የዚህ መስአየመጨረሻ ትንሽ áˆá‹áˆ˜á‰µ {0} áŠá‹‰", + maxLengthText : "የዚህ መስአየመጨረሻ ትáˆá‰… áˆá‹áˆ˜á‰µ {0} áŠá‹‰", + blankText : "á‹áˆ„ መስአአስáˆáˆ‹áŒŠ áŠá‹‰", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + decimalSeparator : ".", + decimalPrecision : 2, + minText : "የዚህ መስአየመጨረሻ ትንሽ እሴት {0} áŠá‹‰", + maxText : "የዚህ መስአየመጨረሻ ትáˆá‰… እሴት {0} áŠá‹‰", + nanText : "{0} የተሳሳተ á‰áŒ¥áˆ áŠá‹‰" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "ቦá‹áŠ—ሠ/ ስራ አá‰áˆŸáˆ", + disabledDatesText : "ቦá‹áŠ—ሠ/ ስራ አá‰áˆŸáˆ", + minText : "እዚ እሴት ዉስጥ ያለዉ ቀን ከ{0} በሑአላ መሆን አለበት", + maxText : "እዚ እሴት ዉስጥ ያለዉ ቀን ከ{0} በáŠá‰µ መሆን አለበት", + invalidText : "{0} የተሳሳተ ቀን áŠá‹‰ - በዚህ ቅáˆá€á‰µ መሆን አለበት {1}", + format : "d/m/y", + altFormats : "d/m/Y|d/m/y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d", + startDay : 0 + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "እያስገባ áŠá‹‰...", + valueNotFoundText : "አáˆá‰°á‹ˆáˆ°áŠáˆ" + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'á‹áˆ„ እሴት ኢሜá‹áˆ መሆን አለበት - በዚህ ቅáˆá€á‰µ መሆን አለበት "user@example.com"', + urlText : 'á‹áˆ„ እሴት ዩአáˆáŠ¤áŠ• መሆን አለበት - በዚህ ቅáˆá€á‰µ መሆን አለበት "http:/'+'/www.example.com"', + alphaText : 'á‹áˆ„ እሴት መያዠያለበት ቃላትና _ ብቻ áŠá‹‰', + alphanumText : 'á‹áˆ„ እሴት መያዠያለበት ቃላትᤠá‰áŒ¥áˆáŠ“ _ ብቻ áŠá‹‰' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'እባኮትን ለዚ ዩአáˆáŠ¤áŠ• አገናአአስገባ:', + buttonTips : { + bold : { + title: 'ደማቅ (መቆጣጣሪያ á‰áˆá+B)', + text: 'የተመረጠዉን ጽáˆá አድáˆá‰…::', + cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' + }, + italic : { + title: 'ሰያá (መቆጣጣሪያ á‰áˆá+I)', + text: 'የተመረጠዉን ጽáˆá ሰያá አድáˆáŒ::', + cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' + }, + underline : { + title: 'መስመረáŒáˆáŒŒ (መቆጣጣሪያ á‰áˆá+U)', + text: 'የተመረጠዉን ጽáˆá ከáŒáˆáŒŒ አስáˆáˆ::', + cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' + }, + increasefontsize : { + title: 'ጽáˆá‰áŠ• አሳድáŒ', + text: 'ቅáˆáŒ¸ á‰áˆáŠ አሳድገáŒ::', + cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' + }, + decreasefontsize : { + title: 'ጽáˆá‰áŠ• አሳንስ', + text: 'ቅáˆáŒ¸ á‰áˆáŠ አሳንስ::', + cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' + }, + backcolor : { + title: 'ጽáˆá áˆáˆ¨áŒ¥ ቀለáˆ', + text: 'የተመረጠዉን ጽáˆá ዳራ ቀለሠለዉጥ::', + cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' + }, + forecolor : { + title: 'ቅáˆáŒ¸ á‰áˆáŠ ቀለáˆ', + text: 'የተመረጠዉን ጽáˆá ቀለሠለዉጥ::', + cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' + }, + justifyleft : { + title: 'ጽáˆá áŒáˆ« አሰáˆá', + text: 'ጽáˆá‰áŠ• ወደáŒáˆ« አሰáˆá::', + cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' + }, + justifycenter : { + title: 'ጽáˆá አማáŠáˆ', + text: 'አáˆá‰³áŠ¢á‹‰ ላዠጽáˆá‰áŠ• አማáŠáˆ::', + cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' + }, + justifyright : { + title: 'ጽáˆá ቀአአሰáˆá', + text: 'ጽáˆá‰áŠ• ወደቀአአሰáˆá::', + cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' + }, + insertunorderedlist : { + title: 'áŠáŒ¥á‰ áˆáˆáŠá‰µ á‹áˆá‹áˆ', + text: 'áŠáŒ¥á‰ áˆáˆáŠá‰µ á‹áˆá‹áˆ ጀáˆáˆ::', + cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' + }, + insertorderedlist : { + title: 'á‰áŒ¥áˆ«á‹Š á‹áˆá‹áˆ', + text: 'á‰áŒ¥áˆ«á‹Š á‹áˆá‹áˆ ጀáˆáˆ::', + cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' + }, + createlink : { + title: 'áŒˆá… áŠ áŒˆáŠ“áŠ', + text: 'የተመረጠዉን ጽáˆá áŒˆá… áŠ áŒˆáŠ“áŠ áŠ á‹µáˆáŒ::', + cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' + }, + sourceedit : { + title: 'áˆáŠ•áŒ አáˆá‰µáŠ¥', + text: 'ወደ áˆáŠ•áŒ አáˆá‰µáŠ¥ áˆáŠá‰³ ቀá‹áˆ::', + cls: 'ኤáŠáˆµ-ኤችቲኤáˆáŠ¤áˆ-አáˆá‰³áŠ¢-ጠቃሚ áˆáŠáˆ' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "ሽቅብ á‹°áˆá‹µáˆ", + sortDescText : "á‰áˆá‰áˆ á‹°áˆá‹µáˆ", + columnsText : "አáˆá‹¶á‰½" + }); +} + +if(Ext.grid.GroupingView){ + Ext.apply(Ext.grid.GroupingView.prototype, { + emptyGroupText : '(ማንáˆ)', + groupByText : 'በዚ መስአቦድን', + showGroupsText : 'በቡድን አሳá‹' + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "ስáˆ", + valueText : "እሴት ", + dateFormat : "m/j/Y", + trueText: "እሙን", + falseText: "áˆáˆ°á‰µ" + }); +} + +if(Ext.grid.BooleanColumn){ + Ext.apply(Ext.grid.BooleanColumn.prototype, { + trueText : "እሙን", + falseText : "áˆáˆ°á‰µ", + undefinedText: ' ' + }); +} + +if(Ext.grid.NumberColumn){ + Ext.apply(Ext.grid.NumberColumn.prototype, { + format : '0,000.00' + }); +} + +if(Ext.grid.DateColumn){ + Ext.apply(Ext.grid.DateColumn.prototype, { + format : 'm/d/Y' + }); +} + +if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "መጠን ለመቀá‹áˆ ጎትት::", + collapsibleSplitTip : "መጠን ለመቀá‹áˆ ጎትት:: ለመደበቅ áˆáˆˆá‰´ ጠቅ አድáˆáŒ::" + }); +} + +if(Ext.form.TimeField){ + Ext.apply(Ext.form.TimeField.prototype, { + minText : "እዚህ መስአዉስጥ ያለዉ ሰዓት ከ{0} እኩሠወá‹áˆ በáŠáˆ‹ መሆን አለበት", + maxText : "እዚህ መስአዉስጥ ያለዉ ሰዓት ከ{0} እኩሠወá‹áˆ በáŠá‰µ መሆን አለበት", + invalidText : "{0} የተሳሳተ ሰዓት áŠá‹‰", + format : "g:i A", + altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H" + }); +} + +if(Ext.form.CheckboxGroup){ + Ext.apply(Ext.form.CheckboxGroup.prototype, { + blankText : "እዚህ ቡድን ዉስጥ ቢያንስ አንድ á‹“á‹áŠá‰µ መáˆáˆ¨áŒ¥ አለብህ" + }); +} + +if(Ext.form.RadioGroup){ + Ext.apply(Ext.form.RadioGroup.prototype, { + blankText : "እዚህ ቡድን ዉስጥ ቢያንስ አንድ á‹“á‹áŠá‰µ መáˆáˆ¨áŒ¥ አለብህ" + }); +} diff --git a/typo3/sysext/em/res/js/ux/css/GridFilters.css b/typo3/sysext/em/res/js/ux/css/GridFilters.css index a8234ac8ac0754e36b11a42fb715537448d215a7..2a5ced40b44f50aab959e3d51ad493e6abe0e75d 100644 --- a/typo3/sysext/em/res/js/ux/css/GridFilters.css +++ b/typo3/sysext/em/res/js/ux/css/GridFilters.css @@ -4,51 +4,51 @@ * licensing@extjs.com * http://www.extjs.com/license */ -/** - * GridFilters Styles - **/ -/* -.x-grid3-hd-row .ux-filtered-column { - border-left: 1px solid #C7E3B4; - border-right: 1px solid #C7E3B4; -} - -.x-grid3-hd-row .ux-filtered-column .x-grid3-hd-inner { - background-image: url(../images/header_bg.gif); -} - -.ux-filtered-column .x-grid3-hd-btn { - background-image: url(../images/hd-btn.gif); -} -*/ -.x-grid3-hd-row td.ux-filtered-column { - font-style: italic; - font-weight: bold; -} - -.ux-filtered-column.sort-asc .x-grid3-sort-icon { - background-image: url(../images/sort_filtered_asc.gif) !important; -} - -.ux-filtered-column.sort-desc .x-grid3-sort-icon { - background-image: url(../images/sort_filtered_desc.gif) !important; -} - -.ux-gridfilter-text-icon { - background-image: url(../images/find.png) !important; -} - -/* Temporary Patch for Bug ??? */ -.x-menu-list-item-indent .x-menu-item-icon { - position: relative; - top: 3px; - left: 3px; - margin-right: 10px; -} -li.x-menu-list-item-indent { - padding-left:0px; -} -li.x-menu-list-item div { - display: inline; -} - +/** + * GridFilters Styles + **/ +/* +.x-grid3-hd-row .ux-filtered-column { + border-left: 1px solid #C7E3B4; + border-right: 1px solid #C7E3B4; +} + +.x-grid3-hd-row .ux-filtered-column .x-grid3-hd-inner { + background-image: url(../images/header_bg.gif); +} + +.ux-filtered-column .x-grid3-hd-btn { + background-image: url(../images/hd-btn.gif); +} +*/ +.x-grid3-hd-row td.ux-filtered-column { + font-style: italic; + font-weight: bold; +} + +.ux-filtered-column.sort-asc .x-grid3-sort-icon { + background-image: url(../images/sort_filtered_asc.gif) !important; +} + +.ux-filtered-column.sort-desc .x-grid3-sort-icon { + background-image: url(../images/sort_filtered_desc.gif) !important; +} + +.ux-gridfilter-text-icon { + background-image: url(../images/find.png) !important; +} + +/* Temporary Patch for Bug ??? */ +.x-menu-list-item-indent .x-menu-item-icon { + position: relative; + top: 3px; + left: 3px; + margin-right: 10px; +} +li.x-menu-list-item-indent { + padding-left:0px; +} +li.x-menu-list-item div { + display: inline; +} + diff --git a/typo3/sysext/em/res/js/ux/css/RangeMenu.css b/typo3/sysext/em/res/js/ux/css/RangeMenu.css index 99281355a7f7f1521f92353be05fbebbede9cd0e..c8571363b1e81d2c6574e2ada57f67501eab7dd1 100644 --- a/typo3/sysext/em/res/js/ux/css/RangeMenu.css +++ b/typo3/sysext/em/res/js/ux/css/RangeMenu.css @@ -4,17 +4,17 @@ * licensing@extjs.com * http://www.extjs.com/license */ -/** - * RangeMenu Styles - **/ -.ux-rangemenu-gt { - background-image: url(../images/greater_than.png) !important; -} - -.ux-rangemenu-lt { - background-image: url(../images/less_than.png) !important; -} - -.ux-rangemenu-eq { - background-image: url(../images/equals.png) !important; -} +/** + * RangeMenu Styles + **/ +.ux-rangemenu-gt { + background-image: url(../images/greater_than.png) !important; +} + +.ux-rangemenu-lt { + background-image: url(../images/less_than.png) !important; +} + +.ux-rangemenu-eq { + background-image: url(../images/equals.png) !important; +} diff --git a/typo3/sysext/em/res/js/ux/filter/BooleanFilter.js b/typo3/sysext/em/res/js/ux/filter/BooleanFilter.js index a3f11eb73a014921fc03fe11731368e0efd622cb..c437ffeb3b5000df02e41fd978b37ae4d66b3b30 100644 --- a/typo3/sysext/em/res/js/ux/filter/BooleanFilter.js +++ b/typo3/sysext/em/res/js/ux/filter/BooleanFilter.js @@ -4,100 +4,100 @@ * licensing@extjs.com * http://www.extjs.com/license */ -/** - * @class Ext.ux.grid.filter.BooleanFilter - * @extends Ext.ux.grid.filter.Filter - * Boolean filters use unique radio group IDs (so you can have more than one!) - * <p><b><u>Example Usage:</u></b></p> - * <pre><code> -var filters = new Ext.ux.grid.GridFilters({ - ... - filters: [{ - // required configs - type: 'boolean', - dataIndex: 'visible' - - // optional configs - defaultValue: null, // leave unselected (false selected by default) - yesText: 'Yes', // default - noText: 'No' // default - }] -}); - * </code></pre> - */ -Ext.ux.grid.filter.BooleanFilter = Ext.extend(Ext.ux.grid.filter.Filter, { - /** - * @cfg {Boolean} defaultValue - * Set this to null if you do not want either option to be checked by default. Defaults to false. - */ - defaultValue : false, - /** - * @cfg {String} yesText - * Defaults to 'Yes'. - */ - yesText : 'Yes', - /** - * @cfg {String} noText - * Defaults to 'No'. - */ - noText : 'No', - - /** - * @private - * Template method that is to initialize the filter and install required menu items. - */ - init : function (config) { - var gId = Ext.id(); - this.options = [ - new Ext.menu.CheckItem({text: this.yesText, group: gId, checked: this.defaultValue === true}), - new Ext.menu.CheckItem({text: this.noText, group: gId, checked: this.defaultValue === false})]; - - this.menu.add(this.options[0], this.options[1]); - - for(var i=0; i<this.options.length; i++){ - this.options[i].on('click', this.fireUpdate, this); - this.options[i].on('checkchange', this.fireUpdate, this); - } - }, - - /** - * @private - * Template method that is to get and return the value of the filter. - * @return {String} The value of this filter - */ - getValue : function () { - return this.options[0].checked; - }, - - /** - * @private - * Template method that is to set the value of the filter. - * @param {Object} value The value to set the filter - */ - setValue : function (value) { - this.options[value ? 0 : 1].setChecked(true); - }, - - /** - * @private - * Template method that is to get and return serialized filter data for - * transmission to the server. - * @return {Object/Array} An object or collection of objects containing - * key value pairs representing the current configuration of the filter. - */ - getSerialArgs : function () { - var args = {type: 'boolean', value: this.getValue()}; - return args; - }, - - /** - * Template method that is to validate the provided Ext.data.Record - * against the filters configuration. - * @param {Ext.data.Record} record The record to validate - * @return {Boolean} true if the record is valid within the bounds - * of the filter, false otherwise. - */ - validateRecord : function (record) { - return record.get(this.dataIndex) == this.getValue(); - } +/** + * @class Ext.ux.grid.filter.BooleanFilter + * @extends Ext.ux.grid.filter.Filter + * Boolean filters use unique radio group IDs (so you can have more than one!) + * <p><b><u>Example Usage:</u></b></p> + * <pre><code> +var filters = new Ext.ux.grid.GridFilters({ + ... + filters: [{ + // required configs + type: 'boolean', + dataIndex: 'visible' + + // optional configs + defaultValue: null, // leave unselected (false selected by default) + yesText: 'Yes', // default + noText: 'No' // default + }] +}); + * </code></pre> + */ +Ext.ux.grid.filter.BooleanFilter = Ext.extend(Ext.ux.grid.filter.Filter, { + /** + * @cfg {Boolean} defaultValue + * Set this to null if you do not want either option to be checked by default. Defaults to false. + */ + defaultValue : false, + /** + * @cfg {String} yesText + * Defaults to 'Yes'. + */ + yesText : 'Yes', + /** + * @cfg {String} noText + * Defaults to 'No'. + */ + noText : 'No', + + /** + * @private + * Template method that is to initialize the filter and install required menu items. + */ + init : function (config) { + var gId = Ext.id(); + this.options = [ + new Ext.menu.CheckItem({text: this.yesText, group: gId, checked: this.defaultValue === true}), + new Ext.menu.CheckItem({text: this.noText, group: gId, checked: this.defaultValue === false})]; + + this.menu.add(this.options[0], this.options[1]); + + for(var i=0; i<this.options.length; i++){ + this.options[i].on('click', this.fireUpdate, this); + this.options[i].on('checkchange', this.fireUpdate, this); + } + }, + + /** + * @private + * Template method that is to get and return the value of the filter. + * @return {String} The value of this filter + */ + getValue : function () { + return this.options[0].checked; + }, + + /** + * @private + * Template method that is to set the value of the filter. + * @param {Object} value The value to set the filter + */ + setValue : function (value) { + this.options[value ? 0 : 1].setChecked(true); + }, + + /** + * @private + * Template method that is to get and return serialized filter data for + * transmission to the server. + * @return {Object/Array} An object or collection of objects containing + * key value pairs representing the current configuration of the filter. + */ + getSerialArgs : function () { + var args = {type: 'boolean', value: this.getValue()}; + return args; + }, + + /** + * Template method that is to validate the provided Ext.data.Record + * against the filters configuration. + * @param {Ext.data.Record} record The record to validate + * @return {Boolean} true if the record is valid within the bounds + * of the filter, false otherwise. + */ + validateRecord : function (record) { + return record.get(this.dataIndex) == this.getValue(); + } }); \ No newline at end of file diff --git a/typo3/sysext/em/res/js/ux/filter/DateFilter.js b/typo3/sysext/em/res/js/ux/filter/DateFilter.js index 96d4eb938fa690d7de73bbd8376c3fd447a49181..272dc6adef58570e0d0baf7e426615a761087eee 100644 --- a/typo3/sysext/em/res/js/ux/filter/DateFilter.js +++ b/typo3/sysext/em/res/js/ux/filter/DateFilter.js @@ -4,310 +4,310 @@ * licensing@extjs.com * http://www.extjs.com/license */ -/** - * @class Ext.ux.grid.filter.DateFilter - * @extends Ext.ux.grid.filter.Filter - * Filter by a configurable Ext.menu.DateMenu - * <p><b><u>Example Usage:</u></b></p> - * <pre><code> -var filters = new Ext.ux.grid.GridFilters({ - ... - filters: [{ - // required configs - type: 'date', - dataIndex: 'dateAdded', - - // optional configs - dateFormat: 'm/d/Y', // default - beforeText: 'Before', // default - afterText: 'After', // default - onText: 'On', // default - pickerOpts: { - // any DateMenu configs - }, - - active: true // default is false - }] -}); - * </code></pre> - */ -Ext.ux.grid.filter.DateFilter = Ext.extend(Ext.ux.grid.filter.Filter, { - /** - * @cfg {String} afterText - * Defaults to 'After'. - */ - afterText : 'After', - /** - * @cfg {String} beforeText - * Defaults to 'Before'. - */ - beforeText : 'Before', - /** - * @cfg {Object} compareMap - * Map for assigning the comparison values used in serialization. - */ - compareMap : { - before: 'lt', - after: 'gt', - on: 'eq' - }, - /** - * @cfg {String} dateFormat - * The date format to return when using getValue. - * Defaults to 'm/d/Y'. - */ - dateFormat : 'm/d/Y', - - /** - * @cfg {Date} maxDate - * Allowable date as passed to the Ext.DatePicker - * Defaults to undefined. - */ - /** - * @cfg {Date} minDate - * Allowable date as passed to the Ext.DatePicker - * Defaults to undefined. - */ - /** - * @cfg {Array} menuItems - * The items to be shown in this menu - * Defaults to:<pre> - * menuItems : ['before', 'after', '-', 'on'], - * </pre> - */ - menuItems : ['before', 'after', '-', 'on'], - - /** - * @cfg {Object} menuItemCfgs - * Default configuration options for each menu item - */ - menuItemCfgs : { - selectOnFocus: true, - width: 125 - }, - - /** - * @cfg {String} onText - * Defaults to 'On'. - */ - onText : 'On', - - /** - * @cfg {Object} pickerOpts - * Configuration options for the date picker associated with each field. - */ - pickerOpts : {}, - - /** - * @private - * Template method that is to initialize the filter and install required menu items. - */ - init : function (config) { - var menuCfg, i, len, item, cfg, Cls; - - menuCfg = Ext.apply(this.pickerOpts, { - minDate: this.minDate, - maxDate: this.maxDate, - format: this.dateFormat, - listeners: { - scope: this, - select: this.onMenuSelect - } - }); - - this.fields = {}; - for (i = 0, len = this.menuItems.length; i < len; i++) { - item = this.menuItems[i]; - if (item !== '-') { - cfg = { - itemId: 'range-' + item, - text: this[item + 'Text'], - menu: new Ext.menu.DateMenu( - Ext.apply(menuCfg, { - itemId: item - }) - ), - listeners: { - scope: this, - checkchange: this.onCheckChange - } - }; - Cls = Ext.menu.CheckItem; - item = this.fields[item] = new Cls(cfg); - } - //this.add(item); - this.menu.add(item); - } - }, - - onCheckChange : function () { - this.setActive(this.isActivatable()); - this.fireEvent('update', this); - }, - - /** - * @private - * Handler method called when there is a keyup event on an input - * item of this menu. - */ - onInputKeyUp : function (field, e) { - var k = e.getKey(); - if (k == e.RETURN && field.isValid()) { - e.stopEvent(); - this.menu.hide(true); - return; - } - }, - - /** - * Handler for when the menu for a field fires the 'select' event - * @param {Object} date - * @param {Object} menuItem - * @param {Object} value - * @param {Object} picker - */ - onMenuSelect : function (menuItem, value, picker) { - var fields = this.fields, - field = this.fields[menuItem.itemId]; - - field.setChecked(true); - - if (field == fields.on) { - fields.before.setChecked(false, true); - fields.after.setChecked(false, true); - } else { - fields.on.setChecked(false, true); - if (field == fields.after && fields.before.menu.picker.value < value) { - fields.before.setChecked(false, true); - } else if (field == fields.before && fields.after.menu.picker.value > value) { - fields.after.setChecked(false, true); - } - } - this.fireEvent('update', this); - }, - - /** - * @private - * Template method that is to get and return the value of the filter. - * @return {String} The value of this filter - */ - getValue : function () { - var key, result = {}; - for (key in this.fields) { - if (this.fields[key].checked) { - result[key] = this.fields[key].menu.picker.getValue(); - } - } - return result; - }, - - /** - * @private - * Template method that is to set the value of the filter. - * @param {Object} value The value to set the filter - * @param {Boolean} preserve true to preserve the checked status - * of the other fields. Defaults to false, unchecking the - * other fields - */ - setValue : function (value, preserve) { - var key; - for (key in this.fields) { - if(value[key]){ - this.fields[key].menu.picker.setValue(value[key]); - this.fields[key].setChecked(true); - } else if (!preserve) { - this.fields[key].setChecked(false); - } - } - this.fireEvent('update', this); - }, - - /** - * @private - * Template method that is to return <tt>true</tt> if the filter - * has enough configuration information to be activated. - * @return {Boolean} - */ - isActivatable : function () { - var key; - for (key in this.fields) { - if (this.fields[key].checked) { - return true; - } - } - return false; - }, - - /** - * @private - * Template method that is to get and return serialized filter data for - * transmission to the server. - * @return {Object/Array} An object or collection of objects containing - * key value pairs representing the current configuration of the filter. - */ - getSerialArgs : function () { - var args = []; - for (var key in this.fields) { - if(this.fields[key].checked){ - args.push({ - type: 'date', - comparison: this.compareMap[key], - value: this.getFieldValue(key).format(this.dateFormat) - }); - } - } - return args; - }, - - /** - * Get and return the date menu picker value - * @param {String} item The field identifier ('before', 'after', 'on') - * @return {Date} Gets the current selected value of the date field - */ - getFieldValue : function(item){ - return this.fields[item].menu.picker.getValue(); - }, - - /** - * Gets the menu picker associated with the passed field - * @param {String} item The field identifier ('before', 'after', 'on') - * @return {Object} The menu picker - */ - getPicker : function(item){ - return this.fields[item].menu.picker; - }, - - /** - * Template method that is to validate the provided Ext.data.Record - * against the filters configuration. - * @param {Ext.data.Record} record The record to validate - * @return {Boolean} true if the record is valid within the bounds - * of the filter, false otherwise. - */ - validateRecord : function (record) { - var key, - pickerValue, - val = record.get(this.dataIndex); - - if(!Ext.isDate(val)){ - return false; - } - val = val.clearTime(true).getTime(); - - for (key in this.fields) { - if (this.fields[key].checked) { - pickerValue = this.getFieldValue(key).clearTime(true).getTime(); - if (key == 'before' && pickerValue <= val) { - return false; - } - if (key == 'after' && pickerValue >= val) { - return false; - } - if (key == 'on' && pickerValue != val) { - return false; - } - } - } - return true; - } +/** + * @class Ext.ux.grid.filter.DateFilter + * @extends Ext.ux.grid.filter.Filter + * Filter by a configurable Ext.menu.DateMenu + * <p><b><u>Example Usage:</u></b></p> + * <pre><code> +var filters = new Ext.ux.grid.GridFilters({ + ... + filters: [{ + // required configs + type: 'date', + dataIndex: 'dateAdded', + + // optional configs + dateFormat: 'm/d/Y', // default + beforeText: 'Before', // default + afterText: 'After', // default + onText: 'On', // default + pickerOpts: { + // any DateMenu configs + }, + + active: true // default is false + }] +}); + * </code></pre> + */ +Ext.ux.grid.filter.DateFilter = Ext.extend(Ext.ux.grid.filter.Filter, { + /** + * @cfg {String} afterText + * Defaults to 'After'. + */ + afterText : 'After', + /** + * @cfg {String} beforeText + * Defaults to 'Before'. + */ + beforeText : 'Before', + /** + * @cfg {Object} compareMap + * Map for assigning the comparison values used in serialization. + */ + compareMap : { + before: 'lt', + after: 'gt', + on: 'eq' + }, + /** + * @cfg {String} dateFormat + * The date format to return when using getValue. + * Defaults to 'm/d/Y'. + */ + dateFormat : 'm/d/Y', + + /** + * @cfg {Date} maxDate + * Allowable date as passed to the Ext.DatePicker + * Defaults to undefined. + */ + /** + * @cfg {Date} minDate + * Allowable date as passed to the Ext.DatePicker + * Defaults to undefined. + */ + /** + * @cfg {Array} menuItems + * The items to be shown in this menu + * Defaults to:<pre> + * menuItems : ['before', 'after', '-', 'on'], + * </pre> + */ + menuItems : ['before', 'after', '-', 'on'], + + /** + * @cfg {Object} menuItemCfgs + * Default configuration options for each menu item + */ + menuItemCfgs : { + selectOnFocus: true, + width: 125 + }, + + /** + * @cfg {String} onText + * Defaults to 'On'. + */ + onText : 'On', + + /** + * @cfg {Object} pickerOpts + * Configuration options for the date picker associated with each field. + */ + pickerOpts : {}, + + /** + * @private + * Template method that is to initialize the filter and install required menu items. + */ + init : function (config) { + var menuCfg, i, len, item, cfg, Cls; + + menuCfg = Ext.apply(this.pickerOpts, { + minDate: this.minDate, + maxDate: this.maxDate, + format: this.dateFormat, + listeners: { + scope: this, + select: this.onMenuSelect + } + }); + + this.fields = {}; + for (i = 0, len = this.menuItems.length; i < len; i++) { + item = this.menuItems[i]; + if (item !== '-') { + cfg = { + itemId: 'range-' + item, + text: this[item + 'Text'], + menu: new Ext.menu.DateMenu( + Ext.apply(menuCfg, { + itemId: item + }) + ), + listeners: { + scope: this, + checkchange: this.onCheckChange + } + }; + Cls = Ext.menu.CheckItem; + item = this.fields[item] = new Cls(cfg); + } + //this.add(item); + this.menu.add(item); + } + }, + + onCheckChange : function () { + this.setActive(this.isActivatable()); + this.fireEvent('update', this); + }, + + /** + * @private + * Handler method called when there is a keyup event on an input + * item of this menu. + */ + onInputKeyUp : function (field, e) { + var k = e.getKey(); + if (k == e.RETURN && field.isValid()) { + e.stopEvent(); + this.menu.hide(true); + return; + } + }, + + /** + * Handler for when the menu for a field fires the 'select' event + * @param {Object} date + * @param {Object} menuItem + * @param {Object} value + * @param {Object} picker + */ + onMenuSelect : function (menuItem, value, picker) { + var fields = this.fields, + field = this.fields[menuItem.itemId]; + + field.setChecked(true); + + if (field == fields.on) { + fields.before.setChecked(false, true); + fields.after.setChecked(false, true); + } else { + fields.on.setChecked(false, true); + if (field == fields.after && fields.before.menu.picker.value < value) { + fields.before.setChecked(false, true); + } else if (field == fields.before && fields.after.menu.picker.value > value) { + fields.after.setChecked(false, true); + } + } + this.fireEvent('update', this); + }, + + /** + * @private + * Template method that is to get and return the value of the filter. + * @return {String} The value of this filter + */ + getValue : function () { + var key, result = {}; + for (key in this.fields) { + if (this.fields[key].checked) { + result[key] = this.fields[key].menu.picker.getValue(); + } + } + return result; + }, + + /** + * @private + * Template method that is to set the value of the filter. + * @param {Object} value The value to set the filter + * @param {Boolean} preserve true to preserve the checked status + * of the other fields. Defaults to false, unchecking the + * other fields + */ + setValue : function (value, preserve) { + var key; + for (key in this.fields) { + if(value[key]){ + this.fields[key].menu.picker.setValue(value[key]); + this.fields[key].setChecked(true); + } else if (!preserve) { + this.fields[key].setChecked(false); + } + } + this.fireEvent('update', this); + }, + + /** + * @private + * Template method that is to return <tt>true</tt> if the filter + * has enough configuration information to be activated. + * @return {Boolean} + */ + isActivatable : function () { + var key; + for (key in this.fields) { + if (this.fields[key].checked) { + return true; + } + } + return false; + }, + + /** + * @private + * Template method that is to get and return serialized filter data for + * transmission to the server. + * @return {Object/Array} An object or collection of objects containing + * key value pairs representing the current configuration of the filter. + */ + getSerialArgs : function () { + var args = []; + for (var key in this.fields) { + if(this.fields[key].checked){ + args.push({ + type: 'date', + comparison: this.compareMap[key], + value: this.getFieldValue(key).format(this.dateFormat) + }); + } + } + return args; + }, + + /** + * Get and return the date menu picker value + * @param {String} item The field identifier ('before', 'after', 'on') + * @return {Date} Gets the current selected value of the date field + */ + getFieldValue : function(item){ + return this.fields[item].menu.picker.getValue(); + }, + + /** + * Gets the menu picker associated with the passed field + * @param {String} item The field identifier ('before', 'after', 'on') + * @return {Object} The menu picker + */ + getPicker : function(item){ + return this.fields[item].menu.picker; + }, + + /** + * Template method that is to validate the provided Ext.data.Record + * against the filters configuration. + * @param {Ext.data.Record} record The record to validate + * @return {Boolean} true if the record is valid within the bounds + * of the filter, false otherwise. + */ + validateRecord : function (record) { + var key, + pickerValue, + val = record.get(this.dataIndex); + + if(!Ext.isDate(val)){ + return false; + } + val = val.clearTime(true).getTime(); + + for (key in this.fields) { + if (this.fields[key].checked) { + pickerValue = this.getFieldValue(key).clearTime(true).getTime(); + if (key == 'before' && pickerValue <= val) { + return false; + } + if (key == 'after' && pickerValue >= val) { + return false; + } + if (key == 'on' && pickerValue != val) { + return false; + } + } + } + return true; + } }); \ No newline at end of file