From 192b76b0adf0e80cbcbb309af050ec1f49a5944a Mon Sep 17 00:00:00 2001 From: Cerdic <cedric@yterium.com> Date: Fri, 28 Jan 2011 18:03:33 +0000 Subject: [PATCH] integration du composant dateur et du composant selecteur article/rubrique pour les formulaires --- .gitattributes | 33 +- prive/box.css | 1 + prive/formulaires/dateur/datePicker.css | 34 + prive/formulaires/dateur/dates.js | 467 ++++ prive/formulaires/dateur/inc-dateur.html | 32 + prive/formulaires/dateur/jquery.datePicker.js | 1061 ++++++++ prive/formulaires/dateur/jquery.timePicker.js | 209 ++ prive/formulaires/dateur/timePicker.css | 26 + prive/formulaires/selecteur/articles.html | 36 + .../selecteur/articles_fonctions.php | 3 + .../selecteur/inc-nav-articles.html | 18 + .../selecteur/inc-nav-rubriques.html | 19 + .../selecteur/inc-sel-articles.html | 11 + .../selecteur/inc-sel-rubriques.html | 8 + .../selecteur/jquery-ui-1.6.custom.js | 2255 +++++++++++++++++ prive/formulaires/selecteur/jquery.picker.js | 84 + prive/formulaires/selecteur/navigateur.html | 24 + prive/formulaires/selecteur/picker-ajax.html | 34 + prive/formulaires/selecteur/picker.css | 13 + prive/formulaires/selecteur/rubriques.html | 24 + .../selecteur/selecteur_fonctions.php | 46 + prive/images/chemin-fond-left.gif | Bin 4121 -> 0 bytes prive/images/chemin-fond-right.gif | Bin 4118 -> 0 bytes prive/images/label-fond-compact-left.gif | Bin 453 -> 0 bytes prive/images/label-fond-compact-right.gif | Bin 452 -> 0 bytes prive/images/label-fond-gauche-left.gif | Bin 4115 -> 0 bytes prive/images/label-fond-gauche-right.gif | Bin 4115 -> 0 bytes prive/images/label-fond-haut-left.gif | Bin 3452 -> 0 bytes prive/images/label-fond-haut-right.gif | Bin 3452 -> 0 bytes prive/images/tourner-180.gif | Bin 104 -> 0 bytes prive/images/tourner-droite.gif | Bin 99 -> 0 bytes prive/images/tourner-gauche.gif | Bin 97 -> 0 bytes prive/javascript/ajaxCallback.js | 13 + prive/style_prive.html | 5 + prive/themes/spip/images/article-12.png | Bin 0 -> 619 bytes prive/themes/spip/images/fleche-droite-16.png | Bin 0 -> 480 bytes prive/themes/spip/style_prive_picker.html | 80 + 37 files changed, 4525 insertions(+), 11 deletions(-) create mode 100644 prive/formulaires/dateur/datePicker.css create mode 100644 prive/formulaires/dateur/dates.js create mode 100644 prive/formulaires/dateur/inc-dateur.html create mode 100644 prive/formulaires/dateur/jquery.datePicker.js create mode 100644 prive/formulaires/dateur/jquery.timePicker.js create mode 100644 prive/formulaires/dateur/timePicker.css create mode 100644 prive/formulaires/selecteur/articles.html create mode 100644 prive/formulaires/selecteur/articles_fonctions.php create mode 100644 prive/formulaires/selecteur/inc-nav-articles.html create mode 100644 prive/formulaires/selecteur/inc-nav-rubriques.html create mode 100644 prive/formulaires/selecteur/inc-sel-articles.html create mode 100644 prive/formulaires/selecteur/inc-sel-rubriques.html create mode 100644 prive/formulaires/selecteur/jquery-ui-1.6.custom.js create mode 100644 prive/formulaires/selecteur/jquery.picker.js create mode 100644 prive/formulaires/selecteur/navigateur.html create mode 100644 prive/formulaires/selecteur/picker-ajax.html create mode 100644 prive/formulaires/selecteur/picker.css create mode 100644 prive/formulaires/selecteur/rubriques.html create mode 100644 prive/formulaires/selecteur/selecteur_fonctions.php delete mode 100644 prive/images/chemin-fond-left.gif delete mode 100644 prive/images/chemin-fond-right.gif delete mode 100644 prive/images/label-fond-compact-left.gif delete mode 100644 prive/images/label-fond-compact-right.gif delete mode 100644 prive/images/label-fond-gauche-left.gif delete mode 100644 prive/images/label-fond-gauche-right.gif delete mode 100644 prive/images/label-fond-haut-left.gif delete mode 100644 prive/images/label-fond-haut-right.gif delete mode 100644 prive/images/tourner-180.gif delete mode 100644 prive/images/tourner-droite.gif delete mode 100644 prive/images/tourner-gauche.gif create mode 100644 prive/themes/spip/images/article-12.png create mode 100644 prive/themes/spip/images/fleche-droite-16.png create mode 100644 prive/themes/spip/style_prive_picker.html diff --git a/.gitattributes b/.gitattributes index 9f60ae078e..a57f5a70a8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -343,6 +343,12 @@ prive/formulaires/configurer_visiteurs.html -text prive/formulaires/configurer_visiteurs.php -text prive/formulaires/dater.html -text prive/formulaires/dater.php -text +prive/formulaires/dateur/datePicker.css -text +prive/formulaires/dateur/dates.js -text +prive/formulaires/dateur/inc-dateur.html -text +prive/formulaires/dateur/jquery.datePicker.js -text +prive/formulaires/dateur/jquery.timePicker.js -text +prive/formulaires/dateur/timePicker.css -text prive/formulaires/editer_article.html -text prive/formulaires/editer_article.php -text prive/formulaires/editer_auteur.html -text @@ -359,6 +365,19 @@ prive/formulaires/recherche_ecrire.html -text prive/formulaires/recherche_ecrire.php -text prive/formulaires/rediriger_article.html -text prive/formulaires/rediriger_article.php -text +prive/formulaires/selecteur/articles.html -text +prive/formulaires/selecteur/articles_fonctions.php -text +prive/formulaires/selecteur/inc-nav-articles.html -text +prive/formulaires/selecteur/inc-nav-rubriques.html -text +prive/formulaires/selecteur/inc-sel-articles.html -text +prive/formulaires/selecteur/inc-sel-rubriques.html -text +prive/formulaires/selecteur/jquery-ui-1.6.custom.js -text +prive/formulaires/selecteur/jquery.picker.js -text +prive/formulaires/selecteur/navigateur.html -text +prive/formulaires/selecteur/picker-ajax.html -text +prive/formulaires/selecteur/picker.css -text +prive/formulaires/selecteur/rubriques.html -text +prive/formulaires/selecteur/selecteur_fonctions.php -text prive/formulaires/selecteur_groupe_mot.html -text prive/formulaires/selecteur_groupe_mot_fonctions.php -text prive/ical_prive.html -text @@ -398,8 +417,6 @@ prive/images/cal-suivi.png -text prive/images/cal-today.gif -text prive/images/calendrier-24.gif -text prive/images/cfg-16.png -text -prive/images/chemin-fond-left.gif -text -prive/images/chemin-fond-right.gif -text prive/images/choix-layout.gif -text prive/images/choix-layout_rtl.gif -text prive/images/choix-layout_rtl_he.gif -text @@ -465,12 +482,6 @@ prive/images/jauge-jaune.gif -text prive/images/jauge-rouge.gif -text prive/images/jauge-test-gd.gif -text prive/images/jauge-vert.gif -text -prive/images/label-fond-compact-left.gif -text -prive/images/label-fond-compact-right.gif -text -prive/images/label-fond-gauche-left.gif -text -prive/images/label-fond-gauche-right.gif -text -prive/images/label-fond-haut-left.gif -text -prive/images/label-fond-haut-right.gif -text prive/images/langues-12.gif -text prive/images/langues-24.gif -text prive/images/langues-modif-12.gif -text @@ -574,9 +585,6 @@ prive/images/test.jpg -text prive/images/test.png -text prive/images/test_image.jpg -text prive/images/tirets-separation.gif -text -prive/images/tourner-180.gif -text -prive/images/tourner-droite.gif -text -prive/images/tourner-gauche.gif -text prive/images/tout-site-24.gif -text prive/images/tout-site.png -text prive/images/traductions-24.gif -text @@ -714,6 +722,7 @@ prive/themes/spip/images/aide-rtl-12.png -text prive/themes/spip/images/aide-rtl-16.png -text prive/themes/spip/images/ajouter-12.png -text prive/themes/spip/images/ajouter-16.png -text +prive/themes/spip/images/article-12.png -text prive/themes/spip/images/article-16.png -text prive/themes/spip/images/article-24.png -text prive/themes/spip/images/article-add-16.png -text @@ -791,6 +800,7 @@ prive/themes/spip/images/edit-16.png -text prive/themes/spip/images/edit-24.png -text prive/themes/spip/images/edition-48.png -text prive/themes/spip/images/erreur-24.png -text +prive/themes/spip/images/fleche-droite-16.png -text prive/themes/spip/images/identite-16.png -text prive/themes/spip/images/identite-24.png -text prive/themes/spip/images/image-16.png -text @@ -884,6 +894,7 @@ prive/themes/spip/images/warning-48.png -text prive/themes/spip/images/xml-16.png -text prive/themes/spip/images/xml-24.png -text prive/themes/spip/style_prive_bling.html -text +prive/themes/spip/style_prive_picker.html -text prive/themes/spip/style_prive_theme.html -text prive/transmettre.html -text prive/transmettre/forum_article.html -text diff --git a/prive/box.css b/prive/box.css index 9693a6ee51..c68fbfdb8a 100644 --- a/prive/box.css +++ b/prive/box.css @@ -7,6 +7,7 @@ version: 0.2 /* box */ .box{margin:20px 0 0;} .bd,.ft{padding:0 10px;overflow:hidden;_overflow:visible; _zoom:1;} +.bd {padding:10px;} .hd {padding:5px 10px;} .box .inner{position:relative;} .box b{display:block;background-repeat:no-repeat;font-size:1%;position:relative;z-index:10;} diff --git a/prive/formulaires/dateur/datePicker.css b/prive/formulaires/dateur/datePicker.css new file mode 100644 index 0000000000..c64ebd9c57 --- /dev/null +++ b/prive/formulaires/dateur/datePicker.css @@ -0,0 +1,34 @@ +table.jCalendar { background: #c0cad4; border-collapse: separate; border-spacing: 2px; } +table.jCalendar th { background: #c0cad4; color: #333; font-weight: bold; padding: 3px 5px; text-transform: uppercase; } +table.jCalendar td { background: #fff; color: #000; padding: 3px 5px; text-align: center; } +table.jCalendar td.other-month { color: #aaa; } +table.jCalendar td.today { background: #666; color: #fff; } +table.jCalendar td.selected { background: #f66; color: #fff; } +table.jCalendar td.selected:hover { background: #f33; color: #fff; } +table.jCalendar td:hover, +table.jCalendar td.dp-hover { background: #eee; color: #000; } +table.jCalendar td.disabled, +table.jCalendar td.disabled:hover { background: #e0e5ea; color: #888; } + +/* For the popup */ + +/* NOTE - you will probably want to style a.dp-choose-date - see how I did it in demo.css */ + +div.dp-popup { position: relative; background: #e0e5ea; border: 1px solid #85909a; font-size: 10px; font-family: arial, sans-serif; padding: 2px; line-height: 1.2em; } +div#dp-popup { position: absolute; z-index: 99999; } +div.dp-popup h2 { font-size: 12px; text-align: center; margin: 2px 0; padding: 0; color: #555; } +a#dp-close { font-size: 11px; padding: 4px 0; text-align: center; display: block; } +a#dp-close:hover { text-decoration: underline; } +div.dp-popup a { color: #000; text-decoration: none; padding: 3px 2px 0; } +div.dp-popup div.dp-nav-prev { position: absolute; top: 2px; left: 4px; width: 100px; } +div.dp-popup div.dp-nav-prev a { float: left; } +/* Opera needs the rules to be this specific otherwise it doesn't change the cursor back to pointer after you have disabled and re-enabled a link */ +div.dp-popup div.dp-nav-prev a, +div.dp-popup div.dp-nav-next a { cursor: pointer; } +div.dp-popup div.dp-nav-prev a.disabled, +div.dp-popup div.dp-nav-next a.disabled { cursor: default; } +div.dp-popup div.dp-nav-next { position: absolute; top: 2px; right: 4px; width: 100px; } +div.dp-popup div.dp-nav-next a { float: right; } +div.dp-popup a.disabled { cursor: default; color: #aaa; } +div.dp-popup td { cursor: pointer; } +div.dp-popup td.disabled { cursor: default; } \ No newline at end of file diff --git a/prive/formulaires/dateur/dates.js b/prive/formulaires/dateur/dates.js new file mode 100644 index 0000000000..d35de84505 --- /dev/null +++ b/prive/formulaires/dateur/dates.js @@ -0,0 +1,467 @@ +/* + * Date prototype extensions. Doesn't depend on any + * other code. Doens't overwrite existing methods. + * + * Adds dayNames, abbrDayNames, monthNames and abbrMonthNames static properties and isLeapYear, + * isWeekend, isWeekDay, getDaysInMonth, getDayName, getMonthName, getDayOfYear, getWeekOfYear, + * setDayOfYear, addYears, addMonths, addDays, addHours, addMinutes, addSeconds methods + * + * Copyright (c) 2006 J̦rn Zaefferer and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) + * + * Additional methods and properties added by Kelvin Luck: firstDayOfWeek, dateFormat, zeroTime, asString, fromString - + * I've added my name to these methods so you know who to blame if they are broken! + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ + +/** + * An Array of day names starting with Sunday. + * + * @example dayNames[0] + * @result 'Sunday' + * + * @name dayNames + * @type Array + * @cat Plugins/Methods/Date + */ +Date.dayNames = ['', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; + +/** + * An Array of abbreviated day names starting with Sun. + * + * @example abbrDayNames[0] + * @result 'Sun' + * + * @name abbrDayNames + * @type Array + * @cat Plugins/Methods/Date + */ +Date.abbrDayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + +/** + * An Array of month names starting with Janurary. + * + * @example monthNames[0] + * @result 'January' + * + * @name monthNames + * @type Array + * @cat Plugins/Methods/Date + */ +Date.monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; + +/** + * An Array of abbreviated month names starting with Jan. + * + * @example abbrMonthNames[0] + * @result 'Jan' + * + * @name monthNames + * @type Array + * @cat Plugins/Methods/Date + */ +Date.abbrMonthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + +/** + * The first day of the week for this locale. + * + * @name firstDayOfWeek + * @type Number + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ +Date.firstDayOfWeek = 1; + +/** + * The format that string dates should be represented as (e.g. 'dd/mm/yyyy' for UK, 'mm/dd/yyyy' for US, 'yyyy-mm-dd' for Unicode etc). + * + * @name format + * @type String + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ +Date.format = 'dd/mm/yyyy'; +//Date.format = 'mm/dd/yyyy'; +//Date.format = 'yyyy-mm-dd'; +//Date.format = 'dd mmm yy'; + +/** + * The first two numbers in the century to be used when decoding a two digit year. Since a two digit year is ambiguous (and date.setYear + * only works with numbers < 99 and so doesn't allow you to set years after 2000) we need to use this to disambiguate the two digit year codes. + * + * @name format + * @type String + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ +Date.fullYearStart = '20'; + +(function() { + + /** + * Adds a given method under the given name + * to the Date prototype if it doesn't + * currently exist. + * + * @private + */ + function add(name, method) { + if( !Date.prototype[name] ) { + Date.prototype[name] = method; + } + }; + + /** + * Checks if the year is a leap year. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.isLeapYear(); + * @result true + * + * @name isLeapYear + * @type Boolean + * @cat Plugins/Methods/Date + */ + add("isLeapYear", function() { + var y = this.getFullYear(); + return (y%4==0 && y%100!=0) || y%400==0; + }); + + /** + * Checks if the day is a weekend day (Sat or Sun). + * + * @example var dtm = new Date("01/12/2008"); + * dtm.isWeekend(); + * @result false + * + * @name isWeekend + * @type Boolean + * @cat Plugins/Methods/Date + */ + add("isWeekend", function() { + return this.getDay()==0 || this.getDay()==6; + }); + + /** + * Check if the day is a day of the week (Mon-Fri) + * + * @example var dtm = new Date("01/12/2008"); + * dtm.isWeekDay(); + * @result false + * + * @name isWeekDay + * @type Boolean + * @cat Plugins/Methods/Date + */ + add("isWeekDay", function() { + return !this.isWeekend(); + }); + + /** + * Gets the number of days in the month. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getDaysInMonth(); + * @result 31 + * + * @name getDaysInMonth + * @type Number + * @cat Plugins/Methods/Date + */ + add("getDaysInMonth", function() { + return [31,(this.isLeapYear() ? 29:28),31,30,31,30,31,31,30,31,30,31][this.getMonth()]; + }); + + /** + * Gets the name of the day. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getDayName(); + * @result 'Saturday' + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getDayName(true); + * @result 'Sat' + * + * @param abbreviated Boolean When set to true the name will be abbreviated. + * @name getDayName + * @type String + * @cat Plugins/Methods/Date + */ + add("getDayName", function(abbreviated) { + return abbreviated ? Date.abbrDayNames[this.getDay()] : Date.dayNames[this.getDay()]; + }); + + /** + * Gets the name of the month. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getMonthName(); + * @result 'Janurary' + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getMonthName(true); + * @result 'Jan' + * + * @param abbreviated Boolean When set to true the name will be abbreviated. + * @name getDayName + * @type String + * @cat Plugins/Methods/Date + */ + add("getMonthName", function(abbreviated) { + return abbreviated ? Date.abbrMonthNames[this.getMonth()] : Date.monthNames[this.getMonth()]; + }); + + /** + * Get the number of the day of the year. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getDayOfYear(); + * @result 11 + * + * @name getDayOfYear + * @type Number + * @cat Plugins/Methods/Date + */ + add("getDayOfYear", function() { + var tmpdtm = new Date("1/1/" + this.getFullYear()); + return Math.floor((this.getTime() - tmpdtm.getTime()) / 86400000); + }); + + /** + * Get the number of the week of the year. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getWeekOfYear(); + * @result 2 + * + * @name getWeekOfYear + * @type Number + * @cat Plugins/Methods/Date + */ + add("getWeekOfYear", function() { + return Math.ceil(this.getDayOfYear() / 7); + }); + + /** + * Set the day of the year. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.setDayOfYear(1); + * dtm.toString(); + * @result 'Tue Jan 01 2008 00:00:00' + * + * @name setDayOfYear + * @type Date + * @cat Plugins/Methods/Date + */ + add("setDayOfYear", function(day) { + this.setMonth(0); + this.setDate(day); + return this; + }); + + /** + * Add a number of years to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addYears(1); + * dtm.toString(); + * @result 'Mon Jan 12 2009 00:00:00' + * + * @name addYears + * @type Date + * @cat Plugins/Methods/Date + */ + add("addYears", function(num) { + this.setFullYear(this.getFullYear() + num); + return this; + }); + + /** + * Add a number of months to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addMonths(1); + * dtm.toString(); + * @result 'Tue Feb 12 2008 00:00:00' + * + * @name addMonths + * @type Date + * @cat Plugins/Methods/Date + */ + add("addMonths", function(num) { + var tmpdtm = this.getDate(); + + this.setMonth(this.getMonth() + num); + + if (tmpdtm > this.getDate()) + this.addDays(-this.getDate()); + + return this; + }); + + /** + * Add a number of days to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addDays(1); + * dtm.toString(); + * @result 'Sun Jan 13 2008 00:00:00' + * + * @name addDays + * @type Date + * @cat Plugins/Methods/Date + */ + add("addDays", function(num) { + this.setDate(this.getDate() + num); + return this; + }); + + /** + * Add a number of hours to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addHours(24); + * dtm.toString(); + * @result 'Sun Jan 13 2008 00:00:00' + * + * @name addHours + * @type Date + * @cat Plugins/Methods/Date + */ + add("addHours", function(num) { + this.setHours(this.getHours() + num); + return this; + }); + + /** + * Add a number of minutes to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addMinutes(60); + * dtm.toString(); + * @result 'Sat Jan 12 2008 01:00:00' + * + * @name addMinutes + * @type Date + * @cat Plugins/Methods/Date + */ + add("addMinutes", function(num) { + this.setMinutes(this.getMinutes() + num); + return this; + }); + + /** + * Add a number of seconds to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addSeconds(60); + * dtm.toString(); + * @result 'Sat Jan 12 2008 00:01:00' + * + * @name addSeconds + * @type Date + * @cat Plugins/Methods/Date + */ + add("addSeconds", function(num) { + this.setSeconds(this.getSeconds() + num); + return this; + }); + + /** + * Sets the time component of this Date to zero for cleaner, easier comparison of dates where time is not relevant. + * + * @example var dtm = new Date(); + * dtm.zeroTime(); + * dtm.toString(); + * @result 'Sat Jan 12 2008 00:01:00' + * + * @name zeroTime + * @type Date + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ + add("zeroTime", function() { + this.setMilliseconds(0); + this.setSeconds(0); + this.setMinutes(0); + this.setHours(0); + return this; + }); + + /** + * Returns a string representation of the date object according to Date.format. + * (Date.toString may be used in other places so I purposefully didn't overwrite it) + * + * @example var dtm = new Date("01/12/2008"); + * dtm.asString(); + * @result '12/01/2008' // (where Date.format == 'dd/mm/yyyy' + * + * @name asString + * @type Date + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ + add("asString", function() { + var r = Date.format; + return r + .split('yyyy').join(this.getFullYear()) + .split('yy').join((this.getFullYear() + '').substring(2)) + .split('mmm').join(this.getMonthName(true)) + .split('mm').join(_zeroPad(this.getMonth()+1)) + .split('dd').join(_zeroPad(this.getDate())); + }); + + /** + * Returns a new date object created from the passed String according to Date.format or false if the attempt to do this results in an invalid date object + * (We can't simple use Date.parse as it's not aware of locale and I chose not to overwrite it incase it's functionality is being relied on elsewhere) + * + * @example var dtm = Date.fromString("12/01/2008"); + * dtm.toString(); + * @result 'Sat Jan 12 2008 00:00:00' // (where Date.format == 'dd/mm/yyyy' + * + * @name fromString + * @type Date + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ + Date.fromString = function(s) + { + var f = Date.format; + var d = new Date('01/01/1977'); + var iY = f.indexOf('yyyy'); + if (iY > -1) { + d.setFullYear(Number(s.substr(iY, 4))); + } else { + // TODO - this doesn't work very well - are there any rules for what is meant by a two digit year? + d.setFullYear(Number(Date.fullYearStart + s.substr(f.indexOf('yy'), 2))); + } + var iM = f.indexOf('mmm'); + if (iM > -1) { + var mStr = s.substr(iM, 3); + for (var i=0; i<Date.abbrMonthNames.length; i++) { + if (Date.abbrMonthNames[i] == mStr) break; + } + d.setMonth(i); + } else { + d.setMonth(Number(s.substr(f.indexOf('mm'), 2)) - 1); + } + d.setDate(Number(s.substr(f.indexOf('dd'), 2))); + if (isNaN(d.getTime())) { + return false; + } + return d; + }; + + // utility method + var _zeroPad = function(num) { + var s = '0'+num; + return s.substring(s.length-2) + //return ('0'+num).substring(-2); // doesn't work on IE :( + }; + +})(); \ No newline at end of file diff --git a/prive/formulaires/dateur/inc-dateur.html b/prive/formulaires/dateur/inc-dateur.html new file mode 100644 index 0000000000..ec15566cab --- /dev/null +++ b/prive/formulaires/dateur/inc-dateur.html @@ -0,0 +1,32 @@ +<script type='text/javascript' src='#CHEMIN{formulaires/dateur/dates.js}'></script> +<script type='text/javascript' src='#CHEMIN{formulaires/dateur/jquery.datePicker.js}'></script> +<script type='text/javascript' src='#CHEMIN{formulaires/dateur/jquery.timePicker.js}'></script> +<script type='text/javascript'>/*<![CDATA[*/ +Date.dayNames = ['<:date_jour_1:>', '<:date_jour_2:>', '<:date_jour_3:>', '<:date_jour_4:>', '<:date_jour_5:>', '<:date_jour_6:>', '<:date_jour_7:>']; +Date.abbrDayNames = ['<:date_jour_1_abbr:>', '<:date_jour_2_abbr:>', '<:date_jour_3_abbr:>', '<:date_jour_4_abbr:>', '<:date_jour_5_abbr:>', '<:date_jour_6_abbr:>', '<:date_jour_7_abbr:>']; +Date.monthNames = ['<:date_mois_1:>', '<:date_mois_2:>', '<:date_mois_3:>', '<:date_mois_4:>', '<:date_mois_5:>', '<:date_mois_6:>', '<:date_mois_7:>', '<:date_mois_8:>', '<:date_mois_9:>', '<:date_mois_10:>', '<:date_mois_11:>', '<:date_mois_12:>']; +Date.abbrMonthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; +Date.firstDayOfWeek = 1; +Date.format = '#ENV{dateFormat,'dd/mm/yyyy'}'; +jQuery.dpText = { + TEXT_PREV_YEAR : '<:spip_bonux:annee_precedente|texte_script:>', + TEXT_PREV_MONTH : '<:spip_bonux:mois_precedent|texte_script:>', + TEXT_NEXT_YEAR : '<:spip_bonux:annee_suivante|texte_script:>', + TEXT_NEXT_MONTH : '<:spip_bonux:mois_suivant|texte_script:>', + TEXT_CLOSE : '<:bouton_fermer|texte_script:>', + TEXT_CHOOSE_DATE : '<img src=\'#CHEMIN_IMAGE{calendrier-16.png}\' alt=\'<:spip_bonux:afficher_calendrier|attribut_html:>\' />', + TITLE_CHOOSE_DATE : '<:spip_bonux:afficher_calendrier|texte_script:>' +} +jQuery(function(){ + jQuery('input.date').addClass('datePicker').datePicker({startDate:'#ENV{startDate,'01/01/1900'}'[,endDate:'(#ENV{endDate})']}).dpSetPosition(jQuery.dpConst.POS_TOP, jQuery.dpConst.POS_RIGHT); + jQuery("input.heure").addClass('timePicker').timePicker(); +}); +/*]]>*/</script> +<style type="text/css"> +@import url(#CHEMIN{formulaires/dateur/datePicker.css}); +@import url(#CHEMIN{formulaires/dateur/timePicker.css}); +a.dp-choose-date { display: inline-block; padding: 0; margin: 0px 0 0 -19px; vertical-align: middle; } +div.time-picker {font-size:11px; width:5em; /* needed for IE */} +.formulaire_spip input.date {width:9em;padding-right:25px;} +.formulaire_spip input.heure {width:7em;} +</style> \ No newline at end of file diff --git a/prive/formulaires/dateur/jquery.datePicker.js b/prive/formulaires/dateur/jquery.datePicker.js new file mode 100644 index 0000000000..5018910d78 --- /dev/null +++ b/prive/formulaires/dateur/jquery.datePicker.js @@ -0,0 +1,1061 @@ +/** + * Copyright (c) 2007 Kelvin Luck (http://www.kelvinluck.com/) + * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) + * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. + * + * $Id: jquery.datePicker.js 3739 2007-10-25 13:55:30Z kelvin.luck $ + **/ + +(function($){ + + $.fn.extend({ +/** + * Render a calendar table into any matched elements. + * + * @param Object s (optional) Customize your calendars. + * @option Number month The month to render (NOTE that months are zero based). Default is today's month. + * @option Number year The year to render. Default is today's year. + * @option Function renderCallback A reference to a function that is called as each cell is rendered and which can add classes and event listeners to the created nodes. Default is no callback. + * @option Number showHeader Whether or not to show the header row, possible values are: $.dpConst.SHOW_HEADER_NONE (no header), $.dpConst.SHOW_HEADER_SHORT (first letter of each day) and $.dpConst.SHOW_HEADER_LONG (full name of each day). Default is $.dpConst.SHOW_HEADER_SHORT. + * @option String hoverClass The class to attach to each cell when you hover over it (to allow you to use hover effects in IE6 which doesn't support the :hover pseudo-class on elements other than links). Default is dp-hover. Pass false if you don't want a hover class. + * @type jQuery + * @name renderCalendar + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('#calendar-me').renderCalendar({month:0, year:2007}); + * @desc Renders a calendar displaying January 2007 into the element with an id of calendar-me. + * + * @example + * var testCallback = function($td, thisDate, month, year) + * { + * if ($td.is('.current-month') && thisDate.getDay() == 4) { + * var d = thisDate.getDate(); + * $td.bind( + * 'click', + * function() + * { + * alert('You clicked on ' + d + '/' + (Number(month)+1) + '/' + year); + * } + * ).addClass('thursday'); + * } else if (thisDate.getDay() == 5) { + * $td.html('Friday the ' + $td.html() + 'th'); + * } + * } + * $('#calendar-me').renderCalendar({month:0, year:2007, renderCallback:testCallback}); + * + * @desc Renders a calendar displaying January 2007 into the element with an id of calendar-me. Every Thursday in the current month has a class of "thursday" applied to it, is clickable and shows an alert when clicked. Every Friday on the calendar has the number inside replaced with text. + **/ + renderCalendar : function(s) + { + var dc = function(a) + { + return document.createElement(a); + }; + + s = $.extend( + { + month : null, + year : null, + renderCallback : null, + showHeader : $.dpConst.SHOW_HEADER_SHORT, + dpController : null, + hoverClass : 'dp-hover' + } + , s + ); + + if (s.showHeader != $.dpConst.SHOW_HEADER_NONE) { + var headRow = $(dc('tr')); + for (var i=Date.firstDayOfWeek; i<Date.firstDayOfWeek+7; i++) { + var weekday = i%7; + var day = Date.dayNames[weekday]; + headRow.append( + jQuery(dc('th')).attr({'scope':'col', 'abbr':day, 'title':day, 'class':(weekday == 0 || weekday == 6 ? 'weekend' : 'weekday')}).html(s.showHeader == $.dpConst.SHOW_HEADER_SHORT ? day.substr(0, 1) : day) + ); + } + }; + + var calendarTable = $(dc('table')) + .attr( + { + 'cellspacing':2, + 'className':'jCalendar' + } + ) + .append( + (s.showHeader != $.dpConst.SHOW_HEADER_NONE ? + $(dc('thead')) + .append(headRow) + : + dc('thead') + ) + ); + var tbody = $(dc('tbody')); + + var today = (new Date()).zeroTime(); + + var month = s.month == undefined ? today.getMonth() : s.month; + var year = s.year || today.getFullYear(); + + var currentDate = new Date(year, month, 1); + + + var firstDayOffset = Date.firstDayOfWeek - currentDate.getDay() + 1; + if (firstDayOffset > 1) firstDayOffset -= 7; + var weeksToDraw = Math.ceil(( (-1*firstDayOffset+1) + currentDate.getDaysInMonth() ) /7); + currentDate.addDays(firstDayOffset-1); + + var doHover = function() + { + if (s.hoverClass) { + $(this).addClass(s.hoverClass); + } + }; + var unHover = function() + { + if (s.hoverClass) { + $(this).removeClass(s.hoverClass); + } + }; + + var w = 0; + while (w++<weeksToDraw) { + var r = jQuery(dc('tr')); + for (var i=0; i<7; i++) { + var thisMonth = currentDate.getMonth() == month; + var d = $(dc('td')) + .text(currentDate.getDate() + '') + .attr('className', (thisMonth ? 'current-month ' : 'other-month ') + + (currentDate.isWeekend() ? 'weekend ' : 'weekday ') + + (thisMonth && currentDate.getTime() == today.getTime() ? 'today ' : '') + ) + .hover(doHover, unHover) + ; + if (s.renderCallback) { + s.renderCallback(d, currentDate, month, year); + } + r.append(d); + currentDate.addDays(1); + } + tbody.append(r); + } + calendarTable.append(tbody); + + return this.each( + function() + { + $(this).empty().append(calendarTable); + } + ); + }, +/** + * Create a datePicker associated with each of the matched elements. + * + * The matched element will receive a few custom events with the following signatures: + * + * dateSelected(event, date, $td, status) + * Triggered when a date is selected. event is a reference to the event, date is the Date selected, $td is a jquery object wrapped around the TD that was clicked on and status is whether the date was selected (true) or deselected (false) + * + * dpClosed(event, selected) + * Triggered when the date picker is closed. event is a reference to the event and selected is an Array containing Date objects. + * + * dpMonthChanged(event, displayedMonth, displayedYear) + * Triggered when the month of the popped up calendar is changed. event is a reference to the event, displayedMonth is the number of the month now displayed (zero based) and displayedYear is the year of the month. + * + * dpDisplayed(event, $datePickerDiv) + * Triggered when the date picker is created. $datePickerDiv is the div containing the date picker. Use this event to add custom content/ listeners to the popped up date picker. + * + * @param Object s (optional) Customize your date pickers. + * @option Number month The month to render when the date picker is opened (NOTE that months are zero based). Default is today's month. + * @option Number year The year to render when the date picker is opened. Default is today's year. + * @option String startDate The first date date can be selected. + * @option String endDate The last date that can be selected. + * @option Boolean inline Whether to create the datePicker as inline (e.g. always on the page) or as a model popup. Default is false (== modal popup) + * @option Boolean createButton Whether to create a .dp-choose-date anchor directly after the matched element which when clicked will trigger the showing of the date picker. Default is true. + * @option Boolean showYearNavigation Whether to display buttons which allow the user to navigate through the months a year at a time. Default is true. + * @option Boolean closeOnSelect Whether to close the date picker when a date is selected. Default is true. + * @option Boolean displayClose Whether to create a "Close" button within the date picker popup. Default is false. + * @option Boolean selectMultiple Whether a user should be able to select multiple dates with this date picker. Default is false. + * @option Boolean clickInput If the matched element is an input type="text" and this option is true then clicking on the input will cause the date picker to appear. + * @option Number verticalPosition The vertical alignment of the popped up date picker to the matched element. One of $.dpConst.POS_TOP and $.dpConst.POS_BOTTOM. Default is $.dpConst.POS_TOP. + * @option Number horizontalPosition The horizontal alignment of the popped up date picker to the matched element. One of $.dpConst.POS_LEFT and $.dpConst.POS_RIGHT. + * @option Number verticalOffset The number of pixels offset from the defined verticalPosition of this date picker that it should pop up in. Default in 0. + * @option Number horizontalOffset The number of pixels offset from the defined horizontalPosition of this date picker that it should pop up in. Default in 0. + * @option (Function|Array) renderCallback A reference to a function (or an array of seperate functions) that is called as each cell is rendered and which can add classes and event listeners to the created nodes. Each callback function will receive four arguments; a jquery object wrapping the created TD, a Date object containing the date this TD represents, a number giving the currently rendered month and a number giving the currently rendered year. Default is no callback. + * @option String hoverClass The class to attach to each cell when you hover over it (to allow you to use hover effects in IE6 which doesn't support the :hover pseudo-class on elements other than links). Default is dp-hover. Pass false if you don't want a hover class. + * @type jQuery + * @name datePicker + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('input.date-picker').datePicker(); + * @desc Creates a date picker button next to all matched input elements. When the button is clicked on the value of the selected date will be placed in the corresponding input (formatted according to Date.format). + * + * @example demo/index.html + * @desc See the projects homepage for many more complex examples... + **/ + datePicker : function(s) + { + if (!$.event._dpCache) $.event._dpCache = []; + + // initialise the date picker controller with the relevant settings... + s = $.extend( + { + month : undefined, + year : undefined, + startDate : undefined, + endDate : undefined, + inline : false, + renderCallback : [], + createButton : true, + showYearNavigation : true, + closeOnSelect : true, + displayClose : false, + selectMultiple : false, + clickInput : false, + verticalPosition : $.dpConst.POS_TOP, + horizontalPosition : $.dpConst.POS_LEFT, + verticalOffset : 0, + horizontalOffset : 0, + hoverClass : 'dp-hover' + } + , s + ); + + return this.each( + function() + { + var $this = $(this); + var alreadyExists = true; + + if (!this._dpId) { + this._dpId = $.event.guid++; + $.event._dpCache[this._dpId] = new DatePicker(this); + alreadyExists = false; + } + + if (s.inline) { + s.createButton = false; + s.displayClose = false; + s.closeOnSelect = false; + $this.empty(); + } + + var controller = $.event._dpCache[this._dpId]; + + controller.init(s); + + if (!alreadyExists && s.createButton) { + // create it! + controller.button = $('<a href="#" class="dp-choose-date" title="' + $.dpText.TITLE_CHOOSE_DATE + '">' + $.dpText.TEXT_CHOOSE_DATE + '</a>') + .bind( + 'click', + function() + { + $this.dpDisplay(this); + this.blur(); + return false; + } + ); + $this.after(controller.button); + } + + if (!alreadyExists && $this.is(':text')) { + $this + .bind( + 'dateSelected', + function(e, selectedDate, $td) + { + this.value = selectedDate.asString(); + } + ).bind( + 'change', + function() + { + var d = Date.fromString(this.value); + if (d) { + controller.setSelected(d, true, true); + } + } + ); + if (s.clickInput) { + $this.bind( + 'click', + function() + { + $this.dpDisplay(); + } + ); + } + var d = Date.fromString(this.value); + if (this.value != '' && d) { + controller.setSelected(d, true, true); + } + } + + $this.addClass('dp-applied'); + + } + ) + }, +/** + * Disables or enables this date picker + * + * @param Boolean s Whether to disable (true) or enable (false) this datePicker + * @type jQuery + * @name dpSetDisabled + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('.date-picker').datePicker(); + * $('.date-picker').dpSetDisabled(true); + * @desc Prevents this date picker from displaying and adds a class of dp-disabled to it (and it's associated button if it has one) for styling purposes. If the matched element is an input field then it will also set the disabled attribute to stop people directly editing the field. + **/ + dpSetDisabled : function(s) + { + return _w.call(this, 'setDisabled', s); + }, +/** + * Updates the first selectable date for any date pickers on any matched elements. + * + * @param String d A string representing the first selectable date (formatted according to Date.format). + * @type jQuery + * @name dpSetStartDate + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('.date-picker').datePicker(); + * $('.date-picker').dpSetStartDate('01/01/2000'); + * @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the first selectable date for each of these to the first day of the millenium. + **/ + dpSetStartDate : function(d) + { + return _w.call(this, 'setStartDate', d); + }, +/** + * Updates the last selectable date for any date pickers on any matched elements. + * + * @param String d A string representing the last selectable date (formatted according to Date.format). + * @type jQuery + * @name dpSetEndDate + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('.date-picker').datePicker(); + * $('.date-picker').dpSetEndDate('01/01/2010'); + * @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the last selectable date for each of these to the first Janurary 2010. + **/ + dpSetEndDate : function(d) + { + return _w.call(this, 'setEndDate', d); + }, +/** + * Gets a list of Dates currently selected by this datePicker. This will be an empty array if no dates are currently selected or NULL if there is no datePicker associated with the matched element. + * + * @type Array + * @name dpGetSelected + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('.date-picker').datePicker(); + * alert($('.date-picker').dpGetSelected()); + * @desc Will alert an empty array (as nothing is selected yet) + **/ + dpGetSelected : function() + { + var c = _getController(this[0]); + if (c) { + return c.getSelected(); + } + return null; + }, +/** + * Selects or deselects a date on any matched element's date pickers. Deselcting is only useful on date pickers where selectMultiple==true. Selecting will only work if the passed date is within the startDate and endDate boundries for a given date picker. + * + * @param String d A string representing the date you want to select (formatted according to Date.format). + * @param Boolean v Whether you want to select (true) or deselect (false) this date. Optional - default = true. + * @param Boolean m Whether you want the date picker to open up on the month of this date when it is next opened. Optional - default = true. + * @type jQuery + * @name dpSetSelected + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('.date-picker').datePicker(); + * $('.date-picker').dpSetSelected('01/01/2010'); + * @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the selected date on these date pickers to the first Janurary 2010. When the date picker is next opened it will display Janurary 2010. + **/ + dpSetSelected : function(d, v, m) + { + if (v == undefined) v=true; + if (m == undefined) m=true; + return _w.call(this, 'setSelected', Date.fromString(d), v, m); + }, +/** + * Sets the month that will be displayed when the date picker is next opened. If the passed month is before startDate then the month containing startDate will be displayed instead. If the passed month is after endDate then the month containing the endDate will be displayed instead. + * + * @param Number m The month you want the date picker to display. Optional - defaults to the currently displayed month. + * @param Number y The year you want the date picker to display. Optional - defaults to the currently displayed year. + * @type jQuery + * @name dpSetDisplayedMonth + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('.date-picker').datePicker(); + * $('.date-picker').dpSetDisplayedMonth(10, 2008); + * @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the selected date on these date pickers to the first Janurary 2010. When the date picker is next opened it will display Janurary 2010. + **/ + dpSetDisplayedMonth : function(m, y) + { + return _w.call(this, 'setDisplayedMonth', Number(m), Number(y)); + }, +/** + * Displays the date picker associated with the matched elements. Since only one date picker can be displayed at once then the date picker associated with the last matched element will be the one that is displayed. + * + * @param HTMLElement e An element that you want the date picker to pop up relative in position to. Optional - default behaviour is to pop up next to the element associated with this date picker. + * @type jQuery + * @name dpDisplay + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('#date-picker').datePicker(); + * $('#date-picker').dpDisplay(); + * @desc Creates a date picker associated with the element with an id of date-picker and then causes it to pop up. + **/ + dpDisplay : function(e) + { + return _w.call(this, 'display', e); + }, +/** + * Sets a function or array of functions that is called when each TD of the date picker popup is rendered to the page + * + * @param (Function|Array) a A function or an array of functions that are called when each td is rendered. Each function will receive four arguments; a jquery object wrapping the created TD, a Date object containing the date this TD represents, a number giving the currently rendered month and a number giving the currently rendered year. + * @type jQuery + * @name dpSetRenderCallback + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('#date-picker').datePicker(); + * $('#date-picker').dpSetRenderCallback(function($td, thisDate, month, year) + * { + * // do stuff as each td is rendered dependant on the date in the td and the displayed month and year + * }); + * @desc Creates a date picker associated with the element with an id of date-picker and then creates a function which is called as each td is rendered when this date picker is displayed. + **/ + dpSetRenderCallback : function(a) + { + return _w.call(this, 'setRenderCallback', a); + }, +/** + * Sets the position that the datePicker will pop up (relative to it's associated element) + * + * @param Number v The vertical alignment of the created date picker to it's associated element. Possible values are $.dpConst.POS_TOP and $.dpConst.POS_BOTTOM + * @param Number h The horizontal alignment of the created date picker to it's associated element. Possible values are $.dpConst.POS_LEFT and $.dpConst.POS_RIGHT + * @type jQuery + * @name dpSetPosition + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('#date-picker').datePicker(); + * $('#date-picker').dpSetPosition($.dpConst.POS_BOTTOM, $.dpConst.POS_RIGHT); + * @desc Creates a date picker associated with the element with an id of date-picker and makes it so that when this date picker pops up it will be bottom and right aligned to the #date-picker element. + **/ + dpSetPosition : function(v, h) + { + return _w.call(this, 'setPosition', v, h); + }, +/** + * Sets the offset that the popped up date picker will have from it's default position relative to it's associated element (as set by dpSetPosition) + * + * @param Number v The vertical offset of the created date picker. + * @param Number h The horizontal offset of the created date picker. + * @type jQuery + * @name dpSetOffset + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('#date-picker').datePicker(); + * $('#date-picker').dpSetOffset(-20, 200); + * @desc Creates a date picker associated with the element with an id of date-picker and makes it so that when this date picker pops up it will be 20 pixels above and 200 pixels to the right of it's default position. + **/ + dpSetOffset : function(v, h) + { + return _w.call(this, 'setOffset', v, h); + }, +/** + * Closes the open date picker associated with this element. + * + * @type jQuery + * @name dpClose + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('.date-pick') + * .datePicker() + * .bind( + * 'focus', + * function() + * { + * $(this).dpDisplay(); + * } + * ).bind( + * 'blur', + * function() + * { + * $(this).dpClose(); + * } + * ); + * @desc Creates a date picker and makes it appear when the relevant element is focused and disappear when it is blurred. + **/ + dpClose : function() + { + return _w.call(this, '_closeCalendar', false, this[0]); + }, + // private function called on unload to clean up any expandos etc and prevent memory links... + _dpDestroy : function() + { + // TODO - implement this? + } + }); + + // private internal function to cut down on the amount of code needed where we forward + // dp* methods on the jQuery object on to the relevant DatePicker controllers... + var _w = function(f, a1, a2, a3) + { + return this.each( + function() + { + var c = _getController(this); + if (c) { + c[f](a1, a2, a3); + } + } + ); + }; + + function DatePicker(ele) + { + this.ele = ele; + + // initial values... + this.displayedMonth = null; + this.displayedYear = null; + this.startDate = null; + this.endDate = null; + this.showYearNavigation = null; + this.closeOnSelect = null; + this.displayClose = null; + this.selectMultiple = null; + this.verticalPosition = null; + this.horizontalPosition = null; + this.verticalOffset = null; + this.horizontalOffset = null; + this.button = null; + this.renderCallback = []; + this.selectedDates = {}; + this.inline = null; + this.context = '#dp-popup'; + }; + $.extend( + DatePicker.prototype, + { + init : function(s) + { + this.setStartDate(s.startDate); + this.setEndDate(s.endDate); + this.setDisplayedMonth(Number(s.month), Number(s.year)); + this.setRenderCallback(s.renderCallback); + this.showYearNavigation = s.showYearNavigation; + this.closeOnSelect = s.closeOnSelect; + this.displayClose = s.displayClose; + this.selectMultiple = s.selectMultiple; + this.verticalPosition = s.verticalPosition; + this.horizontalPosition = s.horizontalPosition; + this.hoverClass = s.hoverClass; + this.setOffset(s.verticalOffset, s.horizontalOffset); + this.inline = s.inline; + if (this.inline) { + this.context = this.ele; + this.display(); + } + }, + setStartDate : function(d) + { + if (d) { + this.startDate = Date.fromString(d); + } + if (!this.startDate) { + this.startDate = (new Date()).zeroTime(); + } + this.setDisplayedMonth(this.displayedMonth, this.displayedYear); + }, + setEndDate : function(d) + { + if (d) { + this.endDate = Date.fromString(d); + } + if (!this.endDate) { + this.endDate = (new Date('12/31/2999')); // using the JS Date.parse function which expects mm/dd/yyyy + } + if (this.endDate.getTime() < this.startDate.getTime()) { + this.endDate = this.startDate; + } + this.setDisplayedMonth(this.displayedMonth, this.displayedYear); + }, + setPosition : function(v, h) + { + this.verticalPosition = v; + this.horizontalPosition = h; + }, + setOffset : function(v, h) + { + this.verticalOffset = parseInt(v) || 0; + this.horizontalOffset = parseInt(h) || 0; + }, + setDisabled : function(s) + { + $e = $(this.ele); + $e[s ? 'addClass' : 'removeClass']('dp-disabled'); + if (this.button) { + $but = $(this.button); + $but[s ? 'addClass' : 'removeClass']('dp-disabled'); + $but.attr('title', s ? '' : $.dpText.TEXT_CHOOSE_DATE); + } + if ($e.is(':text')) { + $e.attr('disabled', s ? 'disabled' : ''); + } + }, + setDisplayedMonth : function(m, y) + { + if (this.startDate == undefined || this.endDate == undefined) { + return; + } + var s = new Date(this.startDate.getTime()); + s.setDate(1); + var e = new Date(this.endDate.getTime()); + e.setDate(1); + + var t; + if ((!m && !y) || (isNaN(m) && isNaN(y))) { + // no month or year passed - default to current month + t = new Date().zeroTime(); + t.setDate(1); + } else if (isNaN(m)) { + // just year passed in - presume we want the displayedMonth + t = new Date(y, this.displayedMonth, 1); + } else if (isNaN(y)) { + // just month passed in - presume we want the displayedYear + t = new Date(this.displayedYear, m, 1); + } else { + // year and month passed in - that's the date we want! + t = new Date(y, m, 1) + } + + // check if the desired date is within the range of our defined startDate and endDate + if (t.getTime() < s.getTime()) { + t = s; + } else if (t.getTime() > e.getTime()) { + t = e; + } + this.displayedMonth = t.getMonth(); + this.displayedYear = t.getFullYear(); + /* Patch Cedric Morin 2008-09-13 pour les controleurs inline */ + if (this.inline){ + this._clearCalendar(); + this._renderCalendar(); + } + }, + setSelected : function(d, v, moveToMonth) + { + if (this.selectMultiple == false) { + this.selectedDates = {}; + $('td.selected', this.context).removeClass('selected'); + } + if (moveToMonth) { + this.setDisplayedMonth(d.getMonth(), d.getFullYear()); + } + this.selectedDates[d.toString()] = v; + }, + isSelected : function(d) + { + return this.selectedDates[d.toString()]; + }, + getSelected : function() + { + var r = []; + for(s in this.selectedDates) { + if (this.selectedDates[s] == true) { + r.push(Date.parse(s)); + } + } + return r; + }, + display : function(eleAlignTo) + { + if ($(this.ele).is('.dp-disabled')) return; + + eleAlignTo = eleAlignTo || this.ele; + var c = this; + var $ele = $(eleAlignTo); + var eleOffset = $ele.offset(); + + var $createIn; + var attrs; + var attrsCalendarHolder; + var cssRules; + + if (c.inline) { + $createIn = $(this.ele); + attrs = { + 'id' : 'calendar-' + this.ele._dpId, + 'className' : 'dp-popup dp-popup-inline' + }; + cssRules = { + }; + } else { + $createIn = $('body'); + attrs = { + 'id' : 'dp-popup', + 'className' : 'dp-popup' + }; + cssRules = { + 'top' : eleOffset.top + c.verticalOffset, + 'left' : eleOffset.left + c.horizontalOffset + }; + + var _checkMouse = function(e) + { + var el = e.target; + var cal = $('#dp-popup')[0]; + + while (true){ + if (el == cal) { + return true; + } else if (el == document) { + c._closeCalendar(); + return false; + } else { + el = $(el).parent()[0]; + } + } + }; + this._checkMouse = _checkMouse; + + this._closeCalendar(true); + } + + + $createIn + .append( + $('<div></div>') + .attr(attrs) + .css(cssRules) + .append( + $('<h2></h2>'), + $('<div class="dp-nav-prev"></div>') + .append( + $('<a class="dp-nav-prev-year" href="#" title="' + $.dpText.TEXT_PREV_YEAR + '"><<</a>') + .bind( + 'click', + function() + { + return c._displayNewMonth.call(c, this, 0, -1); + } + ), + $('<a class="dp-nav-prev-month" href="#" title="' + $.dpText.TEXT_PREV_MONTH + '"><</a>') + .bind( + 'click', + function() + { + return c._displayNewMonth.call(c, this, -1, 0); + } + ) + ), + $('<div class="dp-nav-next"></div>') + .append( + $('<a class="dp-nav-next-year" href="#" title="' + $.dpText.TEXT_NEXT_YEAR + '">>></a>') + .bind( + 'click', + function() + { + return c._displayNewMonth.call(c, this, 0, 1); + } + ), + $('<a class="dp-nav-next-month" href="#" title="' + $.dpText.TEXT_NEXT_MONTH + '">></a>') + .bind( + 'click', + function() + { + return c._displayNewMonth.call(c, this, 1, 0); + } + ) + ), + $('<div></div>') + .attr('className', 'dp-calendar') + ) + .bgIframe() + ); + + var $pop = this.inline ? $('.dp-popup', this.context) : $('#dp-popup'); + + if (this.showYearNavigation == false) { + $('.dp-nav-prev-year, .dp-nav-next-year', c.context).css('display', 'none'); + } + if (this.displayClose) { + $pop.append( + $('<a href="#" id="dp-close">' + $.dpText.TEXT_CLOSE + '</a>') + .bind( + 'click', + function() + { + c._closeCalendar(); + return false; + } + ) + ); + } + c._renderCalendar(); + + $(this.ele).trigger('dpDisplayed', $pop); + + if (!c.inline) { + if (this.verticalPosition == $.dpConst.POS_BOTTOM) { + $pop.css('top', eleOffset.top + $ele.height() - $pop.height() + c.verticalOffset); + } + if (this.horizontalPosition == $.dpConst.POS_RIGHT) { + $pop.css('left', eleOffset.left + $ele.width() - $pop.width() + c.horizontalOffset); + } + $(document).bind('mousedown', this._checkMouse); + } + }, + setRenderCallback : function(a) + { + if (a && typeof(a) == 'function') { + a = [a]; + } + this.renderCallback = this.renderCallback.concat(a); + }, + cellRender : function ($td, thisDate, month, year) { + var c = this.dpController; + var d = new Date(thisDate.getTime()); + + // add our click handlers to deal with it when the days are clicked... + + $td.bind( + 'click', + function() + { + var $this = $(this); + if (!$this.is('.disabled')) { + c.setSelected(d, !$this.is('.selected') || !c.selectMultiple); + var s = c.isSelected(d); + $(c.ele).trigger('dateSelected', [d, $td, s]); + $(c.ele).trigger('change'); + if (c.closeOnSelect) { + c._closeCalendar(); + } else { + $this[s ? 'addClass' : 'removeClass']('selected'); + } + } + } + ); + + if (c.isSelected(d)) { + $td.addClass('selected'); + } + + // call any extra renderCallbacks that were passed in + for (var i=0; i<c.renderCallback.length; i++) { + c.renderCallback[i].apply(this, arguments); + } + + + }, + // ele is the clicked button - only proceed if it doesn't have the class disabled... + // m and y are -1, 0 or 1 depending which direction we want to go in... + _displayNewMonth : function(ele, m, y) + { + if (!$(ele).is('.disabled')) { + this.setDisplayedMonth(this.displayedMonth + m, this.displayedYear + y); + this._clearCalendar(); + this._renderCalendar(); + $(this.ele).trigger('dpMonthChanged', [this.displayedMonth, this.displayedYear]); + } + ele.blur(); + return false; + }, + _renderCalendar : function() + { + // set the title... + $('h2', this.context).html(Date.monthNames[this.displayedMonth] + ' ' + this.displayedYear); + + // render the calendar... + $('.dp-calendar', this.context).renderCalendar( + { + month : this.displayedMonth, + year : this.displayedYear, + renderCallback : this.cellRender, + dpController : this, + hoverClass : this.hoverClass + } + ); + + // update the status of the control buttons and disable dates before startDate or after endDate... + // TODO: When should the year buttons be disabled? When you can't go forward a whole year from where you are or is that annoying? + if (this.displayedYear == this.startDate.getFullYear() && this.displayedMonth == this.startDate.getMonth()) { + $('.dp-nav-prev-year', this.context).addClass('disabled'); + $('.dp-nav-prev-month', this.context).addClass('disabled'); + $('.dp-calendar td.other-month', this.context).each( + function() + { + var $this = $(this); + if (Number($this.text()) > 20) { + $this.addClass('disabled'); + } + } + ); + var d = this.startDate.getDate(); + $('.dp-calendar td.current-month', this.context).each( + function() + { + var $this = $(this); + if (Number($this.text()) < d) { + $this.addClass('disabled'); + } + } + ); + } else { + $('.dp-nav-prev-year', this.context).removeClass('disabled'); + $('.dp-nav-prev-month', this.context).removeClass('disabled'); + var d = this.startDate.getDate(); + if (d > 20) { + // check if the startDate is last month as we might need to add some disabled classes... + var sd = new Date(this.startDate.getTime()); + sd.addMonths(1); + if (this.displayedYear == sd.getFullYear() && this.displayedMonth == sd.getMonth()) { + $('dp-calendar td.other-month', this.context).each( + function() + { + var $this = $(this); + if (Number($this.text()) < d) { + $this.addClass('disabled'); + } + } + ); + } + } + } + if (this.displayedYear == this.endDate.getFullYear() && this.displayedMonth == this.endDate.getMonth()) { + $('.dp-nav-next-year', this.context).addClass('disabled'); + $('.dp-nav-next-month', this.context).addClass('disabled'); + $('.dp-calendar td.other-month', this.context).each( + function() + { + var $this = $(this); + if (Number($this.text()) < 14) { + $this.addClass('disabled'); + } + } + ); + var d = this.endDate.getDate(); + $('.dp-calendar td.current-month', this.context).each( + function() + { + var $this = $(this); + if (Number($this.text()) > d) { + $this.addClass('disabled'); + } + } + ); + } else { + $('.dp-nav-next-year', this.context).removeClass('disabled'); + $('.dp-nav-next-month', this.context).removeClass('disabled'); + var d = this.endDate.getDate(); + if (d < 13) { + // check if the endDate is next month as we might need to add some disabled classes... + var ed = new Date(this.endDate.getTime()); + ed.addMonths(-1); + if (this.displayedYear == ed.getFullYear() && this.displayedMonth == ed.getMonth()) { + $('.dp-calendar td.other-month', this.context).each( + function() + { + var $this = $(this); + if (Number($this.text()) > d) { + $this.addClass('disabled'); + } + } + ); + } + } + } + }, + _closeCalendar : function(programatic, ele) + { + if (!ele || ele == this.ele) + { + $(document).unbind('mousedown', this._checkMouse); + this._clearCalendar(); + $('#dp-popup a').unbind(); + $('#dp-popup').empty().remove(); + if (!programatic) { + $(this.ele).trigger('dpClosed', [this.getSelected()]); + } + } + }, + // empties the current dp-calendar div and makes sure that all events are unbound + // and expandos removed to avoid memory leaks... + _clearCalendar : function() + { + // TODO. + $('.dp-calendar td', this.context).unbind(); + $('.dp-calendar', this.context).empty(); + } + } + ); + + // static constants + $.dpConst = { + SHOW_HEADER_NONE : 0, + SHOW_HEADER_SHORT : 1, + SHOW_HEADER_LONG : 2, + POS_TOP : 0, + POS_BOTTOM : 1, + POS_LEFT : 0, + POS_RIGHT : 1 + }; + // localisable text + $.dpText = { + TEXT_PREV_YEAR : 'Previous year', + TEXT_PREV_MONTH : 'Previous month', + TEXT_NEXT_YEAR : 'Next year', + TEXT_NEXT_MONTH : 'Next month', + TEXT_CLOSE : 'Close', + TEXT_CHOOSE_DATE : 'Choose date' + }; + // version + $.dpVersion = '$Id: jquery.datePicker.js 3739 2007-10-25 13:55:30Z kelvin.luck $'; + + function _getController(ele) + { + if (ele._dpId) return $.event._dpCache[ele._dpId]; + return false; + }; + + // make it so that no error is thrown if bgIframe plugin isn't included (allows you to use conditional + // comments to only include bgIframe where it is needed in IE without breaking this plugin). + if ($.fn.bgIframe == undefined) { + $.fn.bgIframe = function() {return this; }; + }; + + + // clean-up + $(window) + .bind('unload', function() { + var els = $.event._dpCache || []; + for (var i in els) { + $(els[i].ele)._dpDestroy(); + } + }); + + +})(jQuery); \ No newline at end of file diff --git a/prive/formulaires/dateur/jquery.timePicker.js b/prive/formulaires/dateur/jquery.timePicker.js new file mode 100644 index 0000000000..81fa98b318 --- /dev/null +++ b/prive/formulaires/dateur/jquery.timePicker.js @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2006 Sam Collett (http://www.texotela.co.uk) + * Licensed under the MIT License: + * http://www.opensource.org/licenses/mit-license.php + */ + +/* + * A time picker for jQuery + * Based on original timePicker by Sam Collet (http://www.texotela.co.uk) + * @name timePicker + * @version 0.1 + * @author Anders Fajerson (http://perifer.se) + * @example $("#mytime").timePicker(); + * @example $("#mytime").timePicker({step:30, startTime:"15:00", endTime:"18:00"}); + */ + +(function($){ + + $.fn.timePicker = function(options) { + // Build main options before element iteration + var settings = $.extend({}, $.fn.timePicker.defaults, options); + + return this.each(function() { + $.timePicker(this, settings); + }); + }; + + $.timePicker = function (elm, settings) { + var elm = $(elm)[0]; + return elm.timePicker || (elm.timePicker = new jQuery._timePicker(elm, settings)); + }; + + $._timePicker = function(elm, settings) { + + var tpOver = false; + var startTime = normaliseTime(settings.startTime); + var endTime = normaliseTime(settings.endTime); + + $(elm).attr('autocomplete', 'OFF'); // Disable browser autocomplete + + var times = []; + var time = new Date(startTime); // Create a new date object. + while(time <= endTime) { + times[times.length] = formatTime(time, settings); + time = new Date(time.setMinutes(time.getMinutes() + settings.step)); + } + + var $tpDiv = $('<div class="time-picker'+ (settings.show24Hours ? '' : ' time-picker-12hours') +'"></div>'); + var $tpList = $('<ul></ul>'); + + // Build the list. + for(var i = 0; i < times.length; i++) { + $tpList.append("<li>" + times[i] + "</li>"); + } + $tpDiv.append($tpList); + // Store element offset. + var elmOffset = $(elm).offset(); + // Append the timPicker to the body and position it. + $tpDiv.appendTo('body').css({'top':elmOffset.top, 'left':elmOffset.left}).hide(); + + $("li", $tpList).unbind().mouseover(function() { + $("li.selected", $tpDiv).removeClass("selected"); // TODO: only needs to run once. + $(this).addClass("selected"); + }).mousedown(function() { + tpOver = true; + }).click(function() { + setTimeVal(elm, this, $tpDiv, settings); + tpOver = false; + }); + + // Store ananymous function in variable since it's used twice. + var showPicker = function() { + var elmOffset = $(elm).offset(); + $tpDiv.css({'top':elmOffset.top, 'left':elmOffset.left}).show(); // Show picker. + $tpDiv.mouseover(function() { // Have to use mouseover instead of mousedown because of Opera + tpOver = true; + }).mouseout(function() { + tpOver = false; + }); + $("li", $tpDiv).removeClass("selected"); + + // Try to find a time in the list that matches the entered time. + var time = this.value ? timeStringToDate(this.value, settings) : startTime; + var startMin = startTime.getHours() * 60 + startTime.getMinutes(); + var min = (time.getHours() * 60 + time.getMinutes()) - startMin; + var steps = Math.round(min / settings.step); + var roundTime = normaliseTime(new Date(2001, 0, 0, 0, (steps * settings.step + (startMin)), 0)); + roundTime = (startTime < roundTime && roundTime < endTime) ? roundTime : startTime; + + var $matchedTime = $("li:contains(" + formatTime(roundTime, settings) + ")", $tpDiv); + + if ($matchedTime.length) { + $matchedTime.addClass("selected"); + // Scroll to matched time. + $tpDiv[0].scrollTop = $matchedTime[0].offsetTop; + } + }; + + $(elm).unbind().focus(showPicker).click(showPicker) + // Hide timepicker on blur + .blur(function() { + if (!tpOver && $tpDiv[0].parentNode) { // Don't remove when timePicker is clicked or when already removed + $tpDiv.hide(); + } + }) + + // Key support + .keypress(function(e) { + switch (e.keyCode) { + case 38: // Up arrow. + case 63232: // Safari up arrow. + var $selected = $("li.selected", $tpList); + var prev = $selected.prev().addClass("selected")[0]; + if (prev) { + $selected.removeClass("selected"); + $tpDiv[0].scrollTop = prev.offsetTop; + } + return false; + break; + case 40: // Down arrow. + case 63233: // Safari down arrow. + var $selected = $("li.selected", $tpList); + var next = $selected.length ? $selected.next().addClass("selected")[0] : $("li:first").addClass("selected")[0]; + if (next) { + $selected.removeClass("selected"); + $tpDiv[0].scrollTop = next.offsetTop; + } + return false; + break; + case 13: // Enter + if (!$tpDiv.is(":hidden")) { + var sel = $("li.selected", $tpList)[0]; + setTimeVal(elm, sel, $tpDiv, settings); + return false; + } + break; + } + }); + + // Helper function to get an inputs current time as Date object. + // Returns a Date object. + this.getTime = function() { + return timeStringToDate(elm.value, settings); + }; + // Helper function to set a time input. + // Takes a Date object. + this.setTime = function(time) { + elm.value = formatTime(normaliseTime(time), settings); + // Trigger element's change events. + $(elm).change(); + }; + + }; // End fn; + + // Plugin defaults. + $.fn.timePicker.defaults = { + step:30, + startTime: new Date(0, 0, 0, 0, 0, 0), + endTime: new Date(0, 0, 0, 23, 30, 0), + separator: ':', + show24Hours: true + }; + + // Private functions. + + function setTimeVal(elm, sel, $tpDiv, settings) { + // Update input field + elm.value = $(sel).text(); + // Trigger element's change events. + $(elm).change(); + // Keep focus for all but IE (which doesn't like it) + if (!$.browser.msie) { + elm.focus(); + } + // Hide picker + $tpDiv.hide(); + } + + function formatTime(time, settings) { + var h = time.getHours(); + var hours = settings.show24Hours ? h : (((h + 11) % 12) + 1); + var minutes = time.getMinutes(); + return formatNumber(hours) + settings.separator + formatNumber(minutes) + (settings.show24Hours ? '' : ((h < 12) ? ' AM' : ' PM')); + } + + function formatNumber(value) { + return (value < 10 ? '0' : '') + value; + } + + function timeStringToDate(input, settings) { + if (input) { + var array = input.split(settings.separator); + var hours = parseFloat(array[0]); + var minutes = parseFloat(array[1]); + var time = new Date(0, 0, 0, hours, minutes, 0); + return normaliseTime(time); + } + return null; + } + + /* Normalise time object to a common date. */ + function normaliseTime(time) { + time.setFullYear(2001); + time.setMonth(0); + time.setDate(0); + return time; + } + +})(jQuery); diff --git a/prive/formulaires/dateur/timePicker.css b/prive/formulaires/dateur/timePicker.css new file mode 100644 index 0000000000..5c2cd1d2cd --- /dev/null +++ b/prive/formulaires/dateur/timePicker.css @@ -0,0 +1,26 @@ +div.time-picker { + position: absolute; + height: 200px; + width:4em; /* needed for IE */ + overflow: auto; + background: #fff; + border: 1px solid #000; + z-index: 99998; +} +div.time-picker-12hours { + width:6em; /* needed for IE */ +} + +div.time-picker ul { + list-style-type: none; + margin: 0; + padding: 0; +} +div.time-picker li { + padding: 1px; + cursor: pointer; +} +div.time-picker li.selected { + background: #316AC5; + color: #fff; +} \ No newline at end of file diff --git a/prive/formulaires/selecteur/articles.html b/prive/formulaires/selecteur/articles.html new file mode 100644 index 0000000000..e2e96922bd --- /dev/null +++ b/prive/formulaires/selecteur/articles.html @@ -0,0 +1,36 @@ +<script type='text/javascript'>var img_unpick='#CHEMIN_IMAGE{supprimer-12.png}';</script> +<script type='text/javascript' src='#CHEMIN{formulaires/selecteur/jquery.picker.js}'></script> +[(#REM) + +afficher la selection dans un ul class item_picked + +@param int select + 1 => le selecteur se comporte comme un select, avec un seul choix possible +@param int rubriques + 1 = permettre aussi la selection des rubriques +@param string name + nom de l'input envoye +@param string|array selected + liste de valeurs sour la forme array("rubrique|9","article|8",...) ou "rubrique|9,article|8,..." +@param int id_rubrique +@param int id_article +@param int afficher_langue + +]<ul + class='item_picked[ (#ENV{select,''}|?{select})]'> +[(#ENV{rubriques,0}|oui) +<INCLURE{fond=formulaires/selecteur/inc-sel-rubriques}{name}{selected}{select}{img_unpick=#CHEMIN_IMAGE{supprimer-12.png}}{afficher_langue}> +] +<INCLURE{fond=formulaires/selecteur/inc-sel-articles}{name}{selected}{select}{img_unpick=#CHEMIN_IMAGE{supprimer-12.png}}{afficher_langue}> +</ul> + +#SET{id_rubrique,#ENV{id_rubrique}} +<BOUCLE_art(ARTICLES){statut?}{tout}{id_article}>#SET{id_rubrique,#ID_RUBRIQUE}</BOUCLE_art> +[(#REM) + + le container item_picker est ici pour etre voisin de item_picked + appel du selecteur en ajax +] +<div class='item_picker'> +<INCLURE{fond=formulaires/selecteur/picker-ajax}{id_rubrique=#GET{id_rubrique}}{id_article}{articles=1}{ajax}{env}> +</div> diff --git a/prive/formulaires/selecteur/articles_fonctions.php b/prive/formulaires/selecteur/articles_fonctions.php new file mode 100644 index 0000000000..fbf3a9030b --- /dev/null +++ b/prive/formulaires/selecteur/articles_fonctions.php @@ -0,0 +1,3 @@ +<?php + +include_spip('formulaires/selecteur/selecteur_fonctions'); \ No newline at end of file diff --git a/prive/formulaires/selecteur/inc-nav-articles.html b/prive/formulaires/selecteur/inc-nav-articles.html new file mode 100644 index 0000000000..52947f8fda --- /dev/null +++ b/prive/formulaires/selecteur/inc-nav-articles.html @@ -0,0 +1,18 @@ +#SET{p,pa_#ID_RUBRIQUE}<B_articles> +[<p class='pagination'>(#PAGINATION{prive})</p>] +<ul> +<BOUCLE_articles(ARTICLES){id_rubrique}{statut?}{pagination 100 #GET{p}}><li + class='article[ (#EXPOSE)]'>[(#ENV{picker_article,1}|oui)<a + href='#' + onclick="jQuery(this).item_pick('article|#ID_ARTICLE','#ENV{name,id_item}','[(#TITRE*|attribut_html|texte_script|replace{''',#VAL{'\\'}|concat{#EVAL{chr(39)}}})]','article');return false;" +><img + class='add' + src='#CHEMIN_IMAGE{ajouter-16.png}' + alt='ajouter' + width="16" + height="16" + />][(#ENV{picker_article,1}|non)<a + href='[(#ID_ARTICLE|generer_url_entite{article})]'>]#TITRE</a></li> +</BOUCLE_articles> +</ul> +</B_articles> diff --git a/prive/formulaires/selecteur/inc-nav-rubriques.html b/prive/formulaires/selecteur/inc-nav-rubriques.html new file mode 100644 index 0000000000..682f44fb95 --- /dev/null +++ b/prive/formulaires/selecteur/inc-nav-rubriques.html @@ -0,0 +1,19 @@ +#SET{p,pr_#ID_RUBRIQUE}<B_enfants> +[<p class='pagination'>(#PAGINATION)</p>] +<ul class='items'> +<BOUCLE_enfants(RUBRIQUES){id_parent=#ID_RUBRIQUE}{statut?}{pagination 100 #GET{p}}><li + class='rubrique'>[(#ENV{rubriques,0}|oui)<a + href='#' onclick="jQuery(this).item_pick('rubrique|#ID_RUBRIQUE','#ENV{name,id_item}','[(#TITRE*|extraire_multi|attribut_html|texte_script|replace{''',#VAL{'\\'}|concat{#EVAL{chr(39)}}})]','rubrique');return false;" +><img + class='add' + src='#CHEMIN_IMAGE{ajouter-16.png}' + alt='ajouter' + width="16" + height="16" + /></a>#TITRE]<a + class='ajax' + href='[(#SELF|parametre_url{id_r,#ID_RUBRIQUE})]'>[#TITRE(#ENV{rubriques,0}|non)]<img + class='ouvrir' src='#CHEMIN_IMAGE{fleche-droite-16.png}' alt='' /></a></li> +</BOUCLE_enfants> +</ul> +</B_enfants> \ No newline at end of file diff --git a/prive/formulaires/selecteur/inc-sel-articles.html b/prive/formulaires/selecteur/inc-sel-articles.html new file mode 100644 index 0000000000..ee7895517d --- /dev/null +++ b/prive/formulaires/selecteur/inc-sel-articles.html @@ -0,0 +1,11 @@ +<BOUCLE_sel(ARTICLES){id_article IN #ENV{selected}|picker_selected{article}}{statut?}{tout}><li + class='article'><input + type="hidden" + name="[(#ENV{name,id_item})][]" + value="article|#ID_ARTICLE" + />[(#ENV{afficher_langue,0}|oui)[[(#LANG)]] ]#TITRE[(#ENV{select,''}|non) +<a + href='#' + onclick='jQuery(this).item_unpick();return false;'><img + src='#ENV{img_unpick}' alt='' /></a>]<span + class="sep">, </span></li></BOUCLE_sel> diff --git a/prive/formulaires/selecteur/inc-sel-rubriques.html b/prive/formulaires/selecteur/inc-sel-rubriques.html new file mode 100644 index 0000000000..590fa95830 --- /dev/null +++ b/prive/formulaires/selecteur/inc-sel-rubriques.html @@ -0,0 +1,8 @@ +<BOUCLE_pour(POUR){tableau #ENV{selected}|picker_selected{rubrique}}> +<BOUCLE_sel(RUBRIQUES){id_rubrique=#VALEUR}{statut?}{tout}> +<li class='rubrique'><input type="hidden" name="[(#ENV{name,id_item})][]" value="rubrique|#ID_RUBRIQUE" />[(#ENV{afficher_langue,0}|oui)[[(#LANG)]] ]#TITRE[(#ENV{select,''}|non) +<a href='#' onclick='jQuery(this).item_unpick();return false;'><img src='#ENV{img_unpick}' alt='' /></a>]<span class="sep">, </span></li></BOUCLE_sel>[ +(#VALEUR|=={0}|oui) +<li class='rubrique'><input type="hidden" name="[(#ENV{name,id_item})][(#VAL{91}|chr)][(#VAL{93}|chr)]" value="rubrique|[(#VALEUR)]" /><:info_racine_site:>[(#ENV{select,''}|non) +<a href='#' onclick='jQuery(this).item_unpick();return false;'><img src='[(#ENV{img_unpick})]' alt='' /></a>]<span class="sep">, </span></li> +]<//B_sel></BOUCLE_pour> diff --git a/prive/formulaires/selecteur/jquery-ui-1.6.custom.js b/prive/formulaires/selecteur/jquery-ui-1.6.custom.js new file mode 100644 index 0000000000..dbec79f1fa --- /dev/null +++ b/prive/formulaires/selecteur/jquery-ui-1.6.custom.js @@ -0,0 +1,2255 @@ +/* + * jQuery UI 1.6 + * + * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI + */ +;(function($) { + +var _remove = $.fn.remove, + isFF2 = $.browser.mozilla && (parseFloat($.browser.version) < 1.9); + +//Helper functions and ui object +$.ui = { + + version: "1.6", + + // $.ui.plugin is deprecated. Use the proxy pattern instead. + plugin: { + add: function(module, option, set) { + var proto = $.ui[module].prototype; + for(var i in set) { + proto.plugins[i] = proto.plugins[i] || []; + proto.plugins[i].push([option, set[i]]); + } + }, + call: function(instance, name, args) { + var set = instance.plugins[name]; + if(!set) { return; } + + for (var i = 0; i < set.length; i++) { + if (instance.options[set[i][0]]) { + set[i][1].apply(instance.element, args); + } + } + } + }, + + contains: function(a, b) { + var safari2 = $.browser.safari && $.browser.version < 522; + if (a.contains && !safari2) { + return a.contains(b); + } + if (a.compareDocumentPosition) + return !!(a.compareDocumentPosition(b) & 16); + while (b = b.parentNode) + if (b == a) return true; + return false; + }, + + cssCache: {}, + css: function(name) { + if ($.ui.cssCache[name]) { return $.ui.cssCache[name]; } + var tmp = $('<div class="ui-gen">').addClass(name).css({position:'absolute', top:'-5000px', left:'-5000px', display:'block'}).appendTo('body'); + + //if (!$.browser.safari) + //tmp.appendTo('body'); + + //Opera and Safari set width and height to 0px instead of auto + //Safari returns rgba(0,0,0,0) when bgcolor is not set + $.ui.cssCache[name] = !!( + (!(/auto|default/).test(tmp.css('cursor')) || (/^[1-9]/).test(tmp.css('height')) || (/^[1-9]/).test(tmp.css('width')) || + !(/none/).test(tmp.css('backgroundImage')) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))) + ); + try { $('body').get(0).removeChild(tmp.get(0)); } catch(e){} + return $.ui.cssCache[name]; + }, + + hasScroll: function(el, a) { + + //If overflow is hidden, the element might have extra content, but the user wants to hide it + if ($(el).css('overflow') == 'hidden') { return false; } + + var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop', + has = false; + + if (el[scroll] > 0) { return true; } + + // TODO: determine which cases actually cause this to happen + // if the element doesn't have the scroll set, see if it's possible to + // set the scroll + el[scroll] = 1; + has = (el[scroll] > 0); + el[scroll] = 0; + return has; + }, + + isOverAxis: function(x, reference, size) { + //Determines when x coordinate is over "b" element axis + return (x > reference) && (x < (reference + size)); + }, + + isOver: function(y, x, top, left, height, width) { + //Determines when x, y coordinates is over "b" element + return $.ui.isOverAxis(y, top, height) && $.ui.isOverAxis(x, left, width); + }, + + keyCode: { + BACKSPACE: 8, + CAPS_LOCK: 20, + COMMA: 188, + CONTROL: 17, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + INSERT: 45, + LEFT: 37, + NUMPAD_ADD: 107, + NUMPAD_DECIMAL: 110, + NUMPAD_DIVIDE: 111, + NUMPAD_ENTER: 108, + NUMPAD_MULTIPLY: 106, + NUMPAD_SUBTRACT: 109, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SHIFT: 16, + SPACE: 32, + TAB: 9, + UP: 38 + } + +}; + +// WAI-ARIA normalization +if (isFF2) { + var attr = $.attr, + removeAttr = $.fn.removeAttr, + ariaNS = "http://www.w3.org/2005/07/aaa", + ariaState = /^aria-/, + ariaRole = /^wairole:/; + + $.attr = function(elem, name, value) { + var set = value !== undefined; + + return (name == 'role' + ? (set + ? attr.call(this, elem, name, "wairole:" + value) + : (attr.apply(this, arguments) || "").replace(ariaRole, "")) + : (ariaState.test(name) + ? (set + ? elem.setAttributeNS(ariaNS, + name.replace(ariaState, "aaa:"), value) + : attr.call(this, elem, name.replace(ariaState, "aaa:"))) + : attr.apply(this, arguments))); + }; + + $.fn.removeAttr = function(name) { + return (ariaState.test(name) + ? this.each(function() { + this.removeAttributeNS(ariaNS, name.replace(ariaState, "")); + }) : removeAttr.call(this, name)); + }; +} + +//jQuery plugins +$.fn.extend({ + + remove: function() { + // Safari has a native remove event which actually removes DOM elements, + // so we have to use triggerHandler instead of trigger (#3037). + $("*", this).add(this).each(function() { + $(this).triggerHandler("remove"); + }); + return _remove.apply(this, arguments ); + }, + + enableSelection: function() { + return this + .attr('unselectable', 'off') + .css('MozUserSelect', '') + .unbind('selectstart.ui'); + }, + + disableSelection: function() { + return this + .attr('unselectable', 'on') + .css('MozUserSelect', 'none') + .bind('selectstart.ui', function() { return false; }); + }, + + scrollParent: function() { + + var scrollParent; + if(($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) { + scrollParent = this.parents().filter(function() { + return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1)); + }).eq(0); + } else { + scrollParent = this.parents().filter(function() { + return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1)); + }).eq(0); + } + + return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent; + + + } + +}); + + +//Additional selectors +$.extend($.expr[':'], { + + data: function(a, i, m) { + return $.data(a, m[3]); + }, + + // TODO: add support for object, area + tabbable: function(a, i, m) { + + var nodeName = a.nodeName.toLowerCase(); + function isVisible(element) { + return !($(element).is(':hidden') || $(element).parents(':hidden').length); + } + + return ( + // in tab order + a.tabIndex >= 0 && + + ( // filter node types that participate in the tab order + + // anchor tag + ('a' == nodeName && a.href) || + + // enabled form element + (/input|select|textarea|button/.test(nodeName) && + 'hidden' != a.type && !a.disabled) + ) && + + // visible on page + isVisible(a) + ); + + } + +}); + + +// $.widget is a factory to create jQuery plugins +// taking some boilerplate code out of the plugin code +function getter(namespace, plugin, method, args) { + function getMethods(type) { + var methods = $[namespace][plugin][type] || []; + return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods); + } + + var methods = getMethods('getter'); + if (args.length == 1 && typeof args[0] == 'string') { + methods = methods.concat(getMethods('getterSetter')); + } + return ($.inArray(method, methods) != -1); +} + +$.widget = function(name, prototype) { + var namespace = name.split(".")[0]; + name = name.split(".")[1]; + + // create plugin method + $.fn[name] = function(options) { + var isMethodCall = (typeof options == 'string'), + args = Array.prototype.slice.call(arguments, 1); + + // prevent calls to internal methods + if (isMethodCall && options.substring(0, 1) == '_') { + return this; + } + + // handle getter methods + if (isMethodCall && getter(namespace, name, options, args)) { + var instance = $.data(this[0], name); + return (instance ? instance[options].apply(instance, args) + : undefined); + } + + // handle initialization and non-getter methods + return this.each(function() { + var instance = $.data(this, name); + + // constructor + (!instance && !isMethodCall && + $.data(this, name, new $[namespace][name](this, options))); + + // method call + (instance && isMethodCall && $.isFunction(instance[options]) && + instance[options].apply(instance, args)); + }); + }; + + // create widget constructor + $[namespace] = $[namespace] || {}; + $[namespace][name] = function(element, options) { + var self = this; + + this.widgetName = name; + this.widgetEventPrefix = $[namespace][name].eventPrefix || name; + this.widgetBaseClass = namespace + '-' + name; + + this.options = $.extend({}, + $.widget.defaults, + $[namespace][name].defaults, + $.metadata && $.metadata.get(element)[name], + options); + + this.element = $(element) + .bind('setData.' + name, function(event, key, value) { + return self._setData(key, value); + }) + .bind('getData.' + name, function(event, key) { + return self._getData(key); + }) + .bind('remove', function() { + return self.destroy(); + }); + + this._init(); + }; + + // add widget prototype + $[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype); + + // TODO: merge getter and getterSetter properties from widget prototype + // and plugin prototype + $[namespace][name].getterSetter = 'option'; +}; + +$.widget.prototype = { + _init: function() {}, + destroy: function() { + this.element.removeData(this.widgetName); + }, + + option: function(key, value) { + var options = key, + self = this; + + if (typeof key == "string") { + if (value === undefined) { + return this._getData(key); + } + options = {}; + options[key] = value; + } + + $.each(options, function(key, value) { + self._setData(key, value); + }); + }, + _getData: function(key) { + return this.options[key]; + }, + _setData: function(key, value) { + this.options[key] = value; + + if (key == 'disabled') { + this.element[value ? 'addClass' : 'removeClass']( + this.widgetBaseClass + '-disabled'); + } + }, + + enable: function() { + this._setData('disabled', false); + }, + disable: function() { + this._setData('disabled', true); + }, + + _trigger: function(type, event, data) { + var eventName = (type == this.widgetEventPrefix + ? type : this.widgetEventPrefix + type); + event = event || $.event.fix({ type: eventName, target: this.element[0] }); + return this.element.triggerHandler(eventName, [event, data], this.options[type]); + } +}; + +$.widget.defaults = { + disabled: false +}; + + +/** Mouse Interaction Plugin **/ + +$.ui.mouse = { + _mouseInit: function() { + var self = this; + + this.element + .bind('mousedown.'+this.widgetName, function(event) { + return self._mouseDown(event); + }) + .bind('click.'+this.widgetName, function(event) { + if(self._preventClickEvent) { + self._preventClickEvent = false; + return false; + } + }); + + // Prevent text selection in IE + if ($.browser.msie) { + this._mouseUnselectable = this.element.attr('unselectable'); + this.element.attr('unselectable', 'on'); + } + + this.started = false; + }, + + // TODO: make sure destroying one instance of mouse doesn't mess with + // other instances of mouse + _mouseDestroy: function() { + this.element.unbind('.'+this.widgetName); + + // Restore text selection in IE + ($.browser.msie + && this.element.attr('unselectable', this._mouseUnselectable)); + }, + + _mouseDown: function(event) { + // we may have missed mouseup (out of window) + (this._mouseStarted && this._mouseUp(event)); + + this._mouseDownEvent = event; + + var self = this, + btnIsLeft = (event.which == 1), + elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false); + if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { + return true; + } + + this.mouseDelayMet = !this.options.delay; + if (!this.mouseDelayMet) { + this._mouseDelayTimer = setTimeout(function() { + self.mouseDelayMet = true; + }, this.options.delay); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = (this._mouseStart(event) !== false); + if (!this._mouseStarted) { + event.preventDefault(); + return true; + } + } + + // these delegates are required to keep context + this._mouseMoveDelegate = function(event) { + return self._mouseMove(event); + }; + this._mouseUpDelegate = function(event) { + return self._mouseUp(event); + }; + $(document) + .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate) + .bind('mouseup.'+this.widgetName, this._mouseUpDelegate); + + // preventDefault() is used to prevent the selection of text here - + // however, in Safari, this causes select boxes not to be selectable + // anymore, so this fix is needed + if(!$.browser.safari) event.preventDefault(); + return true; + }, + + _mouseMove: function(event) { + // IE mouseup check - mouseup happened when mouse was out of window + if ($.browser.msie && !event.button) { + return this._mouseUp(event); + } + + if (this._mouseStarted) { + this._mouseDrag(event); + return event.preventDefault(); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = + (this._mouseStart(this._mouseDownEvent, event) !== false); + (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); + } + + return !this._mouseStarted; + }, + + _mouseUp: function(event) { + $(document) + .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate) + .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate); + + if (this._mouseStarted) { + this._mouseStarted = false; + this._preventClickEvent = true; + this._mouseStop(event); + } + + return false; + }, + + _mouseDistanceMet: function(event) { + return (Math.max( + Math.abs(this._mouseDownEvent.pageX - event.pageX), + Math.abs(this._mouseDownEvent.pageY - event.pageY) + ) >= this.options.distance + ); + }, + + _mouseDelayMet: function(event) { + return this.mouseDelayMet; + }, + + // These are placeholder methods, to be overriden by extending plugin + _mouseStart: function(event) {}, + _mouseDrag: function(event) {}, + _mouseStop: function(event) {}, + _mouseCapture: function(event) { return true; } +}; + +$.ui.mouse.defaults = { + cancel: null, + distance: 1, + delay: 0 +}; + +})(jQuery); +/* + * jQuery UI Draggable 1.6 + * + * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Draggables + * + * Depends: + * ui.core.js + */ +(function($) { + +$.widget("ui.draggable", $.extend({}, $.ui.mouse, { + + _init: function() { + + if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position"))) + this.element[0].style.position = 'relative'; + + (this.options.cssNamespace && this.element.addClass(this.options.cssNamespace+"-draggable")); + (this.options.disabled && this.element.addClass('ui-draggable-disabled')); + + this._mouseInit(); + + }, + + destroy: function() { + if(!this.element.data('draggable')) return; + this.element.removeData("draggable").unbind(".draggable").removeClass('ui-draggable ui-draggable-dragging ui-draggable-disabled'); + this._mouseDestroy(); + }, + + _mouseCapture: function(event) { + + var o = this.options; + + if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle')) + return false; + + //Quit if we're not on a valid handle + this.handle = this._getHandle(event); + if (!this.handle) + return false; + + return true; + + }, + + _mouseStart: function(event) { + + var o = this.options; + + //Create and append the visible helper + this.helper = this._createHelper(event); + + //Cache the helper size + this._cacheHelperProportions(); + + //If ddmanager is used for droppables, set the global draggable + if($.ui.ddmanager) + $.ui.ddmanager.current = this; + + /* + * - Position generation - + * This block generates everything position related - it's the core of draggables. + */ + + //Cache the margins of the original element + this._cacheMargins(); + + //Store the helper's css position + this.cssPosition = this.helper.css("position"); + this.scrollParent = this.helper.scrollParent(); + + //The element's absolute position on the page minus margins + this.offset = this.element.offset(); + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }; + + $.extend(this.offset, { + click: { //Where the click happened, relative to the element + left: event.pageX - this.offset.left, + top: event.pageY - this.offset.top + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper + }); + + //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied + if(o.cursorAt) + this._adjustOffsetFromHelper(o.cursorAt); + + //Generate the original position + this.originalPosition = this._generatePosition(event); + + //Set a containment if given in the options + if(o.containment) + this._setContainment(); + + //Call plugins and callbacks + this._propagate("start", event); + + //Recache the helper size + this._cacheHelperProportions(); + + //Prepare the droppable offsets + if ($.ui.ddmanager && !o.dropBehaviour) + $.ui.ddmanager.prepareOffsets(this, event); + + this.helper.addClass("ui-draggable-dragging"); + this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position + return true; + }, + + _mouseDrag: function(event, noPropagation) { + + //Compute the helpers position + this.position = this._generatePosition(event); + this.positionAbs = this._convertPositionTo("absolute"); + + //Call plugins and callbacks and use the resulting position if something is returned + if(!noPropagation) this.position = this._propagate("drag", event) || this.position; + + if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px'; + if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px'; + if($.ui.ddmanager) $.ui.ddmanager.drag(this, event); + + return false; + }, + + _mouseStop: function(event) { + + //If we are using droppables, inform the manager about the drop + var dropped = false; + if ($.ui.ddmanager && !this.options.dropBehaviour) + var dropped = $.ui.ddmanager.drop(this, event); + + if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) { + var self = this; + $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { + self._propagate("stop", event); + self._clear(); + }); + } else { + this._propagate("stop", event); + this._clear(); + } + + return false; + }, + + _getHandle: function(event) { + + var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false; + $(this.options.handle, this.element) + .find("*") + .andSelf() + .each(function() { + if(this == event.target) handle = true; + }); + + return handle; + + }, + + _createHelper: function(event) { + + var o = this.options; + var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone() : this.element); + + if(!helper.parents('body').length) + helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo)); + + if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) + helper.css("position", "absolute"); + + return helper; + + }, + + _adjustOffsetFromHelper: function(obj) { + if(obj.left != undefined) this.offset.click.left = obj.left + this.margins.left; + if(obj.right != undefined) this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + if(obj.top != undefined) this.offset.click.top = obj.top + this.margins.top; + if(obj.bottom != undefined) this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + }, + + _getParentOffset: function() { + + this.offsetParent = this.helper.offsetParent(); var po = this.offsetParent.offset(); //Get the offsetParent and cache its position + + if((this.offsetParent[0] == document.body && $.browser.mozilla) //Ugly FF3 fix + || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix + po = { top: 0, left: 0 }; + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) + }; + + }, + + _getRelativeOffset: function() { + + if(this.cssPosition == "relative") { + var p = this.element.position(); + return { + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() + }; + } else { + return { top: 0, left: 0 }; + } + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.element.css("marginLeft"),10) || 0), + top: (parseInt(this.element.css("marginTop"),10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + var o = this.options; + if(o.containment == 'parent') o.containment = this.helper[0].parentNode; + if(o.containment == 'document' || o.containment == 'window') this.containment = [ + 0 - this.offset.relative.left - this.offset.parent.left, + 0 - this.offset.relative.top - this.offset.parent.top, + $(o.containment == 'document' ? document : window).width() - this.offset.relative.left - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.element.css("marginRight"),10) || 0), + ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.offset.relative.top - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.element.css("marginBottom"),10) || 0) + ]; + + if(!(/^(document|window|parent)$/).test(o.containment)) { + var ce = $(o.containment)[0]; + var co = $(o.containment).offset(); + var over = ($(ce).css("overflow") != 'hidden'); + + this.containment = [ + co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.relative.left - this.offset.parent.left - this.margins.left, + co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.relative.top - this.offset.parent.top - this.margins.top, + co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.relative.left - this.offset.parent.left - this.helperProportions.width - this.margins.left, + co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.relative.top - this.offset.parent.top - this.helperProportions.height - this.margins.top + ]; + } + + }, + + _convertPositionTo: function(d, pos) { + + if(!pos) pos = this.position; + var mod = d == "absolute" ? 1 : -1; + var scroll = this[(this.cssPosition == 'absolute' ? 'offset' : 'scroll')+'Parent'], scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + return { + top: ( + pos.top // the calculated relative position + + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent + + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border) + + ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod + + this.margins.top * mod //Add the margin (you don't want the margin counting in intersection methods) + ), + left: ( + pos.left // the calculated relative position + + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent + + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border) + + ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : ( scrollIsRootNode ? 0 : scroll.scrollLeft() ) ) * mod + + this.margins.left * mod //Add the margin (you don't want the margin counting in intersection methods) + ) + }; + }, + + _generatePosition: function(event) { + + var o = this.options, scroll = this[(this.cssPosition == 'absolute' ? 'offset' : 'scroll')+'Parent'], scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + var position = { + top: ( + event.pageY // The absolute mouse position + - this.offset.click.top // Click offset (relative to the element) + - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent + - this.offset.parent.top // The offsetParent's offset without borders (offset + border) + + ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) + ), + left: ( + event.pageX // The absolute mouse position + - this.offset.click.left // Click offset (relative to the element) + - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent + - this.offset.parent.left // The offsetParent's offset without borders (offset + border) + + ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) + ) + }; + + if(!this.originalPosition) return position; //If we are not dragging yet, we won't check for options + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + if(this.containment) { + if(position.left < this.containment[0]) position.left = this.containment[0]; + if(position.top < this.containment[1]) position.top = this.containment[1]; + if(position.left > this.containment[2]) position.left = this.containment[2]; + if(position.top > this.containment[3]) position.top = this.containment[3]; + } + + if(o.grid) { + var top = this.originalPosition.top + Math.round((position.top - this.originalPosition.top) / o.grid[1]) * o.grid[1]; + position.top = this.containment ? (!(top < this.containment[1] || top > this.containment[3]) ? top : (!(top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + + var left = this.originalPosition.left + Math.round((position.left - this.originalPosition.left) / o.grid[0]) * o.grid[0]; + position.left = this.containment ? (!(left < this.containment[0] || left > this.containment[2]) ? left : (!(left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + } + + return position; + }, + + _clear: function() { + this.helper.removeClass("ui-draggable-dragging"); + if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove(); + //if($.ui.ddmanager) $.ui.ddmanager.current = null; + this.helper = null; + this.cancelHelperRemoval = false; + }, + + // From now on bulk stuff - mainly helpers + + _propagate: function(n, event) { + $.ui.plugin.call(this, n, [event, this._uiHash()]); + if(n == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins + return this.element.triggerHandler(n == "drag" ? n : "drag"+n, [event, this._uiHash()], this.options[n]); + }, + + plugins: {}, + + _uiHash: function(event) { + return { + helper: this.helper, + position: this.position, + absolutePosition: this.positionAbs, + options: this.options + }; + } + +})); + +$.extend($.ui.draggable, { + version: "1.6", + defaults: { + appendTo: "parent", + axis: false, + cancel: ":input", + connectToSortable: false, + containment: false, + cssNamespace: "ui", + cursor: "default", + cursorAt: null, + delay: 0, + distance: 1, + grid: false, + handle: false, + helper: "original", + iframeFix: false, + opacity: 1, + refreshPositions: false, + revert: false, + revertDuration: 500, + scope: "default", + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + snap: false, + snapMode: "both", + snapTolerance: 20, + stack: false, + zIndex: null + } +}); + +$.ui.plugin.add("draggable", "connectToSortable", { + start: function(event, ui) { + + var inst = $(this).data("draggable"); + inst.sortables = []; + $(ui.options.connectToSortable).each(function() { + // 'this' points to a string, and should therefore resolved as query, but instead, if the string is assigned to a variable, it loops through the strings properties, + // so we have to append '' to make it anonymous again + $(this+'').each(function() { + if($.data(this, 'sortable')) { + var sortable = $.data(this, 'sortable'); + inst.sortables.push({ + instance: sortable, + shouldRevert: sortable.options.revert + }); + sortable._refreshItems(); //Do a one-time refresh at start to refresh the containerCache + sortable._propagate("activate", event, inst); + } + }); + }); + + }, + stop: function(event, ui) { + + //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper + var inst = $(this).data("draggable"); + + $.each(inst.sortables, function() { + if(this.instance.isOver) { + this.instance.isOver = 0; + inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance + this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work) + if(this.shouldRevert) this.instance.options.revert = true; //revert here + this.instance._mouseStop(event); + + //Also propagate receive event, since the sortable is actually receiving a element + this.instance.element.triggerHandler("sortreceive", [event, $.extend(this.instance._ui(), { sender: inst.element })], this.instance.options["receive"]); + + this.instance.options.helper = this.instance.options._helper; + + if(inst.options.helper == 'original') { + this.instance.currentItem.css({ top: 'auto', left: 'auto' }); + } + + } else { + this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance + this.instance._propagate("deactivate", event, inst); + } + + }); + + }, + drag: function(event, ui) { + + var inst = $(this).data("draggable"), self = this; + + var checkPos = function(o) { + var dyClick = this.offset.click.top, dxClick = this.offset.click.left; + var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left; + var itemHeight = o.height, itemWidth = o.width; + var itemTop = o.top, itemLeft = o.left; + + return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth); + }; + + $.each(inst.sortables, function(i) { + + if(checkPos.call(inst, this.instance.containerCache)) { + + //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once + if(!this.instance.isOver) { + this.instance.isOver = 1; + //Now we fake the start of dragging for the sortable instance, + //by cloning the list group item, appending it to the sortable and using it as inst.currentItem + //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one) + this.instance.currentItem = $(self).clone().appendTo(this.instance.element).data("sortable-item", true); + this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it + this.instance.options.helper = function() { return ui.helper[0]; }; + + event.target = this.instance.currentItem[0]; + this.instance._mouseCapture(event, true); + this.instance._mouseStart(event, true, true); + + //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes + this.instance.offset.click.top = inst.offset.click.top; + this.instance.offset.click.left = inst.offset.click.left; + this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left; + this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top; + + inst._propagate("toSortable", event); + + } + + //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable + if(this.instance.currentItem) this.instance._mouseDrag(event); + + } else { + + //If it doesn't intersect with the sortable, and it intersected before, + //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval + if(this.instance.isOver) { + this.instance.isOver = 0; + this.instance.cancelHelperRemoval = true; + this.instance.options.revert = false; //No revert here + this.instance._mouseStop(event, true); + this.instance.options.helper = this.instance.options._helper; + + //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size + this.instance.currentItem.remove(); + if(this.instance.placeholder) this.instance.placeholder.remove(); + + inst._propagate("fromSortable", event); + } + + }; + + }); + + } +}); + +$.ui.plugin.add("draggable", "cursor", { + start: function(event, ui) { + var t = $('body'); + if (t.css("cursor")) ui.options._cursor = t.css("cursor"); + t.css("cursor", ui.options.cursor); + }, + stop: function(event, ui) { + if (ui.options._cursor) $('body').css("cursor", ui.options._cursor); + } +}); + +$.ui.plugin.add("draggable", "iframeFix", { + start: function(event, ui) { + $(ui.options.iframeFix === true ? "iframe" : ui.options.iframeFix).each(function() { + $('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>') + .css({ + width: this.offsetWidth+"px", height: this.offsetHeight+"px", + position: "absolute", opacity: "0.001", zIndex: 1000 + }) + .css($(this).offset()) + .appendTo("body"); + }); + }, + stop: function(event, ui) { + $("div.ui-draggable-iframeFix").each(function() { this.parentNode.removeChild(this); }); //Remove frame helpers + } +}); + +$.ui.plugin.add("draggable", "opacity", { + start: function(event, ui) { + var t = $(ui.helper); + if(t.css("opacity")) ui.options._opacity = t.css("opacity"); + t.css('opacity', ui.options.opacity); + }, + stop: function(event, ui) { + if(ui.options._opacity) $(ui.helper).css('opacity', ui.options._opacity); + } +}); + +$.ui.plugin.add("draggable", "scroll", { + start: function(event, ui) { + var o = ui.options; + var i = $(this).data("draggable"); + + if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset(); + + }, + drag: function(event, ui) { + + var o = ui.options, scrolled = false; + var i = $(this).data("draggable"); + + if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') { + + if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) + i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed; + else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) + i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed; + + if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) + i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed; + else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) + i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed; + + } else { + + if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); + else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); + + if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); + else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); + + } + + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) + $.ui.ddmanager.prepareOffsets(i, event); + + + + // This is a special case where we need to modify a offset calculated on start, since the following happened: + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag + if(scrolled !== false && i.cssPosition == 'absolute' && i.scrollParent[0] != document && $.ui.contains(i.scrollParent[0], i.offsetParent[0])) { + i.offset.parent = i._getParentOffset(); + + } + + // This is another very weird special case that only happens for relative elements: + // 1. If the css position is relative + // 2. and the scroll parent is the document or similar to the offset parent + // we have to refresh the relative offset during the scroll so there are no jumps + if(scrolled !== false && i.cssPosition == 'relative' && !(i.scrollParent[0] != document && i.scrollParent[0] != i.offsetParent[0])) { + i.offset.relative = i._getRelativeOffset(); + } + + + } +}); + +$.ui.plugin.add("draggable", "snap", { + start: function(event, ui) { + + var inst = $(this).data("draggable"); + inst.snapElements = []; + + $(ui.options.snap.constructor != String ? ( ui.options.snap.items || ':data(draggable)' ) : ui.options.snap).each(function() { + var $t = $(this); var $o = $t.offset(); + if(this != inst.element[0]) inst.snapElements.push({ + item: this, + width: $t.outerWidth(), height: $t.outerHeight(), + top: $o.top, left: $o.left + }); + }); + + }, + drag: function(event, ui) { + + var inst = $(this).data("draggable"); + var d = ui.options.snapTolerance; + + var x1 = ui.absolutePosition.left, x2 = x1 + inst.helperProportions.width, + y1 = ui.absolutePosition.top, y2 = y1 + inst.helperProportions.height; + + for (var i = inst.snapElements.length - 1; i >= 0; i--){ + + var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width, + t = inst.snapElements[i].top, b = t + inst.snapElements[i].height; + + //Yes, I know, this is insane ;) + if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) { + if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); + inst.snapElements[i].snapping = false; + continue; + } + + if(ui.options.snapMode != 'inner') { + var ts = Math.abs(t - y2) <= d; + var bs = Math.abs(b - y1) <= d; + var ls = Math.abs(l - x2) <= d; + var rs = Math.abs(r - x1) <= d; + if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top; + if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top; + if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left; + if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left; + } + + var first = (ts || bs || ls || rs); + + if(ui.options.snapMode != 'outer') { + var ts = Math.abs(t - y1) <= d; + var bs = Math.abs(b - y2) <= d; + var ls = Math.abs(l - x1) <= d; + var rs = Math.abs(r - x2) <= d; + if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top; + if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top; + if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left; + if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left; + } + + if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) + (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); + inst.snapElements[i].snapping = (ts || bs || ls || rs || first); + + }; + + } +}); + +$.ui.plugin.add("draggable", "stack", { + start: function(event, ui) { + var group = $.makeArray($(ui.options.stack.group)).sort(function(a,b) { + return (parseInt($(a).css("zIndex"),10) || ui.options.stack.min) - (parseInt($(b).css("zIndex"),10) || ui.options.stack.min); + }); + + $(group).each(function(i) { + this.style.zIndex = ui.options.stack.min + i; + }); + + this[0].style.zIndex = ui.options.stack.min + group.length; + } +}); + +$.ui.plugin.add("draggable", "zIndex", { + start: function(event, ui) { + var t = $(ui.helper); + if(t.css("zIndex")) ui.options._zIndex = t.css("zIndex"); + t.css('zIndex', ui.options.zIndex); + }, + stop: function(event, ui) { + if(ui.options._zIndex) $(ui.helper).css('zIndex', ui.options._zIndex); + } +}); + +})(jQuery); +/* + * jQuery UI Sortable 1.6 + * + * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Sortables + * + * Depends: + * ui.core.js + */ +(function($) { + +$.widget("ui.sortable", $.extend({}, $.ui.mouse, { + _init: function() { + + var o = this.options; + this.containerCache = {}; + this.element.addClass("ui-sortable"); + + //Get the items + this.refresh(); + + //Let's determine if the items are floating + this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) : false; + + //Let's determine the parent's offset + this.offset = this.element.offset(); + + //Initialize mouse events for interaction + this._mouseInit(); + + }, + + destroy: function() { + this.element + .removeClass("ui-sortable ui-sortable-disabled") + .removeData("sortable") + .unbind(".sortable"); + this._mouseDestroy(); + + for ( var i = this.items.length - 1; i >= 0; i-- ) + this.items[i].item.removeData("sortable-item"); + }, + + _mouseCapture: function(event, overrideHandle) { + + if (this.reverting) { + return false; + } + + if(this.options.disabled || this.options.type == 'static') return false; + + //We have to refresh the items data once first + this._refreshItems(event); + + //Find out if the clicked node (or one of its parents) is a actual item in this.items + var currentItem = null, self = this, nodes = $(event.target).parents().each(function() { + if($.data(this, 'sortable-item') == self) { + currentItem = $(this); + return false; + } + }); + if($.data(event.target, 'sortable-item') == self) currentItem = $(event.target); + + if(!currentItem) return false; + if(this.options.handle && !overrideHandle) { + var validHandle = false; + + $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; }); + if(!validHandle) return false; + } + + this.currentItem = currentItem; + this._removeCurrentsFromItems(); + return true; + + }, + + _mouseStart: function(event, overrideHandle, noActivation) { + + var o = this.options; + this.currentContainer = this; + + //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture + this.refreshPositions(); + + //Create and append the visible helper + this.helper = this._createHelper(event); + + //Cache the helper size + this._cacheHelperProportions(); + + /* + * - Position generation - + * This block generates everything position related - it's the core of draggables. + */ + + //Cache the margins of the original element + this._cacheMargins(); + + //Get the next scrolling parent + this.scrollParent = this.helper.scrollParent(); + + //The element's absolute position on the page minus margins + this.offset = this.currentItem.offset(); + + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }; + + // Only after we got the offset, we can change the helper's position to absolute + // TODO: Still need to figure out a way to make relative sorting possible + this.helper.css("position", "absolute"); + this.cssPosition = this.helper.css("position"); + + $.extend(this.offset, { + click: { //Where the click happened, relative to the element + left: event.pageX - this.offset.left, + top: event.pageY - this.offset.top + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper + }); + + //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied + if(o.cursorAt) + this._adjustOffsetFromHelper(o.cursorAt); + + //Generate the original position + this.originalPosition = this._generatePosition(event); + + //Cache the former DOM position + this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; + + //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way + if(this.helper[0] != this.currentItem[0]) { + this.currentItem.hide(); + } + + //Create the placeholder + this._createPlaceholder(); + + //Set a containment if given in the options + if(o.containment) + this._setContainment(); + + //Call plugins and callbacks + this._propagate("start", event); + + //Recache the helper size + if(!this._preserveHelperProportions) + this._cacheHelperProportions(); + + + //Post 'activate' events to possible containers + if(!noActivation) { + for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._propagate("activate", event, this); } + } + + //Prepare possible droppables + if($.ui.ddmanager) + $.ui.ddmanager.current = this; + + if ($.ui.ddmanager && !o.dropBehaviour) + $.ui.ddmanager.prepareOffsets(this, event); + + this.dragging = true; + + this.helper.addClass('ui-sortable-helper'); + this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position + return true; + + }, + + _mouseDrag: function(event) { + + //Compute the helpers position + this.position = this._generatePosition(event); + this.positionAbs = this._convertPositionTo("absolute"); + + if (!this.lastPositionAbs) { + this.lastPositionAbs = this.positionAbs; + } + + //Call the internal plugins + $.ui.plugin.call(this, "sort", [event, this._ui()]); + + //Regenerate the absolute position used for position checks + this.positionAbs = this._convertPositionTo("absolute"); + + //Set the helper position + if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px'; + if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px'; + + //Rearrange + for (var i = this.items.length - 1; i >= 0; i--) { + + //Cache variables and intersection, continue if no intersection + var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item); + if (!intersection) continue; + + if(itemElement != this.currentItem[0] //cannot intersect with itself + && this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before + && !$.ui.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked + && (this.options.type == 'semi-dynamic' ? !$.ui.contains(this.element[0], itemElement) : true) + ) { + + this.direction = intersection == 1 ? "down" : "up"; + + if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) { + this.options.sortIndicator.call(this, event, item); + } else { + break; + } + + this._propagate("change", event); //Call plugins and callbacks + break; + } + } + + //Post events to containers + this._contactContainers(event); + + //Interconnect with droppables + if($.ui.ddmanager) $.ui.ddmanager.drag(this, event); + + //Call callbacks + this._trigger('sort', event, this._ui()); + + this.lastPositionAbs = this.positionAbs; + return false; + + }, + + _mouseStop: function(event, noPropagation) { + + if(!event) return; + + //If we are using droppables, inform the manager about the drop + if ($.ui.ddmanager && !this.options.dropBehaviour) + $.ui.ddmanager.drop(this, event); + + if(this.options.revert) { + var self = this; + var cur = self.placeholder.offset(); + + self.reverting = true; + + $(this.helper).animate({ + left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft), + top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) + }, parseInt(this.options.revert, 10) || 500, function() { + self._clear(event); + }); + } else { + this._clear(event, noPropagation); + } + + return false; + + }, + + cancel: function() { + + if(this.dragging) { + + this._mouseUp(); + + if(this.options.helper == "original") + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + else + this.currentItem.show(); + + //Post deactivating events to containers + for (var i = this.containers.length - 1; i >= 0; i--){ + this.containers[i]._propagate("deactivate", null, this); + if(this.containers[i].containerCache.over) { + this.containers[i]._propagate("out", null, this); + this.containers[i].containerCache.over = 0; + } + } + + } + + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove(); + + $.extend(this, { + helper: null, + dragging: false, + reverting: false, + _noFinalSort: null + }); + + if(this.domPosition.prev) { + $(this.domPosition.prev).after(this.currentItem); + } else { + $(this.domPosition.parent).prepend(this.currentItem); + } + + return true; + + }, + + serialize: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected); + var str = []; o = o || {}; + + $(items).each(function() { + var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/)); + if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2])); + }); + + return str.join('&'); + + }, + + toArray: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected); + var ret = []; o = o || {}; + + items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); }); + return ret; + + }, + + /* Be careful with the following core functions */ + _intersectsWith: function(item) { + + var x1 = this.positionAbs.left, + x2 = x1 + this.helperProportions.width, + y1 = this.positionAbs.top, + y2 = y1 + this.helperProportions.height; + + var l = item.left, + r = l + item.width, + t = item.top, + b = t + item.height; + + var dyClick = this.offset.click.top, + dxClick = this.offset.click.left; + + var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r; + + if( this.options.tolerance == "pointer" + || this.options.forcePointerForContainers + || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height']) + ) { + return isOverElement; + } else { + + return (l < x1 + (this.helperProportions.width / 2) // Right Half + && x2 - (this.helperProportions.width / 2) < r // Left Half + && t < y1 + (this.helperProportions.height / 2) // Bottom Half + && y2 - (this.helperProportions.height / 2) < b ); // Top Half + + } + }, + + _intersectsWithPointer: function(item) { + + var isOverElementHeight = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), + isOverElementWidth = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), + isOverElement = isOverElementHeight && isOverElementWidth, + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (!isOverElement) + return false; + + return this.floating ? + ( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 ) + : ( verticalDirection && (verticalDirection == "down" ? 2 : 1) ); + + }, + + _intersectsWithSides: function(item) { + + var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), + isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (this.floating && horizontalDirection) { + return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf)); + } else { + return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf)); + } + + }, + + _getDragVerticalDirection: function() { + var delta = this.positionAbs.top - this.lastPositionAbs.top; + return delta != 0 && (delta > 0 ? "down" : "up"); + }, + + _getDragHorizontalDirection: function() { + var delta = this.positionAbs.left - this.lastPositionAbs.left; + return delta != 0 && (delta > 0 ? "right" : "left"); + }, + + refresh: function(event) { + this._refreshItems(event); + this.refreshPositions(); + }, + + _getItemsAsjQuery: function(connected) { + + var self = this; + var items = []; + var queries = []; + + if(this.options.connectWith && connected) { + for (var i = this.options.connectWith.length - 1; i >= 0; i--){ + var cur = $(this.options.connectWith[i]); + for (var j = cur.length - 1; j >= 0; j--){ + var inst = $.data(cur[j], 'sortable'); + if(inst && inst != this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper"), inst]); + } + }; + }; + } + + queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper"), this]); + + for (var i = queries.length - 1; i >= 0; i--){ + queries[i][0].each(function() { + items.push(this); + }); + }; + + return $(items); + + }, + + _removeCurrentsFromItems: function() { + + var list = this.currentItem.find(":data(sortable-item)"); + + for (var i=0; i < this.items.length; i++) { + + for (var j=0; j < list.length; j++) { + if(list[j] == this.items[i].item[0]) + this.items.splice(i,1); + }; + + }; + + }, + + _refreshItems: function(event) { + + this.items = []; + this.containers = [this]; + var items = this.items; + var self = this; + var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]]; + + if(this.options.connectWith) { + for (var i = this.options.connectWith.length - 1; i >= 0; i--){ + var cur = $(this.options.connectWith[i]); + for (var j = cur.length - 1; j >= 0; j--){ + var inst = $.data(cur[j], 'sortable'); + if(inst && inst != this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); + this.containers.push(inst); + } + }; + }; + } + + for (var i = queries.length - 1; i >= 0; i--) { + var targetData = queries[i][1]; + var _queries = queries[i][0]; + + for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) { + var item = $(_queries[j]); + + item.data('sortable-item', targetData); // Data for target checking (mouse manager) + + items.push({ + item: item, + instance: targetData, + width: 0, height: 0, + left: 0, top: 0 + }); + }; + }; + + }, + + refreshPositions: function(fast) { + + //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change + if(this.offsetParent && this.helper) { + this.offset.parent = this._getParentOffset(); + } + + for (var i = this.items.length - 1; i >= 0; i--){ + var item = this.items[i]; + + //We ignore calculating positions of all connected containers when we're not over them + if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0]) + continue; + + var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; + + if (!fast) { + if (this.options.accurateIntersection) { + item.width = t.outerWidth(); + item.height = t.outerHeight(); + } + else { + item.width = t[0].offsetWidth; + item.height = t[0].offsetHeight; + } + } + + var p = t.offset(); + item.left = p.left; + item.top = p.top; + }; + + if(this.options.custom && this.options.custom.refreshContainers) { + this.options.custom.refreshContainers.call(this); + } else { + for (var i = this.containers.length - 1; i >= 0; i--){ + var p = this.containers[i].element.offset(); + this.containers[i].containerCache.left = p.left; + this.containers[i].containerCache.top = p.top; + this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); + this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); + }; + } + + }, + + _createPlaceholder: function(that) { + + var self = that || this, o = self.options; + + if(!o.placeholder || o.placeholder.constructor == String) { + var className = o.placeholder; + o.placeholder = { + element: function() { + + var el = $(document.createElement(self.currentItem[0].nodeName)) + .addClass(className || self.currentItem[0].className+" ui-sortable-placeholder") + .removeClass('ui-sortable-helper')[0]; + + if(!className) { + el.style.visibility = "hidden"; + document.body.appendChild(el); + // Name attributes are removed, otherwice causes elements to be unchecked + // Expando attributes also have to be removed because of stupid IE (no condition, doesn't hurt in other browsers) + el.innerHTML = self.currentItem[0].innerHTML.replace(/name\=\"[^\"\']+\"/g, '').replace(/jQuery[0-9]+\=\"[^\"\']+\"/g, ''); + document.body.removeChild(el); + }; + + return el; + }, + update: function(container, p) { + if(className && !o.forcePlaceholderSize) return; + if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); }; + if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); }; + } + }; + } + + //Create the placeholder + self.placeholder = $(o.placeholder.element.call(self.element, self.currentItem)); + + //Append it after the actual current item + self.currentItem.after(self.placeholder); + + //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) + o.placeholder.update(self, self.placeholder); + + }, + + _contactContainers: function(event) { + for (var i = this.containers.length - 1; i >= 0; i--){ + + if(this._intersectsWith(this.containers[i].containerCache)) { + if(!this.containers[i].containerCache.over) { + + if(this.currentContainer != this.containers[i]) { + + //When entering a new container, we will find the item with the least distance and append our item near it + var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[i].floating ? 'left' : 'top']; + for (var j = this.items.length - 1; j >= 0; j--) { + if(!$.ui.contains(this.containers[i].element[0], this.items[j].item[0])) continue; + var cur = this.items[j][this.containers[i].floating ? 'left' : 'top']; + if(Math.abs(cur - base) < dist) { + dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; + } + } + + if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled + continue; + + this.currentContainer = this.containers[i]; + itemWithLeastDistance ? this.options.sortIndicator.call(this, event, itemWithLeastDistance, null, true) : this.options.sortIndicator.call(this, event, null, this.containers[i].element, true); + this._propagate("change", event); //Call plugins and callbacks + this.containers[i]._propagate("change", event, this); //Call plugins and callbacks + + //Update the placeholder + this.options.placeholder.update(this.currentContainer, this.placeholder); + + } + + this.containers[i]._propagate("over", event, this); + this.containers[i].containerCache.over = 1; + } + } else { + if(this.containers[i].containerCache.over) { + this.containers[i]._propagate("out", event, this); + this.containers[i].containerCache.over = 0; + } + } + + }; + }, + + _createHelper: function(event) { + + var o = this.options; + var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem); + + if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already + $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); + + if(helper[0] == this.currentItem[0]) + this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; + + if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width()); + if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height()); + + return helper; + + }, + + _adjustOffsetFromHelper: function(obj) { + if(obj.left != undefined) this.offset.click.left = obj.left + this.margins.left; + if(obj.right != undefined) this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + if(obj.top != undefined) this.offset.click.top = obj.top + this.margins.top; + if(obj.bottom != undefined) this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + }, + + _getParentOffset: function() { + + //Get the offsetParent and cache its position + this.offsetParent = this.helper.offsetParent(); var po = this.offsetParent.offset(); + + if((this.offsetParent[0] == document.body && $.browser.mozilla) //Ugly FF3 fix + || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix + po = { top: 0, left: 0 }; + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) + }; + + }, + + _getRelativeOffset: function() { + + if(this.cssPosition == "relative") { + var p = this.currentItem.position(); + return { + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() + }; + } else { + return { top: 0, left: 0 }; + } + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), + top: (parseInt(this.currentItem.css("marginTop"),10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + var o = this.options; + if(o.containment == 'parent') o.containment = this.helper[0].parentNode; + if(o.containment == 'document' || o.containment == 'window') this.containment = [ + 0 - this.offset.relative.left - this.offset.parent.left, + 0 - this.offset.relative.top - this.offset.parent.top, + $(o.containment == 'document' ? document : window).width() - this.offset.relative.left - this.offset.parent.left - this.margins.left - (parseInt(this.currentItem.css("marginRight"),10) || 0), + ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.offset.relative.top - this.offset.parent.top - this.margins.top - (parseInt(this.currentItem.css("marginBottom"),10) || 0) + ]; + + if(!(/^(document|window|parent)$/).test(o.containment)) { + var ce = $(o.containment)[0]; + var co = $(o.containment).offset(); + var over = ($(ce).css("overflow") != 'hidden'); + + this.containment = [ + co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.relative.left - this.offset.parent.left - this.margins.left, + co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.relative.top - this.offset.parent.top - this.margins.top, + co.left + (over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.relative.left - this.offset.parent.left - this.margins.left, + co.top + (over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.relative.top - this.offset.parent.top - this.margins.top + ]; + } + + }, + + _convertPositionTo: function(d, pos) { + + if(!pos) pos = this.position; + var mod = d == "absolute" ? 1 : -1; + var scroll = this[(this.cssPosition == 'absolute' ? 'offset' : 'scroll')+'Parent'], scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + return { + top: ( + pos.top // the calculated relative position + + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent + + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border) + + ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod + + this.margins.top * mod //Add the margin (you don't want the margin counting in intersection methods) + ), + left: ( + pos.left // the calculated relative position + + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent + + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border) + + ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : ( scrollIsRootNode ? 0 : scroll.scrollLeft() ) ) * mod + + this.margins.left * mod //Add the margin (you don't want the margin counting in intersection methods) + ) + }; + }, + + _generatePosition: function(event) { + + var o = this.options, scroll = this[(this.cssPosition == 'absolute' ? 'offset' : 'scroll')+'Parent'], scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + var position = { + top: ( + event.pageY // The absolute mouse position + - this.offset.click.top // Click offset (relative to the element) + - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent + - this.offset.parent.top // The offsetParent's offset without borders (offset + border) + + ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) + ), + left: ( + event.pageX // The absolute mouse position + - this.offset.click.left // Click offset (relative to the element) + - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent + - this.offset.parent.left // The offsetParent's offset without borders (offset + border) + + ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : ( scrollIsRootNode ? 0 : scroll.scrollLeft() ) ) + ) + }; + + if(!this.originalPosition) return position; //If we are not dragging yet, we won't check for options + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + if(this.containment) { + if(position.left < this.containment[0]) position.left = this.containment[0]; + if(position.top < this.containment[1]) position.top = this.containment[1]; + if(position.left + this.helperProportions.width > this.containment[2]) position.left = this.containment[2] - this.helperProportions.width; + if(position.top + this.helperProportions.height > this.containment[3]) position.top = this.containment[3] - this.helperProportions.height; + } + + if(o.grid) { + var top = this.originalPosition.top + Math.round((position.top - this.originalPosition.top) / o.grid[1]) * o.grid[1]; + position.top = this.containment ? (!(top < this.containment[1] || top > this.containment[3]) ? top : (!(top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + + var left = this.originalPosition.left + Math.round((position.left - this.originalPosition.left) / o.grid[0]) * o.grid[0]; + position.left = this.containment ? (!(left < this.containment[0] || left > this.containment[2]) ? left : (!(left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + } + + return position; + }, + + _rearrange: function(event, i, a, hardRefresh) { + + a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling)); + + //Various things done here to improve the performance: + // 1. we create a setTimeout, that calls refreshPositions + // 2. on the instance, we have a counter variable, that get's higher after every append + // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same + // 4. this lets only the last addition to the timeout stack through + this.counter = this.counter ? ++this.counter : 1; + var self = this, counter = this.counter; + + window.setTimeout(function() { + if(counter == self.counter) self.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove + },0); + + }, + + _clear: function(event, noPropagation) { + + this.reverting = false; + + //We first have to update the dom position of the actual currentItem + if(!this._noFinalSort) this.placeholder.before(this.currentItem); + this._noFinalSort = null; + + if(this.helper[0] == this.currentItem[0]) { + for(var i in this._storedCSS) { + if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = ''; + } + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else { + this.currentItem.show(); + } + + if(this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) this._propagate("update", event, null, noPropagation); //Trigger update callback if the DOM position has changed + if(!$.ui.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element + this._propagate("remove", event, null, noPropagation); + for (var i = this.containers.length - 1; i >= 0; i--){ + if($.ui.contains(this.containers[i].element[0], this.currentItem[0])) { + this.containers[i]._propagate("update", event, this, noPropagation); + this.containers[i]._propagate("receive", event, this, noPropagation); + } + }; + }; + + //Post events to containers + for (var i = this.containers.length - 1; i >= 0; i--){ + this.containers[i]._propagate("deactivate", event, this, noPropagation); + if(this.containers[i].containerCache.over) { + this.containers[i]._propagate("out", event, this); + this.containers[i].containerCache.over = 0; + } + } + + this.dragging = false; + if(this.cancelHelperRemoval) { + this._propagate("beforeStop", event, null, noPropagation); + this._propagate("stop", event, null, noPropagation); + return false; + } + + this._propagate("beforeStop", event, null, noPropagation); + + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + + if(this.options.helper != "original") this.helper.remove(); this.helper = null; + this._propagate("stop", event, null, noPropagation); + + return true; + + }, + + _propagate: function(n, event, inst, noPropagation) { + $.ui.plugin.call(this, n, [event, this._ui(inst)]); + var dontCancel = !noPropagation ? this.element.triggerHandler(n == "sort" ? n : "sort"+n, [event, this._ui(inst)], this.options[n]) : true; + if(dontCancel === false) this.cancel(); + }, + + plugins: {}, + + _ui: function(inst) { + var self = inst || this; + return { + helper: self.helper, + placeholder: self.placeholder || $([]), + position: self.position, + absolutePosition: self.positionAbs, + item: self.currentItem, + sender: inst ? inst.element : null + }; + } + +})); + +$.extend($.ui.sortable, { + getter: "serialize toArray", + version: "1.6", + defaults: { + accurateIntersection: true, + appendTo: "parent", + cancel: ":input", + delay: 0, + distance: 1, + dropOnEmpty: true, + forcePlaceholderSize: false, + forceHelperSize: false, + helper: "original", + items: '> *', + scope: "default", + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + sortIndicator: $.ui.sortable.prototype._rearrange, + tolerance: "default", + zIndex: 1000 + } +}); + +/* + * Sortable Extensions + */ + +$.ui.plugin.add("sortable", "cursor", { + start: function(event, ui) { + var t = $('body'), i = $(this).data('sortable'); + if (t.css("cursor")) i.options._cursor = t.css("cursor"); + t.css("cursor", i.options.cursor); + }, + beforeStop: function(event, ui) { + var i = $(this).data('sortable'); + if (i.options._cursor) $('body').css("cursor", i.options._cursor); + } +}); + +$.ui.plugin.add("sortable", "opacity", { + start: function(event, ui) { + var t = ui.helper, i = $(this).data('sortable'); + if(t.css("opacity")) i.options._opacity = t.css("opacity"); + t.css('opacity', i.options.opacity); + }, + beforeStop: function(event, ui) { + var i = $(this).data('sortable'); + if(i.options._opacity) $(ui.helper).css('opacity', i.options._opacity); + } +}); + +$.ui.plugin.add("sortable", "scroll", { + start: function(event, ui) { + var i = $(this).data("sortable"), o = i.options; + if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset(); + }, + sort: function(event, ui) { + + var i = $(this).data("sortable"), o = i.options, scrolled = false; + + if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') { + + if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) + i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed; + else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) + i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed; + + if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) + i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed; + else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) + i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed; + + } else { + + if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); + else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); + + if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); + else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); + + } + + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) + $.ui.ddmanager.prepareOffsets(i, event); + + + + //This is a special case where we need to modify a offset calculated on start, since the following happened: + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag + if(scrolled !== false && i.cssPosition == 'absolute' && i.scrollParent[0] != document && $.ui.contains(i.scrollParent[0], i.offsetParent[0])) { + i.offset.parent = i._getParentOffset(); + } + + // This is another very weird special case that only happens for relative elements: + // 1. If the css position is relative + // 2. and the scroll parent is the document or similar to the offset parent + // we have to refresh the relative offset during the scroll so there are no jumps + if(scrolled !== false && i.cssPosition == 'relative' && !(i.scrollParent[0] != document && i.scrollParent[0] != i.offsetParent[0])) { + i.offset.relative = i._getRelativeOffset(); + } + + } +}); + +$.ui.plugin.add("sortable", "zIndex", { + start: function(event, ui) { + var t = ui.helper, i = $(this).data('sortable'); + if(t.css("zIndex")) i.options._zIndex = t.css("zIndex"); + t.css('zIndex', i.options.zIndex); + }, + beforeStop: function(event, ui) { + var i = $(this).data('sortable'); + if(i.options._zIndex) $(ui.helper).css('zIndex', i.options._zIndex == 'auto' ? '' : i.options._zIndex); + } +}); + +})(jQuery); diff --git a/prive/formulaires/selecteur/jquery.picker.js b/prive/formulaires/selecteur/jquery.picker.js new file mode 100644 index 0000000000..2cf176f82f --- /dev/null +++ b/prive/formulaires/selecteur/jquery.picker.js @@ -0,0 +1,84 @@ +/** +item_picked et picker doivent seulement etre voisins + +<ul class='item_picked'>..</ul> +... +... +<xx class='item_picker'> +<div class='picker_bouton'>..</div> +</xx> +... +**/ +jQuery(document).ready(function(){ + var picked = jQuery('ul.item_picked'); + if (picked.length) { + picked.find('>li').removeClass('last').find('li:last').addClass('last'); + } +}); + +jQuery.fn.picker_toggle = function(){ + var browser = jQuery(this).parents('.item_picker').find('.browser'); + if (browser.is(':visible')){ + if (jQuery.browser.msie) + browser.hide(); + else + browser.slideUp(); + jQuery('a.close',this).hide(); + jQuery('a.edit',this).show(); + } + else { + browser.show(); + jQuery('a.close',this).show(); + jQuery('a.edit',this).hide(); + } +} + +// stop animation du bloc cible pour faire patienter +jQuery.fn.stopAnimeajax = function(end) { + this.children().css('opacity', 1.0); + this.find('.image_loading').html(''); + return this; // don't break the chain +} + +jQuery.fn.item_pick = function(id_item,name,title,type){ + var picker = this.parents('.item_picker'); + var picked = picker.siblings('ul.item_picked'); + if (!picked.length) { + picker.before("<ul class='item_picked'></ul>"); + picked = picker.siblings('ul.item_picked'); + } + var select = picked.is('.select'); + if (select) + picked.html(''); + else + jQuery('li.on',picked).removeClass('on'); + var sel=jQuery('input[value='+id_item+']',picked); + if (sel.length==0){ + picked.addClass('changing').animeajax(); + // simulons de la latence pour l'oeil de l'utilisateur + setTimeout(function(){ + jQuery('li:last',picked).removeClass('last'); + picked.append('<li class="last on '+type+'">' + +'<input type="hidden" name="'+name+'[]" value="'+id_item+'"/>' + + title + +(select?"":" <a href='#' onclick='jQuery(this).item_unpick();return false;'>" + +"<img src='"+img_unpick+"' /></a>" + ) + +'<span class="sep">, </span></li>').removeClass('changing').stopAnimeajax(); + // masquer le selecteur apres un pick + picker.find('.picker_bouton').picker_toggle(); + },300); + } + else + sel.parent().addClass('on'); + return this; // don't break the chain +} +jQuery.fn.item_unpick = function(){ + var picked = this.parents('ul.item_picked'); + var me = this.parent(); + jQuery(me).fadeOut('fast'); + setTimeout(function(){ + me.remove(); + picked.find('>li').removeClass('last').find('li:last').addClass('last'); + },400); +} \ No newline at end of file diff --git a/prive/formulaires/selecteur/navigateur.html b/prive/formulaires/selecteur/navigateur.html new file mode 100644 index 0000000000..f2bab6aa61 --- /dev/null +++ b/prive/formulaires/selecteur/navigateur.html @@ -0,0 +1,24 @@ + <BOUCLE_rub(RUBRIQUES){id_rubrique=#ENV{id_r,#ENV{id_rubrique}}}{statut?}> + <div class='chemin'> + <a href='[(#SELF|parametre_url{id_r,0})]' class='ajax'><:info_racine_site:></a> + <BOUCLE_chemin(HIERARCHIE){id_rubrique}> > <a href='[(#SELF|parametre_url{id_r,#ID_RUBRIQUE})]' class='ajax'>#TITRE</a></BOUCLE_chemin> > <strong class='on'>#TITRE</strong> + </div>#SET{n,0} + <B_contenu> + [(#REM) afficher la racine si la profondeur le permet] + [(#GRAND_TOTAL|<{#TOTAL_BOUCLE}|oui) + <div class='frame[ total_(#GRAND_TOTAL|max{#TOTAL_BOUCLE|moins{1}})] frame_0'><h2>[<a(#ENV{rubriques,0}|oui) href='#' onclick="jQuery(this).item_pick('rubrique|0','#ENV{name,id_item}','<:info_racine_site|texte_script|attribut_html:>','rubrique');return false;" +><img class='add' src='#CHEMIN{img_pack/item-add.png}' alt='' /></a>]<:info_racine_site:></h2> + [(#INCLURE{fond=formulaires/selecteur/inc-nav-rubriques}{id_rubrique=0}{env})]</div>] + <BOUCLE_contenu(HIERARCHIE){id_rubrique}{tout}{n-4,4}>#SET{n,0} + <div class='frame[ total_(#GRAND_TOTAL|min{#TOTAL_BOUCLE|moins{1}})][ frame_(#COMPTEUR_BOUCLE|moins{#GRAND_TOTAL|plus{1}|max{#TOTAL_BOUCLE}}|plus{#TOTAL_BOUCLE})]'><a + href='[(#SELF|parametre_url{id_r,#_rub:ID_PARENT|?{#_rub:ID_PARENT,racine}})]' class='frame_close ajax'><img src='#CHEMIN{img_pack/frame-close.png}' alt='' /></a> + <h2><a class='ajax' href='[(#SELF|parametre_url{id_r,#ID_RUBRIQUE})]'>#TITRE</a></h2> + [(#INCLURE{fond=formulaires/selecteur/inc-nav-rubriques}{id_rubrique}{env})] + [(#ENV{articles,0}|oui) [(#INCLURE{fond=formulaires/selecteur/inc-nav-articles}{id_rubrique}{id_article}{env})] ] + </div> + </BOUCLE_contenu> + + </BOUCLE_rub> + <div class='chemin'><strong class='on'><:info_racine_site:></strong></div> + <div class='frame total_0 frame_0'><h2><:info_racine_site:></h2>[(#INCLURE{fond=formulaires/selecteur/inc-nav-rubriques}{id_rubrique=0}{env})]</div> + <//B_rub> \ No newline at end of file diff --git a/prive/formulaires/selecteur/picker-ajax.html b/prive/formulaires/selecteur/picker-ajax.html new file mode 100644 index 0000000000..a1b9503ff0 --- /dev/null +++ b/prive/formulaires/selecteur/picker-ajax.html @@ -0,0 +1,34 @@ +#SET{bouton_modif,#ENV{select,''}|?{bouton_modifier,bouton_ajouter}|_T} +[(#REM) Afficher un bouton ajax Modifier a la premiere fois ---------------------------------------- +][(#ENV{picker,''}|non) +<div class='picker_bouton'>[<a href='[(#SELF|parametre_url{picker,1})]' class='ajax'>#GET{bouton_modif}</a>]</div> +] +[(#REM) Afficher un bouton Fermer/Modifier ensuite ---------------------------------------- +][(#ENV{picker,''}|oui) +<div class='picker_bouton'>[<a class='close' +href='[(#SELF|parametre_url{picker,0})]' +onclick="jQuery(this).parent().picker_toggle();return false;" +><:bouton_fermer:></a><a class='edit' +href='[(#SELF|parametre_url{picker,1})]' +onclick="jQuery(this).parent().picker_toggle();return false;" +style='display:none;'>#GET{bouton_modif}</a>]</div> + +[(#REM) et enfin le navigateur ------] +<div class='browser'> + <div class="choix choix_rapide"> + <label for="picker_id"><:spip_bonux:id_rapide:></label> + <input type="text" value="" id="picker_id" size="10" /> + <a href="#" + onclick="jQuery.ajax({'url':'[(#URL_PAGE{ajax_item_pick,rubriques=[(#ENV{rubriques})]&articles=[(#ENV{articles})]&ref=})]'+jQuery('#picker_id').attr('value'), + 'success':function(r){ + eval('r = '+r); // JSON envoye par ajax_item_pick.html + if (r){ + jQuery('#picker_id').item_pick(r.id,'#ENV{name,id_item}',r.titre,r.type); + } + jQuery('#picker_id').attr('value',''); + } + });return false;">#GET{bouton_modif}</a> + </div> + <INCLURE{fond=formulaires/selecteur/navigateur}{ajax}{env}> +</div> +] \ No newline at end of file diff --git a/prive/formulaires/selecteur/picker.css b/prive/formulaires/selecteur/picker.css new file mode 100644 index 0000000000..0d61d9e4e1 --- /dev/null +++ b/prive/formulaires/selecteur/picker.css @@ -0,0 +1,13 @@ +.item_picker .chemin {border-bottom:1px sold #eee;margin:0.5em 0 0.25em;} + +.item_picker .frame {border:1px solid #999;width:180px;height:400px;float:left;overflow:auto;} +.item_picker .frame h2 {margin:0;padding:5px;background:#999;} +.item_picker .frame ul {list-style:none;margin:0;padding:0;} +.item_picker .frame ul li {list-style:none;margin:0;padding:2px;padding-left:26px;} +.item_picker .frame ul li.rubrique {background:url(prive/images/rubrique-24.gif) no-repeat top left;} +.item_picker .frame ul li.article {background:url(prive/images/article-24.gif) no-repeat top left;} + +.item_picker .frame ul li:hover {background-color:#999;} + +.browser .choix_rapide {font-size:0.9em;} +.browser #picker_id {padding:0;margin:0 5px;border:1px solid;} \ No newline at end of file diff --git a/prive/formulaires/selecteur/rubriques.html b/prive/formulaires/selecteur/rubriques.html new file mode 100644 index 0000000000..43c64f15f0 --- /dev/null +++ b/prive/formulaires/selecteur/rubriques.html @@ -0,0 +1,24 @@ +<script type='text/javascript'>var img_unpick='#CHEMIN{img_pack/item-remove.png}';</script> +<script type='text/javascript' src='#CHEMIN{formulaires/selecteur/jquery.picker.js}'></script> + +[(#REM) afficher la selection dans un ul class item_picked ---------------------------------------- +select=1 => le selecteur se comporte comme un select, avec un seul choix possible +]<ul class='item_picked[ (#ENV{select,''}|?{select})]'> +<INCLURE{fond=formulaires/selecteur/inc-sel-rubriques}{name}{selected}{select}{img_unpick=#CHEMIN{img_pack/item-remove.png}}{afficher_langue}> +</ul> + +#SET{id_rubrique,#ENV{id_rubrique}} +<BOUCLE_art(ARTICLES){statut?}{tout}{id_article}>#SET{id_rubrique,#ID_RUBRIQUE}</BOUCLE_art> + +[(#REM) le container item_picker est ici pour etre voisin de item_picked ------] +<div class='item_picker'> +<INCLURE{fond=formulaires/selecteur/picker-ajax}{id_rubrique=#GET{id_rubrique}}{id_article}{rubriques=1}{articles=0}{ajax}{env}> +</div> +[(#ENV{sortable,'non'}|=={oui}|oui) +<script type='text/javascript' src='#CHEMIN{formulaires/selecteur/jquery-ui-1.6.custom.js}'></script> +<script type='text/javascript'> +jQuery(function() { + jQuery("ul.item_picked").sortable(); + }); +</script> +] diff --git a/prive/formulaires/selecteur/selecteur_fonctions.php b/prive/formulaires/selecteur/selecteur_fonctions.php new file mode 100644 index 0000000000..97b1459469 --- /dev/null +++ b/prive/formulaires/selecteur/selecteur_fonctions.php @@ -0,0 +1,46 @@ +<?php + + +/** + * Transformer un tableau d'entrees array("rubrique|9","article|8",...) + * en un tableau contenant uniquement les identifiants d'un type donne. + * Accepte aussi que les valeurs d'entrees soient une chaine brute + * "rubrique|9,article|8,..." + * + * @param array/string $selected liste des entrees : tableau ou chaine separee par des virgules + * @param string $type type de valeur a recuperer ('rubrique', 'article') + * + * @return array liste des identifiants trouves. +**/ +function picker_selected($selected, $type){ + $select = array(); + $type = preg_replace(',\W,','',$type); + + if ($selected and !is_array($selected)) + $selected = explode(',', $selected); + + if (is_array($selected)) + foreach($selected as $value) + if (preg_match(",".$type."[|]([0-9]+),",$value,$match) + AND strlen($v=intval($match[1]))) + $select[] = $v; + return $select; +} + +function picker_identifie_id_rapide($ref,$rubriques=0,$articles=0){ + include_spip("inc/json"); + include_spip("inc/lien"); + if (!($match = typer_raccourci($ref))) + return json_export(false); + @list($type,,$id,,,,) = $match; + if (!in_array($type,array($rubriques?'rubrique':'x',$articles?'article':'x'))) + return json_export(false); + $table_sql = table_objet_sql($type); + $id_table_objet = id_table_objet($type); + if (!$titre = sql_getfetsel('titre',$table_sql,"$id_table_objet=".intval($id))) + return json_export(false); + $titre = attribut_html(extraire_multi($titre)); + return json_export(array('type'=>$type,'id'=>"$type|$id",'titre'=>$titre)); +} + +?> \ No newline at end of file diff --git a/prive/images/chemin-fond-left.gif b/prive/images/chemin-fond-left.gif deleted file mode 100644 index a746397dfe576e6d76fc425da31aac2f33fc2523..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4121 zcmchZ`BxH%qs6J*o?kOxlZx0hjy3A2nbY(Psnc<)$qmudG=a1^efy?4PUG}C3DoPk z<AR7w$fAfFARwTbBJN9yil}LdXogFQJ8rBhZ@&M;yFc7t?+^EL?z#SfH^9EXwH`tM z7Qz9iPoJ)>t#x;IcX4sKa^=c*-+c#xKrURk;P3D6>FIgy+&L%|`ryHXpMU=OufP66 zAP_@CLsF@9a&j^(EbNCLe(>}2BNB=E`T2A@T`rfC$>eL-uEoX0wYIiCdi3b|^XDRw zC^9mV&*!t*?9R?kJRaZE)AQ@EzrKI}ULukF^2;x0&z^nw@Zs3ln5(O+kB<)+48DB% z^62PjUtizU)YQFu_h>X43<ksDaKppHBO@b!{`qHBRTY&=ZEkKZD=Qlx9}f%+?CtIS z{`>DMDk_|vovW*>b8>Q!NMw6^drVA>P$-niWGoiz$&)8_b#>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Q$$?4X5x(%r0IHcqR zvcxWk4i_8-iAqk&OHS!aoIs_{kkT{AQWs3A8>Q4;RO%@&_0pGmgUZfB$}S+wPGgLw z|3N5&h{`U@%dY6l{6OVbA?4SR<u@?p0hIC}Q8`pz4%3&1fhul7DsH)#!<_&KN(E9> zaaUe(UtbXcVmyQ}9w8ZzF^nh*BU;3Wku#p^8L=SdGYIoHjOn#lCW^wuh?uYB%-4Em zJcyMDVI?D3sTfuog_R*<;p8m5o<#sv=327gio--qC5ci=5mgq-D{1;lI*45gVV5J> z3=Eq^VY5YSuAI%&vjredF~;;r7^e=y5mGoJ5vNJcY0-1qK->-pw+qSb#&E?HZl8!N zk#nVb?$9y^9tIdiR*hk*WRxnosA@`HHLb5wfL`!sA-s7cZvn$oQh3WE-m09puIGKi zm;$`{J4n77!`D*ydJ%t5{`W)V0~`g1F9}TU2+UpzET{s@MuF9&z`CCg4>LJ_srtm7 vYP*-!Kx#FpvHIj>^(jNOlVgqZrJ6H$YFu8{xKV4|8*4l#YaAUd0GIv`(53lm diff --git a/prive/images/chemin-fond-right.gif b/prive/images/chemin-fond-right.gif deleted file mode 100644 index 2acf37e6a1d81d7d251db8db6a20d9bdc4b42ab1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4118 zcmchZ>st~C!o`^;FYA=KO&L<#x=o{IW=_)@Qrqh`l{ZA6sR^X(G`(r%l+*SolItQW zctJ!{<f4Q(Kvcj>a?#YZ6cNGH6wxU%6TG7$SCx16pLoxQ^Ywf<zvnzBB<vzM=;w|v z5P+E&z&GD~)7;$b>+9>~<#qP#*>Au776O5sJb5xCB*f3p@A&cKP$=}~&6^i4T=?y` z-w+7I;NYM_p_rJMh>ni_?z``TgM-Ora#2wclgU)8)l@3=haY}ON=oYJ=(uy|&XXrk zBoaw%Y%HJ8=W@B--Q7eYvA4JPr=Na$^X83QF28i?(y?R5Zr{E=Iy&m@?Hw2x2nK`C zoH;WxG9r`7CMPGaU%$>^Fkmnkfk1f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sh6tm z9?w^Uo*RxZ;7ov-`rImhzA^rM%kmrmVs3*lw<DR3Xr?ob=^|n7P%~YvOgB*ZZb<nT zXosT-<v?0FNK$@4U4GD7?g^?m1gSWTtnflt_|PhRB^7?^3V&-w0I2eWO9h++2t?Z} z!L&+<r1Ffq@~pKo7*ur*Qgt3#brD?^N~;Q&R6*5MFl$vbsQQ1<4%?!uub`_Dv}&ZJ z`kK1>hPC<@h;<vnx`SlhMYG~)tossHyqfjU%1W54h6ikaf@CM6*(e$tEn%mq*{N1G z2E@TaI2lL|4$aA;adIRaf|^6La{i5W@DHddLe`McH56J6O;S^;u3=bfm>_Nigj<E= zvd~-(jmwpA>(pGHtOgzcXoS=@BWqjGwIW)rL{i(Pu5Gv0c7p1<Aa$>ibv@`hDXmT> zsgtYgTG0*;ZuLWu`VnOPD7s!nt5-|vC)M@ut@Rqvzj#v+-ZYXogXZaIyg3PPfm;s; z0Q4aKDui!9@{MS|nZ~zD_#5g!9wHyGU$E`8VEa{p<5Ph%UEtCxu%I0-=ml>38+M;= v*mJeP{b>V`-T-QCI55$0(AMC&zwyxN#=}<|y`DDu&>MYo8{lrvfYbj6eQ@ZB diff --git a/prive/images/label-fond-compact-left.gif b/prive/images/label-fond-compact-left.gif deleted file mode 100644 index 1653b83442c478b97076bd0abb522330ec50884c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 453 zcmV;$0XqIiNk%w1VFv?O0Du7ieSLlZ|NkNR1OWg50RSuj0000716Ke50{@JUsmtvT zqnxzbi?iOm`wxcVNS5Y_rs~SJ?hD8AOxN~}=lag~{tpZahs2`sh)gP%%%<}RjY_A~ zs`ZM^YPa03_X`e-$K<m4j83c9?6&(2kIU!uy8VvN>-YS={|^`_I7nD%c!-#&xX9S( z_y`#(IZ0V*d5M{+xyjk-`3V{-I!an<dWxE=y2{$>`U)E>J4;(@dyAW^yUW|_`wJW_ zJWO0{e2ko|yv*F}{0to}JxyJ0eT|*1z0KY2{S6*2K2Bb4evY25zRuq6{th26KTlt8 ze~+K9zt7+A{|_*rz<~q{8a#+Fp~8g>8#;UlF`~qY6f0W1h%uwajhq}idi)47q{xvZ zOPV~1GNsCuEL*yK2{We5nKWzKyoocX&Ye7a`uqtrsL-KAiyA$OG^x_1Oq)7=3N@<K zsZ^_4y^1xf)~#H-di@GEtk|(+%bGolHmzDB0NT0*kl?M{xpeE=y^A-m-o1SL`uz(y vu;9Uj3mZO+II-fzj2k<C3^}so$%z-hHE?;YW*cxbZ~i>PGw9JK3IG5*9~<R= diff --git a/prive/images/label-fond-compact-right.gif b/prive/images/label-fond-compact-right.gif deleted file mode 100644 index e27102e1180df575af310530430d4c90083305bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 452 zcmV;#0XzOjNk%w1VFv?O0Du7ieSLlZ|NkNR1OWg50RSuj0000716Ke50{@JUsmtvT zqnxzbi?iOm`wxcVNS5Y_rs~SJ?hD8AOxN~}=lag~{tpZahs2`sh)gP%%%<}RjY_A~ zs`ZM^YPa03_X`e-$K<m4j83c9?6&(2kIU!uy8VvN>-YS={|^`_I7nD%c!-#&xX9S( z_y`#(IZ0V*d5M{+xyjk-`3V{-I!an<dWxE=y2{$>`U)E>J4;(@dyAW^yUW|_`wJW_ zJWO0{e2ko|yv*F}{0to}JxyJ0eT|*1z0KY2{S6*2K2Bb4evY25zRuq6{th26KTlt8 ze~+K9zt7+A{|_*rz<~q{8a#+Fp~8g>8#;UlF`~qY6f0W1h%uwajhh@hdi)47q{xvZ zOPV~1GNsCuEL*yK2{We5nKWzKyoocX&Ye7a`uqtrsL-KAiyA$OG^x_1Oq)7=3N@<K zsZ^_4y^1xf)~#H-di@GEtk|(+%bGolHmzDB0NT2J3pcLZxpeE=y^A-m-o1SL`uz(y uu;9Uj3mZO+II-fzj2k<C3^{V(1aj9}h5_I}=F6OCWZv94H0A~c0027*I^<&j diff --git a/prive/images/label-fond-gauche-left.gif b/prive/images/label-fond-gauche-left.gif deleted file mode 100644 index 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ive/images/label-fond-gauche-right.gif b/prive/images/label-fond-gauche-right.gif deleted file mode 100644 index fab63f68b493e425c55ee383a837460f9760a1e0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4115 zcmc(f`&SYM!^c_cO<z{#+ngab=c*~0m0KMH>iGJ!mUpzRB~mLNpH4dG%=L5>spG*b zUJ&pSS5p)P1XMIb#A{lLh+ydy(HW@;UQ$Hms`BpnE8g!v@cH5MIp3g=Yf#ufdp<z| z7LkCAjEv08%qLHt<mBX}r>E!T<)x*i1q1|KxNzZzAAY!e`Eq!8_?a_je);8>yLa!( zWHJN-F*-UrJw5%?Pd};E>NjuR5C{Z39)If8si>%^@$qq$N(F^NfBp5>Z@>MP$Ky3M zH9dOtXl7<cBoei@w)XV&eE<FT6B857&COgc7llF<6cm(~m!CLs;`s67-rnB+{{BHh zL4kpRFJHd&^78uQk3Sd;#^mH=U0od<4i5<lq0wmf?%nI}@0ZKvuV23|DJfwxnF@s> zE-voppMM@28e*|nK0ZDV9z1AhXc!zE?CR=DN=o|Xn{UpYJBLIf$HvCQVsT|<Wqf?R zL?ZF^^(B+Z=g*(F+wFk=k9}>~{|Nwq1o-|3{vRg*2Rjy-g*={{hs!T0EW#HPh@_Iz zvht^73YA7@R6MJ!Visj1kJPa_+<G2g(9qZ<Y;Jkp`a;wuZkKd)c6Imk@>wpgUJndP zhh)R@5ruN}&D*i@KPM(tQ|jrNzh>XbSnl%+9~QN`rR9~?k8A7t4a4Tvw$Ws^SZzDI zdrPcj$78`l=F4oy&wXx7h1LBy=M$k7!Ob<Vi$LcSXQa(1`mTFlDLfX^Qae-z`H6RX zsHJY0;`c9EMaXmZ2m|`><(Z+)1<0YmY~Yunt=u=P;4+_IWUcjMoG4c4v(Oj3Kl#Y# ziGL+Naw%_$?JxW?OeC0ko-oGyWmwcO-IijXmpuz>Yy7JNy}5km5-;mr5BAf~Ji^7o z_x<^wpS~j(H_s1}PJ~s4x3_#4rk?-Y<BRI&S|#)QB9913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?!DYxZ<+Iew|-<gFI3$1M;>i;KG>;L`sA1*qmL diff --git a/prive/images/label-fond-haut-left.gif b/prive/images/label-fond-haut-left.gif deleted file mode 100644 index a72fa4acc8300f2d698e8e1dfeb5373e2c59ee1a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3452 zcmXw(Yf#b&qsHCpsP(EfyN#mtww~TS>6*39zD=Svji>D>Dx%XiiPrjh+E!gN*KHd` zZ5zA+DgxfPX+~;*cf4`+mYN_}%Thp7@&?`!5&nS6+4sYFK0e=m^Ze!s3l9Yc{jbx} zSci|-9lE-@)N1wc@bE9c{DQ;bQc_Y<Q&W{n<>cgKT3T9qdU|PT>CDUwl}fFus;aH6 z<?(n;O-+rBjcsjhbUGb@K>Ysu@BRJ#Jv}`lk!W;ubZl&_pr9Z(Hy4FMWoBkhOia9c z_ik!xiby0D7Z=yn)v?*^j*bqwTrLm@kVs@pOUvNk;Kz?2|M=q%l}aTRi)l2PR4T2n zuP-kzCzHv~pFe;2@Zp084-yj-6A}_;XJ_qpyTkwIKP|_;aB#Tp;Q#O9-%JjU_MsOU z5PvVcsPV~oTJXyW=F^C__zq=jrerf`P{Tq%FV`q^Jvp*;!MvXP4AwET4fH)%Y}@R} zy!?W~A`}`^TvCcH!{G_#6_r)hL=u@ot*L!c_mcLizM=6ooxyBsZfR|6?_hOyb@%kL zIb0rJ(APgOIP_+CWc2NrP&6)<NM&-x#Jl&CA3jb^D^=>5*-vxxn$HW1OUo---Rj!< z#^%<xe#fwD+%uU0i`BM&aA<cpdg3gEMSD}={FUE*5$n|mdIJQhg>=@xEd~8Ebyn2b zAjEtBP;xfBt8u*2_s8b@<6W;Mq=28rwc*|LD9RU4)@H}M84CN$kb)C`kLY2(Yk*Yx z{Uq*bnq<T@M7)UTZT{E-?@s+B?tL`nkvLNF_egfDsyk(}`6mgxZHAMvD1H&iY5ycZ z?5=&1a60A(kw^b_4hquejbOgIm>}hLE(!_%h^&M1x|Sv6e?FR%^18JO+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A_FCwK%G6~WCyIOSRXWl;I)xN`UGauB85i&uVDResJ= z?(JD|ezp8RVk$0VSNKvY{CE}qs*1~&iU7~b?}I9@#8qC+t^`vmgL#$LRh2g^l_8#0 zH-oBf#Z`r7S3xLM{}bc@RaL<(RWY8`w}Yzh#8uzTu7*>p<9XHhRn-ZW>O@cCgCOF= zIAT&Zk&;3ort*ksDq^~Ym@!Vg9zc4UeKa$h6c|Fv;gO!HNY5=Kq$fE)h+G&)MrD&R z6mkiVj8&0w7Baz;QV~R{ilY#-DP#(T%A?fAQNVi2OBJO)h}sxOrDs!_6lyb%+Nz?q zTc|8gN>D&eXIu?CyM{}t;qz+xR5b&Znx>|sLqWBpakXRFwIWKbm{;5CdCcM3{{g%W B_iz9J diff --git a/prive/images/label-fond-haut-right.gif b/prive/images/label-fond-haut-right.gif deleted file mode 100644 index efa3bfbc74a8b2b192ac65486c7e7b21829c2933..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3452 zcmXw(Yf#b&qsHCpsP(EfyN#mtww~TS>6*39zD=Svji>D>Dx%XiiPrjh+E!gN*KHd` zZ5zA+DgxfPX+~;*cSPjsEj2-|mZgZM<PE$dD*OSJv+sxVe0;wB=K0MN79I)?`d_D` zu?`=vJFwYojYcy#IQYvizu<7Vl$4az)Ks-vJw863mX?;Do?cp7Iz2s2rBbV^s%mR% z1p+}+Q&VGOV_RDrolZv}5WoNadv9+qhr^LbB*VkQBO@aP1qHdexhNDWGc$8+Z0y~; zcM}s6L?W@cxVWyaj?3kCbaW_{N|8u}L?T;STKfC@KYsl9#~*)8O-)IqQW}jWm&@zx z>&wf_$z<~L=g%KLeE8tOgT%zdgoK2dnHjs??(qNlPs_0{92~AY`2V~3H<N>-ec(j~ z#NP`qX?!x87W{II`81*}zC+!bDci{D*Rl}M%QY%JCr6Pknltd9!8)e5fS%{7Et?&g zmtRm=ghFGAOG>e2I6R@eqOz)*NFr0HHMKA5UeaFGH#EMcGnh@yEv;?s9js1v7pI%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RTzzeP-3c!$puUQ4x)de?zf)G&Q zO>p5Ycws1_5JE1D;1@#Gg)pEn22^w#TyzIsbQe(sCl|%@i|(t75`dz6`Xdj(sE2S= z5(1S%My2vmX=+qDfXV=&pMcR%;pj{R8bL<q@X^oI=;r_$3Bu%qF@<mp$`|8Kz?ASY zSTzO*U<jb%3UF~1yqJh6CX<V){Nh@5aUD=h1C`W+OB&%NbVLc0T++-hX;qgrF&$W- zQZ~4h125$wO8MkcA-}XoU25+GN(VsLK`?e0jvYZ@C1k9WkCm&jN&q_sDtiwu``}!5 zJfloaF4OSKX4GY~K$#YVn+M|-;kac4PEW?I@^R~G+$MlCfbd2zeix26A@BehZ{_37 zDGrAK-ocY_B#3Y<j^LP0aHbGW2na4y1UC!elxO*uLFK38%H6ZeL6mYYLHXIK@^hAQ zZ_kSJE9L(YQ*j}?!k1FvC#dkBs<>>a2=J`@KB)3aT;<j5N-(7|SWtO=s`7@VGQ_j$ zW>D3wxT?_XDhQ?Oe}WvKQ&liaRg7o#?V##Aan*OTtKpRDctQ33sp<qvb)qNnK@jm_ z95E@INJ*g(Qw7AdDPp>Xm@!Jc9zc2;N6O45At<CA0qNNk>A8i3^d#p8kqhI<sBAKZ zLM{=Iu~TH6g-r0IR0L6~;wZ#y3M%_3RX_<uQtB)enkThBh}sxOrDs!_6l$}8+S)`0 z8>k&qRCZ7eC$5H@UBjo;2n97gLDV2aO|NI|U{LLFT<u79t%Op`X*!zYdCcM3{{hq< B^}GN8 diff --git a/prive/images/tourner-180.gif b/prive/images/tourner-180.gif deleted file mode 100644 index 392a87496a1794edb282a28e30c2c4783eacb4e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 104 zcmZ?wbhEHb<YM4rSj5h-Wy_WqFJ2TB6il2r@zkkP*4EZ{?%a9(`nBRu7DfgJb_N{= zAONXlVAicrK9l@>iYGV6CLV@oX9E->Zn&_tg-0EUFqp)!<O&1ZU2ek(hINezEd~cv H7#OSp984w9 diff --git a/prive/images/tourner-droite.gif b/prive/images/tourner-droite.gif deleted file mode 100644 index abcc6c238a702cd8e82d60c7dad473a6be3e4613..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99 zcmZ?wbhEHb<YM4rSj5io;>C;Q%a^;myWhBR!@|O%prGK;p+m1<zgGOo!pOkD&Y;5p z1R%8x%o-eA!EDcYoSOw6#wvAuZ!8y`&uru(=<t9s;Nn46L6Pkrd!K%E{oKyNU=0A^ CA0vMN diff --git a/prive/images/tourner-gauche.gif b/prive/images/tourner-gauche.gif deleted file mode 100644 index 24295e3c3ad2e3bfaddeb080d3747736702f1fa6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97 zcmZ?wbhEHb<YM4rSj5io{Q2{fCr|F!v19u5>A}IlrlzKijg7BgzgGOo!pOkD&Y;5p z1R%8x%xV?vMjsMd13NgTPd)qHR7O$ku#$kAK*LfMn>CAE9CXfqi=Axlr^a9n0KB>) A761SM diff --git a/prive/javascript/ajaxCallback.js b/prive/javascript/ajaxCallback.js index 5dc2e7de9b..a6c7b55de4 100644 --- a/prive/javascript/ajaxCallback.js +++ b/prive/javascript/ajaxCallback.js @@ -70,6 +70,19 @@ jQuery.fn.animeajax = function(end) { return this; // don't break the chain } +jQuery.fn.animeRemove = function(){ + $(this).addClass('remove').animate({opacity: "0.0"}, 'fast'); + return this; // don't break the chain +} +jQuery.fn.animeAppend = function(){ + $(this).css('opacity','0.0').animate({opacity: "1.0"}, 1000,function(){ + jQuery(this).animate({backgroundColor: '#ffffff'}, 3000,function(){ + jQuery(this).removeClass('append').parents('.append').removeClass('append'); + jQuery(this).css({backgroundColor: 'inherit'}); + }); + }); +} + // s'il n'est pas totalement visible, scroller pour positionner // le bloc cible en haut de l'ecran // si force = true, scroller dans tous les cas diff --git a/prive/style_prive.html b/prive/style_prive.html index 85639f198b..57ba46f9bd 100644 --- a/prive/style_prive.html +++ b/prive/style_prive.html @@ -837,6 +837,11 @@ body.sites .no_onglets #contenu #wysiwyg div.contenu_nom_site {display: none;} [(#INCLURE{fond=style_prive_formulaires}{env}{couleur_claire}{couleur_foncee}{lang}{ltr})] /******** Formulaires fin *********/ +/** Picker articles/rubriques **/ +[(#INCLURE{fond=prive/themes/spip/style_prive_picker}{env}{couleur_claire}{couleur_foncee}{lang}{ltr})] + + + /******** Boites *******************/ [(#INCLURE{fond=prive/box_skins.css}{env}{couleur_claire}{couleur_foncee}{lang}{ltr})] /******** Boites fin ***************/ diff --git a/prive/themes/spip/images/article-12.png b/prive/themes/spip/images/article-12.png new file mode 100644 index 0000000000000000000000000000000000000000..35d3d3d5951a8d06859ed9030fe34aa1a4924d36 GIT binary patch literal 619 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$3?vg*uel1OSkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wP9djWDW2Mam~occ>DHkZEbB)QBh@O zWmQ#G>k@|cr3?=q+$||7TD*9%o}SLPZ(l<~Lhs(a8xiGq`}XZUd-iNN#du)<{`Ay> z%zB2SFBy&<JNDzp4@YN{*x1;X*8114Ure1kwY|MV$&eu_HR{u+PpejLN={DB&dx5Y z^_#JYD?Z6zU0p3M(SPB*jlI1+K;ReP^85GihK2?gcdhR3?!$+U78e)iWR)-4&G-4^ z-=?Of^o)!-b7zK!ht8d`yQ$ap(%CmVcI=4Hve>t8-?wkyZe4rr?CgB{^y!29&o<U~ zZ``=Ct7CF-m|tFQ?y08?(`NQPfA;dujrSYRGu*#_f6A08zkdB{YilbjEBg-yS7Z)H z0z)mlB*-rqB0_DFVPCT8W1tnCo-U3d6}NQGxr!Zf5MjOOUQj;$!Mk_wX0iQxU$42u za_8n*q9t#%mmD)yYH|OwzV55ApXKyL8glKtsZKnT9Pekp-Q%sUm@jE3%x{-!<GCU4 z{pzC&rDlBKUsx}5hwJkqTWuw&nx8(;CfEoI<}cS@+O_+l=tlcu-}VjDl=4H1CmRZF fkriD$pMja7B3L2II9KmI&`}JYu6{1-oD!M<t9ML) literal 0 HcmV?d00001 diff --git a/prive/themes/spip/images/fleche-droite-16.png b/prive/themes/spip/images/fleche-droite-16.png new file mode 100644 index 0000000000000000000000000000000000000000..2865fd0c0fdccbe364a0dfbbf0172ba8bb561103 GIT binary patch literal 480 zcmV<60U!Q}P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUzf=NU{RCwCNlRay~P!xtwVxk2NA)rXQ zW)}C-#nqvM-CR2Ak`C?AJwKs~C5Zo^V>^~YLOTQ$1P2#4i>SoGj~EkU&q=Y=Qa`|< zcf0rIzVCUTbHc1vD>!DcaOC2CZc3%nWe^08@B7az%R)37g~eh4kw^p>h5^s>fa5sO zb^Y%OWLdt><#Lblc)aYoE`Lb84S_@=5#;mv6IE3!*=+U|9nZ0v!v)Y427>`ek_5$K z@vKlNyrfd83dWEzS{P#|19BUUM&LM3xK|W~PbQOP%d#$7t(G>M&1%TQ+bTf7hQnb9 zZ=Ih2W-^)6bUOV|uh*~e{uYnlw^m@=Ht;<EEkNBMk@0v;XUy*y8v^tpb^v0r*w-bt zY&xAnyWQ?}IvoueRq<|n1bQHfA_#&I_8cF2jYgw}A{timK?XY^k~30=e!mZfVZ3#_ z-8<xBt}EI*iAb3>O>^FCHg6`ANfqOGRMo+wj5BbL?(^kx`9vTI*uH6G{{3(K6kq_m W^RtTvtU3z-0000<MNUMnLSTZ5Bhf1W literal 0 HcmV?d00001 diff --git a/prive/themes/spip/style_prive_picker.html b/prive/themes/spip/style_prive_picker.html new file mode 100644 index 0000000000..b74ce64875 --- /dev/null +++ b/prive/themes/spip/style_prive_picker.html @@ -0,0 +1,80 @@ +[(#REM) + + Ce squelette definit les styles de l'espace prive + + Note: l'entete "Vary:" sert a repousser l'entete par + defaut "Vary: Cookie,Accept-Encoding", qui est (un peu) + genant en cas de "rotation du cookie de session" apres + un changement d'IP (effet de clignotement). + + ATTENTION: il faut absolument le charset sinon Firefox croit que + c'est du text/html ! + <style> +] +#CACHE{3600*100,cache-client} +#HTTP_HEADER{Content-Type: text/css; charset=iso-8859-15} +#HTTP_HEADER{Vary: Accept-Encoding} + +#SET{claire,##ENV{couleur_claire,edf3fe}} +#SET{foncee,##ENV{couleur_foncee,3874b0}} +#SET{left,#ENV{ltr}|choixsiegal{left,left,right}} +#SET{right,#ENV{ltr}|choixsiegal{left,right,left}} + +ul.item_picked {list-style:none;margin:0;padding:0;float:left;} +ul.item_picked li {margin:0 2px 2px;padding:2px;background:#eee;border:1px solid #GET{claire};float:#GET{left};clear:none;} +ul.item_picked li span.sep {display:none;} + +ul.item_picked li.article {padding-#GET{left}:15px;background:url([(#CHEMIN_IMAGE{article-12.png}|url_absolue)]) no-repeat [(#GET{left}) ]center;} +ul.item_picked li.rubrique {padding-#GET{left}:15px;background:url([(#CHEMIN_IMAGE{rubrique-12.png}|url_absolue)]) no-repeat [(#GET{left}) ]center;} + +ul.item_picked.select li {padding:2px 0;border:0;font-weight:bold;background:none;float:none;} +ul.item_picked.select ul > li {float:#GET{left};} +ul.item_picked.changing {} + +.picker_bouton {float:#GET{right};clear:both;} + +.item_picker {clear:#GET{left};font-size:0.95em;} +.item_picker .chemin {border-bottom:1px solid #GET{claire};margin:0.5em 0 0.25em;clear:both;} + +.item_picker .frame {background:#fff;border:1px solid #GET{foncee};width:159px;height:400px;float:#GET{left};overflow:auto;position:relative;} +.cadre .cadre_padding .item_picker .frame {width:153px;} +.fiche_objet .cadre .cadre_padding .item_picker .frame {width:148px;} +.item_picker .frame.total_3 {margin-#GET{left}:-58px;border-#GET{left}:3px solid #GET{foncee};} +.item_picker .frame.frame_0 {margin-#GET{left}:0;z-index:1000;} +.item_picker .frame.frame_1 {z-index:1010;} +.item_picker .frame.frame_2 {z-index:1020;} +.item_picker .frame.frame_3 {z-index:1030;} +.item_picker .frame.frame_4 {z-index:1040;} + +.item_picker .frame .frame_close {float:#GET{right};} +.item_picker .frame h2 {margin:0;padding:5px;background:[#(#GET{claire}|couleur_eclaircir)];font-size:1.3em;} +.item_picker .frame .pagination {font-size:0.9em;} + +.item_picker .frame ul {list-style:none;margin:0;padding:0;} +.item_picker .frame ul li {display:block;clear:both;list-style:none;margin:0;padding:0 2px;padding-#GET{left}:15px;position:relative;} +.item_picker .frame ul li.rubrique {background:url([(#CHEMIN_IMAGE{rubrique-12.png}|url_absolue)]) no-repeat[ (#GET{left}) ]2px;padding-#GET{right}:16px;} +.item_picker .frame ul li.article {clear:both;background:url([(#CHEMIN_IMAGE{article-12.png}|url_absolue)]) no-repeat[ (#GET{left}) ]2px;} + +.item_picker .frame ul li:hover,.item_picker .frame ul li.on {background-color:[#(#GET{claire}|couleur_eclaircir)];} +.item_picker .frame a:hover,.item_picker .frame a:hover .ouvrir,.item_picker .frame a:hover .add {background-color:#GET{claire};} + +.item_picker .frame ul li.rubrique .ouvrir {position:absolute;display:block;top:0px;#GET{right}:0px;} +.item_picker .frame ul >li .add {float:#GET{left};clear:#GET{left};} +.item_picker .frame ul li a {display:block;} +.item_picker .frame a {text-decoration:none;} + +.browser .choix_rapide {font-size:0.9em;} +.browser #picker_id {padding:0;margin:0 5px;border:1px solid;} + + +/* + Selecteurs de rubrique / article + ayant une classe li.selecteur_item + n'ont pas de marge a gauche pour occuper toute la largeur +*/ +.formulaire_spip li.selecteur_item { + padding-#GET{left}:10px;background:#fff; +} +.formulaire_spip li.selecteur_item label { + margin-#GET{left}:0;display:block;float:left;padding:2px 0; +} -- GitLab