commit 7d68ea52270bf69611d0b0ca1a2bcd64740a5f7a Author: Stian Lund Date: Sun Mar 3 13:51:38 2024 +0100 New repo diff --git a/README.md b/README.md new file mode 100644 index 0000000..c94a69e --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +modules/: +albumtree +arrow_nav +batchtag +captionator +custom_menus +database_info +delete_cache +downloadfullsize +dupcheck +exif_gps +gallerystats +greydragon +image_fit +latestupdates +moduleorder +movie_tools +permissions_dialog_usability +reset_counts +rwinfo +tag_cloud_page +themedispatcher +treeview +user_info + +themes/: +clean_canvas +greydragon +greydragon_wide_wind +imobile +smk +widesmk diff --git a/modules/.not-used/navcarousel/controllers/admin_navcarousel.php b/modules/.not-used/navcarousel/controllers/admin_navcarousel.php new file mode 100755 index 0000000..5d9dff6 --- /dev/null +++ b/modules/.not-used/navcarousel/controllers/admin_navcarousel.php @@ -0,0 +1,134 @@ +_get_view(); + } + + public function handler() { + access::verify_csrf(); + + $form = $this->_get_form(); + if ($form->validate()) { + $scrollsize = intval($form->navcarousel->scrollsize->value); + $showelements = intval($form->navcarousel->showelements->value); + $carouselwidth = intval($form->navcarousel->carouselwidth->value); + $thumbsize = intval($form->thumbsettings->thumbsize->value); + if ($showelements < 1) { + $showelements = 1; + message::error(t("You must show at least one item.")); + } + if ($scrollsize < 1) { + $scrollsize = 1; + message::error(t("You must scroll by at least one item.")); + } + if ($thumbsize > 150 || $thumbsize < 25) { + $thumbsize = 50; + message::error(t("The size of the thumbnails must be between 25 and 150 pixel.")); + } + if ($carouselwidth < ($thumbsize + 75) && $carouselwidth > 0) { + $carouselwidth = $thumbsize + 75; + message::error(t("The carousel must be at least %pixel wide.", array("pixel" => $carouselwidth))); + } + if ($carouselwidth > 0) { + if ($carouselwidth < ((($thumbsize + 11) * $showelements) + 64)) { + $showelements = ($carouselwidth - 64) / ($thumbsize + 11); + $showelements = intval(floor($showelements)); + message::error(t("With the selected carousel width and thumbnail size you can show a maximum of %itemno items.", array("itemno" => $showelements))); + } + } else { + message::warning(t("The maximum number of displayable items cannot be calculated when the carousel width is set to 0.")); + } + if ($scrollsize > $showelements) { + $scrollsize = $showelements; + message::error(t("The number of items to scroll must not exceed the number of items to show.")); + } + module::set_var( + "navcarousel", "scrollsize", $scrollsize); + module::set_var( + "navcarousel", "showelements", $showelements); + module::set_var( + "navcarousel", "carouselwidth", $carouselwidth); + module::set_var( + "navcarousel", "thumbsize", $thumbsize); + module::set_var( + "navcarousel", "abovephoto", $form->navcarousel->abovephoto->value, true); + module::set_var( + "navcarousel", "noajax", $form->navcarousel->noajax->value, true); + module::set_var( + "navcarousel", "showondomready", $form->navcarousel->showondomready->value, true); + module::set_var( + "navcarousel", "maintainaspect", $form->thumbsettings->maintainaspect->value, true); + module::set_var( + "navcarousel", "nomouseover", $form->thumbsettings->nomouseover->value, true); + module::set_var( + "navcarousel", "noresize", $form->thumbsettings->noresize->value, true); + + message::success(t("Your settings have been saved.")); + url::redirect("admin/navcarousel"); + } + print $this->_get_view($form); + } + + private function _get_view($form=null) { + $v = new Admin_View("admin.html"); + $v->content = new View("admin_navcarousel.html"); + $v->content->form = empty($form) ? $this->_get_form() : $form; + return $v; + } + + private function _get_form() { + $form = new Forge("admin/navcarousel/handler", "", "post", array("id" => "g-admin-form")); + + $group = $form->group("navcarousel")->label(t("Navigation carousel settings")); + $group->input("scrollsize")->label(t('Enter how many items you want to scroll when clicking next or previous')) + ->value(module::get_var("navcarousel", "scrollsize", "7")) + ->rules("valid_numeric|length[1,2]"); + $group->input("showelements")->label(t('Enter how many items you want to be visible')) + ->value(module::get_var("navcarousel", "showelements", "7")) + ->rules("valid_numeric|length[1,2]"); + $group->input("carouselwidth")->label(t('Carousel width (in pixel). If set to 0 the carousel will use the full available width.')) + ->value(module::get_var("navcarousel", "carouselwidth", "600")) + ->rules("valid_numeric|length[1,3]"); + $group->checkbox("abovephoto")->label(t("Show carousel above photo")) + ->checked(module::get_var("navcarousel", "abovephoto", false)); + $group->checkbox("noajax")->label(t("Disable dynamic loading of thumbnails (might be slow for big albums)")) + ->checked(module::get_var("navcarousel", "noajax", false)); + $group->checkbox("showondomready")->label(t("Show carousel before all items are loaded (faster loading on large albums but might cause too early display on Chrome and Opera)")) + ->checked(module::get_var("navcarousel", "showondomready", false)); + + $group = $form->group("thumbsettings")->label(t("Change how thumnails are displayed")); + $group->input("thumbsize")->label(t('Thumbnail size (in pixel)')) + ->value(module::get_var("navcarousel", "thumbsize", "50")) + ->rules("valid_numeric|length[1,3]"); + $group->checkbox("nomouseover")->label(t("Do not show item title and number on mouse over")) + ->checked(module::get_var("navcarousel", "nomouseover", false)); + $group->checkbox("noresize")->label(t("Crop thumbails instead of resizing them.")) + ->onClick("changeaspectstate()") + ->id("noresize") + ->checked(module::get_var("navcarousel", "noresize", false)); + $group->checkbox("maintainaspect")->label(t("Maintain aspect ratio of the items for the thumbnails.")) + ->id("maintainaspect") + ->checked(module::get_var("navcarousel", "maintainaspect", false)); + + $form->submit("submit")->value(t("Save")); + return $form; + } +} diff --git a/modules/.not-used/navcarousel/controllers/navcarousel.php b/modules/.not-used/navcarousel/controllers/navcarousel.php new file mode 100755 index 0000000..7b8125a --- /dev/null +++ b/modules/.not-used/navcarousel/controllers/navcarousel.php @@ -0,0 +1,62 @@ +parent(); + $item_count = -1; + + // Array indexes are 0-based, jCarousel positions are 1-based. + $first = max(0, intval($_GET['first']) - 1); + $last = max($first + 1, intval($_GET['last']) - 1); + + $length = $last - $first + 1; + + // Build the array with the thumbnail URLs + foreach ($parent->viewable()->children() as $photo) { + if (!$photo->is_album()) { + $item_count++; + $itemlist[$item_count] = $photo->thumb_url(); + } + } + + $total = count($itemlist); + $selected = array_slice($itemlist, $first, $length); + + // --- + + header('Content-Type: text/xml'); + + echo ''; + + // Return total number of images so the callback + // can set the size of the carousel. + echo ' ' . $total . ''; + + foreach ($selected as $img) { + echo ' ' . $img . ''; + } + + echo ''; + + } +} diff --git a/modules/.not-used/navcarousel/css/credits.txt b/modules/.not-used/navcarousel/css/credits.txt new file mode 100755 index 0000000..e5ec8c2 --- /dev/null +++ b/modules/.not-used/navcarousel/css/credits.txt @@ -0,0 +1 @@ +Button images copyright by Tango Icon Library Team (http://tango.freedesktop.org/Tango_Icon_Library) \ No newline at end of file diff --git a/modules/.not-used/navcarousel/css/skin.css b/modules/.not-used/navcarousel/css/skin.css new file mode 100755 index 0000000..695779f --- /dev/null +++ b/modules/.not-used/navcarousel/css/skin.css @@ -0,0 +1,122 @@ +.jcarousel-skin-tango .jcarousel-container { + -moz-border-radius: 10px; + background: transparent; + border: 0; +} + +.jcarousel-skin-tango .jcarousel-container-horizontal { + padding: 0 60px; + margin: 0 auto; +} + +.jcarousel-skin-tango .jcarousel-item { + background-color: transparent !important; +} + +.jcarousel-skin-tango .jcarousel-item-horizontal { + margin-right: 2px; + margin-right: 2px; + padding-top: 2px; + text-align: center; +} + +.jcarousel-skin-tango .jcarousel-item-placeholder { + background: #fff; + color: #000; +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-tango .jcarousel-next-horizontal { + position: absolute; + right: 18px; + width: 32px; + height: 32px; + cursor: pointer; + background: transparent url('../images/next-horizontal.png') no-repeat 0 0; + visibility: hidden; +} + +.jcarousel-skin-tango .jcarousel-next-horizontal:hover { + background-position: -32px 0; +} + +.jcarousel-skin-tango .jcarousel-next-horizontal:active { + background-position: -64px 0; +} + +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: -96px 0; +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal { + position: absolute; + left: 18px; + width: 32px; + height: 32px; + cursor: pointer; + background: transparent url('../images/prev-horizontal.png') no-repeat 0 0; + visibility: hidden; +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal:hover { + background-position: -32px 0; +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal:active { + background-position: -64px 0; +} + +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: -96px 0; +} + +.carousel-thumbnail { + padding: 5px; + margin: 0 !important; +} + +.carousel-thumbnail:hover { + box-shadow: 1px 0px 8px #d7e1fa; + -moz-box-shadow: 1px 0px 8px #d7e1fa; + -webkit-box-shadow: 1px 0px 8px #d7e1fa; +} + +.carousel-current { + box-shadow: 1px 0px 8px #d7e1fa; + -moz-box-shadow: 1px 0px 8px #d7e1fa; + -webkit-box-shadow: 1px 0px 8px #d7e1fa; + padding: 5px; + margin: 0 !important; +} + +#navcarousel-wrapper { + width: 100%; + background: url('../images/ajax-loader.gif') no-repeat center center; +} + +#navcarousel { + visibility: hidden; +} + +/** + * RTL Support + */ + +.jcarousel-skin-tango .jcarousel-direction-rtl {direction:rtl;} +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-item-horizontal{ margin-right:0; margin-left:10px;} + +/*horizontal buttons*/ +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-next-horizontal{ + background-image:url('../images/prev-horizontal.png'); right:auto; left:5px; +} +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-prev-horizontal{ + background-image:url('../images/next-horizontal.png'); left:auto; right:5px; +} diff --git a/modules/.not-used/navcarousel/helpers/navcarousel_event.php b/modules/.not-used/navcarousel/helpers/navcarousel_event.php new file mode 100755 index 0000000..a636ea2 --- /dev/null +++ b/modules/.not-used/navcarousel/helpers/navcarousel_event.php @@ -0,0 +1,28 @@ +get("settings_menu") + ->append(Menu::factory("link") + ->id("navcarousel_menu") + ->label(t("Navigation carousel")) + ->url(url::site("admin/navcarousel"))); + } +} diff --git a/modules/.not-used/navcarousel/helpers/navcarousel_theme.php b/modules/.not-used/navcarousel/helpers/navcarousel_theme.php new file mode 100755 index 0000000..cd1603a --- /dev/null +++ b/modules/.not-used/navcarousel/helpers/navcarousel_theme.php @@ -0,0 +1,43 @@ +page_type == "item") { + return $theme->script("jquery.jcarousel.min.js") + . $theme->css("skin.css"); + } + } + + static function photo_bottom($theme) { + if (!module::get_var("navcarousel", "abovephoto", false)) { + if ($theme->page_type == "item") { + return new View("navcarousel.html"); + } + } + } + + static function photo_top($theme) { + if (module::get_var("navcarousel", "abovephoto", false)) { + if ($theme->page_type == "item") { + return new View("navcarousel.html"); + } + } + } +} diff --git a/modules/.not-used/navcarousel/images/ajax-loader.gif b/modules/.not-used/navcarousel/images/ajax-loader.gif new file mode 100755 index 0000000..3288d10 Binary files /dev/null and b/modules/.not-used/navcarousel/images/ajax-loader.gif differ diff --git a/modules/.not-used/navcarousel/images/next-horizontal.png b/modules/.not-used/navcarousel/images/next-horizontal.png new file mode 100755 index 0000000..c9943fd Binary files /dev/null and b/modules/.not-used/navcarousel/images/next-horizontal.png differ diff --git a/modules/.not-used/navcarousel/images/prev-horizontal.png b/modules/.not-used/navcarousel/images/prev-horizontal.png new file mode 100755 index 0000000..e963d28 Binary files /dev/null and b/modules/.not-used/navcarousel/images/prev-horizontal.png differ diff --git a/modules/.not-used/navcarousel/js/jquery.jcarousel.js b/modules/.not-used/navcarousel/js/jquery.jcarousel.js new file mode 100755 index 0000000..90f2459 --- /dev/null +++ b/modules/.not-used/navcarousel/js/jquery.jcarousel.js @@ -0,0 +1,917 @@ +/*! + * jCarousel - Riding carousels with jQuery + * http://sorgalla.com/jcarousel/ + * + * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.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. + * + * Built on top of the jQuery library + * http://jquery.com + * + * Inspired by the "Carousel Component" by Bill Scott + * http://billwscott.com/carousel/ + */ + +(function($) { + /** + * Creates a carousel for all matched elements. + * + * @example $("#mycarousel").jcarousel(); + * @before + * @result + * + *
+ *
+ *
+ *
    + *
  • First item
  • + *
  • Second item
  • + *
+ *
+ *
+ *
+ *
+ *
+ * + * @method jcarousel + * @return jQuery + * @param o {Hash|String} A set of key/value pairs to set as configuration properties or a method name to call on a formerly created instance. + */ + $.fn.jcarousel = function(o) { + if (typeof o == 'string') { + var instance = $(this).data('jcarousel'), args = Array.prototype.slice.call(arguments, 1); + return instance[o].apply(instance, args); + } else + return this.each(function() { + $(this).data('jcarousel', new $jc(this, o)); + }); + }; + + // Default configuration properties. + var defaults = { + vertical: false, + rtl: false, + start: 1, + offset: 1, + size: null, + scroll: 3, + visible: null, + animation: 'normal', + easing: 'swing', + auto: 0, + wrap: null, + initCallback: null, + reloadCallback: null, + itemLoadCallback: null, + itemFirstInCallback: null, + itemFirstOutCallback: null, + itemLastInCallback: null, + itemLastOutCallback: null, + itemVisibleInCallback: null, + itemVisibleOutCallback: null, + buttonNextHTML: '
', + buttonPrevHTML: '
', + buttonNextEvent: 'click', + buttonPrevEvent: 'click', + buttonNextCallback: null, + buttonPrevCallback: null, + itemFallbackDimension: null + }, windowLoaded = false; + + $(window).bind('load.jcarousel', function() { windowLoaded = true; }) + + /** + * The jCarousel object. + * + * @constructor + * @class jcarousel + * @param e {HTMLElement} The element to create the carousel for. + * @param o {Object} A set of key/value pairs to set as configuration properties. + * @cat Plugins/jCarousel + */ + $.jcarousel = function(e, o) { + this.options = $.extend({}, defaults, o || {}); + + this.locked = false; + + this.container = null; + this.clip = null; + this.list = null; + this.buttonNext = null; + this.buttonPrev = null; + + // Only set if not explicitly passed as option + if (!o || o.rtl === undefined) + this.options.rtl = ($(e).attr('dir') || $('html').attr('dir') || '').toLowerCase() == 'rtl'; + + this.wh = !this.options.vertical ? 'width' : 'height'; + this.lt = !this.options.vertical ? (this.options.rtl ? 'right' : 'left') : 'top'; + + // Extract skin class + var skin = '', split = e.className.split(' '); + + for (var i = 0; i < split.length; i++) { + if (split[i].indexOf('jcarousel-skin') != -1) { + $(e).removeClass(split[i]); + skin = split[i]; + break; + } + } + + if (e.nodeName.toUpperCase() == 'UL' || e.nodeName.toUpperCase() == 'OL') { + this.list = $(e); + this.container = this.list.parent(); + + if (this.container.hasClass('jcarousel-clip')) { + if (!this.container.parent().hasClass('jcarousel-container')) + this.container = this.container.wrap('
'); + + this.container = this.container.parent(); + } else if (!this.container.hasClass('jcarousel-container')) + this.container = this.list.wrap('
').parent(); + } else { + this.container = $(e); + this.list = this.container.find('ul,ol').eq(0); + } + + if (skin != '' && this.container.parent()[0].className.indexOf('jcarousel-skin') == -1) + this.container.wrap('
'); + + this.clip = this.list.parent(); + + if (!this.clip.length || !this.clip.hasClass('jcarousel-clip')) + this.clip = this.list.wrap('
').parent(); + + this.buttonNext = $('.jcarousel-next', this.container); + + if (this.buttonNext.size() == 0 && this.options.buttonNextHTML != null) + this.buttonNext = this.clip.after(this.options.buttonNextHTML).next(); + + this.buttonNext.addClass(this.className('jcarousel-next')); + + this.buttonPrev = $('.jcarousel-prev', this.container); + + if (this.buttonPrev.size() == 0 && this.options.buttonPrevHTML != null) + this.buttonPrev = this.clip.after(this.options.buttonPrevHTML).next(); + + this.buttonPrev.addClass(this.className('jcarousel-prev')); + + this.clip.addClass(this.className('jcarousel-clip')).css({ + overflow: 'hidden', + position: 'relative' + }); + this.list.addClass(this.className('jcarousel-list')).css({ + overflow: 'hidden', + position: 'relative', + top: 0, + margin: 0, + padding: 0 + }).css((this.options.rtl ? 'right' : 'left'), 0); + this.container.addClass(this.className('jcarousel-container')).css({ + position: 'relative' + }); + if (!this.options.vertical && this.options.rtl) + this.container.addClass('jcarousel-direction-rtl').attr('dir', 'rtl'); + + var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; + var li = this.list.children('li'); + + var self = this; + + if (li.size() > 0) { + var wh = 0, i = this.options.offset; + li.each(function() { + self.format(this, i++); + wh += self.dimension(this, di); + }); + + this.list.css(this.wh, (wh + 100) + 'px'); + + // Only set if not explicitly passed as option + if (!o || o.size === undefined) + this.options.size = li.size(); + } + + // For whatever reason, .show() does not work in Safari... + this.container.css('display', 'block'); + this.buttonNext.css('display', 'block'); + this.buttonPrev.css('display', 'block'); + + this.funcNext = function() { self.next(); }; + this.funcPrev = function() { self.prev(); }; + this.funcResize = function() { self.reload(); }; + + if (this.options.initCallback != null) + this.options.initCallback(this, 'init'); + + if (!windowLoaded && $.browser.safari) { + this.buttons(false, false); + $(window).bind('load.jcarousel', function() { self.setup(); }); + } else + this.setup(); + }; + + // Create shortcut for internal use + var $jc = $.jcarousel; + + $jc.fn = $jc.prototype = { + jcarousel: '0.2.5' + }; + + $jc.fn.extend = $jc.extend = $.extend; + + $jc.fn.extend({ + /** + * Setups the carousel. + * + * @method setup + * @return undefined + */ + setup: function() { + this.first = null; + this.last = null; + this.prevFirst = null; + this.prevLast = null; + this.animating = false; + this.timer = null; + this.tail = null; + this.inTail = false; + + if (this.locked) + return; + + this.list.css(this.lt, this.pos(this.options.offset) + 'px'); + var p = this.pos(this.options.start); + this.prevFirst = this.prevLast = null; + this.animate(p, false); + + $(window).unbind('resize.jcarousel', this.funcResize).bind('resize.jcarousel', this.funcResize); + }, + + /** + * Clears the list and resets the carousel. + * + * @method reset + * @return undefined + */ + reset: function() { + this.list.empty(); + + this.list.css(this.lt, '0px'); + this.list.css(this.wh, '10px'); + + if (this.options.initCallback != null) + this.options.initCallback(this, 'reset'); + + this.setup(); + }, + + /** + * Reloads the carousel and adjusts positions. + * + * @method reload + * @return undefined + */ + reload: function() { + if (this.tail != null && this.inTail) + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + this.tail); + + this.tail = null; + this.inTail = false; + + if (this.options.reloadCallback != null) + this.options.reloadCallback(this); + + if (this.options.visible != null) { + var self = this; + var di = Math.ceil(this.clipping() / this.options.visible), wh = 0, lt = 0; + this.list.children('li').each(function(i) { + wh += self.dimension(this, di); + if (i + 1 < self.first) + lt = wh; + }); + + this.list.css(this.wh, wh + 'px'); + this.list.css(this.lt, -lt + 'px'); + } + + this.scroll(this.first, false); + }, + + /** + * Locks the carousel. + * + * @method lock + * @return undefined + */ + lock: function() { + this.locked = true; + this.buttons(); + }, + + /** + * Unlocks the carousel. + * + * @method unlock + * @return undefined + */ + unlock: function() { + this.locked = false; + this.buttons(); + }, + + /** + * Sets the size of the carousel. + * + * @method size + * @return undefined + * @param s {Number} The size of the carousel. + */ + size: function(s) { + if (s != undefined) { + this.options.size = s; + if (!this.locked) + this.buttons(); + } + + return this.options.size; + }, + + /** + * Checks whether a list element exists for the given index (or index range). + * + * @method get + * @return bool + * @param i {Number} The index of the (first) element. + * @param i2 {Number} The index of the last element. + */ + has: function(i, i2) { + if (i2 == undefined || !i2) + i2 = i; + + if (this.options.size !== null && i2 > this.options.size) + i2 = this.options.size; + + for (var j = i; j <= i2; j++) { + var e = this.get(j); + if (!e.length || e.hasClass('jcarousel-item-placeholder')) + return false; + } + + return true; + }, + + /** + * Returns a jQuery object with list element for the given index. + * + * @method get + * @return jQuery + * @param i {Number} The index of the element. + */ + get: function(i) { + return $('.jcarousel-item-' + i, this.list); + }, + + /** + * Adds an element for the given index to the list. + * If the element already exists, it updates the inner html. + * Returns the created element as jQuery object. + * + * @method add + * @return jQuery + * @param i {Number} The index of the element. + * @param s {String} The innerHTML of the element. + */ + add: function(i, s) { + var e = this.get(i), old = 0, n = $(s); + + if (e.length == 0) { + var c, e = this.create(i), j = $jc.intval(i); + while (c = this.get(--j)) { + if (j <= 0 || c.length) { + j <= 0 ? this.list.prepend(e) : c.after(e); + break; + } + } + } else + old = this.dimension(e); + + if (n.get(0).nodeName.toUpperCase() == 'LI') { + e.replaceWith(n); + e = n; + } else + e.empty().append(s); + + this.format(e.removeClass(this.className('jcarousel-item-placeholder')), i); + + var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; + var wh = this.dimension(e, di) - old; + + if (i > 0 && i < this.first) + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - wh + 'px'); + + this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) + wh + 'px'); + + return e; + }, + + /** + * Removes an element for the given index from the list. + * + * @method remove + * @return undefined + * @param i {Number} The index of the element. + */ + remove: function(i) { + var e = this.get(i); + + // Check if item exists and is not currently visible + if (!e.length || (i >= this.first && i <= this.last)) + return; + + var d = this.dimension(e); + + if (i < this.first) + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + d + 'px'); + + e.remove(); + + this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) - d + 'px'); + }, + + /** + * Moves the carousel forwards. + * + * @method next + * @return undefined + */ + next: function() { + this.stopAuto(); + + if (this.tail != null && !this.inTail) + this.scrollTail(false); + else + this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'last') && this.options.size != null && this.last == this.options.size) ? 1 : this.first + this.options.scroll); + }, + + /** + * Moves the carousel backwards. + * + * @method prev + * @return undefined + */ + prev: function() { + this.stopAuto(); + + if (this.tail != null && this.inTail) + this.scrollTail(true); + else + this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'first') && this.options.size != null && this.first == 1) ? this.options.size : this.first - this.options.scroll); + }, + + /** + * Scrolls the tail of the carousel. + * + * @method scrollTail + * @return undefined + * @param b {Boolean} Whether scroll the tail back or forward. + */ + scrollTail: function(b) { + if (this.locked || this.animating || !this.tail) + return; + + var pos = $jc.intval(this.list.css(this.lt)); + + !b ? pos -= this.tail : pos += this.tail; + this.inTail = !b; + + // Save for callbacks + this.prevFirst = this.first; + this.prevLast = this.last; + + this.animate(pos); + }, + + /** + * Scrolls the carousel to a certain position. + * + * @method scroll + * @return undefined + * @param i {Number} The index of the element to scoll to. + * @param a {Boolean} Flag indicating whether to perform animation. + */ + scroll: function(i, a) { + if (this.locked || this.animating) + return; + + this.animate(this.pos(i), a); + }, + + /** + * Prepares the carousel and return the position for a certian index. + * + * @method pos + * @return {Number} + * @param i {Number} The index of the element to scoll to. + */ + pos: function(i) { + var pos = $jc.intval(this.list.css(this.lt)); + + if (this.locked || this.animating) + return pos; + + if (this.options.wrap != 'circular') + i = i < 1 ? 1 : (this.options.size && i > this.options.size ? this.options.size : i); + + var back = this.first > i; + + // Create placeholders, new list width/height + // and new list position + var f = this.options.wrap != 'circular' && this.first <= 1 ? 1 : this.first; + var c = back ? this.get(f) : this.get(this.last); + var j = back ? f : f - 1; + var e = null, l = 0, p = false, d = 0, g; + + while (back ? --j >= i : ++j < i) { + e = this.get(j); + p = !e.length; + if (e.length == 0) { + e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); + c[back ? 'before' : 'after' ](e); + + if (this.first != null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) { + g = this.get(this.index(j)); + if (g.length) + e = this.add(j, g.clone(true)); + } + } + + c = e; + d = this.dimension(e); + + if (p) + l += d; + + if (this.first != null && (this.options.wrap == 'circular' || (j >= 1 && (this.options.size == null || j <= this.options.size)))) + pos = back ? pos + d : pos - d; + } + + // Calculate visible items + var clipping = this.clipping(); + var cache = []; + var visible = 0, j = i, v = 0; + var c = this.get(i - 1); + + while (++visible) { + e = this.get(j); + p = !e.length; + if (e.length == 0) { + e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); + // This should only happen on a next scroll + c.length == 0 ? this.list.prepend(e) : c[back ? 'before' : 'after' ](e); + + if (this.first != null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) { + g = this.get(this.index(j)); + if (g.length) + e = this.add(j, g.clone(true)); + } + } + + c = e; + var d = this.dimension(e); + if (d == 0) { + throw new Error('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...'); + } + + if (this.options.wrap != 'circular' && this.options.size !== null && j > this.options.size) + cache.push(e); + else if (p) + l += d; + + v += d; + + if (v >= clipping) + break; + + j++; + } + + // Remove out-of-range placeholders + for (var x = 0; x < cache.length; x++) + cache[x].remove(); + + // Resize list + if (l > 0) { + this.list.css(this.wh, this.dimension(this.list) + l + 'px'); + + if (back) { + pos -= l; + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - l + 'px'); + } + } + + // Calculate first and last item + var last = i + visible - 1; + if (this.options.wrap != 'circular' && this.options.size && last > this.options.size) + last = this.options.size; + + if (j > last) { + visible = 0, j = last, v = 0; + while (++visible) { + var e = this.get(j--); + if (!e.length) + break; + v += this.dimension(e); + if (v >= clipping) + break; + } + } + + var first = last - visible + 1; + if (this.options.wrap != 'circular' && first < 1) + first = 1; + + if (this.inTail && back) { + pos += this.tail; + this.inTail = false; + } + + this.tail = null; + if (this.options.wrap != 'circular' && last == this.options.size && (last - visible + 1) >= 1) { + var m = $jc.margin(this.get(last), !this.options.vertical ? 'marginRight' : 'marginBottom'); + if ((v - m) > clipping) + this.tail = v - clipping - m; + } + + // Adjust position + while (i-- > first) + pos += this.dimension(this.get(i)); + + // Save visible item range + this.prevFirst = this.first; + this.prevLast = this.last; + this.first = first; + this.last = last; + + return pos; + }, + + /** + * Animates the carousel to a certain position. + * + * @method animate + * @return undefined + * @param p {Number} Position to scroll to. + * @param a {Boolean} Flag indicating whether to perform animation. + */ + animate: function(p, a) { + if (this.locked || this.animating) + return; + + this.animating = true; + + var self = this; + var scrolled = function() { + self.animating = false; + + if (p == 0) + self.list.css(self.lt, 0); + + if (self.options.wrap == 'circular' || self.options.wrap == 'both' || self.options.wrap == 'last' || self.options.size == null || self.last < self.options.size) + self.startAuto(); + + self.buttons(); + self.notify('onAfterAnimation'); + + // This function removes items which are appended automatically for circulation. + // This prevents the list from growing infinitely. + if (self.options.wrap == 'circular' && self.options.size !== null) + for (var i = self.prevFirst; i <= self.prevLast; i++) + if (i !== null && !(i >= self.first && i <= self.last) && (i < 1 || i > self.options.size)) + self.remove(i); + }; + + this.notify('onBeforeAnimation'); + + // Animate + if (!this.options.animation || a == false) { + this.list.css(this.lt, p + 'px'); + scrolled(); + } else { + var o = !this.options.vertical ? (this.options.rtl ? {'right': p} : {'left': p}) : {'top': p}; + this.list.animate(o, this.options.animation, this.options.easing, scrolled); + } + }, + + /** + * Starts autoscrolling. + * + * @method auto + * @return undefined + * @param s {Number} Seconds to periodically autoscroll the content. + */ + startAuto: function(s) { + if (s != undefined) + this.options.auto = s; + + if (this.options.auto == 0) + return this.stopAuto(); + + if (this.timer != null) + return; + + var self = this; + this.timer = setTimeout(function() { self.next(); }, this.options.auto * 1000); + }, + + /** + * Stops autoscrolling. + * + * @method stopAuto + * @return undefined + */ + stopAuto: function() { + if (this.timer == null) + return; + + clearTimeout(this.timer); + this.timer = null; + }, + + /** + * Sets the states of the prev/next buttons. + * + * @method buttons + * @return undefined + */ + buttons: function(n, p) { + if (n == undefined || n == null) { + var n = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'first') || this.options.size == null || this.last < this.options.size); + if (!this.locked && (!this.options.wrap || this.options.wrap == 'first') && this.options.size != null && this.last >= this.options.size) + n = this.tail != null && !this.inTail; + } + + if (p == undefined || p == null) { + var p = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'last') || this.first > 1); + if (!this.locked && (!this.options.wrap || this.options.wrap == 'last') && this.options.size != null && this.first == 1) + p = this.tail != null && this.inTail; + } + + var self = this; + + this.buttonNext[n ? 'bind' : 'unbind'](this.options.buttonNextEvent + '.jcarousel', this.funcNext)[n ? 'removeClass' : 'addClass'](this.className('jcarousel-next-disabled')).attr('disabled', n ? false : true); + this.buttonPrev[p ? 'bind' : 'unbind'](this.options.buttonPrevEvent + '.jcarousel', this.funcPrev)[p ? 'removeClass' : 'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled', p ? false : true); + + if (this.options.buttonNextCallback != null && this.buttonNext.data('jcarouselstate') != n) { + this.buttonNext.each(function() { self.options.buttonNextCallback(self, this, n); }).data('jcarouselstate', n); + } + + if (this.options.buttonPrevCallback != null && (this.buttonPrev.data('jcarouselstate') != p)) { + this.buttonPrev.each(function() { self.options.buttonPrevCallback(self, this, p); }).data('jcarouselstate', p); + } + }, + + /** + * Notify callback of a specified event. + * + * @method notify + * @return undefined + * @param evt {String} The event name + */ + notify: function(evt) { + var state = this.prevFirst == null ? 'init' : (this.prevFirst < this.first ? 'next' : 'prev'); + + // Load items + this.callback('itemLoadCallback', evt, state); + + if (this.prevFirst !== this.first) { + this.callback('itemFirstInCallback', evt, state, this.first); + this.callback('itemFirstOutCallback', evt, state, this.prevFirst); + } + + if (this.prevLast !== this.last) { + this.callback('itemLastInCallback', evt, state, this.last); + this.callback('itemLastOutCallback', evt, state, this.prevLast); + } + + this.callback('itemVisibleInCallback', evt, state, this.first, this.last, this.prevFirst, this.prevLast); + this.callback('itemVisibleOutCallback', evt, state, this.prevFirst, this.prevLast, this.first, this.last); + }, + + callback: function(cb, evt, state, i1, i2, i3, i4) { + if (this.options[cb] == undefined || (typeof this.options[cb] != 'object' && evt != 'onAfterAnimation')) + return; + + var callback = typeof this.options[cb] == 'object' ? this.options[cb][evt] : this.options[cb]; + + if (!$.isFunction(callback)) + return; + + var self = this; + + if (i1 === undefined) + callback(self, state, evt); + else if (i2 === undefined) + this.get(i1).each(function() { callback(self, this, i1, state, evt); }); + else { + for (var i = i1; i <= i2; i++) + if (i !== null && !(i >= i3 && i <= i4)) + this.get(i).each(function() { callback(self, this, i, state, evt); }); + } + }, + + create: function(i) { + return this.format('
  • ', i); + }, + + format: function(e, i) { + var e = $(e), split = e.get(0).className.split(' '); + for (var j = 0; j < split.length; j++) { + if (split[j].indexOf('jcarousel-') != -1) { + e.removeClass(split[j]); + } + } + e.addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-' + i)).css({ + 'float': (this.options.rtl ? 'right' : 'left'), + 'list-style': 'none' + }).attr('jcarouselindex', i); + return e; + }, + + className: function(c) { + return c + ' ' + c + (!this.options.vertical ? '-horizontal' : '-vertical'); + }, + + dimension: function(e, d) { + var el = e.jquery != undefined ? e[0] : e; + + var old = !this.options.vertical ? + (el.offsetWidth || $jc.intval(this.options.itemFallbackDimension)) + $jc.margin(el, 'marginLeft') + $jc.margin(el, 'marginRight') : + (el.offsetHeight || $jc.intval(this.options.itemFallbackDimension)) + $jc.margin(el, 'marginTop') + $jc.margin(el, 'marginBottom'); + + if (d == undefined || old == d) + return old; + + var w = !this.options.vertical ? + d - $jc.margin(el, 'marginLeft') - $jc.margin(el, 'marginRight') : + d - $jc.margin(el, 'marginTop') - $jc.margin(el, 'marginBottom'); + + $(el).css(this.wh, w + 'px'); + + return this.dimension(el); + }, + + clipping: function() { + return !this.options.vertical ? + this.clip[0].offsetWidth - $jc.intval(this.clip.css('borderLeftWidth')) - $jc.intval(this.clip.css('borderRightWidth')) : + this.clip[0].offsetHeight - $jc.intval(this.clip.css('borderTopWidth')) - $jc.intval(this.clip.css('borderBottomWidth')); + }, + + index: function(i, s) { + if (s == undefined) + s = this.options.size; + + return Math.round((((i-1) / s) - Math.floor((i-1) / s)) * s) + 1; + } + }); + + $jc.extend({ + /** + * Gets/Sets the global default configuration properties. + * + * @method defaults + * @return {Object} + * @param d {Object} A set of key/value pairs to set as configuration properties. + */ + defaults: function(d) { + return $.extend(defaults, d || {}); + }, + + margin: function(e, p) { + if (!e) + return 0; + + var el = e.jquery != undefined ? e[0] : e; + + if (p == 'marginRight' && $.browser.safari) { + var old = {'display': 'block', 'float': 'none', 'width': 'auto'}, oWidth, oWidth2; + + $.swap(el, old, function() { oWidth = el.offsetWidth; }); + + old['marginRight'] = 0; + $.swap(el, old, function() { oWidth2 = el.offsetWidth; }); + + return oWidth2 - oWidth; + } + + return $jc.intval($.css(el, p)); + }, + + intval: function(v) { + v = parseInt(v); + return isNaN(v) ? 0 : v; + } + }); + +})(jQuery); diff --git a/modules/.not-used/navcarousel/js/jquery.jcarousel.min.js b/modules/.not-used/navcarousel/js/jquery.jcarousel.min.js new file mode 100755 index 0000000..0b8313a --- /dev/null +++ b/modules/.not-used/navcarousel/js/jquery.jcarousel.min.js @@ -0,0 +1,16 @@ +/*! + * jCarousel - Riding carousels with jQuery + * http://sorgalla.com/jcarousel/ + * + * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.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. + * + * Built on top of the jQuery library + * http://jquery.com + * + * Inspired by the "Carousel Component" by Bill Scott + * http://billwscott.com/carousel/ + */ + +(function(i){i.fn.jcarousel=function(a){if(typeof a=="string"){var c=i(this).data("jcarousel"),b=Array.prototype.slice.call(arguments,1);return c[a].apply(c,b)}else return this.each(function(){i(this).data("jcarousel",new h(this,a))})};var p={vertical:false,rtl:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null, itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:"
    ",buttonPrevHTML:"
    ",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},q=false;i(window).bind("load.jcarousel",function(){q=true});i.jcarousel=function(a,c){this.options=i.extend({},p,c||{});this.locked=false;this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;if(!c||c.rtl===undefined)this.options.rtl= (i(a).attr("dir")||i("html").attr("dir")||"").toLowerCase()=="rtl";this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical?this.options.rtl?"right":"left":"top";for(var b="",d=a.className.split(" "),e=0;e");this.container=this.container.parent()}else if(!this.container.hasClass("jcarousel-container"))this.container=this.list.wrap("
    ").parent()}else{this.container=i(a);this.list=this.container.find("ul,ol").eq(0)}b!=""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('
    ');this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass("jcarousel-clip"))this.clip=this.list.wrap("
    ").parent(); this.buttonNext=i(".jcarousel-next",this.container);if(this.buttonNext.size()==0&&this.options.buttonNextHTML!=null)this.buttonNext=this.clip.after(this.options.buttonNextHTML).next();this.buttonNext.addClass(this.className("jcarousel-next"));this.buttonPrev=i(".jcarousel-prev",this.container);if(this.buttonPrev.size()==0&&this.options.buttonPrevHTML!=null)this.buttonPrev=this.clip.after(this.options.buttonPrevHTML).next();this.buttonPrev.addClass(this.className("jcarousel-prev"));this.clip.addClass(this.className("jcarousel-clip")).css({overflow:"hidden", position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"});!this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var f=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;b=this.list.children("li");var g= this;if(b.size()>0){var j=0;e=this.options.offset;b.each(function(){g.format(this,e++);j+=g.dimension(this,f)});this.list.css(this.wh,j+100+"px");if(!c||c.size===undefined)this.options.size=b.size()}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display","block");this.funcNext=function(){g.next()};this.funcPrev=function(){g.prev()};this.funcResize=function(){g.reload()};this.options.initCallback!=null&&this.options.initCallback(this,"init");if(!q&& i.browser.safari){this.buttons(false,false);i(window).bind("load.jcarousel",function(){g.setup()})}else this.setup()};var h=i.jcarousel;h.fn=h.prototype={jcarousel:"0.2.5"};h.fn.extend=h.extend=i.extend;h.fn.extend({setup:function(){this.prevLast=this.prevFirst=this.last=this.first=null;this.animating=false;this.tail=this.timer=null;this.inTail=false;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var a=this.pos(this.options.start);this.prevFirst=this.prevLast=null;this.animate(a, false);i(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize)}},reset:function(){this.list.empty();this.list.css(this.lt,"0px");this.list.css(this.wh,"10px");this.options.initCallback!=null&&this.options.initCallback(this,"reset");this.setup()},reload:function(){this.tail!=null&&this.inTail&&this.list.css(this.lt,h.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=false;this.options.reloadCallback!=null&&this.options.reloadCallback(this);if(this.options.visible!= null){var a=this,c=Math.ceil(this.clipping()/this.options.visible),b=0,d=0;this.list.children("li").each(function(e){b+=a.dimension(this,c);if(e+1this.options.size)c=this.options.size;for(var b=a;b<=c;b++){var d=this.get(b);if(!d.length||d.hasClass("jcarousel-item-placeholder"))return false}return true},get:function(a){return i(".jcarousel-item-"+a,this.list)},add:function(a,c){var b=this.get(a),d=0,e=i(c);if(b.length==0){var f;b=this.create(a);for(var g=h.intval(a);f=this.get(--g);)if(g<=0||f.length){g<=0?this.list.prepend(b):f.after(b);break}}else d=this.dimension(b);if(e.get(0).nodeName.toUpperCase()=="LI"){b.replaceWith(e); b=e}else b.empty().append(c);this.format(b.removeClass(this.className("jcarousel-item-placeholder")),a);e=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;d=this.dimension(b,e)-d;a>0&&a=this.first&&a<=this.last)){var b=this.dimension(c);athis.options.size?this.options.size:a;for(var b=this.first>a,d=this.options.wrap!="circular"&&this.first<=1?1:this.first,e=b?this.get(d):this.get(this.last),f=b?d:d-1,g=null,j=0,l=false,k=0;b?--f>=a:++fthis.options.size)){e=this.get(this.index(f)); if(e.length)g=this.add(f,e.clone(true))}}e=g;k=this.dimension(g);if(l)j+=k;if(this.first!=null&&(this.options.wrap=="circular"||f>=1&&(this.options.size==null||f<=this.options.size)))c=b?c+k:c-k}d=this.clipping();var o=[],n=0;f=a;var m=0;for(e=this.get(a-1);++n;){g=this.get(f);l=!g.length;if(g.length==0){g=this.create(f).addClass(this.className("jcarousel-item-placeholder"));e.length==0?this.list.prepend(g):e[b?"before":"after"](g);if(this.first!=null&&this.options.wrap=="circular"&&this.options.size!== null&&(f<=0||f>this.options.size)){e=this.get(this.index(f));if(e.length)g=this.add(f,e.clone(true))}}e=g;k=this.dimension(g);if(k==0)throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...");if(this.options.wrap!="circular"&&this.options.size!==null&&f>this.options.size)o.push(g);else if(l)j+=k;m+=k;if(m>=d)break;f++}for(g=0;g0){this.list.css(this.wh,this.dimension(this.list)+j+"px");if(b){c-=j;this.list.css(this.lt,h.intval(this.list.css(this.lt))- j+"px")}}j=a+n-1;if(this.options.wrap!="circular"&&this.options.size&&j>this.options.size)j=this.options.size;if(f>j){n=0;f=j;for(m=0;++n;){g=this.get(f--);if(!g.length)break;m+=this.dimension(g);if(m>=d)break}}f=j-n+1;if(this.options.wrap!="circular"&&f<1)f=1;if(this.inTail&&b){c+=this.tail;this.inTail=false}this.tail=null;if(this.options.wrap!="circular"&&j==this.options.size&&j-n+1>=1){b=h.margin(this.get(j),!this.options.vertical?"marginRight":"marginBottom");if(m-b>d)this.tail=m-d-b}for(;a-- > f;)c+=this.dimension(this.get(a));this.prevFirst=this.first;this.prevLast=this.last;this.first=f;this.last=j;return c},animate:function(a,c){if(!(this.locked||this.animating)){this.animating=true;var b=this,d=function(){b.animating=false;a==0&&b.list.css(b.lt,0);if(b.options.wrap=="circular"||b.options.wrap=="both"||b.options.wrap=="last"||b.options.size==null||b.last=b.first&&e<=b.last)&&(e<1||e>b.options.size))b.remove(e)};this.notify("onBeforeAnimation");if(!this.options.animation||c==false){this.list.css(this.lt,a+"px");d()}else this.list.animate(!this.options.vertical?this.options.rtl?{right:a}:{left:a}:{top:a},this.options.animation,this.options.easing,d)}},startAuto:function(a){if(a!=undefined)this.options.auto=a;if(this.options.auto==0)return this.stopAuto();if(this.timer==null){var c=this;this.timer=setTimeout(function(){c.next()}, this.options.auto*1E3)}},stopAuto:function(){if(this.timer!=null){clearTimeout(this.timer);this.timer=null}},buttons:function(a,c){if(a==undefined||a==null){a=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size==null||this.last=this.options.size)a=this.tail!=null&&!this.inTail}if(c==undefined||c==null){c=!this.locked&&this.options.size!== 0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!=null&&this.first==1)c=this.tail!=null&&this.inTail}var b=this;this.buttonNext[a?"bind":"unbind"](this.options.buttonNextEvent+".jcarousel",this.funcNext)[a?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",a?false:true);this.buttonPrev[c?"bind":"unbind"](this.options.buttonPrevEvent+".jcarousel",this.funcPrev)[c?"removeClass": "addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",c?false:true);this.options.buttonNextCallback!=null&&this.buttonNext.data("jcarouselstate")!=a&&this.buttonNext.each(function(){b.options.buttonNextCallback(b,this,a)}).data("jcarouselstate",a);this.options.buttonPrevCallback!=null&&this.buttonPrev.data("jcarouselstate")!=c&&this.buttonPrev.each(function(){b.options.buttonPrevCallback(b,this,c)}).data("jcarouselstate",c)},notify:function(a){var c=this.prevFirst==null?"init":this.prevFirst< this.first?"next":"prev";this.callback("itemLoadCallback",a,c);if(this.prevFirst!==this.first){this.callback("itemFirstInCallback",a,c,this.first);this.callback("itemFirstOutCallback",a,c,this.prevFirst)}if(this.prevLast!==this.last){this.callback("itemLastInCallback",a,c,this.last);this.callback("itemLastOutCallback",a,c,this.prevLast)}this.callback("itemVisibleInCallback",a,c,this.first,this.last,this.prevFirst,this.prevLast);this.callback("itemVisibleOutCallback",a,c,this.prevFirst,this.prevLast, this.first,this.last)},callback:function(a,c,b,d,e,f,g){if(!(this.options[a]==undefined||typeof this.options[a]!="object"&&c!="onAfterAnimation")){var j=typeof this.options[a]=="object"?this.options[a][c]:this.options[a];if(i.isFunction(j)){var l=this;if(d===undefined)j(l,b,c);else if(e===undefined)this.get(d).each(function(){j(l,this,d,b,c)});else for(var k=d;k<=e;k++)k!==null&&!(k>=f&&k<=g)&&this.get(k).each(function(){j(l,this,k,b,c)})}}},create:function(a){return this.format("
  • ",a)},format:function(a, c){a=i(a);for(var b=a.get(0).className.split(" "),d=0;d + +
    +

    +

    +

    + If you are experiencing this bug then please enable the option 'Disable dynamic loading of thumbnails'.
    + I am working on fixing this bug and will release an update as soon as possible.") ?>

    + +
    diff --git a/modules/.not-used/navcarousel/views/navcarousel.html.php b/modules/.not-used/navcarousel/views/navcarousel.html.php new file mode 100755 index 0000000..508cafb --- /dev/null +++ b/modules/.not-used/navcarousel/views/navcarousel.html.php @@ -0,0 +1,202 @@ +item->parent()->viewable()->children_count(); + $itemoffset = intval(floor($showelements / 2)); + if ($childcount <= $showelements) { + $itemoffset = 1; + } else { + $itempos = $theme->item->parent()->get_position($theme->item); + $itemoffset = $itempos - $itemoffset; + if ($itemoffset < 1) { + $itemoffset = 1; + } + if (($itemoffset + $showelements) > $childcount) { + $itemoffset = $childcount - $showelements + 1; + } + } + if (module::get_var("navcarousel", "noajax", false)) { + $ajaxhandler = ""; + } else { + $ajaxhandler = "itemLoadCallback: navcarousel_itemLoadCallback,\n"; + } + if (module::get_var("navcarousel", "showondomready", false)) { + $onwinload = ""; + } else { + $onwinload = "});\n + $(window).load(function () {\n"; + } + echo "\n + \n + \n + "; + $thumbsize = module::get_var("navcarousel", "thumbsize", "50"); + $parent = $item->parent(); + $item_counter = 0; + $item_offset = 0; + $maintain_aspect = module::get_var("navcarousel", "maintainaspect", false); + $no_resize = module::get_var("navcarousel", "noresize", false); + $no_ajax = module::get_var("navcarousel", "noajax", false); +?> + + +where("state", "!=", 2) + ->count_all(); + if ($count == 0) { + site_status::clear("pending_user_registrations"); + } + list ($form, $errors) = $this->_get_form(); + print $this->_get_admin_view($form, $errors); + } + + public function update() { + access::verify_csrf(); + + $post = new Validation($_POST); + $post->add_rules("policy", "required"); + $post->add_rules("group", array($this, "passthru")); + $post->add_rules("email_verification", array($this, "passthru")); + // added Shad Laws, v2 + $post->add_rules("admin_notify", array($this, "passthru")); + $post->add_rules("subject_prefix", array($this, "passthru")); + $group_list = array(); + if ($post->validate()) { + module::set_var("registration", "policy", $post->policy); + module::set_var("registration", "default_group", $post->group); + module::set_var("registration", "email_verification", !empty($post->email_verification)); + // added Shad Laws, v2 + module::set_var("registration", "admin_notify", !empty($post->admin_notify)); + module::set_var("registration", "subject_prefix", $post->subject_prefix); + + message::success(t("Registration defaults have been updated.")); + + url::redirect("admin/register"); + } else { + list ($form, $errors) = $this->_get_form(); + $form = array_merge($form, $post->as_array()); + $errors = array_merge($errors, $post->errors()); + print $this->_get_admin_view($form, $errors); + } + } + + // We need this validation callback in order to have the optional fields copied to + // validation array. + public function passthru($field) { + return true; + } + + public function activate() { + access::verify_csrf(); + + $post = new Validation($_POST); + $post->add_rules("activate_users", "required"); + $post->add_rules("activate", "alpha_numeric"); + if ($post->validate()) { + $names = array(); + if (!empty($post->activate)) { + foreach ($post->activate as $id) { + $user = register::create_new_user($id); + $names[] = $user->name; + } + + message::success(t("Activated %users.", array("users" => implode(", ", $names)))); + } + + $count = ORM::factory("pending_user") + ->where("state", "!=", 2) + ->count_all(); + + if ($count == 0) { + site_status::clear("pending_user_registrations"); + } + url::redirect("admin/register"); + } + + list ($form, $errors) = $this->_get_form(); + $form = array_merge($form, $post->as_array()); + $errors = array_merge($errors, $post->errors()); + print $this->_get_admin_view($form, $errors); + } + + private function _get_admin_view($form, $errors) { + $v = new Admin_View("admin.html"); + $v->page_title = t("User registration"); + $v->content = new View("admin_register.html"); + $v->content->action = "admin/register/update"; + $v->content->policy_list = + array("admin_only" => t("Only site administrators can create new user accounts."), + "visitor" => + t("Visitors can create accounts and no administrator approval is required."), + "admin_approval" => + t("Visitors can create accounts but administrator approval is required.")); + $admin = identity::admin_user(); + $v->content->disable_email = + empty($admin->email) || $form["policy"] == "admin_only" ? "disabled" : ""; + if (empty($admin->email)) { + module::set_var("registration", "email_verification", false); + } + // below lines added Shad Laws, v2 + $v->content->disable_admin_notify = + empty($admin->email) || $form["policy"] !== "admin_approval" ? "disabled" : ""; + if (empty($admin->email)) { + module::set_var("registration", "admin_notify", false); + } + + $v->content->group_list = array(); + foreach (identity::groups() as $group) { + if ($group->id != identity::everybody()->id && + $group->id != identity::registered_users()->id) { + $v->content->group_list[$group->id] = $group->name; + } + } + $hidden = array("name" => "csrf", "value" => access::csrf_token()); + if (count($v->content->group_list)) { + $v->content->group_list = + array("" => t("Choose the default group")) + $v->content->group_list; + } else { + $hidden["group"] = ""; + } + $v->content->hidden = $hidden; + $v->content->pending = ORM::factory("pending_user")->find_all(); + $v->content->activate = "admin/register/activate"; + $v->content->form = $form; + $v->content->errors = $errors; + return $v; + } + + private function _get_form() { + $form = array("policy" => module::get_var("registration", "policy"), + "group" => module::get_var("registration", "default_group"), + "email_verification" => module::get_var("registration", "email_verification"), + // added Shad Laws, v2 + "subject_prefix" => module::get_var("registration", "subject_prefix"), + "admin_notify" => module::get_var("registration", "admin_notify")); + $errors = array_fill_keys(array_keys($form), ""); + + return array($form, $errors); + } +} \ No newline at end of file diff --git a/modules/.not-used/register/controllers/register.php b/modules/.not-used/register/controllers/register.php new file mode 100755 index 0000000..285e417 --- /dev/null +++ b/modules/.not-used/register/controllers/register.php @@ -0,0 +1,196 @@ +_get_form(); + } + + public function handler() { + access::verify_csrf(); + + $form = $this->_get_form(); + $valid = $form->validate(); + + $name = $form->register_user->inputs["name"]->value; + if (register::check_user_name($name)) { + $form->register_user->inputs["name"]->add_error("in_use", 1); + $valid = false; + } + if ($valid) { + $pending_user = register::create_pending_request($form); + $policy = module::get_var("registration", "policy"); + if ($policy == "visitor") { + if ($pending_user->state == 1) { + $user = register::create_new_user($pending_user->id); + Session::instance()->set("registration_first_usage"); + auth::login($user); + Session::instance()->set("registration_first_usage", true); + $pending_user->delete(); + } else { + $user = register::create_new_user($pending_user->id, true); + message::success(t("A confirmation email has been sent to your email address.")); + } + } else if ($pending_user->state == 1) { + site_status::warning( + t("There are pending user registration. Review now!", + // modified by Shad Laws, v2 + // array("url" => html::mark_clean(url::site("admin/register")))), + array("url" => html::mark_clean(url::site("admin/register")), "locale" => module::get_var("gallery", "default_locale"))), + "pending_user_registrations"); + message::success(t("Your registration request is awaiting administrator approval")); + // added by Shad Laws, v2 + if (module::get_var("registration", "admin_notify") == 1) { + register::send_admin_notify($pending_user); + } + } else { + register::send_confirmation($pending_user); + message::success(t("A confirmation email has been sent to your email address.")); + } + + json::reply(array("result" => "success")); + } else { + json::reply(array("result" => "error", "html" => (string)$form)); + } + } + + public function confirm($hash) { + $pending_user = ORM::factory("pending_user") + ->where("hash", "=", $hash) + ->where("state", "=", 0) + ->find(); + if ($pending_user->loaded()) { + // @todo add a request date to the pending user table and check that it hasn't expired + $policy = module::get_var("registration", "policy"); + $pending_user->state = 1; + $pending_user->save(); + if ($policy == "vistor") { + $user = register::create_new_user($pending_user->id); + message::success(t("Your registration request has been approved")); + auth::login($user); + Session::instance()->set("registration_first_usage", true); + $pending_user->delete(); + } else { + site_status::warning( + t("There are pending user registration. Review now!", + // modified by Shad Laws, v2 + // array("url" => html::mark_clean(url::site("admin/register")))), + array("url" => html::mark_clean(url::site("admin/register")), "locale" => module::get_var("gallery", "default_locale"))), + "pending_user_registrations"); + message::success(t("Your registration request is awaiting administrator approval")); + // added by Shad Laws, v2 + if (module::get_var("registration", "admin_notify") == 1) { + register::send_admin_notify($pending_user); + } + } + } else { + message::error(t("Your registration request is no longer valid, Please re-register.")); + } + url::redirect(item::root()->abs_url()); + } + + public function first($hash) { + $pending_user = ORM::factory("pending_user") + ->where("hash", "=", $hash) + ->where("state", "=", 2) + ->find(); + if ($pending_user->loaded()) { + // @todo add a request date to the pending user table and check that it hasn't expired + $user = identity::lookup_user_by_name($pending_user->name); + if (!empty($user)) { + auth::login($user); + Session::instance()->set("registration_first_usage", true); + $pending_user->delete(); + } + url::redirect(item::root()->abs_url()); + } else { + message::warning(t("Your account is ready to use so please login.")); + } + url::redirect(item::root()->abs_url()); + } + + public function welcome_message() { + $user = identity::active_user(); + $password = substr(md5(rand()), 0, 8); + $user->password = $password; + $user->save(); + + $v = new View("register_welcome_message.html"); + $v->user = $user; + $v->password = $password; + print $v; + } + + public function change_password($id, $password) { + $user = user::lookup($id); + print $this->_get_change_password_form($user, $password); + } + + private function _get_form() { + $minimum_length = module::get_var("user", "mininum_password_length", 5); + $form = new Forge("register/handler", "", "post", array("id" => "g-register-form")); + $group = $form->group("register_user")->label(t("Register user")); + $group->input("name")->label(t("Username"))->id("g-username") + ->rules("required|length[1,32]") + ->error_messages("in_use", t("There is already a user with that username")); + $group->input("full_name")->label(t("Full Name"))->id("g-fullname") + ->rules("length[0, 255]"); + $group->input("email")->label(t("Email"))->id("g-email") + ->rules("required|valid_email|length[1,255]"); + $group->input("email2")->label(t("Confirm email"))->id("g-email2") + ->matches($group->email); + // modified by Shad Laws, v2 + // $group->input("url")->label(t("URL"))->id("g-url") + $group->input("url")->label(t("URL")." (".t("optional").")")->id("g-url") + ->rules("valid_url"); + + module::event("register_add_form", $form); + module::event("captcha_protect_form", $form); + $group->submit("")->value(t("Register")); + return $form; + } + + /** + * Get the password change form. This code is copied from controllers/users.php. The + * difference is that as this is the first time logging on, the user might not have + * expected that they were going to have to enter the password displayed on the welcome + * page, and didn't make note of it. If we were using the standard change password dialog, the + * user would be screwed as there is no way to go back and get it. So with this dialog, + * we will provide the old password as a hidden field. + */ + private function _get_change_password_form($user, $password) { + $form = new Forge( + "users/change_password/$user->id", "", "post", array("id" => "g-change-password-user-form")); + $group = $form->group("change_password")->label(t("Change your password")); + $group->hidden("old_password")->value($password); + $group->password("password")->label(t("New password"))->id("g-password") + ->error_messages("min_length", t("Your new password is too short")); + $group->script("") + ->text( + '$("form").ready(function(){$(\'input[name="password"]\').user_password_strength();});'); + $group->password("password2")->label(t("Confirm new password"))->id("g-password2") + ->matches($group->password) + ->error_messages("matches", t("The passwords you entered do not match")); + + module::event("user_change_password_form", $user, $form); + $group->submit("")->value(t("Save")); + return $form; + } +} \ No newline at end of file diff --git a/modules/.not-used/register/css/register.css b/modules/.not-used/register/css/register.css new file mode 100755 index 0000000..adbac65 --- /dev/null +++ b/modules/.not-used/register/css/register.css @@ -0,0 +1 @@ +#g-register-form { width: 350px; } \ No newline at end of file diff --git a/modules/.not-used/register/helpers/register.php b/modules/.not-used/register/helpers/register.php new file mode 100755 index 0000000..1da80af --- /dev/null +++ b/modules/.not-used/register/helpers/register.php @@ -0,0 +1,138 @@ +where("name", "=", $user_name) + ->find(); + return $user->loaded(); + } + + static function send_user_created_confirmation($user, $requires_first=false) { + $message = new View("register_welcome.html"); + $message->user = $user; + $message->site_url = $requires_first ? url::abs_site("register/first/{$user->hash}") : + url::abs_site(""); + // added Shad Laws, v2 + $message->subject_prefix = module::get_var("registration", "subject_prefix"); + $message->locale = $user->locale; // as stored in pending_users table + $message->subject = t("Welcome", array("locale" => $message->locale)); + // modified Shad Laws, v2 + self::_sendemail($user->email, $message->subject_prefix.$message->subject, $message); + } + + static function send_confirmation($user) { + $message = new View("confirm_registration.html"); + $message->confirm_url = url::abs_site("register/confirm/{$user->hash}"); + $message->user = $user; + // added Shad Laws, v2 + $message->subject_prefix = module::get_var("registration", "subject_prefix"); + $message->locale = $user->locale; // as stored in pending_users table + $message->subject = t("User registration confirmation", array("locale" => $message->locale)); + // modified Shad Laws, v2 + self::_sendemail($user->email, $message->subject_prefix.$message->subject, $message); + } + + // function added Shad Laws, v2 + static function send_admin_notify($user) { + $message = new View("register_admin_notify.html"); + $message->admin_register_url = url::abs_site("admin/register"); + $message->user = $user; + $message->subject_prefix = module::get_var("registration", "subject_prefix"); + $message->locale = module::get_var("gallery", "default_locale"); // as Gallery default + $message->subject = t("New pending user registration", array("locale" => $message->locale)); + self::_sendemail(module::get_var("gallery", "email_reply_to"), $message->subject_prefix.$message->subject, $message); + } + + static function create_pending_request($form) { + $email_verification = module::get_var("registration", "email_verification"); + + $user = ORM::factory("pending_user"); + $user->name = $form->register_user->inputs["name"]->value; + $user->full_name = $form->register_user->inputs["full_name"]->value; + $user->email = $form->register_user->inputs["email"]->value; + $user->url = $form->register_user->inputs["url"]->value; + $user->request_date = time(); + // added by Shad Laws, v2 + $user->locale = locales::locale_from_http_request() ? locales::locale_from_http_request() : module::get_var("gallery", "default_locale"); // sets default locale based on browser + + if (!$email_verification) { + $user->state = 1; + } + $user->hash = md5(rand()); + $user->save(); + return $user; + } + + static function create_new_user($id) { + $user = ORM::factory("pending_user", $id); + + $password = md5(uniqid(mt_rand(), true)); + $new_user = identity::create_user($user->name, $user->full_name, $password, $user->email); + $new_user->url = $user->url; + $new_user->admin = false; + $new_user->guest = false; + $new_user->save(); + + $group_id = module::get_var("registration", "default_group"); + if ($group_id != null) { + $default_group = group::lookup($group_id); + if ($default_group != null) { + $default_group->add($new_user); + $default_group->save(); + } + } + + $user->hash = md5(uniqid(mt_rand(), true)); + $user->state = 2; + $user->save(); + self::send_user_created_confirmation($user, $password); + + return $new_user; + } + + private static function _sendemail($email, $subject, $message) { + Sendmail::factory() + ->to($email) + ->subject($subject) + ->header("Mime-Version", "1.0") + // modified by Shad Laws, v2 + ->header("Content-type", "text/html; charset=utf-8") + ->message($message->render()) + ->send(); + } +} diff --git a/modules/.not-used/register/helpers/register_event.php b/modules/.not-used/register/helpers/register_event.php new file mode 100755 index 0000000..16e874f --- /dev/null +++ b/modules/.not-used/register/helpers/register_event.php @@ -0,0 +1,38 @@ +get("settings_menu") + ->append( Menu::factory("link") + ->id("register_users") + ->label(t("User registration")) + ->url(url::site("admin/register"))); + } + + static function user_menu($menu, $theme) { + $user = identity::active_user(); + if ($user->guest) { + $menu->append(Menu::factory("dialog") + ->id("user_menu_register") + ->css_id("g-register-menu") + ->url(url::site("register")) + ->label(t("Register"))); + } + } +} diff --git a/modules/.not-used/register/helpers/register_installer.php b/modules/.not-used/register/helpers/register_installer.php new file mode 100755 index 0000000..674fce7 --- /dev/null +++ b/modules/.not-used/register/helpers/register_installer.php @@ -0,0 +1,70 @@ +query("CREATE TABLE IF NOT EXISTS {pending_users} ( + `id` int(9) NOT NULL auto_increment, + `name` varchar(32) NOT NULL, + `state` int(9) NOT NULL DEFAULT 0, + `full_name` varchar(255) NOT NULL, + `email` varchar(64) default NULL, + `hash` char(32) default NULL, + `url` varchar(255) default NULL, + `request_date` int(9) not NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY(`hash`, `state`), + UNIQUE KEY(`name`)) + DEFAULT CHARSET=utf8;"); + + module::set_var("registration", "policy", "admin_only"); + module::set_var("registration", "default_group", ""); + module::set_var("registration", "email_verification", false); + // added Shad Laws, v2 + module::set_var("registration", "admin_notify", false); + module::set_var("registration", "subject_prefix", ""); + $db->query("ALTER TABLE {pending_users} ADD `locale` varchar(32) default NULL;"); + // changed Shad Laws, v2 + module::set_version("register", 2); + } + + // function added Shad Laws, v2 + static function upgrade() { + if (module::get_version("register") < 1) { + module::install("register"); + } + if (is_null(module::get_var("registration", "admin_notify")) || + is_null(module::get_var("registration", "subject_prefix")) || + (module::get_version("register") < 2) ) { + + module::set_var("registration", "admin_notify", false); + module::set_var("registration", "subject_prefix", ""); + $db = Database::instance(); + $db->query("ALTER TABLE {pending_users} ADD `locale` varchar(32) default NULL;"); + } + module::set_version("register", 2); + } + + static function uninstall() { + Database::instance()->query("DROP TABLE IF EXISTS {pending_users};"); + // added Shad Laws, v2 + module::clear_all_vars("registration"); + } +} \ No newline at end of file diff --git a/modules/.not-used/register/helpers/register_theme.php b/modules/.not-used/register/helpers/register_theme.php new file mode 100755 index 0000000..197933d --- /dev/null +++ b/modules/.not-used/register/helpers/register_theme.php @@ -0,0 +1,33 @@ +get("registration_first_usage")) { + $session->delete("registration_first_usage"); + return new View("register_welcome_message_loader.html"); + } + } + // added Shad Laws, v2 + static function head($theme) { + return $theme->css("register.css"); + } + +} \ No newline at end of file diff --git a/modules/.not-used/register/models/pending_user.php b/modules/.not-used/register/models/pending_user.php new file mode 100755 index 0000000..888d5ae --- /dev/null +++ b/modules/.not-used/register/models/pending_user.php @@ -0,0 +1,21 @@ + + +
    +

    +
    + "post"), $hidden) ?> +
    + +
      + $text): ?> +
    • + + +
    • + +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    • + + + "group"), $group_list, $form["group"]) ?> + + + +
    • +
    • + "g-registration-admin", "name" => "save", "class" => "submit", "style" => "clear:both!important"), t("Update")) ?> +
    • +
    +
    + +
    + +
    + "post"), $hidden) ?> +
    + + + + + + + + + + + + + "> + + + + + + + + +
    + +
    + state != 2): ?> + id) ?> + +   + + state) ?>name) ?>full_name) ?>email) ?>request_date)) ?>
    + "g-registration-activate", "name" => "activate_users", "class" => "submit"), t("Activate selected")) ?> +
    + +
    + +
    diff --git a/modules/.not-used/register/views/confirm_registration.html.php b/modules/.not-used/register/views/confirm_registration.html.php new file mode 100755 index 0000000..80c6293 --- /dev/null +++ b/modules/.not-used/register/views/confirm_registration.html.php @@ -0,0 +1,18 @@ + + + + <?= ($subject_prefix.$subject) ?> + + +

    +

    + $user->full_name ? $user->full_name : $user->name, "locale" => $locale)) ?> +

    +

    + clicking this link. If you didn't request this password reset, it's ok to ignore this mail.", + array("site_url" => html::mark_clean(url::base(false, "http")), + "confirm_url" => $confirm_url, + "locale" => $locale)) ?> +

    + + diff --git a/modules/.not-used/register/views/register_admin_notify.html.php b/modules/.not-used/register/views/register_admin_notify.html.php new file mode 100755 index 0000000..39cd04d --- /dev/null +++ b/modules/.not-used/register/views/register_admin_notify.html.php @@ -0,0 +1,15 @@ + + + + <?= ($subject_prefix.$subject) ?> + + +

    +

    + You can access the site by clicking this link, after which you can review and approve this request.", + array("name" => $user->full_name ? $user->full_name : $user->name, + "locale" => $locale, + "site_url" => html::mark_clean($admin_register_url))) ?> +

    + + diff --git a/modules/.not-used/register/views/register_welcome.html.php b/modules/.not-used/register/views/register_welcome.html.php new file mode 100755 index 0000000..2d18385 --- /dev/null +++ b/modules/.not-used/register/views/register_welcome.html.php @@ -0,0 +1,17 @@ + + + + <?= ($subject_prefix.$subject) ?> + + +

    +

    + $user->full_name ? $user->full_name : $user->name, "locale" => $locale)) ?> +

    +

    + You can access the site by clicking this link and you will be prompted to set your password at this point.", + array("site_url" => html::mark_clean($site_url), + "locale" => $locale)) ?> +

    + + diff --git a/modules/.not-used/register/views/register_welcome_message.html.php b/modules/.not-used/register/views/register_welcome_message.html.php new file mode 100755 index 0000000..76c076c --- /dev/null +++ b/modules/.not-used/register/views/register_welcome_message.html.php @@ -0,0 +1,36 @@ + +
    +

    + +

    + +

    +

    + +

    +

    + +

    + %user_name account. We have generated a password for you (%password). You should change your password to something that you'll remember.", array("user_name" => $user->name, "password" => $password)) ?> +

    + +

    + id}/$password") ?>" + title="for_html_attr() ?>" + id="g-after-install-change-password-link" + class="g-button ui-state-default ui-corners-all"> + + + +

    + +

    + Gallery website has news and information about the Gallery project and community.", array("url" => "http://gallery.menalto.com")) ?> +

    + +

    + documentation site or you can ask for help in the forums!", array("codex_url" => "http://codex.gallery2.org/Main_Page", "forum_url" => "http://gallery.menalto.com/forum")) ?> +

    +
    diff --git a/modules/.not-used/register/views/register_welcome_message_loader.html.php b/modules/.not-used/register/views/register_welcome_message_loader.html.php new file mode 100755 index 0000000..ea3c550 --- /dev/null +++ b/modules/.not-used/register/views/register_welcome_message_loader.html.php @@ -0,0 +1,7 @@ + +for_html_attr() ?>" + href=""/> + diff --git a/modules/.not-used/tag_cloud_html5/controllers/admin_tag_cloud_html5.php b/modules/.not-used/tag_cloud_html5/controllers/admin_tag_cloud_html5.php new file mode 100755 index 0000000..98ffe6e --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/controllers/admin_tag_cloud_html5.php @@ -0,0 +1,252 @@ +_get_admin_form(); + $this->_print_screen($form); + } + + public function edit() { + access::verify_csrf(); + $cfg = $this->_get_config(); + $form = $this->_get_admin_form(); + if ($form->validate()) { + if ($form->general->reset_defaults->value) { + // reset all to defaults, redirect with message + module::install("tag_cloud_html5"); + message::success(t("Tag cloud options reset successfully")); + url::redirect("admin/tag_cloud_html5"); + } + // save the new inputs + module::set_var("tag_cloud_html5", "show_wholecloud_link", ($form->general->show_wholecloud_link->value == 1)); + module::set_var("tag_cloud_html5", "show_add_tag_form", ($form->general->show_add_tag_form->value == 1)); + module::set_var("tag_cloud_html5", "show_wholecloud_list", ($form->general->show_wholecloud_list->value == 1)); + foreach ($cfg['groups'] as $groupname => $grouptext) { + module::set_var("tag_cloud_html5", "maxtags".$groupname, $form->{"size".$groupname}->{"maxtags".$groupname}->value); + module::set_var("tag_cloud_html5", "width".$groupname, $form->{"size".$groupname}->{"width".$groupname}->value); + module::set_var("tag_cloud_html5", "height".$groupname, $form->{"size".$groupname}->{"height".$groupname}->value); + + $optionsarray = array(); + // group size + $optionsarray['shape'] = $form->{"size".$groupname}->{"shape".$groupname}->value; + $optionsarray['zoom'] = $form->{"size".$groupname}->{"zoom".$groupname}->value; + $optionsarray['stretchX'] = $form->{"size".$groupname}->{"stretchX".$groupname}->value; + $optionsarray['stretchY'] = $form->{"size".$groupname}->{"stretchY".$groupname}->value; + // group motion + $optionsarray['maxSpeed'] = $form->{"motion".$groupname}->{"maxSpeed".$groupname}->value; + $optionsarray['minSpeed'] = $form->{"motion".$groupname}->{"minSpeed".$groupname}->value; + $optionsarray['deadZone'] = $form->{"motion".$groupname}->{"deadZone".$groupname}->value; + $optionsarray['decel'] = $form->{"motion".$groupname}->{"decel".$groupname}->value; + $optionsarray['initial'] = array($form->{"motion".$groupname}->{"initialX".$groupname}->value, $form->{"motion".$groupname}->{"initialY".$groupname}->value); + $optionsarray['maxInputZone'] = $form->{"motion".$groupname}->{"maxInputZone".$groupname}->value; + // group select + $optionsarray['outlineMethod'] = $form->{"select".$groupname}->{"outlineMethod".$groupname}->value; + $optionsarray['outlineOffset'] = $form->{"select".$groupname}->{"outlineOffset".$groupname}->value; + $optionsarray['outlineColour'] = $form->{"select".$groupname}->{"outlineColour".$groupname}->value; + $optionsarray['frontSelect'] = ($form->{"select".$groupname}->{"frontSelect".$groupname}->value == 1); + // group appearance + $optionsarray['textHeight'] = $form->{"appearance".$groupname}->{"textHeight".$groupname}->value; + $optionsarray['textColour'] = $form->{"appearance".$groupname}->{"textColour".$groupname}->value; + $optionsarray['textFont'] = $form->{"appearance".$groupname}->{"textFont".$groupname}->value; + $optionsarray['depth'] = $form->{"appearance".$groupname}->{"depth".$groupname}->value; + // options that are not explicitly defined in admin menu + $optionsarray['wheelZoom'] = false; // otherwise scrolling through the page screws everything up (was a problem in v1) + $optionsarray['initialDecel'] = true; // this was an option in v4, but it's sorta useless - use minSpeed for a related but better effect + $optionsarray['physModel'] = true; // this is the big enhancement for v5, and is a major modification that I did to TagCanvas + switch ($optionsarray['shape']) { + case "hcylinder": + // keep it horizontal - lock x-axis rotation + $optionsarray['lock'] = "x"; + break; + case "vcylinder": + // keep it vertical - lock y-axis rotation + $optionsarray['lock'] = "y"; + break; + default: + // do not lock either axis + $optionsarray['lock'] = ""; + } + module::set_var("tag_cloud_html5", "options".$groupname, json_encode($optionsarray)); + } + // all done; redirect with message + message::success(t("Tag cloud options updated successfully")); + url::redirect("admin/tag_cloud_html5"); + } + // not valid - print screen from existing form + $this->_print_screen($form); + } + + private function _get_config() { + // these define the two variable name groups, along with their labels which are always shown with t() for i18n. + $cfg['groups'] = array("_sidebar"=>t("Sidebar"), "_wholecloud"=>t("Whole cloud")); + // this defines the separator that's used between the group name and the attribute, and is *not* put through t(). + $cfg['sep'] = " : "; + // this is used in the labels of the width/height parameters + $cfg['size'] = array("_sidebar"=>t("as fraction of sidebar width, e.g. 'g-block-content' class"), "_wholecloud"=>t("as fraction of browser window height")); + return $cfg; + } + + private function _print_screen($form) { + // this part is a bit of a hack, but Forge doesn't seem to allow set_attr() for groups. + $form = $form->render(); + $form = preg_replace("/
    /","
    ",$form,1); + $form = preg_replace("/
    /","
    ",$form,4); + $form = preg_replace("/
    /","
    ",$form,4); + + $view = new Admin_View("admin.html"); + $view->content = new View("admin_tag_cloud_html5.html"); + $view->content->form = $form; + print $view; + } + + private function _get_admin_form() { + $cfg = $this->_get_config(); + $sep = $cfg['sep']; + + // Make the main form. This form has *nine* groups: general, then size, motion, select, and appearance for _sidebar and _wholecloud. + $form = new Forge("admin/tag_cloud_html5/edit", "", "post", array("id" => "g-tag-cloud-html5-admin-form")); + + // group general + $group_general = $form->group("general")->label(t("General"))->set_attr("id","g-tag-cloud-html5-admin-form-general"); + $group_general->checkbox("reset_defaults") + ->label(t("Reset all to default values")) + ->checked(false); + $group_general->checkbox("show_wholecloud_link") + ->label(t("Show 'View whole cloud' link in sidebar")) + ->checked(module::get_var("tag_cloud_html5", "show_wholecloud_link", null)); + $group_general->checkbox("show_add_tag_form") + ->label(t("Show 'Add tag to album' form in sidebar (when permitted and applicable)")) + ->checked(module::get_var("tag_cloud_html5", "show_add_tag_form", null)); + $group_general->checkbox("show_wholecloud_list") + ->label(t("Show inline tag list under cloud on 'View whole cloud' page")." {hideTags}") + ->checked(module::get_var("tag_cloud_html5", "show_wholecloud_list", null)); + + foreach ($cfg['groups'] as $groupname => $grouptext) { + $maxtags = strval(module::get_var("tag_cloud_html5", "maxtags".$groupname, null)); + $width = strval(module::get_var("tag_cloud_html5", "width".$groupname, null)); + $height = strval(module::get_var("tag_cloud_html5", "height".$groupname, null)); + $options = json_decode(module::get_var("tag_cloud_html5", "options".$groupname, null),true); + + // group size/shape + ${"group_size".$groupname} = $form->group("size".$groupname)->label(t("Size and shape").$sep.$grouptext); + ${"group_size".$groupname}->input("maxtags".$groupname) + ->label(t("maximum tags shown")) + ->value($maxtags) + ->rules("required|numrange[0]"); + ${"group_size".$groupname}->input("width".$groupname) + ->label(t("width")." (".$cfg['size'][$groupname].")") + ->value($width) + ->rules("required|numrange[0]"); + ${"group_size".$groupname}->input("height".$groupname) + ->label(t("height")." (".$cfg['size'][$groupname].")") + ->value($height) + ->rules("required|numrange[0]"); + ${"group_size".$groupname}->dropdown("shape".$groupname) + ->label(t("shape of cloud")." {shape,lock}") + ->options(array("sphere"=>t("sphere"),"hcylinder"=>t("horizontal cylinder"),"vcylinder"=>t("vertical cylinder"))) + ->selected($options['shape']); + ${"group_size".$groupname}->input("zoom".$groupname) + ->label(t("zoom (<1.0 is zoom out, >1.0 is zoom in)")." {zoom}") + ->value($options['zoom']) + ->rules("required|numrange[0]"); + ${"group_size".$groupname}->input("stretchX".$groupname) + ->label(t("x-axis stretch factor (<1.0 squishes, >1.0 stretches)")." {stretchX}") + ->value($options['stretchX']) + ->rules("required|numrange[0]"); + ${"group_size".$groupname}->input("stretchY".$groupname) + ->label(t("y-axis stretch factor (<1.0 squishes, >1.0 stretches)")." {stretchY}") + ->value($options['stretchY']) + ->rules("required|numrange[0]"); + + // group motion + ${"group_motion".$groupname} = $form->group("motion".$groupname)->label(t("Motion").$sep.$grouptext); + ${"group_motion".$groupname}->input("maxSpeed".$groupname) + ->label(t("max speed (typically 0.01-0.20)")." {maxSpeed}") + ->value($options['maxSpeed']) + ->rules("required|numrange[0]"); + ${"group_motion".$groupname}->input("minSpeed".$groupname) + ->label(t("no mouseover speed (typically 0.00-0.01)")." {minSpeed}") + ->value($options['minSpeed']) + ->rules("required|numrange[0]"); + ${"group_motion".$groupname}->input("deadZone".$groupname) + ->label(t("dead zone size (0.0-1.0 - 0.0 is none and 1.0 is entire cloud)")." {deadZone}") + ->value($options['deadZone']) + ->rules("required|numrange[0,1]"); + ${"group_motion".$groupname}->input("decel".$groupname) + ->label(t("inertia (0.0-1.0 - 0.0 changes velocity instantly and 1.0 never changes)")." {decel}") + ->value($options['decel']) + ->rules("required|numrange[0,1]"); + ${"group_motion".$groupname}->input("initialX".$groupname) + ->label(t("initial horizontal speed (between +/-1.0, as fraction of max speed)")." {initial}") + ->value($options['initial'][0]) + ->rules("required|numrange[-1,1]"); + ${"group_motion".$groupname}->input("initialY".$groupname) + ->label(t("initial vertical speed (between +/-1.0, as fraction of max speed)")." {initial}") + ->value($options['initial'][1]) + ->rules("required|numrange[-1,1]"); + ${"group_motion".$groupname}->input("maxInputZone".$groupname) + ->label(t("mouseover region beyond cloud (as fraction of cloud - 0.0 is tight around cloud)")." {maxInputZone}") + ->value($options['maxInputZone']) + ->rules("required|numrange[0]"); + + // group select + ${"group_select".$groupname} = $form->group("select".$groupname)->label(t("Tag selection").$sep.$grouptext); + ${"group_select".$groupname}->dropdown("outlineMethod".$groupname) + ->label(t("change of display for selected tag")." {outlineMethod}") + ->options(array("colour"=>t("change text color"),"outline"=>t("add outline around text"),"block"=>t("add block behind text"))) + ->selected($options['outlineMethod']); + ${"group_select".$groupname}->input("outlineOffset".$groupname) + ->label(t("mouseover region around tag text (in pixels - 0 is tight around text)")." {outlineOffset}") + ->value($options['outlineOffset']) + ->rules("required|numrange[0]"); + ${"group_select".$groupname}->input("outlineColour".$groupname) + ->label(t("color used for change of display (as #hhhhhh)")." {outlineColour}") + ->value($options['outlineColour']) + ->rules('required|color'); + ${"group_select".$groupname}->checkbox("frontSelect".$groupname) + ->label(t("only allow tags in front to be selected")." {frontSelect}") + ->checked($options['frontSelect']); + + // group appearance + ${"group_appearance".$groupname} = $form->group("appearance".$groupname)->label(t("Appearance").$sep.$grouptext); + ${"group_appearance".$groupname}->input("textHeight".$groupname) + ->label(t("text height (in pixels)")." {textHeight}") + ->value($options['textHeight']) + ->rules("required|numrange[0]"); + ${"group_appearance".$groupname}->input("textColour".$groupname) + ->label(t("text color (as #hhhhhh, or empty to use theme color)")." {textColour}") + ->value($options['textColour']) + ->rules('color'); + ${"group_appearance".$groupname}->input("textFont".$groupname) + ->label(t("text font family (empty to use theme font family)")." {textFont}") + ->value($options['textFont']) + ->rules("length[0,60]"); + ${"group_appearance".$groupname}->input("depth".$groupname) + ->label(t("depth/perspective of cloud (0.0-1.0 - 0.0 is none and >0.9 gets strange)")." {depth}") + ->value($options['depth']) + ->rules("required|numrange[0,1]"); + } + $form->submit("")->value(t("Save")); + + return $form; + } + +} diff --git a/modules/.not-used/tag_cloud_html5/controllers/tag_cloud.php b/modules/.not-used/tag_cloud_html5/controllers/tag_cloud.php new file mode 100755 index 0000000..e12216b --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/controllers/tag_cloud.php @@ -0,0 +1,114 @@ +content = new View("tag_cloud_html5_page.html"); + $template->content->title = t("Tag cloud"); + $template->content->cloud = tag::cloud($maxtags); + $template->content->options = $options; + $template->content->width = $width; + $template->content->height = $height; + + // Display the page. + print $template; + } + + public function embed() { + /** + * This is used to embed the tag cloud in other things. New in version 7. + * + * It expects the url to be in the form: + * tag_cloud/embed/optionsbase/option1/value1/option2/value2/.../optionN/valueN + * Where: + * optionsbase = "sidebar" or "wholecloud" (takes settings from this config) + * optionX = option name (either "maxtags" or any of the TagCanvas parameters - no name verification performed!) + * valueX = value of option (no value verification performed here!) + * Here's how the tag cloud is built: + * 1. Load "maxtags" and "options" variables for optionbase (as defined in admin menu or admin/advanced variables) + * Note: width and height are ignored, and the add tag form, wholecloud link, and inline tags are not shown. + * 2. Use option/value pairs to override and/or append those loaded above. + * 3. Build tag cloud, using 100% of the size from its parent. + * Correspondingly, the optionsbase is required, but the options and values are not. + */ + + // Require view permission for the root album for security purposes. + $album = ORM::factory("item", 1); + access::required("view", $album); + + // get the function arguments + $args = func_get_args(); + + // get/check the number of arguments - must be odd + $countargs = count($args); + if ($countargs % 2 == 0) { + return; + } + + // get/check the first argument - must be sidebar or wholecloud + $optionsbase = $args[0]; + if (!(in_array($optionsbase, array("sidebar", "wholecloud")))) { + return; + } + + // get and override/append options/values + $maxtags = module::get_var("tag_cloud_html5", "maxtags_".$optionsbase, null); + $options = module::get_var("tag_cloud_html5", "options_".$optionsbase, null); + $options = json_decode($options, true); + for ($i = 0; $i < ($countargs-1)/2; $i++) { + $option = $args[2*$i+1]; + $value = $args[2*$i+2]; + if ($option == "maxtags") { + // assign to maxtags + $maxtags = $value; + } elseif (substr($option,-6) == 'Colour') { + // assign to options with a hash in front + $options[$option] = '#'.$value; + } else { + // assign to options + $options[$option] = $value; + } + } + $options = json_encode($options); + + // Set up and display the actual page. + $template = new View("tag_cloud_html5_embed.html"); + $template->cloud = tag::cloud($maxtags); + $template->options = $options; + + // Display the page. + print $template; + } +} \ No newline at end of file diff --git a/modules/.not-used/tag_cloud_html5/css/admin_tag_cloud_html5.css b/modules/.not-used/tag_cloud_html5/css/admin_tag_cloud_html5.css new file mode 100755 index 0000000..e87717f --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/css/admin_tag_cloud_html5.css @@ -0,0 +1,17 @@ +#g-content fieldset { + display: block; +} +#g-content fieldset.g-tag-cloud-html5-admin-form-top { + width: 80%; + clear: both; +} +#g-content fieldset.g-tag-cloud-html5-admin-form-left { + width: 45%; + float: left; + clear: left; + margin-right: 2% +} +#g-content fieldset.g-tag-cloud-html5-admin-form-right { + width: 45%; + clear: right; +} \ No newline at end of file diff --git a/modules/.not-used/tag_cloud_html5/css/tag_cloud_html5.css b/modules/.not-used/tag_cloud_html5/css/tag_cloud_html5.css new file mode 100755 index 0000000..bf20ce8 --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/css/tag_cloud_html5.css @@ -0,0 +1,106 @@ +/* Tag cloud - sidebar ~~~~~~~~~~~~~~~~~~~~~~~ */ + +/* comment out this first block to make the inline tags appear if the cloud doesn't load */ +#g-tag-cloud-html5-tags { + display: none; +} + +#g-tag-cloud-html5-tags ul { + text-align: justify; +} + +#g-tag-cloud-html5-tags ul li { + display: inline; + text-align: justify; +} + +#g-tag-cloud-html5-tags ul li a { + text-decoration: none; +} + +#g-tag-cloud-html5-tags ul li span { + display: none; +} + +#g-tag-cloud-html5-page ul li a:hover { + text-decoration: underline; +} + +/* Tag cloud - whole cloud page ~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-tag-cloud-html5-page-canvas { + display: block; + margin: 0 auto; +} + +#g-tag-cloud-html5-page-tags ul { + font-size: 1.2em; + text-align: justify; +} + +#g-tag-cloud-html5-page-tags ul li { + display: inline; + line-height: 1.5em; + text-align: justify; +} + +#g-tag-cloud-html5-page-tags ul li a { + text-decoration: none; +} + +#g-tag-cloud-html5-page-tags ul li span { + display: none; +} + +#g-tag-cloud-html5-page-tags ul li.size0 a { + color: #9cf; + font-size: 70%; + font-weight: 100; +} + +#g-tag-cloud-html5-page-tags ul li.size1 a { + color: #9cf; + font-size: 80%; + font-weight: 100; +} + +#g-tag-cloud-html5-page-tags ul li.size2 a { + color: #69f; + font-size: 90%; + font-weight: 300; +} + +#g-tag-cloud-html5-page-tags ul li.size3 a { + color: #69c; + font-size: 100%; + font-weight: 500; +} + +#g-tag-cloud-html5-page-tags ul li.size4 a { + color: #369; + font-size: 110%; + font-weight: 700; +} + +#g-tag-cloud-html5-page-tags ul li.size5 a { + color: #0e2b52; + font-size: 120%; + font-weight: 900; +} + +#g-tag-cloud-html5-page-tags ul li.size6 a { + color: #0e2b52; + font-size: 130%; + font-weight: 900; +} + +#g-tag-cloud-html5-page-tags ul li.size7 a { + color: #0e2b52; + font-size: 140%; + font-weight: 900; +} + +#g-tag-cloud-html5-page-tags ul li a:hover { + color: #f30; + text-decoration: underline; +} diff --git a/modules/.not-used/tag_cloud_html5/helpers/tag_cloud_html5_block.php b/modules/.not-used/tag_cloud_html5/helpers/tag_cloud_html5_block.php new file mode 100755 index 0000000..bc99af7 --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/helpers/tag_cloud_html5_block.php @@ -0,0 +1,67 @@ + (t("Tag cloud")." HTML5")); + } + + static function get($block_id, $theme) { + $block = ""; + switch ($block_id) { + case "tag_cloud_html5_site": + // load settings + $options = module::get_var("tag_cloud_html5", "options_sidebar", null); + $maxtags = module::get_var("tag_cloud_html5", "maxtags_sidebar", null); + $showlink = module::get_var("tag_cloud_html5", "show_wholecloud_link", null); + $showaddtag = module::get_var("tag_cloud_html5", "show_add_tag_form", null); + $width = module::get_var("tag_cloud_html5", "width_sidebar", null); + $height = module::get_var("tag_cloud_html5", "height_sidebar", null); + + // make the block + $block = new Block(); + $block->css_id = "g-tag"; + $block->title = t("Tag cloud"); + $block->content = new View("tag_cloud_html5_block.html"); + $block->content->cloud = tag::cloud($maxtags); + $block->content->options = $options; + $block->content->width = $width; + $block->content->height = $height; + + // add the 'View whole cloud' link if needed + if ($showlink) { + $block->content->wholecloud_link = "".t("View whole cloud").""; + } else { + $block->content->wholecloud_link = ""; + } + + // add the 'Add tag' form if needed + if ($theme->item() && $theme->page_subtype() != "tag" && access::can("edit", $theme->item()) && $showaddtag) { + $controller = new Tags_Controller(); + $block->content->form = tag::get_add_form($theme->item()); + } else { + $block->content->form = ""; + } + + break; + } + return $block; + } +} diff --git a/modules/.not-used/tag_cloud_html5/helpers/tag_cloud_html5_event.php b/modules/.not-used/tag_cloud_html5/helpers/tag_cloud_html5_event.php new file mode 100755 index 0000000..85443a2 --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/helpers/tag_cloud_html5_event.php @@ -0,0 +1,28 @@ +get("settings_menu") + ->append(Menu::factory("link") + ->id("tag_cloud_html5") + ->label(t("Tag cloud")." HTML5") + ->url(url::site("admin/tag_cloud_html5"))); + } +} diff --git a/modules/.not-used/tag_cloud_html5/helpers/tag_cloud_html5_installer.php b/modules/.not-used/tag_cloud_html5/helpers/tag_cloud_html5_installer.php new file mode 100755 index 0000000..4b2914d --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/helpers/tag_cloud_html5_installer.php @@ -0,0 +1,177 @@ + 0.05, + "deadZone" => 0.25, + "initial" => array(0.8,-0.3), + "initialDecel" => true, + "zoom" => 1.25, + "depth" => 0.5, + "outlineMethod" => "colour", + "outlineOffset" => 8, + "outlineColour" => "#eeeeee", + "textColour" => "", + "textFont" => "", + "textHeight" => 12, + "frontSelect" => true, + "wheelZoom" => false, + "shape" => "sphere", + "lock" => "", + "stretchX" => 1.0, + "stretchY" => 1.0, + "decel" => 0.92, + "physModel" => true, + "maxInputZone" => 0.25, + "minSpeed" => 0.002 + ))); + + module::set_var("tag_cloud_html5", "options_wholecloud", json_encode(array( + "maxSpeed" => 0.05, + "deadZone" => 0.25, + "initial" => array(0.8,-0.3), + "initialDecel" => true, + "zoom" => 1.25, + "depth" => 0.5, + "outlineMethod" => "colour", + "outlineOffset" => 8, + "outlineColour" => "#eeeeee", + "textColour" => "", + "textFont" => "", + "textHeight" => 13, + "frontSelect" => true, + "wheelZoom" => false, + "shape" => "sphere", + "lock" => "", + "stretchX" => 1.0, + "stretchY" => 1.0, + "decel" => 0.92, + "physModel" => true, + "maxInputZone" => 0.15, + "minSpeed" => 0.002 + ))); + + module::set_version("tag_cloud_html5", 7); + } + + static function upgrade() { + if (is_null(module::get_var("tag_cloud_html5", "options_sidebar")) || + is_null(module::get_var("tag_cloud_html5", "options_wholecloud")) || + (module::get_version("tag_cloud_html5") < 1) ) { + + module::install("tag_cloud_html5"); + } + if (module::get_version("tag_cloud_html5") < 2) { + // added wheelZoom, which is not accessible from admin menu + $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); + $options["wheelZoom"] = false; + module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); + + $options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true); + $options["wheelZoom"] = false; + module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options)); + } + if (module::get_version("tag_cloud_html5") < 3) { + // added deadZone, initial, and initialDecel + + module::set_var("tag_cloud_html5", "show_add_tag_form", true); + + $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); + $options["deadZone"] = 0.25; + $options["initial"] = array(0.8,-0.3); + $options["initialDecel"] = true; + module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); + + $options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true); + $options["deadZone"] = 0.25; + $options["initial"] = array(0.8,-0.3); + $options["initialDecel"] = true; + module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options)); + } + if (module::get_version("tag_cloud_html5") < 4) { + // added height_sidebar, then scaled back zoom and textHeight for consistency + module::set_var("tag_cloud_html5", "height_sidebar", 0.8); + + $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); + $options["zoom"] = $options["zoom"] / 0.8; + $options["textHeight"] = $options["textHeight"] * 0.8; + module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); + } + if (module::get_version("tag_cloud_html5") < 5) { + // added lots of options that are on admin menu + // added physModel, lock, and initialDecel as options not on admin menu + // (previously initialDecel was on menu, so reset here) + + module::set_var("tag_cloud_html5", "width_sidebar", 1.00); + module::set_var("tag_cloud_html5", "width_wholecloud", 0.95); + module::set_var("tag_cloud_html5", "height_wholecloud", 0.75); + + $options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true); + $options["deadZone"] = $options["deadZone"]; + $options["shape"] = "sphere"; + $options["lock"] = ""; + $options["stretchX"] = 1.0; + $options["stretchY"] = 1.0; + $options["decel"] = 0.92; + $options["physModel"] = true; + $options["maxInputZone"] = 0.25; + $options["minSpeed"] = 0.002; + $options["initialDecel"] = true; + module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options)); + + $options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true); + $options["deadZone"] = $options["deadZone"]; + $options["shape"] = "sphere"; + $options["lock"] = ""; + $options["stretchX"] = 1.0; + $options["stretchY"] = 1.0; + $options["decel"] = 0.92; + $options["physModel"] = true; + $options["maxInputZone"] = 0.15; + $options["minSpeed"] = 0.002; + $options["initialDecel"] = true; + module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options)); + } + // note: there are no variable changes for v6 and v7 upgrades + module::set_version("tag_cloud_html5", 7); + } + + static function uninstall() { + module::clear_all_vars("tag_cloud_html5"); + } + +} diff --git a/modules/.not-used/tag_cloud_html5/helpers/tag_cloud_html5_theme.php b/modules/.not-used/tag_cloud_html5/helpers/tag_cloud_html5_theme.php new file mode 100755 index 0000000..ce0b6d3 --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/helpers/tag_cloud_html5_theme.php @@ -0,0 +1,25 @@ +script("jquery.tagcanvas.mod.min.js"); + $theme->css("tag_cloud_html5.css"); + } +} \ No newline at end of file diff --git a/modules/.not-used/tag_cloud_html5/js/excanvas.compiled.js b/modules/.not-used/tag_cloud_html5/js/excanvas.compiled.js new file mode 100755 index 0000000..a34ca1d --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/js/excanvas.compiled.js @@ -0,0 +1,35 @@ +// Copyright 2006 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +document.createElement("canvas").getContext||(function(){var s=Math,j=s.round,F=s.sin,G=s.cos,V=s.abs,W=s.sqrt,k=10,v=k/2;function X(){return this.context_||(this.context_=new H(this))}var L=Array.prototype.slice;function Y(b,a){var c=L.call(arguments,2);return function(){return b.apply(a,c.concat(L.call(arguments)))}}var M={init:function(b){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var a=b||document;a.createElement("canvas");a.attachEvent("onreadystatechange",Y(this.init_,this,a))}},init_:function(b){b.namespaces.g_vml_|| +b.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");b.namespaces.g_o_||b.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!b.styleSheets.ex_canvas_){var a=b.createStyleSheet();a.owningElement.id="ex_canvas_";a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var c=b.getElementsByTagName("canvas"),d=0;for(;d','","");this.element_.insertAdjacentHTML("BeforeEnd",t.join(""))};i.stroke=function(b){var a=[],c=P(b?this.fillStyle:this.strokeStyle),d=c.color,f=c.alpha*this.globalAlpha;a.push("g.x)g.x=e.x;if(h.y==null||e.yg.y)g.y=e.y}}a.push(' ">');if(b)if(typeof this.fillStyle=="object"){var m=this.fillStyle,r=0,n={x:0,y:0},o=0,q=1;if(m.type_=="gradient"){var t=m.x1_/this.arcScaleX_,E=m.y1_/this.arcScaleY_,p=this.getCoords_(m.x0_/this.arcScaleX_,m.y0_/this.arcScaleY_), +z=this.getCoords_(t,E);r=Math.atan2(z.x-p.x,z.y-p.y)*180/Math.PI;if(r<0)r+=360;if(r<1.0E-6)r=0}else{var p=this.getCoords_(m.x0_,m.y0_),w=g.x-h.x,x=g.y-h.y;n={x:(p.x-h.x)/w,y:(p.y-h.y)/x};w/=this.arcScaleX_*k;x/=this.arcScaleY_*k;var R=s.max(w,x);o=2*m.r0_/R;q=2*m.r1_/R-o}var u=m.colors_;u.sort(function(ba,ca){return ba.offset-ca.offset});var J=u.length,da=u[0].color,ea=u[J-1].color,fa=u[0].alpha*this.globalAlpha,ga=u[J-1].alpha*this.globalAlpha,S=[],l=0;for(;l')}else a.push('');else{var K=this.lineScale_*this.lineWidth;if(K<1)f*=K;a.push("')}a.push("");this.element_.insertAdjacentHTML("beforeEnd",a.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(b,a){var c=this.m_;return{x:k*(b*c[0][0]+a*c[1][0]+c[2][0])-v,y:k*(b*c[0][1]+a*c[1][1]+c[2][1])-v}};i.save=function(){var b={};O(this,b);this.aStack_.push(b);this.mStack_.push(this.m_);this.m_=y(I(),this.m_)};i.restore=function(){O(this.aStack_.pop(), +this);this.m_=this.mStack_.pop()};function ha(b){var a=0;for(;a<3;a++){var c=0;for(;c<2;c++)if(!isFinite(b[a][c])||isNaN(b[a][c]))return false}return true}function A(b,a,c){if(!!ha(a)){b.m_=a;if(c)b.lineScale_=W(V(a[0][0]*a[1][1]-a[0][1]*a[1][0]))}}i.translate=function(b,a){A(this,y([[1,0,0],[0,1,0],[b,a,1]],this.m_),false)};i.rotate=function(b){var a=G(b),c=F(b);A(this,y([[a,c,0],[-c,a,0],[0,0,1]],this.m_),false)};i.scale=function(b,a){this.arcScaleX_*=b;this.arcScaleY_*=a;A(this,y([[b,0,0],[0,a, +0],[0,0,1]],this.m_),true)};i.transform=function(b,a,c,d,f,h){A(this,y([[b,a,0],[c,d,0],[f,h,1]],this.m_),true)};i.setTransform=function(b,a,c,d,f,h){A(this,[[b,a,0],[c,d,0],[f,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new U};function D(b){this.type_=b;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}D.prototype.addColorStop=function(b,a){a=P(a);this.colors_.push({offset:b,color:a.color,alpha:a.alpha})};function U(){}G_vmlCanvasManager= +M;CanvasRenderingContext2D=H;CanvasGradient=D;CanvasPattern=U})(); diff --git a/modules/.not-used/tag_cloud_html5/js/jquery.tagcanvas.mod.js b/modules/.not-used/tag_cloud_html5/js/jquery.tagcanvas.mod.js new file mode 100755 index 0000000..016a291 --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/js/jquery.tagcanvas.mod.js @@ -0,0 +1,1014 @@ +/** + * Copyright (C) 2010-2012 Graham Breach + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ +/** + * jQuery.tagcanvas 1.17.1 + * For more information, please contact + */ +/** + * Modified by Shad Laws 2012/06/08 -- all modified lines have "mod Shad Laws" comments + * - built a physics-based model for motion, which is activated with the physModel flag + * - included initialDecel, deadZone, maxInputZone, and physModel as options + * - set defaults of new options to mimic behavior without them (false, 0, 0, and false) + * - removed two unnecessary variable declarations caught by YUI Compressor + * - fixed initialization of a few variables (minSpeed, decel, yaw/pitch) + * - fixed problem with html margin-top changing coordinates in IE (but not Chrome or Firefox) + */ +(function($) { +// var i, j, abs = Math.abs, sin = Math.sin, cos = Math.cos, max = Math.max, min = Math.min, // mod Shad Laws +var i, j, abs = Math.abs, sin = Math.sin, cos = Math.cos, max = Math.max, min = Math.min, sqrt = Math.sqrt, // mod Shad Laws + hexlookup3 = {}, hexlookup2 = {}, hexlookup1 = { + 0:"0,", 1:"17,", 2:"34,", 3:"51,", 4:"68,", 5:"85,", + 6:"102,", 7:"119,", 8:"136,", 9:"153,", a:"170,", A:"170,", + b:"187,", B:"187,", c:"204,", C:"204,", d:"221,", D:"221,", + e:"238,", E:"238,", f:"255,", F:"255," +}, Oproto, Tproto, TCproto, doc = document, ocanvas, handlers = {}; +for(i = 0; i < 256; ++i) { + j = i.toString(16); + if(i < 16) + j = '0' + j; + hexlookup2[j] = hexlookup2[j.toUpperCase()] = i.toString() + ','; +} +function Defined(d) { + return typeof(d) != 'undefined'; +} +function Shuffle(a) { + var i = a.length-1, t, p; + while(i) { + p = ~~(Math.random()*i); + t = a[i]; + a[i] = a[p]; + a[p] = t; + --i; + } +} +function PointsOnSphere(n,xr,yr,zr) { + var i, y, r, phi, pts = [], inc = Math.PI * (3-Math.sqrt(5)), off = 2/n; + for(i = 0; i < n; ++i) { + y = i * off - 1 + (off / 2); + r = Math.sqrt(1 - y*y); + phi = i * inc; + pts.push([cos(phi) * r * xr, y * yr, sin(phi) * r * zr]); + } + return pts; +} +function Cylinder(n,o,xr,yr,zr,i,j,k,l) { + var phi, pts = [], inc = Math.PI * (3-Math.sqrt(5)), off = 2/n; + for(i = 0; i < n; ++i) { + j = i * off - 1 + (off / 2); + phi = i * inc; + k = cos(phi); + l = sin(phi); + pts.push(o ? [j * xr, k * yr, l * zr] : [k * xr, j * yr, l * zr]); + } + return pts; +} +function PointsOnCylinderV(n,xr,yr,zr) { return Cylinder(n, 0, xr, yr, zr) } +function PointsOnCylinderH(n,xr,yr,zr) { return Cylinder(n, 1, xr, yr, zr) } +function SetAlpha(c,a) { + var d = c, p1, p2, ae = (a*1).toPrecision(3) + ')'; + if(c[0] === '#') { + if(!hexlookup3[c]) + if(c.length === 4) + hexlookup3[c] = 'rgba(' + hexlookup1[c[1]] + hexlookup1[c[2]] + hexlookup1[c[3]]; + else + hexlookup3[c] = 'rgba(' + hexlookup2[c.substr(1,2)] + hexlookup2[c.substr(3,2)] + hexlookup2[c.substr(5,2)]; + d = hexlookup3[c] + ae; + } else if(c.substr(0,4) === 'rgb(' || c.substr(0,4) === 'hsl(') { + d = (c.replace('(','a(').replace(')', ',' + ae)); + } else if(c.substr(0,5) === 'rgba(' || c.substr(0,5) === 'hsla(') { + p1 = c.lastIndexOf(',') + 1, p2 = c.indexOf(')'); + a *= parseFloat(c.substring(p1,p2)); + d = c.substr(0,p1) + a.toPrecision(3) + ')'; + } + return d; +} +function NewCanvas(w,h) { + // if using excanvas, give up now + if(window.G_vmlCanvasManager) + return null; + var c = doc.createElement('canvas'); + c.width = w; + c.height = h; + return c; +} +// I think all browsers pass this test now... +function ShadowAlphaBroken() { + var cv = NewCanvas(3,3), c, i; + if(!cv) + return false; + c = cv.getContext('2d'); + c.strokeStyle = '#000'; + c.shadowColor = '#fff'; + c.shadowBlur = 3; + c.globalAlpha = 0; + c.strokeRect(2,2,2,2); + c.globalAlpha = 1; + i = c.getImageData(2,2,1,1); + cv = null; + return (i.data[0] > 0); +} +function FindGradientColour(t,p) { + var l = 1024, g = t.weightGradient, cv, c, i, gd, d; + if(t.gCanvas) { + c = t.gCanvas.getContext('2d'); + } else { + t.gCanvas = cv = NewCanvas(l,1); + if(!cv) + return null; + c = cv.getContext('2d'); + gd = c.createLinearGradient(0,0,l,0); + for(i in g) + gd.addColorStop(1-i, g[i]); + c.fillStyle = gd; + c.fillRect(0,0,l,1); + } + d = c.getImageData(~~((l-1)*p),0,1,1).data; + return 'rgba(' + d[0] + ',' + d[1] + ',' + d[2] + ',' + (d[3]/255) + ')'; +} +function TextSet(c,f,l,s,sc,sb,so) { + var xo = (sb || 0) + (so && so[0] < 0 ? abs(so[0]) : 0), + yo = (sb || 0) + (so && so[1] < 0 ? abs(so[1]) : 0); + c.font = f; + c.textBaseline = 'top'; + c.fillStyle = l; + sc && (c.shadowColor = sc); + sb && (c.shadowBlur = sb); + so && (c.shadowOffsetX = so[0], c.shadowOffsetY = so[1]); + c.fillText(s, xo, yo); +} +function TextToCanvas(s,f,ht,w,h,l,sc,sb,so,padx,pady) { + var cw = w + abs(so[0]) + sb + sb, ch = h + abs(so[1]) + sb + sb, cv, c; + cv = NewCanvas(cw+padx,ch+pady); + if(!cv) + return null; + c = cv.getContext('2d'); + TextSet(c,f,l,s,sc,sb,so); + return cv; +} +function AddShadowToImage(i,sc,sb,so) { + var cw = i.width + abs(so[0]) + sb + sb, ch = i.height + abs(so[1]) + sb + sb, cv, c, + xo = (sb || 0) + (so && so[0] < 0 ? abs(so[0]) : 0), + yo = (sb || 0) + (so && so[1] < 0 ? abs(so[1]) : 0); + cv = NewCanvas(cw,ch); + if(!cv) + return null; + c = cv.getContext('2d'); + sc && (c.shadowColor = sc); + sb && (c.shadowBlur = sb); + so && (c.shadowOffsetX = so[0], c.shadowOffsetY = so[1]); + c.drawImage(i, xo, yo); + return cv; +} +function FindTextBoundingBox(s,f,ht) { + var w = parseInt(s.length * ht), h = parseInt(ht * 2), cv = NewCanvas(w,h), c, idata, w1, h1, x, y, i, ex; + if(!cv) + return null; + c = cv.getContext('2d'); + c.fillStyle = '#000'; + c.fillRect(0,0,w,h); + TextSet(c,ht + 'px ' + f,'#fff',s) + + idata = c.getImageData(0,0,w,h); + w1 = idata.width; h1 = idata.height; + ex = { + min: { x: w1, y: h1 }, + max: { x: -1, y: -1 } + }; + for(y = 0; y < h1; ++y) { + for(x = 0; x < w1; ++x) { + i = (y * w1 + x) * 4; + if(idata.data[i+1] > 0) { + if(x < ex.min.x) ex.min.x = x; + if(x > ex.max.x) ex.max.x = x; + if(y < ex.min.y) ex.min.y = y; + if(y > ex.max.y) ex.max.y = y; + } + } + } + // device pixels might not be css pixels + if(w1 != w) { + ex.min.x *= (w / w1); + ex.max.x *= (w / w1); + } + if(h1 != h) { + ex.min.y *= (w / h1); + ex.max.y *= (w / h1); + } + + cv = null; + return ex; +} +function FixFont(f) { + return "'" + f.replace(/(\'|\")/g,'').replace(/\s*,\s*/g, "', '") + "'"; +} +function AddHandler(h,f,e) { + e = e || doc; + if(e.addEventListener) + e.addEventListener(h,f,false); + else + e.attachEvent('on' + h, f); +} +function AddImage(i,o,t,tc) { + var tl = tc.taglist, s = tc.imageScale; + if(s && !(o.width && o.height)) { + // images are not yet rendered, wait for window onload + AddHandler('load', function() { AddImage(i,o,t,tc); }, window); + return; + } + if(!i.complete) { + // image not loaded, wait for image onload + AddHandler('load',function() { AddImage(i,o,t,tc); }, i); + return; + } + + // Yes, this does look like nonsense, but it makes sure that both the + // width and height are actually set and not just calculated. This is + // required to keep proportional sizes when the images are hidden, so + // the images can be used again for another cloud. + o.width = o.width; + o.height = o.height; + + if(s) { + i.width = o.width * s; + i.height = o.height * s; + } + t.w = i.width; + t.h = i.height; + tl.push(t); +} +function GetProperty(e,p) { + var dv = doc.defaultView, pc = p.replace(/\-([a-z])/g,function(a){return a.charAt(1).toUpperCase()}); + return (dv && dv.getComputedStyle && dv.getComputedStyle(e,null).getPropertyValue(p)) || + (e.currentStyle && e.currentStyle[pc]); +} +function FindWeight(t,a) { + var w = 1, p; + if(t.weightFrom) { + w = 1 * (a.getAttribute(t.weightFrom) || t.textHeight); + } else if(p = GetProperty(a,'font-size')) { + w = (p.indexOf('px') > -1 && p.replace('px','') * 1) || + (p.indexOf('pt') > -1 && p.replace('pt','') * 1.25) || + p * 3.3; + } else { + t.weight = false; + } + return w; +} +function MouseOut(e) { + MouseMove(e); + var cv = e.target || e.fromElement.parentNode, tc = TagCanvas.tc[cv.id]; + tc && (tc.mx = tc.my = -1); +} +function MouseMove(e) { + var i, tc, dd = doc.documentElement, o; + for(i in TagCanvas.tc) { + tc = TagCanvas.tc[i]; + if(tc.tttimer) { + clearTimeout(tc.tttimer); + tc.tttimer = null; + } + o = $(tc.canvas).offset(); + // if(e.pageX) { // mod Shad Laws + if(e.offsetX) { // mod Shad Laws + // this works for IE + tc.mx = e.offsetX; // mod Shad Laws + tc.my = e.offsetY; // mod Shad Laws + } else if(e.pageX) { // mod Shad Laws + // this doesn't work for IE --> e.pageY = -parseInt($("html").css("margin-left"), 10) for the top row! + tc.mx = e.pageX - o.left; + tc.my = e.pageY - o.top; + } else { + tc.mx = e.clientX + (dd.scrollLeft || doc.body.scrollLeft) - o.left; + tc.my = e.clientY + (dd.scrollTop || doc.body.scrollTop) - o.top; + } + } +} +function MouseClick(e) { + var t = TagCanvas, cb = doc.addEventListener ? 0 : 1, + tg = e.target && Defined(e.target.id) ? e.target.id : e.srcElement.parentNode.id; + if(tg && e.button == cb && t.tc[tg]) { + MouseMove(e); + t.tc[tg].Clicked(e); + } +} +function MouseWheel(e) { + var t = TagCanvas, + tg = e.target && Defined(e.target.id) ? e.target.id : e.srcElement.parentNode.id; + if(tg && t.tc[tg]) { + e.cancelBubble = true; + e.returnValue = false; + e.preventDefault && e.preventDefault(); + t.tc[tg].Wheel((e.wheelDelta || e.detail) > 0); + } +} +function DrawCanvas() { + var t = TagCanvas.tc, i; + for(i in t) + t[i].Draw(); +} +function RotX(p1,t) { + var s = sin(t), c = cos(t); + return {x:p1.x, y:(p1.y * c) + (p1.z * s), z:(p1.y * -s) + (p1.z * c)}; +} +function RotY(p1,t) { + var s = sin(t), c = cos(t); + return {x:(p1.x * c) + (p1.z * -s), y:p1.y, z:(p1.x * s) + (p1.z * c)}; +} +function Project(tc,p1,w,h,sx,sy) { + var yn, xn, zn, m = tc.z1 / (tc.z1 + tc.z2 + p1.z); + yn = p1.y * m * sy; + xn = p1.x * m * sx; + zn = tc.z2 + p1.z; + return {x:xn, y:yn, z:zn}; +} +/** + * @constructor + */ +function Outline(tc) { + this.ts = new Date().valueOf(); + this.tc = tc; + this.x = this.y = this.w = this.h = this.sc = 1; + this.z = 0; + this.Draw = tc.pulsateTo < 1 && tc.outlineMethod != 'colour' ? this.DrawPulsate : this.DrawSimple; + this.SetMethod(tc.outlineMethod); +} +Oproto = Outline.prototype; +Oproto.SetMethod = function(om) { + var methods = { + block: ['PreDraw','DrawBlock'], + colour: ['PreDraw','DrawColour'], + outline: ['PostDraw','DrawOutline'], + classic: ['LastDraw','DrawOutline'], + none: ['LastDraw'] + }, funcs = methods[om] || methods.outline; + if(om == 'none') { + this.Draw = function() { return 1; } + } else { + this.drawFunc = this[funcs[1]]; + } + this[funcs[0]] = this.Draw; +}; +Oproto.Update = function(x,y,w,h,sc,p,xo,yo) { + var o = this.tc.outlineOffset, o2 = 2 * o; + this.x = sc * x + xo - o; + this.y = sc * y + yo - o; + this.w = sc * w + o2; + this.h = sc * h + o2; + this.sc = sc; // used to determine frontmost + this.z = p.z; +}; +Oproto.DrawOutline = function(c,x,y,w,h,colour) { + c.strokeStyle = colour; + c.strokeRect(x,y,w,h); +}; +Oproto.DrawColour = function(c,x,y,w,h,colour,tag,x1,y1) { + return this[tag.image ? 'DrawColourImage' : 'DrawColourText'](c,x,y,w,h,colour,tag,x1,y1); +}; +Oproto.DrawColourText = function(c,x,y,w,h,colour,tag,x1,y1) { + var normal = tag.colour; + tag.colour = colour; + tag.Draw(c,x1,y1); + tag.colour = normal; + return 1; +}; +Oproto.DrawColourImage = function(c,x,y,w,h,colour,tag,x1,y1) { + var ccanvas = c.canvas, fx = ~~max(x,0), fy = ~~max(y,0), + fw = min(ccanvas.width - fx, w) + .5|0, fh = min(ccanvas.height - fy,h) + .5|0, cc; + if(ocanvas) + ocanvas.width = fw, ocanvas.height = fh; + else + ocanvas = NewCanvas(fw, fh); + if(!ocanvas) + return this.SetMethod('outline'); // if using IE and images, give up! + cc = ocanvas.getContext('2d'); + + cc.drawImage(ccanvas,fx,fy,fw,fh,0,0,fw,fh); + c.clearRect(fx,fy,fw,fh); + tag.Draw(c,x1,y1); + c.setTransform(1,0,0,1,0,0); + c.save(); + c.beginPath(); + c.rect(fx,fy,fw,fh); + c.clip(); + c.globalCompositeOperation = 'source-in'; + c.fillStyle = colour; + c.fillRect(fx,fy,fw,fh); + c.restore(); + c.globalCompositeOperation = 'destination-over'; + c.drawImage(ocanvas,0,0,fw,fh,fx,fy,fw,fh); + c.globalCompositeOperation = 'source-over'; + return 1; +}; +Oproto.DrawBlock = function(c,x,y,w,h,colour) { + c.fillStyle = colour; + c.fillRect(x,y,w,h); +}; +Oproto.DrawSimple = function(c, tag, x1, y1) { + var t = this.tc; + c.setTransform(1,0,0,1,0,0); + c.strokeStyle = t.outlineColour; + c.lineWidth = t.outlineThickness; + c.shadowBlur = c.shadowOffsetX = c.shadowOffsetY = 0; + c.globalAlpha = 1; + return this.drawFunc(c,this.x,this.y,this.w,this.h,t.outlineColour,tag,x1,y1); +}; +Oproto.DrawPulsate = function(c, tag, x1, y1) { + var diff = new Date().valueOf() - this.ts, t = this.tc; + c.setTransform(1,0,0,1,0,0); + c.strokeStyle = t.outlineColour; + c.lineWidth = t.outlineThickness; + c.shadowBlur = c.shadowOffsetX = c.shadowOffsetY = 0; + c.globalAlpha = t.pulsateTo + ((1 - t.pulsateTo) * + (0.5 + (cos(2 * Math.PI * diff / (1000 * t.pulsateTime)) / 2))); + return this.drawFunc(c,this.x,this.y,this.w,this.h,t.outlineColour,tag,x1,y1); +}; +Oproto.Active = function(c,x,y) { + return (x >= this.x && y >= this.y && + x <= this.x + this.w && y <= this.y + this.h); +}; +Oproto.PreDraw = Oproto.PostDraw = Oproto.LastDraw = function() {}; +/** + * @constructor + */ +function Tag(tc,name,a,v,w,h,col,font) { + var c = tc.ctxt, i; + this.tc = tc; + this.image = name.src ? name : null; + this.name = name.src ? '' : name; + this.title = a.title || null; + this.a = a; + this.p3d = { x: v[0] * tc.radius * 1.1, y: v[1] * tc.radius * 1.1, z: v[2] * tc.radius * 1.1}; + this.x = this.y = 0; + this.w = w; + this.h = h; + this.colour = col || tc.textColour; + this.textFont = font || tc.textFont; + this.weight = this.sc = this.alpha = 1; + this.weighted = !tc.weight; + this.outline = new Outline(tc); + if(this.image) { + if(tc.txtOpt && tc.shadow) { + i = AddShadowToImage(this.image,tc.shadow,tc.shadowBlur,tc.shadowOffset); + if(i) { + this.image = i; + this.w = i.width; + this.h = i.height; + } + } + } else { + this.textHeight = tc.textHeight; + this.extents = FindTextBoundingBox(this.name, this.textFont, this.textHeight); + this.Measure(c,tc); + } + this.SetShadowColour = tc.shadowAlpha ? this.SetShadowColourAlpha : this.SetShadowColourFixed; + this.SetDraw(tc); +} +Tproto = Tag.prototype; +Tproto.SetDraw = function(t) { + this.Draw = this.image ? (t.ie > 7 ? this.DrawImageIE : this.DrawImage) : this.DrawText; + t.noSelect && (this.CheckActive = function() {}); +}; +Tproto.Measure = function(c,t) { + this.h = this.extents ? this.extents.max.y + this.extents.min.y : this.textHeight; + c.font = this.font = this.textHeight + 'px ' + this.textFont; + this.w = c.measureText(this.name).width; + if(t.txtOpt) { + var s = t.txtScale, th = s * this.textHeight, f = th + 'px ' + this.textFont, + soff = [s*t.shadowOffset[0],s*t.shadowOffset[1]], cw; + c.font = f; + cw = c.measureText(this.name).width; + this.image = TextToCanvas(this.name, f, th, cw, s * this.h, this.colour, + t.shadow, s * t.shadowBlur, soff, s, s); + if(this.image) { + this.w = this.image.width / s; + this.h = this.image.height / s; + } + this.SetDraw(t); + t.txtOpt = this.image; + } +}; +Tproto.SetWeight = function(w) { + if(!this.name.length) + return; + this.weight = w; + this.Weight(this.tc.ctxt, this.tc); + this.Measure(this.tc.ctxt, this.tc); +}; +Tproto.Weight = function(c,t) { + var w = this.weight, m = t.weightMode; + this.weighted = true; + if(m == 'colour' || m == 'both') + this.colour = FindGradientColour(t, (w - t.min_weight) / (t.max_weight-t.min_weight)); + if(m == 'size' || m == 'both') + this.textHeight = w * t.weightSize; + this.extents = FindTextBoundingBox(this.name, this.textFont, this.textHeight); +}; +Tproto.SetShadowColourFixed = function(c,s,a) { + c.shadowColor = s; +}; +Tproto.SetShadowColourAlpha = function(c,s,a) { + c.shadowColor = SetAlpha(s, a); +}; +Tproto.DrawText = function(c,xoff,yoff) { + var t = this.tc, x = this.x, y = this.y, w, h, s = this.sc; + c.globalAlpha = this.alpha; + c.setTransform(s,0,0,s,0,0); + c.fillStyle = this.colour; + t.shadow && this.SetShadowColour(c,t.shadow,this.alpha); + c.font = this.font; + w = this.w; + h = this.h; + x += (xoff / s) - (w / 2); + y += (yoff / s) - (h / 2); + c.fillText(this.name, x, y); +}; +Tproto.DrawImage = function(c,xoff,yoff) { + //var t = this.tc, x = this.x, y = this.y, s = this.sc, // mod Shad Laws + var x = this.x, y = this.y, s = this.sc, // mod Shad Laws + i = this.image, w = this.w, h = this.h, a = this.alpha, + shadow = this.shadow; + c.globalAlpha = a; + c.setTransform(s,0,0,s,0,0); + c.fillStyle = this.colour; + shadow && this.SetShadowColour(c,shadow,a); + x += (xoff / s) - (w / 2); + y += (yoff / s) - (h / 2); + c.drawImage(i, x, y, w, h); +}; +Tproto.DrawImageIE = function(c,xoff,yoff) { + var i = this.image, s = this.sc, + w = i.width = this.w*s, h = i.height = this.h * s, + x = (this.x*s) + xoff - (w/2), y = (this.y*s) + yoff - (h/2); + c.setTransform(1,0,0,1,0,0); + c.globalAlpha = this.alpha; + c.drawImage(i, x, y); +}; +Tproto.Calc = function(yaw,pitch) { + var pp = RotY(this.p3d,yaw), t = this.tc, mb = t.minBrightness, r = t.radius; + this.p3d = RotX(pp,pitch); + pp = Project(t, this.p3d, this.w, this.h, t.stretchX, t.stretchY); + this.x = pp.x; + this.y = pp.y; + this.sc = (t.z1 + t.z2 - pp.z) / t.z2; + this.alpha = max(mb,min(1,mb + 1 - ((pp.z - t.z2 + r) / (2 * r)))); +}; +Tproto.CheckActive = function(c,xoff,yoff) { + var t = this.tc, o = this.outline, + w = this.w, h = this.h, + x = this.x - w/2, y = this.y - h/2; + o.Update(x, y, w, h, this.sc, this.p3d, xoff, yoff); + return o.Active(c, t.mx, t.my) ? o : null; +}; +Tproto.Clicked = function(e) { + var a = this.a, t = a.target, h = a.href, evt; + if(t != '' && t != '_self') { + if(self.frames[t]) { + self.frames[t] = h; + } else{ + try { + if(top.frames[t]) { + top.frames[t] = h; + return; + } + } catch(err) { + // different domain/port/protocol? + } + window.open(h, t); + } + return; + } + if(doc.createEvent) { + evt = doc.createEvent('MouseEvents'); + evt.initMouseEvent('click', 1, 1, window, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null); + if(!a.dispatchEvent(evt)) + return; + } else if(a.fireEvent) { + if(!a.fireEvent('onclick')) + return; + } + doc.location = h; +}; +/** + * @constructor + */ +function TagCanvas() { + var i, opts = { + mx: -1, my: -1, + z1: 20000, z2: 20000, z0: 0.0002, + freezeActive: false, + activeCursor: 'pointer', + pulsateTo: 1, + pulsateTime: 3, + reverse: false, + depth: 0.5, + maxSpeed: 0.05, + minSpeed: 0, + decel: 0.95, + interval: 20, + initial: null, + initialDecel: false, // mod Shad Laws + deadZone: 0, // mod Shad Laws + physModel: false, // mod Shad Laws + maxInputZone: 0, // mod Shad Laws + hideTags: true, + minBrightness: 0.1, + outlineColour: '#ffff99', + outlineThickness: 2, + outlineOffset: 5, + outlineMethod: 'outline', + textColour: '#ff99ff', + textHeight: 15, + textFont: 'Helvetica, Arial, sans-serif', + shadow: '#000', + shadowBlur: 0, + shadowOffset: [0,0], + zoom: 1, + weight: false, + weightMode: 'size', + weightFrom: null, + weightSize: 1, + weightGradient: {0:'#f00', 0.33:'#ff0', 0.66:'#0f0', 1:'#00f'}, + txtOpt: true, + txtScale: 2, + frontSelect: false, + wheelZoom: true, + zoomMin: 0.3, + zoomMax: 3, + zoomStep: 0.05, + shape: 'sphere', + lock: null, + tooltip: null, + tooltipDelay: 300, + tooltipClass: 'tctooltip', + radiusX: 1, + radiusY: 1, + radiusZ: 1, + stretchX: 1, + stretchY: 1, + shuffleTags: false, + noSelect: false, + noMouse: false, + imageScale: 1 + }; + for(i in opts) + this[i] = opts[i]; + this.max_weight = 0; + this.min_weight = 200; +} +TCproto = TagCanvas.prototype; +TCproto.Draw = function() { + var cv = this.canvas, cw = cv.width, ch = cv.height, max_sc = 0, yaw = this.yaw, pitch = this.pitch, + x1 = cw / 2, y1 = ch / 2, c = this.ctxt, active, a, i, aindex = -1, tl = this.taglist, l = tl.length, + frontsel = this.frontSelect; + //if(yaw == 0 && pitch == 0 && this.drawn) // mod Shad Laws + if(yaw == 0 && pitch == 0 && this.drawn && !this.zoneActive) // mod Shad Laws + return this.Animate(cw,ch); + c.setTransform(1,0,0,1,0,0); + this.active = null; + for(i = 0; i < l; ++i) + tl[i].Calc(yaw, pitch); + tl = tl.sort(function(a,b) {return a.sc-b.sc}); + + for(i = 0; i < l; ++i) { + a = tl[i].CheckActive(c, x1, y1); + a = this.mx >= 0 && this.my >= 0 && tl[i].CheckActive(c, x1, y1); + if(a && a.sc > max_sc && (!frontsel || a.z <= 0)) { + active = a; + active.index = aindex = i; + max_sc = a.sc; + } + } + this.active = active; + + if(!this.txtOpt && this.shadow) { + c.shadowBlur = this.shadowBlur; + c.shadowOffsetX = this.shadowOffset[0]; + c.shadowOffsetY = this.shadowOffset[1]; + } + c.clearRect(0,0,cw,ch); + for(i = 0; i < l; ++i) { + if(!(aindex == i && active.PreDraw(c, tl[i], x1, y1))) + tl[i].Draw(c, x1, y1); + aindex == i && active.PostDraw(c); + } + if(this.freezeActive && active) { + this.yaw = this.pitch = this.drawn = 0; + } else { + this.Animate(cw, ch); + this.drawn = (l == this.listLength); + } + active && active.LastDraw(c); + cv.style.cursor = active ? this.activeCursor : ''; + this.Tooltip(active,tl[aindex]); +}; +TCproto.TooltipNone = function() { }; +TCproto.TooltipNative = function(active,tag) { + this.canvas.title = active && tag.title ? tag.title : ''; +}; +TCproto.TooltipDiv = function(active,tag) { + //var tc = this, s = tc.ttdiv.style, cid = tc.canvas.id; // mod Shad Laws + var tc = this, s = tc.ttdiv.style; // mod Shad Laws + if(active && tag.title) { + tc.ttdiv.innerHTML = tag.title; + if(s.display == 'none' && ! tc.tttimer) { + tc.tttimer = setTimeout(function() { + var p = $(tc.canvas).offset(); + s.display = 'block'; + s.left = p.left + tc.mx + 'px'; + s.top = p.top + tc.my + 24 + 'px'; + tc.tttimer = null; + }, tc.tooltipDelay); + } + } else { + s.display = 'none'; + } +}; +TCproto.Animate = function(w,h) { // mod Shad Laws - original function afterward + var tc = this; // mod Shad Laws + if(tc.physModel) + /** + * Physics-based model -- mod Shad Laws + * State update equation + * (normalized inertia J=1 and time-step dt=1, forward Euler discretization) + * w1 = w - b*w + m*(u-f) + n*v + * where w1,w,u,f,v are vectors, b,m,n are scalars: + * w = rotational speed at t=k + * components wx, wy, magnitude w + * w1 = rotational speed at t=k+1 + * components wx1, wy1, magnitude w1 + * u-f = actual input from mouse position (-1 <= u-f <= 1) + * components ux, uy, magnitude u + * coulomb friction f (models "deadZone" effect) + * reversed/locked/saturated as defined (models "reverse", "lock", and "maxInputZone" effects) + * v = fictitious input (-1 <= v <= 1) + * components vx, vy, magnitude v + * directed as needed (models "minSpeed" effect) + * b = damping (models "decel" effect) + * m = maximum actual input (models "maxSpeed" effect) + * n = maximum fictitious input (models "minSpeed" effect) + */ + { + var x = tc.mx, y = tc.my, xmax = w-1, ymax = h-1, xstr = tc.stretchX, ystr = tc.stretchY; + var r = tc.reverse ? -1 : 1, l = tc.lock, usat = tc.maxInputZone, zt = tc.z0; + // calculate physical parameters (b,f,m,n) + var b = 1-tc.decel, f = tc.deadZone, m = tc.maxSpeed*b, n = tc.minSpeed*b; + // set rotational velocities, following previous convention where x-rotation is "pitch" and y-rotation is "yaw" + var wx = tc.pitch, wy = tc.yaw, w = sqrt(wx*wx + wy*wy), wx1, wy1, w1; + // calculate inputs + var ux, uy, u, vx, vy, v; + this.zoneActive = false; + if(x >= 0 && y >= 0 && x <= xmax && y <= ymax) + { + // the "max(xmax/ymax,1)" parts are needed to deal with non-square tag clouds correctly + ux = -r * (2 * y/ymax - 1) * max(ymax/xmax,1) / ystr; + uy = r * (2 * x/xmax - 1) * max(xmax/ymax,1) / xstr; + if(abs(ux) <= 1+usat && abs(uy) <= 1+usat) + { + ux = (l != 'y') ? ux : 0; + uy = (l != 'x') ? uy : 0; + u = sqrt(ux*ux + uy*uy); + if(u <= f || f >= 1-zt) // dead zone, zero input + { + this.initial = null; + this.zoneActive = true; + ux = 0, uy = 0, u = 0; + vx = 0, vy = 0, v = 0; + } + else if(u <= 1) // inside cloud, normal input + { + this.initial = null; + this.zoneActive = true; + ux = ux/u*(u-f)/(1-f), uy = uy/u*(u-f)/(1-f), u = (u-f)/(1-f); + vx = 0, vy = 0, v = 0; + } + else if(u <= 1+usat) // just outside cloud, saturated input + { + this.initial = null; + this.zoneActive = true; + ux = ux/u, uy = uy/u, u = 1; + vx = 0, vy = 0, v = 0; + } + } + } + if(!this.zoneActive) // outside cloud, fictitious input + { + ux = 0, uy = 0, u = 0; + if(w >= zt) + vx = wx/w, vy = wy/w, v = 1; + else + { + v = 2*Math.PI*Math.random(); + if(l == 'x') + vx = 0, vy = v= 0 && y >= 0 && x < w && y < h) + { + tc.zoneActive = true; // mod Shad Laws + //s = tc.maxSpeed, r = tc.reverse ? -1 : 1; // mod Shad Laws + s = tc.maxSpeed, r = tc.reverse ? -1 : 1, dz = tc.deadZone; // mod Shad Laws + if(l != 'x') + //this.yaw = r * ((s * 2 * x / w) - s); // mod Shad Laws + this.yaw = r * s / max(1-dz,0.000001) * ( max(2*x/w-1-dz,0) + min(2*x/w-1+dz,0) ); // mod Shad Laws + if(l != 'y') + //this.pitch = r * -((s * 2 * y / h) - s); // mod Shad Laws + this.pitch = -r * s / max(1-dz,0.000001) * ( max(2*y/h-1-dz,0) + min(2*y/h-1+dz,0) ); // mod Shad Laws + this.initial = null; + } + //else if(!tc.initial) // mod Shad Laws + else if(!tc.initial || tc.initialDecel) // mod Shad Laws + { + s = tc.minSpeed, ay = abs(tc.yaw), ap = abs(tc.pitch); + if(l != 'x' && ay > s) + this.yaw = ay > tc.z0 ? tc.yaw * tc.decel : 0; + if(l != 'y' && ap > s) + this.pitch = ap > tc.z0 ? tc.pitch * tc.decel : 0; + } + } +}; +TCproto.Zoom = function(r) { + this.z2 = this.z1 * (1/r); + this.drawn = 0; +}; +TCproto.Clicked = function(e) { + var t = this.taglist, a = this.active; + try { + if(a && t[a.index]) + t[a.index].Clicked(e); + } catch(ex) { + } +}; +TCproto.Wheel = function(i) { + var z = this.zoom + this.zoomStep * (i ? 1 : -1); + this.zoom = min(this.zoomMax,max(this.zoomMin,z)); + this.Zoom(this.zoom); +}; + +TagCanvas.tc = {}; + +jQuery.fn.tagcanvas = function(options,lctr) { + var links, ctr = lctr ? jQuery('#'+lctr) : this; + if(doc.all && !lctr) return false; // IE must have external list + links = ctr.find('a'); + if(Defined(window.G_vmlCanvasManager)) { + this.each(function() { $(this)[0] = window.G_vmlCanvasManager.initElement($(this)[0]); }); + options.ie = parseFloat(navigator.appVersion.split('MSIE')[1]); + } + + if(!links.length || !this[0].getContext || !this[0].getContext('2d').fillText) + return false; + + this.each(function() { + var i, vl, im, ii, tag, jqt, w, weights = [], + pfuncs = { + sphere:PointsOnSphere, + vcylinder:PointsOnCylinderV, + hcylinder:PointsOnCylinderH + }; + + // if using internal links, get only the links for this canvas + lctr || (links = $(this).find('a')); + + jqt = new TagCanvas; + for(i in options) + jqt[i] = options[i]; + + jqt.z1 = (19800 / (Math.exp(jqt.depth) * (1-1/Math.E))) + + 20000 - 19800 / (1-(1/Math.E)); + jqt.z2 = jqt.z1 * (1/jqt.zoom); + + jqt.radius = (this.height > this.width ? this.width : this.height) + * 0.33 * (jqt.z2 + jqt.z1) / (jqt.z1); + //jqt.yaw = jqt.initial ? jqt.initial[0] * jqt.maxSpeed : 0; // mod Shad Laws + //jqt.pitch = jqt.initial ? jqt.initial[1] * jqt.maxSpeed : 0; // mod Shad Laws + jqt.yaw = jqt.initial && (jqt.lock != 'x') ? jqt.initial[0] * jqt.maxSpeed : 0; + jqt.pitch = jqt.initial && (jqt.lock != 'y') ? jqt.initial[1] * jqt.maxSpeed : 0; + jqt.canvas = $(this)[0]; + jqt.ctxt = jqt.canvas.getContext('2d'); + jqt.textFont = jqt.textFont && FixFont(jqt.textFont); + jqt.deadZone *= 1; // mod Shad Laws + jqt.minSpeed *= 1; // mod Shad Laws + jqt.decel *= 1; // mod Shad Laws + jqt.maxInputZone *= 1; // mod Shad Laws + jqt.pulsateTo *= 1; + jqt.textHeight *= 1; + jqt.minBrightness *= 1; + jqt.ctxt.textBaseline = 'top'; + if(jqt.shadowBlur || jqt.shadowOffset[0] || jqt.shadowOffset[1]) { + // let the browser translate "red" into "#ff0000" + jqt.ctxt.shadowColor = jqt.shadow; + jqt.shadow = jqt.ctxt.shadowColor; + jqt.shadowAlpha = ShadowAlphaBroken(); + } else { + delete jqt.shadow; + } + jqt.taglist = []; + + jqt.shape = pfuncs[jqt.shape] || pfuncs.sphere; + vl = jqt.shape(links.length, jqt.radiusX, jqt.radiusY, jqt.radiusZ); + jqt.shuffleTags && Shuffle(vl); + jqt.listLength = links.length; + for(i = 0; i < links.length; ++i) { + im = links[i].getElementsByTagName('img'); + if(im.length) { + ii = new Image; + ii.src = im[0].src; + tag = new Tag(jqt,ii, links[i], vl[i], 1, 1); + AddImage(ii,im[0],tag,jqt); + } else { + jqt.taglist.push(new Tag(jqt,links[i].innerText || links[i].textContent, links[i], + vl[i], 2, jqt.textHeight + 2, jqt.textColour || GetProperty(links[i],'color'), + jqt.textFont || FixFont(GetProperty(links[i],'font-family')))); + } + if(jqt.weight) { + w = FindWeight(jqt,links[i]); + if(w > jqt.max_weight) jqt.max_weight = w; + if(w < jqt.min_weight) jqt.min_weight = w; + weights.push(w); + } + } + if(jqt.weight = (jqt.max_weight > jqt.min_weight)) { + for(i = 0; i < jqt.taglist.length; ++i) { + jqt.taglist[i].SetWeight(weights[i]); + } + } + + TagCanvas.tc[$(this)[0].id] = jqt; + jqt.Tooltip = (jqt.tooltip == 'native' ? jqt.TooltipNative : (jqt.tooltip ? jqt.TooltipDiv : jqt.TooltipNone)); + if(jqt.tooltip) { + if(jqt.tooltip == 'native') { + jqt.Tooltip = jqt.TooltipNative; + } else { + jqt.Tooltip = jqt.TooltipDiv; + if(!jqt.ttdiv) { + jqt.ttdiv = doc.createElement('div'); + jqt.ttdiv.className = jqt.tooltipClass; + jqt.ttdiv.style.position = 'absolute'; + jqt.ttdiv.style.zIndex = jqt.canvas.style.zIndex + 1; + AddHandler('mouseover',function(e){e.target.style.display='none';},jqt.ttdiv); + doc.body.appendChild(jqt.ttdiv); + } + } + } else { + jqt.Tooltip = jqt.TooltipNone; + } + if(!jqt.noMouse && !handlers[$(this)[0].id]) { + // for some reason, using bind with mouseup isn't working in IE + AddHandler('mousemove', MouseMove, this); + AddHandler('mouseout', MouseOut, this); + AddHandler('mouseup', MouseClick, this); + if(jqt.wheelZoom) { + AddHandler('mousewheel', MouseWheel, this); + AddHandler('DOMMouseScroll', MouseWheel, this); + } + handlers[$(this)[0].id] = 1; + } + if(lctr && jqt.hideTags) { + if(TagCanvas.loaded) + $(ctr).hide(); + else + AddHandler('load', function() { $(ctr).hide() }, window); + } + options.interval = options.interval || jqt.interval; + }); + return !!(TagCanvas.started || (TagCanvas.started = setInterval(DrawCanvas, options.interval))); +}; +// set a flag for when the window has loaded +AddHandler('load',function(){TagCanvas.loaded=1;},window); +})(jQuery); diff --git a/modules/.not-used/tag_cloud_html5/js/jquery.tagcanvas.mod.min.js b/modules/.not-used/tag_cloud_html5/js/jquery.tagcanvas.mod.min.js new file mode 100755 index 0000000..b4f0191 --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/js/jquery.tagcanvas.mod.min.js @@ -0,0 +1,30 @@ +/** + * Copyright (C) 2010-2012 Graham Breach + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ +/** + * jQuery.tagcanvas 1.17.1 + * For more information, please contact + */ +/** + * Modified by Shad Laws 2012/06/08 -- all modified lines have "mod Shad Laws" comments + * - built a physics-based model for motion, which is activated with the physModel flag + * - included initialDecel, deadZone, maxInputZone, and physModel as options + * - set defaults of new options to mimic behavior without them (false, 0, 0, and false) + * - removed two unnecessary variable declarations caught by YUI Compressor + * - fixed initialization of a few variables (minSpeed, decel, yaw/pitch) + * - fixed problem with html margin-top changing coordinates in IE (but not Chrome or Firefox) + */ +(function(I){var S,R,G=Math.abs,r=Math.sin,h=Math.cos,z=Math.max,W=Math.min,M=Math.sqrt,B={},C={},D={0:"0,",1:"17,",2:"34,",3:"51,",4:"68,",5:"85,",6:"102,",7:"119,",8:"136,",9:"153,",a:"170,",A:"170,",b:"187,",B:"187,",c:"204,",C:"204,",d:"221,",D:"221,",e:"238,",E:"238,",f:"255,",F:"255,"},e,J,d,l=document,y,c={};for(S=0;S<256;++S){R=S.toString(16);if(S<16){R="0"+R}C[R]=C[R.toUpperCase()]=S.toString()+","}function O(i){return typeof(i)!="undefined"}function H(j){var Z=j.length-1,Y,aa;while(Z){aa=~~(Math.random()*Z);Y=j[Z];j[Z]=j[aa];j[aa]=Y;--Z}}function n(Z,ab,ag,ad){var ac,af,j,ae,ah=[],aa=Math.PI*(3-Math.sqrt(5)),Y=2/Z;for(ac=0;ac0)}function X(af,j){var Y=1024,ab=af.weightGradient,aa,ad,Z,ae,ac;if(af.gCanvas){ad=af.gCanvas.getContext("2d")}else{af.gCanvas=aa=g(Y,1);if(!aa){return null}ad=aa.getContext("2d");ae=ad.createLinearGradient(0,0,Y,0);for(Z in ab){ae.addColorStop(1-Z,ab[Z])}ad.fillStyle=ae;ad.fillRect(0,0,Y,1)}ac=ad.getImageData(~~((Y-1)*j),0,1,1).data;return"rgba("+ac[0]+","+ac[1]+","+ac[2]+","+(ac[3]/255)+")"}function u(ab,aa,Y,ae,ac,ad,j){var Z=(ad||0)+(j&&j[0]<0?G(j[0]):0),i=(ad||0)+(j&&j[1]<0?G(j[1]):0);ab.font=aa;ab.textBaseline="top";ab.fillStyle=Y;ac&&(ab.shadowColor=ac);ad&&(ab.shadowBlur=ad);j&&(ab.shadowOffsetX=j[0],ab.shadowOffsetY=j[1]);ab.fillText(ae,Z,i)}function m(ak,ac,ag,ai,ab,Y,ae,af,j,aj,ah){var Z=ai+G(j[0])+af+af,i=ab+G(j[1])+af+af,aa,ad;aa=g(Z+aj,i+ah);if(!aa){return null}ad=aa.getContext("2d");u(ad,ac,Y,ak,ae,af,j);return aa}function Q(ac,af,ag,Z){var aa=ac.width+G(Z[0])+ag+ag,j=ac.height+G(Z[1])+ag+ag,ad,ae,ab=(ag||0)+(Z&&Z[0]<0?G(Z[0]):0),Y=(ag||0)+(Z&&Z[1]<0?G(Z[1]):0);ad=g(aa,j);if(!ad){return null}ae=ad.getContext("2d");af&&(ae.shadowColor=af);ag&&(ae.shadowBlur=ag);Z&&(ae.shadowOffsetX=Z[0],ae.shadowOffsetY=Z[1]);ae.drawImage(ac,ab,Y);return ad}function K(ak,ac,ai){var aj=parseInt(ak.length*ai),ab=parseInt(ai*2),Z=g(aj,ab),af,j,aa,ae,ah,ag,Y,ad;if(!Z){return null}af=Z.getContext("2d");af.fillStyle="#000";af.fillRect(0,0,aj,ab);u(af,ai+"px "+ac,"#fff",ak);j=af.getImageData(0,0,aj,ab);aa=j.width;ae=j.height;ad={min:{x:aa,y:ae},max:{x:-1,y:-1}};for(ag=0;ag0){if(ahad.max.x){ad.max.x=ah}if(agad.max.y){ad.max.y=ag}}}}if(aa!=aj){ad.min.x*=(aj/aa);ad.max.x*=(aj/aa)}if(ae!=ab){ad.min.y*=(aj/ae);ad.max.y*=(aj/ae)}Z=null;return ad}function t(i){return"'"+i.replace(/(\'|\")/g,"").replace(/\s*,\s*/g,"', '")+"'"}function A(i,j,Y){Y=Y||l;if(Y.addEventListener){Y.addEventListener(i,j,false)}else{Y.attachEvent("on"+i,j)}}function P(aa,ac,Z,j){var Y=j.taglist,ab=j.imageScale;if(ab&&!(ac.width&&ac.height)){A("load",function(){P(aa,ac,Z,j)},window);return}if(!aa.complete){A("load",function(){P(aa,ac,Z,j)},aa);return}ac.width=ac.width;ac.height=ac.height;if(ab){aa.width=ac.width*ab;aa.height=ac.height*ab}Z.w=aa.width;Z.h=aa.height;Y.push(Z)}function N(Z,Y){var j=l.defaultView,i=Y.replace(/\-([a-z])/g,function(aa){return aa.charAt(1).toUpperCase()});return(j&&j.getComputedStyle&&j.getComputedStyle(Z,null).getPropertyValue(Y))||(Z.currentStyle&&Z.currentStyle[i])}function x(Y,j){var i=1,Z;if(Y.weightFrom){i=1*(j.getAttribute(Y.weightFrom)||Y.textHeight)}else{if(Z=N(j,"font-size")){i=(Z.indexOf("px")>-1&&Z.replace("px","")*1)||(Z.indexOf("pt")>-1&&Z.replace("pt","")*1.25)||Z*3.3}else{Y.weight=false}}return i}function k(Y){L(Y);var j=Y.target||Y.fromElement.parentNode,i=s.tc[j.id];i&&(i.mx=i.my=-1)}function L(aa){var Z,Y,j=l.documentElement,ab;for(Z in s.tc){Y=s.tc[Z];if(Y.tttimer){clearTimeout(Y.tttimer);Y.tttimer=null}ab=I(Y.canvas).offset();if(aa.offsetX){Y.mx=aa.offsetX;Y.my=aa.offsetY}else{if(aa.pageX){Y.mx=aa.pageX-ab.left;Y.my=aa.pageY-ab.top}else{Y.mx=aa.clientX+(j.scrollLeft||l.body.scrollLeft)-ab.left;Y.my=aa.clientY+(j.scrollTop||l.body.scrollTop)-ab.top}}}}function q(Z){var j=s,i=l.addEventListener?0:1,Y=Z.target&&O(Z.target.id)?Z.target.id:Z.srcElement.parentNode.id;if(Y&&Z.button==i&&j.tc[Y]){L(Z);j.tc[Y].Clicked(Z)}}function U(Y){var i=s,j=Y.target&&O(Y.target.id)?Y.target.id:Y.srcElement.parentNode.id;if(j&&i.tc[j]){Y.cancelBubble=true;Y.returnValue=false;Y.preventDefault&&Y.preventDefault();i.tc[j].Wheel((Y.wheelDelta||Y.detail)>0)}}function o(){var Y=s.tc,j;for(j in Y){Y[j].Draw()}}function b(Y,i){var j=r(i),Z=h(i);return{x:Y.x,y:(Y.y*Z)+(Y.z*j),z:(Y.y*-j)+(Y.z*Z)}}function a(Y,i){var j=r(i),Z=h(i);return{x:(Y.x*Z)+(Y.z*-j),y:Y.y,z:(Y.x*j)+(Y.z*Z)}}function T(Y,af,ae,aa,ad,ab){var i,Z,ac,j=Y.z1/(Y.z1+Y.z2+af.z);i=af.y*j*ab;Z=af.x*j*ad;ac=Y.z2+af.z;return{x:Z,y:i,z:ac}}function f(i){this.ts=new Date().valueOf();this.tc=i;this.x=this.y=this.w=this.h=this.sc=1;this.z=0;this.Draw=i.pulsateTo<1&&i.outlineMethod!="colour"?this.DrawPulsate:this.DrawSimple;this.SetMethod(i.outlineMethod)}e=f.prototype;e.SetMethod=function(Y){var j={block:["PreDraw","DrawBlock"],colour:["PreDraw","DrawColour"],outline:["PostDraw","DrawOutline"],classic:["LastDraw","DrawOutline"],none:["LastDraw"]},i=j[Y]||j.outline;if(Y=="none"){this.Draw=function(){return 1}}else{this.drawFunc=this[i[1]]}this[i[0]]=this.Draw};e.Update=function(ae,ad,af,ab,ac,j,aa,i){var Y=this.tc.outlineOffset,Z=2*Y;this.x=ac*ae+aa-Y;this.y=ac*ad+i-Y;this.w=ac*af+Z;this.h=ac*ab+Z;this.sc=ac;this.z=j.z};e.DrawOutline=function(ab,i,aa,j,Y,Z){ab.strokeStyle=Z;ab.strokeRect(i,aa,j,Y)};e.DrawColour=function(Z,ac,aa,ad,Y,i,ae,j,ab){return this[ae.image?"DrawColourImage":"DrawColourText"](Z,ac,aa,ad,Y,i,ae,j,ab)};e.DrawColourText=function(aa,ad,ab,ae,Y,i,af,j,ac){var Z=af.colour;af.colour=i;af.Draw(aa,j,ac);af.colour=Z;return 1};e.DrawColourImage=function(ad,ag,ae,ah,ac,i,ak,j,af){var ai=ad.canvas,aa=~~z(ag,0),Z=~~z(ae,0),ab=W(ai.width-aa,ah)+0.5|0,aj=W(ai.height-Z,ac)+0.5|0,Y;if(y){y.width=ab,y.height=aj}else{y=g(ab,aj)}if(!y){return this.SetMethod("outline")}Y=y.getContext("2d");Y.drawImage(ai,aa,Z,ab,aj,0,0,ab,aj);ad.clearRect(aa,Z,ab,aj);ak.Draw(ad,j,af);ad.setTransform(1,0,0,1,0,0);ad.save();ad.beginPath();ad.rect(aa,Z,ab,aj);ad.clip();ad.globalCompositeOperation="source-in";ad.fillStyle=i;ad.fillRect(aa,Z,ab,aj);ad.restore();ad.globalCompositeOperation="destination-over";ad.drawImage(y,0,0,ab,aj,aa,Z,ab,aj);ad.globalCompositeOperation="source-over";return 1};e.DrawBlock=function(ab,i,aa,j,Y,Z){ab.fillStyle=Z;ab.fillRect(i,aa,j,Y)};e.DrawSimple=function(aa,i,j,Z){var Y=this.tc;aa.setTransform(1,0,0,1,0,0);aa.strokeStyle=Y.outlineColour;aa.lineWidth=Y.outlineThickness;aa.shadowBlur=aa.shadowOffsetX=aa.shadowOffsetY=0;aa.globalAlpha=1;return this.drawFunc(aa,this.x,this.y,this.w,this.h,Y.outlineColour,i,j,Z)};e.DrawPulsate=function(ab,i,j,Z){var aa=new Date().valueOf()-this.ts,Y=this.tc;ab.setTransform(1,0,0,1,0,0);ab.strokeStyle=Y.outlineColour;ab.lineWidth=Y.outlineThickness;ab.shadowBlur=ab.shadowOffsetX=ab.shadowOffsetY=0;ab.globalAlpha=Y.pulsateTo+((1-Y.pulsateTo)*(0.5+(h(2*Math.PI*aa/(1000*Y.pulsateTime))/2)));return this.drawFunc(ab,this.x,this.y,this.w,this.h,Y.outlineColour,i,j,Z)};e.Active=function(Y,i,j){return(i>=this.x&&j>=this.y&&i<=this.x+this.w&&j<=this.y+this.h)};e.PreDraw=e.PostDraw=e.LastDraw=function(){};function E(aa,j,ae,ag,af,ac,Y,Z){var ad=aa.ctxt,ab;this.tc=aa;this.image=j.src?j:null;this.name=j.src?"":j;this.title=ae.title||null;this.a=ae;this.p3d={x:ag[0]*aa.radius*1.1,y:ag[1]*aa.radius*1.1,z:ag[2]*aa.radius*1.1};this.x=this.y=0;this.w=af;this.h=ac;this.colour=Y||aa.textColour;this.textFont=Z||aa.textFont;this.weight=this.sc=this.alpha=1;this.weighted=!aa.weight;this.outline=new f(aa);if(this.image){if(aa.txtOpt&&aa.shadow){ab=Q(this.image,aa.shadow,aa.shadowBlur,aa.shadowOffset);if(ab){this.image=ab;this.w=ab.width;this.h=ab.height}}}else{this.textHeight=aa.textHeight;this.extents=K(this.name,this.textFont,this.textHeight);this.Measure(ad,aa)}this.SetShadowColour=aa.shadowAlpha?this.SetShadowColourAlpha:this.SetShadowColourFixed;this.SetDraw(aa)}J=E.prototype;J.SetDraw=function(i){this.Draw=this.image?(i.ie>7?this.DrawImageIE:this.DrawImage):this.DrawText;i.noSelect&&(this.CheckActive=function(){})};J.Measure=function(ac,j){this.h=this.extents?this.extents.max.y+this.extents.min.y:this.textHeight;ac.font=this.font=this.textHeight+"px "+this.textFont;this.w=ac.measureText(this.name).width;if(j.txtOpt){var Z=j.txtScale,aa=Z*this.textHeight,ab=aa+"px "+this.textFont,Y=[Z*j.shadowOffset[0],Z*j.shadowOffset[1]],i;ac.font=ab;i=ac.measureText(this.name).width;this.image=m(this.name,ab,aa,i,Z*this.h,this.colour,j.shadow,Z*j.shadowBlur,Y,Z,Z);if(this.image){this.w=this.image.width/Z;this.h=this.image.height/Z}this.SetDraw(j);j.txtOpt=this.image}};J.SetWeight=function(i){if(!this.name.length){return}this.weight=i;this.Weight(this.tc.ctxt,this.tc);this.Measure(this.tc.ctxt,this.tc)};J.Weight=function(Z,Y){var j=this.weight,i=Y.weightMode;this.weighted=true;if(i=="colour"||i=="both"){this.colour=X(Y,(j-Y.min_weight)/(Y.max_weight-Y.min_weight))}if(i=="size"||i=="both"){this.textHeight=j*Y.weightSize}this.extents=K(this.name,this.textFont,this.textHeight)};J.SetShadowColourFixed=function(Y,j,i){Y.shadowColor=j};J.SetShadowColourAlpha=function(Y,j,i){Y.shadowColor=p(j,i)};J.DrawText=function(Y,ac,j){var ad=this.tc,aa=this.x,Z=this.y,ab,i,ae=this.sc;Y.globalAlpha=this.alpha;Y.setTransform(ae,0,0,ae,0,0);Y.fillStyle=this.colour;ad.shadow&&this.SetShadowColour(Y,ad.shadow,this.alpha);Y.font=this.font;ab=this.w;i=this.h;aa+=(ac/ae)-(ab/2);Z+=(j/ae)-(i/2);Y.fillText(this.name,aa,Z)};J.DrawImage=function(aa,ag,Z){var ad=this.x,ab=this.y,ah=this.sc,j=this.image,ae=this.w,Y=this.h,ac=this.alpha,af=this.shadow;aa.globalAlpha=ac;aa.setTransform(ah,0,0,ah,0,0);aa.fillStyle=this.colour;af&&this.SetShadowColour(aa,af,ac);ad+=(ag/ah)-(ae/2);ab+=(Z/ah)-(Y/2);aa.drawImage(j,ad,ab,ae,Y)};J.DrawImageIE=function(aa,ae,Z){var j=this.image,af=this.sc,ad=j.width=this.w*af,Y=j.height=this.h*af,ac=(this.x*af)+ae-(ad/2),ab=(this.y*af)+Z-(Y/2);aa.setTransform(1,0,0,1,0,0);aa.globalAlpha=this.alpha;aa.drawImage(j,ac,ab)};J.Calc=function(aa,Z){var i=a(this.p3d,aa),j=this.tc,ab=j.minBrightness,Y=j.radius;this.p3d=b(i,Z);i=T(j,this.p3d,this.w,this.h,j.stretchX,j.stretchY);this.x=i.x;this.y=i.y;this.sc=(j.z1+j.z2-i.z)/j.z2;this.alpha=z(ab,W(1,ab+1-((i.z-j.z2+Y)/(2*Y))))};J.CheckActive=function(Z,ad,Y){var ae=this.tc,i=this.outline,ac=this.w,j=this.h,ab=this.x-ac/2,aa=this.y-j/2;i.Update(ab,aa,ac,j,this.sc,this.p3d,ad,Y);return i.Active(Z,ae.mx,ae.my)?i:null};J.Clicked=function(ab){var j=this.a,Y=j.target,Z=j.href,i;if(Y!=""&&Y!="_self"){if(self.frames[Y]){self.frames[Y]=Z}else{try{if(top.frames[Y]){top.frames[Y]=Z;return}}catch(aa){}window.open(Z,Y)}return}if(l.createEvent){i=l.createEvent("MouseEvents");i.initMouseEvent("click",1,1,window,0,0,0,0,0,0,0,0,0,0,null);if(!j.dispatchEvent(i)){return}}else{if(j.fireEvent){if(!j.fireEvent("onclick")){return}}}l.location=Z};function s(){var j,Y={mx:-1,my:-1,z1:20000,z2:20000,z0:0.0002,freezeActive:false,activeCursor:"pointer",pulsateTo:1,pulsateTime:3,reverse:false,depth:0.5,maxSpeed:0.05,minSpeed:0,decel:0.95,interval:20,initial:null,initialDecel:false,deadZone:0,physModel:false,maxInputZone:0,hideTags:true,minBrightness:0.1,outlineColour:"#ffff99",outlineThickness:2,outlineOffset:5,outlineMethod:"outline",textColour:"#ff99ff",textHeight:15,textFont:"Helvetica, Arial, sans-serif",shadow:"#000",shadowBlur:0,shadowOffset:[0,0],zoom:1,weight:false,weightMode:"size",weightFrom:null,weightSize:1,weightGradient:{0:"#f00",0.33:"#ff0",0.66:"#0f0",1:"#00f"},txtOpt:true,txtScale:2,frontSelect:false,wheelZoom:true,zoomMin:0.3,zoomMax:3,zoomStep:0.05,shape:"sphere",lock:null,tooltip:null,tooltipDelay:300,tooltipClass:"tctooltip",radiusX:1,radiusY:1,radiusZ:1,stretchX:1,stretchY:1,shuffleTags:false,noSelect:false,noMouse:false,imageScale:1};for(j in Y){this[j]=Y[j]}this.max_weight=0;this.min_weight=200}d=s.prototype;d.Draw=function(){var ah=this.canvas,af=ah.width,Y=ah.height,j=0,ae=this.yaw,Z=this.pitch,aa=af/2,ak=Y/2,ai=this.ctxt,ac,aj,ag,ad=-1,am=this.taglist,ab=am.length,al=this.frontSelect;if(ae==0&&Z==0&&this.drawn&&!this.zoneActive){return this.Animate(af,Y)}ai.setTransform(1,0,0,1,0,0);this.active=null;for(ag=0;ag=0&&this.my>=0&&am[ag].CheckActive(ai,aa,ak);if(aj&&aj.sc>j&&(!al||aj.z<=0)){ac=aj;ac.index=ad=ag;j=aj.sc}}this.active=ac;if(!this.txtOpt&&this.shadow){ai.shadowBlur=this.shadowBlur;ai.shadowOffsetX=this.shadowOffset[0];ai.shadowOffsetY=this.shadowOffset[1]}ai.clearRect(0,0,af,Y);for(ag=0;ag=0&&aa>=0&&ac<=aq&&aa<=ax){Y=-aj*(2*aa/ax-1)*z(ax/aq,1)/av;j=aj*(2*ac/aq-1)*z(aq/ax,1)/ai;if(G(Y)<=1+al&&G(j)<=1+al){Y=(au!="y")?Y:0;j=(au!="x")?j:0;ag=M(Y*Y+j*j);if(ag<=az||az>=1-i){this.initial=null;this.zoneActive=true;Y=0,j=0,ag=0;am=0,ak=0,af=0}else{if(ag<=1){this.initial=null;this.zoneActive=true;Y=Y/ag*(ag-az)/(1-az),j=j/ag*(ag-az)/(1-az),ag=(ag-az)/(1-az);am=0,ak=0,af=0}else{if(ag<=1+al){this.initial=null;this.zoneActive=true;Y=Y/ag,j=j/ag,ag=1;am=0,ak=0,af=0}}}}}if(!this.zoneActive){Y=0,j=0,ag=0;if(ae>=i){am=aC/ae,ak=aB/ae,af=1}else{af=2*Math.PI*Math.random();if(au=="x"){am=0,ak=af=0&&aa>=0&&acah){this.yaw=ab>Z.z0?Z.yaw*Z.decel:0}if(au!="y"&&an>ah){this.pitch=an>Z.z0?Z.pitch*Z.decel:0}}}}};d.Zoom=function(i){this.z2=this.z1*(1/i);this.drawn=0};d.Clicked=function(Z){var Y=this.taglist,i=this.active;try{if(i&&Y[i.index]){Y[i.index].Clicked(Z)}}catch(j){}};d.Wheel=function(j){var Y=this.zoom+this.zoomStep*(j?1:-1);this.zoom=W(this.zoomMax,z(this.zoomMin,Y));this.Zoom(this.zoom)};s.tc={};jQuery.fn.tagcanvas=function(Y,j){var i,Z=j?jQuery("#"+j):this;if(l.all&&!j){return false}i=Z.find("a");if(O(window.G_vmlCanvasManager)){this.each(function(){I(this)[0]=window.G_vmlCanvasManager.initElement(I(this)[0])});Y.ie=parseFloat(navigator.appVersion.split("MSIE")[1])}if(!i.length||!this[0].getContext||!this[0].getContext("2d").fillText){return false}this.each(function(){var ac,aa,ae,ah,ai,ad,ag,af=[],ab={sphere:n,vcylinder:w,hcylinder:F};j||(i=I(this).find("a"));ad=new s;for(ac in Y){ad[ac]=Y[ac]}ad.z1=(19800/(Math.exp(ad.depth)*(1-1/Math.E)))+20000-19800/(1-(1/Math.E));ad.z2=ad.z1*(1/ad.zoom);ad.radius=(this.height>this.width?this.width:this.height)*0.33*(ad.z2+ad.z1)/(ad.z1);ad.yaw=ad.initial&&(ad.lock!="x")?ad.initial[0]*ad.maxSpeed:0;ad.pitch=ad.initial&&(ad.lock!="y")?ad.initial[1]*ad.maxSpeed:0;ad.canvas=I(this)[0];ad.ctxt=ad.canvas.getContext("2d");ad.textFont=ad.textFont&&t(ad.textFont);ad.deadZone*=1;ad.minSpeed*=1;ad.decel*=1;ad.maxInputZone*=1;ad.pulsateTo*=1;ad.textHeight*=1;ad.minBrightness*=1;ad.ctxt.textBaseline="top";if(ad.shadowBlur||ad.shadowOffset[0]||ad.shadowOffset[1]){ad.ctxt.shadowColor=ad.shadow;ad.shadow=ad.ctxt.shadowColor;ad.shadowAlpha=v()}else{delete ad.shadow}ad.taglist=[];ad.shape=ab[ad.shape]||ab.sphere;aa=ad.shape(i.length,ad.radiusX,ad.radiusY,ad.radiusZ);ad.shuffleTags&&H(aa);ad.listLength=i.length;for(ac=0;acad.max_weight){ad.max_weight=ag}if(agad.min_weight)){for(ac=0;acvalue)) { + if (!is_null($min) && ($this->value < $min)) { + // below min + $this->errors['numrange'] = true; + $this->error_messages['numrange'] = t('Value is below minimum of').' '.$min; + } elseif (!is_null($max) && ($this->value > $max)) { + // above max + $this->errors['numrange'] = true; + $this->error_messages['numrange'] = t('Value is above maximum of').' '.$max;; + } + } else { + // not numeric + $this->errors['numrange'] = true; + $this->error_messages['numrange'] = t('Value is not numeric'); + } + } + + /** + * Custom validation rule: color + * returns no error if string is formatted as #hhhhhh OR if string is empty + * to exclude the empty case, add "required" as another rule + */ + protected function rule_color() { + if (preg_match("/^#[0-9A-Fa-f]{6}$|^$/", $this->value) == 0) { + $this->errors['color'] = true; + $this->error_messages['color'] = t('Color is not in #hhhhhh format'); + } + } +} \ No newline at end of file diff --git a/modules/.not-used/tag_cloud_html5/module.info b/modules/.not-used/tag_cloud_html5/module.info new file mode 100755 index 0000000..e158d15 --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/module.info @@ -0,0 +1,7 @@ +name = "Tag Cloud HTML5" +description = "HTML5-compliant tag cloud. Functions as non-Flash replacements for both 'tag_cloud' and 'tag_cloud_page' modules, with some extra features added." +version = 7 +author_name = "Shad Laws" +author_url = "" +info_url = "http://codex.gallery2.org/Gallery3:Modules:tag_cloud_html5" +discuss_url = "http://gallery.menalto.com/node/106774" \ No newline at end of file diff --git a/modules/.not-used/tag_cloud_html5/views/admin_tag_cloud_html5.html.php b/modules/.not-used/tag_cloud_html5/views/admin_tag_cloud_html5.html.php new file mode 100755 index 0000000..026624a --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/views/admin_tag_cloud_html5.html.php @@ -0,0 +1,29 @@ + + +
    +

    + +

    +

    +
    + TagCanvas: ".t("a non-flash, HTML5-compliant jQuery plugin.") ?>
    + excanvas: ".t("maintains canvas compatibility with pre-9.0 Internet Explorer, and does not load if not needed.") ?>
    + + +

    +

    +
    +
    +
    +
    + +

    +

    +
    +
    + +

    + +
    diff --git a/modules/.not-used/tag_cloud_html5/views/tag_cloud_html5_block.html.php b/modules/.not-used/tag_cloud_html5/views/tag_cloud_html5_block.html.php new file mode 100755 index 0000000..80360fe --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/views/tag_cloud_html5_block.html.php @@ -0,0 +1,40 @@ + + + +
    + + + +
    +
    + +
    + + diff --git a/modules/.not-used/tag_cloud_html5/views/tag_cloud_html5_embed.html.php b/modules/.not-used/tag_cloud_html5/views/tag_cloud_html5_embed.html.php new file mode 100755 index 0000000..99e5af4 --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/views/tag_cloud_html5_embed.html.php @@ -0,0 +1,59 @@ + + + +
    + + + +
    + \ No newline at end of file diff --git a/modules/.not-used/tag_cloud_html5/views/tag_cloud_html5_page.html.php b/modules/.not-used/tag_cloud_html5/views/tag_cloud_html5_page.html.php new file mode 100755 index 0000000..2b6fa62 --- /dev/null +++ b/modules/.not-used/tag_cloud_html5/views/tag_cloud_html5_page.html.php @@ -0,0 +1,40 @@ + + + +
    +
    + dynamic_top() ?> +
    +

    +
    +
    + + + +
    +
    + +
    +dynamic_bottom() ?> \ No newline at end of file diff --git a/modules/.not-used/user_albums/helpers/user_albums_event.php b/modules/.not-used/user_albums/helpers/user_albums_event.php new file mode 100755 index 0000000..1abb3df --- /dev/null +++ b/modules/.not-used/user_albums/helpers/user_albums_event.php @@ -0,0 +1,53 @@ +name}"; + $group = identity::lookup_group_by_name($group_name); + if (!$group) { + $group = identity::create_group($group_name); + identity::add_user_to_group($user, $group); + } + + // Create an album for the user, if it doesn't exist + $album = ORM::factory("item") + ->where("parent_id", "=", item::root()->id) + ->where("name", "=", $user->name) + ->find(); + if (!$album->loaded()) { + $album->type = "album"; + $album->name = $user->name; + $album->title = "{$user->name}'s album"; + $album->parent_id = item::root()->id; + $album->sort_column = "weight"; + $album->sort_order = "asc"; + $album->save(); + + access::allow($group, "view", item::root()); + access::allow($group, "view_full", $album); + access::allow($group, "edit", $album); + access::allow($group, "add", $album); + } + } +} diff --git a/modules/.not-used/user_albums/module.info b/modules/.not-used/user_albums/module.info new file mode 100755 index 0000000..548ea98 --- /dev/null +++ b/modules/.not-used/user_albums/module.info @@ -0,0 +1,7 @@ +name = "User Albums" +description = "Create a personal album for new users" +version = 1 +author_name = "" +author_url = "" +info_url = "http://codex.gallery2.org/Gallery3:Modules:user_albums" +discuss_url = "http://gallery.menalto.com/forum_module_user_albums" diff --git a/modules/albumtree/helpers/albumtree_block.php b/modules/albumtree/helpers/albumtree_block.php new file mode 100755 index 0000000..3ae36fb --- /dev/null +++ b/modules/albumtree/helpers/albumtree_block.php @@ -0,0 +1,38 @@ + t("Album tree")); + } + + static function get($block_id) { + $block = new Block(); + switch ($block_id) { + case "albumtree": + $style = module::get_var("albumtree", "style", "select"); + $block->css_id = "g-albumtree"; + $block->title = t("Album Tree"); + $block->content = new View("albumtree_block_{$style}.html"); + $block->content->root = item::root(); + break; + } + return $block; + } +} \ No newline at end of file diff --git a/modules/albumtree/helpers/albumtree_installer.php b/modules/albumtree/helpers/albumtree_installer.php new file mode 100755 index 0000000..17ff86f --- /dev/null +++ b/modules/albumtree/helpers/albumtree_installer.php @@ -0,0 +1,33 @@ + + + + +
    +
    + +
    +
    diff --git a/modules/albumtree/views/albumtree_block_list.html.php b/modules/albumtree/views/albumtree_block_list.html.php new file mode 100755 index 0000000..08ab3f0 --- /dev/null +++ b/modules/albumtree/views/albumtree_block_list.html.php @@ -0,0 +1,30 @@ + + + +
      + +
    • + title) ?> +
    • +viewable()->children(null, null, array(array("type", "=", "album"))) as $child){ + makelist($child,$level+1); + } +} +makelist($root,0); +?> +
    + + diff --git a/modules/albumtree/views/albumtree_block_select.html.php b/modules/albumtree/views/albumtree_block_select.html.php new file mode 100755 index 0000000..afe1c7f --- /dev/null +++ b/modules/albumtree/views/albumtree_block_select.html.php @@ -0,0 +1,16 @@ + + diff --git a/modules/arrow_nav/helpers/arrow_nav_theme.php b/modules/arrow_nav/helpers/arrow_nav_theme.php new file mode 100755 index 0000000..930a27c --- /dev/null +++ b/modules/arrow_nav/helpers/arrow_nav_theme.php @@ -0,0 +1,24 @@ +script("arrow_nav.js"); + } +} diff --git a/modules/arrow_nav/js/arrow_nav.js b/modules/arrow_nav/js/arrow_nav.js new file mode 100755 index 0000000..5a6eeae --- /dev/null +++ b/modules/arrow_nav/js/arrow_nav.js @@ -0,0 +1,74 @@ +(function ($) { + 'use strict'; + + var slideshowOpen = false, + direction = 'ltr', + keyPrevious = 37, + keyNext = 39, + keyDelete = 119, + url; + + $(document).ready(function() { + direction = $(document.body).css("direction"); + + if (direction === 'rtl') { + keyPrevious = 39; + keyNext = 37; + } + + if (typeof cooliris !== 'undefined') { + if ('embed' in cooliris) { + var show = cooliris.embed.show; + + cooliris.embed.show = function() { + slideshowOpen = true; + show.apply(this, arguments); + }; + } + } + }); + + $(document).keydown(function(e) { + + // do not interfere with browser defaults like history navigation etc. + if (e.altKey || e.shiftKey || e.ctrlKey || e.metaKey) { return; } + + // do nothing if event happens inside form elements + if (e.target.form && e.target.form.nodeType && e.target.form.nodeType === 1) { return; } + + // do not interfere with slideshow control + if (slideshowOpen) { + // check if it's still there + slideshowOpen = false; + + $(document).find('object').each(function(){ + if (/cooliris/.test(this.data)) { + slideshowOpen = true; + return; + } + }); + + if (slideshowOpen) { return; } + } + + switch (e.keyCode) { + case keyPrevious: + url = $('.g-paginator .g-first a').eq(0).attr("href"); + break; + + case keyNext: + url = $('.g-paginator .g-text-right a').eq(0).attr("href"); + break; + + case keyDelete: + $('a.g-dialog-link.g-quick-delete').click(); + return false; + } + + if (url !== undefined) { + window.location = url; + return false; + } + }); + +})(jQuery); diff --git a/modules/arrow_nav/module.info b/modules/arrow_nav/module.info new file mode 100755 index 0000000..1fe4a50 --- /dev/null +++ b/modules/arrow_nav/module.info @@ -0,0 +1,7 @@ +name = "Arrow Navigation" +description = "Use the left/right arrow keys to go to the previous/next page" +version = 4 +author_name = "" +author_url = "" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:arrow_nav" +discuss_url = "" diff --git a/modules/batchtag/controllers/batchtag.php b/modules/batchtag/controllers/batchtag.php new file mode 100755 index 0000000..b36d0e6 --- /dev/null +++ b/modules/batchtag/controllers/batchtag.php @@ -0,0 +1,117 @@ +post('name')}&item_id={$input->post('item_id')}&tag_subitems={$input->post('tag_subitems')}&csrf={$input->post('csrf')}")); + + } + + public function tagitems2() { + // Tag all non-album items in the current album with the specified tags. + + // Prevent Cross Site Request Forgery + access::verify_csrf(); + + $input = Input::instance(); + + // Variables + if (($input->get("batchtag_max") == false) || ($input->get("batchtag_max") == "0")) { + $batchtag_max = "50"; + } else { + $batchtag_max = $input->get("batchtag_max"); + } + if ($input->get("batchtag_items_processed") == false) { + $batchtag_items_processed = "0"; + } else { + $batchtag_items_processed = $input->get("batchtag_items_processed"); + } + + // Figure out if the contents of sub-albums should also be tagged + $str_tag_subitems = $input->get("tag_subitems"); + + $children = ""; + if ($str_tag_subitems == false) { + // Generate an array of all non-album items in the current album. + $children = ORM::factory("item") + ->where("parent_id", "=", $input->get("item_id")) + ->where("type", "!=", "album") + ->find_all(); + } else { + // Generate an array of all non-album items in the current album + // and any sub albums. + $item = ORM::factory("item", $input->get("item_id")); + $children = $item->descendants(); + } + + // Loop through each item in the album and make sure the user has + // access to view and edit it. + $children_count = "0"; + $tag_count = "0"; + + //echo Kohana::debug($children); + + echo ''; + + foreach ($children as $child) { + + if ($tag_count < $batchtag_max) { + + if ($children_count >= $batchtag_items_processed) { + if (access::can("view", $child) && access::can("edit", $child) && !$child->is_album()) { + + // Assuming the user can view/edit the current item, loop + // through each tag that was submitted and apply it to + // the current item. + foreach (explode(",", $input->get("name")) as $tag_name) { + $tag_name = trim($tag_name); + if ($tag_name) { + tag::add($child, $tag_name); + } + // $tag_count should be inside the foreach loop as it is depending on the number of time tag:add is run + $tag_count++; + } + } + echo '' . "\n"; + $children_count++; + $batchtag_max_new = $tag_count; + echo ''; + } else { $children_count++; } + + } else { break; } + + } + + if ($tag_count < $batchtag_max) { + // Redirect back to the album. + $item = ORM::factory("item", $input->get("item_id")); + url::redirect(url::abs_site("{$item->type}s/{$item->id}")); + //echo url::abs_site("{$item->type}s/{$item->id}"); + } else { + url::redirect(url::abs_site("batchtag/tagitems2?name={$input->get('name')}&item_id={$input->get('item_id')}&tag_subitems={$input->get('tag_subitems')}&batchtag_items_processed=$children_count&batchtag_max=$batchtag_max&csrf={$input->get('csrf')}")); + //echo url::abs_site("batchtag/tagitems2?name={$input->get('name')}&item_id={$input->get('item_id')}&tag_subitems={$input->get('tag_subitems')}&batchtag_items_processed=$children_count&batchtag_max=$batchtag_max&csrf={$input->get('csrf')}"); + } + } +} diff --git a/modules/batchtag/helpers/batchtag_block.php b/modules/batchtag/helpers/batchtag_block.php new file mode 100755 index 0000000..1bad96c --- /dev/null +++ b/modules/batchtag/helpers/batchtag_block.php @@ -0,0 +1,61 @@ + t("Batch Tag")); + } + + static function get($block_id, $theme) { + $block = ""; + + // Only display on album pages that the user can edit. + $item = $theme->item(); + if (!$item || !$item->is_album() || !access::can("edit", $item)) { + return; + } + + switch ($block_id) { + case "batch_tag": + // Make a new sidebar block. + $block = new Block(); + $block->css_id = "g-batch-tag"; + $block->title = t("Batch Tag"); + $block->content = new View("batchtag_block.html"); + + // Make a new form to place in the sidebar block. + $form = new Forge("batchtag/tagitems", "", "post", + array("id" => "g-batch-tag-form")); + $label = t("Tag everything in this album:"); + $group = $form->group("add_tag")->label("Add Tag"); + $group->input("name")->label($label)->rules("required|length[1,64]"); + $group->checkbox("tag_subitems") + ->label(t("Include sub-albums?")) + ->value(true) + ->checked(false); + + $group->hidden("item_id")->value($item->id); + $group->submit("")->value(t("Add Tag")); + $block->content->batch_tag_form = $form; + + break; + } + return $block; + } +} diff --git a/modules/batchtag/helpers/batchtag_event.php b/modules/batchtag/helpers/batchtag_event.php new file mode 100755 index 0000000..b1f887b --- /dev/null +++ b/modules/batchtag/helpers/batchtag_event.php @@ -0,0 +1,40 @@ +module == "tag") { + $data->messages["warn"][] = t("The BatchTag module requires the Tags module."); + } + } + + static function module_change($changes) { + // See if the Tags module is installed, + // tell the user to install it if it isn't. + if (!module::is_active("tag") || in_array("tag", $changes->deactivate)) { + site_status::warning( + t("The BatchTag module requires the Tags module. " . + "Activate the Tags module now", + array("url" => url::site("admin/modules"))), + "batchtag_needs_tag"); + } else { + site_status::clear("batchtag_needs_tag"); + } + } +} diff --git a/modules/batchtag/helpers/batchtag_installer.php b/modules/batchtag/helpers/batchtag_installer.php new file mode 100755 index 0000000..a8b30fd --- /dev/null +++ b/modules/batchtag/helpers/batchtag_installer.php @@ -0,0 +1,41 @@ + + + diff --git a/modules/captionator/controllers/captionator.php b/modules/captionator/controllers/captionator.php new file mode 100755 index 0000000..9a89599 --- /dev/null +++ b/modules/captionator/controllers/captionator.php @@ -0,0 +1,84 @@ +abs_url()); + } + + $v = new Theme_View("page.html", "collection", "captionator"); + $v->content = new View("captionator_dialog.html"); + $v->content->album = $album; + $v->content->enable_tags = module::is_active("tag"); + if ($v->content->enable_tags) { + $v->content->tags = array(); + foreach ($album->viewable()->children() as $child) { + $item = ORM::factory("item", $child->id); + $tag_names = array(); + foreach (tag::item_tags($item) as $tag) { + $tag_names[] = $tag->name; + } + $v->content->tags[$child->id] = implode(", ", $tag_names); + } + } + print $v; + } + + function save($album_id) { + access::verify_csrf(); + + $album = ORM::factory("item", $album_id); + access::required("edit", $album); + + if (Input::instance()->post("save")) { + $titles = Input::instance()->post("title"); + $descriptions = Input::instance()->post("description"); + $filenames = Input::instance()->post("filename"); + $internetaddresses = Input::instance()->post("internetaddress"); + $tags = Input::instance()->post("tags"); + $enable_tags = module::is_active("tag"); + foreach (array_keys($titles) as $id) { + $item = ORM::factory("item", $id); + if ($item->loaded() && access::can("edit", $item)) { + $item->title = $titles[$id]; + $item->description = $descriptions[$id]; + $item->name = $filenames[$id]; + $item->slug = $internetaddresses[$id]; + $item->save(); + if ($enable_tags) { + tag::clear_all($item); + foreach (explode(",", $tags[$id]) as $tag_name) { + if ($tag_name) { + tag::add($item, trim($tag_name)); + } + } + tag::compact(); + } + } + } + message::success(t("Captions saved")); + } + url::redirect($album->abs_url()); + } +} diff --git a/modules/captionator/helpers/captionator_event.php b/modules/captionator/helpers/captionator_event.php new file mode 100755 index 0000000..09268ac --- /dev/null +++ b/modules/captionator/helpers/captionator_event.php @@ -0,0 +1,33 @@ +item(); + + if ($item && $item->is_album() && access::can("edit", $item)) { + $menu->get("options_menu") + ->append(Menu::factory("link") + ->id("captionator") + ->label(t("Caption album")) + ->css_id("g-menu-captionator-link") + ->url(url::site("captionator/dialog/{$item->id}"))); + } + } +} diff --git a/modules/captionator/module.info b/modules/captionator/module.info new file mode 100755 index 0000000..5edf301 --- /dev/null +++ b/modules/captionator/module.info @@ -0,0 +1,7 @@ +name = "Captionator" +description = "Caption all photos, movies and albums in an album at once." +version = 1 +author_name = "" +author_url = "" +info_url = "http://codex.gallery2.org/Gallery3:Modules:captionator" +discuss_url = "http://gallery.menalto.com/forum_module_captionator" diff --git a/modules/captionator/views/captionator_dialog.html.php b/modules/captionator/views/captionator_dialog.html.php new file mode 100755 index 0000000..2b2f0e2 --- /dev/null +++ b/modules/captionator/views/captionator_dialog.html.php @@ -0,0 +1,68 @@ + +
    + +
    id}") ?>" method="post" id="g-captionator-form"> + +
    + + %album_title", array("album_title" => $album->title)) ?> + + + viewable()->children() as $child): ?> + + + + + +
    + thumb_img(array(), 140, true) ?> + +
      +
    • + + +
    • +
    • + + +
    • + +
    • + + +
    • + +
    • + + +
    • +
    • + + +
    • +
    +
    + +
    +
    + "/> + "/> +
    +
    +
    diff --git a/modules/custom_menus/controllers/admin_custom_menus.php b/modules/custom_menus/controllers/admin_custom_menus.php new file mode 100755 index 0000000..6bd5993 --- /dev/null +++ b/modules/custom_menus/controllers/admin_custom_menus.php @@ -0,0 +1,254 @@ +page_title = t("Manage menus"); + $view->content = new View("admin_custom_menus.html"); + $view->content->menu_list = $this->get_html_list(0); + print $view; + } + + public function form_create($id) { + // Display the create new menu form. + print $this->get_new_menu_form($id); + } + + public function form_edit($id) { + // Display the edit menu form. + print $this->get_edit_menu_form($id); + } + + static function get_new_menu_form($id) { + // Generate the create new menu form. + $form = new Forge("admin/custom_menus/create/$id", "", "post", array("id" => "g-create-menu-form")); + $group = $form->group("create_menu") + ->label(t("Add new menu")); + $group->input("menu_title") + ->label(t("Title")); + $group->input("menu_url") + ->label(t("URL (Leave blank if this menu will have sub-menus)")); + $group->submit("")->value(t("Create menu")); + return $form; + } + + static function get_edit_menu_form($id) { + // Generate the edit menu form. + $existing_menu = ORM::factory("custom_menu", $id); + $form = new Forge("admin/custom_menus/edit/$id", "", "post", array("id" => "g-edit-menu-form")); + $group = $form->group("edit_menu") + ->label(t("Edit menu")); + $group->input("menu_title") + ->label(t("Title")) + ->value($existing_menu->title); + $group->input("menu_url") + ->label(t("URL (Leave blank if this menu will have sub-menus)")) + ->value($existing_menu->url); + $group->submit("")->value(t("Save changes")); + return $form; + } + + public function create($id) { + // Save a new menu to the database. + + access::verify_csrf(); + + // Save form variables to the database. + $new_menu = ORM::factory("custom_menu"); + $new_menu->title = Input::instance()->post("menu_title"); + $new_menu->url = Input::instance()->post("menu_url"); + $new_menu->parent_id = $id; + + // Set menu's location to the last position. + $existing_menu = ORM::factory("custom_menu") + ->where("parent_id", "=", $id) + ->order_by("order_by", "DESC") + ->find_all(1); + if (count($existing_menu) > 0) { + $int_position = $existing_menu[0]->order_by; + $int_position++; + $new_menu->order_by = $int_position; + } else { + $new_menu->order_by = 0; + } + + // Save new menu to the database. + $new_menu->save(); + message::success(t("Menu %menu_name created", array("menu_name" => $new_menu->title))); + log::success("custom_menus", t("Menu %menu_name created", array("menu_name" => $new_menu->title))); + json::reply(array("result" => "success")); + } + + public function edit($id) { + // Save a new menu to the database. + + access::verify_csrf(); + + // Load the existing menu and save changes. + $existing_menu = ORM::factory("custom_menu", $id); + if ($existing_menu->loaded()) { + $existing_menu->title = Input::instance()->post("menu_title"); + $existing_menu->url = Input::instance()->post("menu_url"); + $existing_menu->save(); + message::success(t("Menu %menu_name saved", array("menu_name" => $existing_menu->title))); + log::success("custom_menus", t("Menu %menu_name saved", array("menu_name" => $existing_menu->title))); + json::reply(array("result" => "success")); + } else { + message::error(t("Unable to load menu %menu_id", array("menu_id" => $id))); + log::success("custom_menus", t("Unable to load menu %menu_id", array("menu_id" => $id))); + json::reply(array("result" => "success")); + } + } + + function get_html_list($parent_id) { + // Generate an HTML list of existing menu items. + $existing_menu = ORM::factory("custom_menu") + ->where("parent_id", "=", $parent_id) + ->order_by("order_by", "ASC") + ->find_all(); + $str_html = ""; + if (count($existing_menu) > 0) { + $str_html = "\n"; + } + return $str_html; + } + + public function form_delete($id) { + // Display a form asking the user if they want to delete a menu. + $one_menu = ORM::factory("custom_menu", $id); + if ($one_menu->loaded()) { + print $this->get_delete_form($one_menu); + } + } + + public function delete($id) { + // Delete the specified menu. + + access::verify_csrf(); + + // Make sure $id belongs to an actual menu. + $one_menu = ORM::factory("custom_menu", $id); + if (!$one_menu->loaded()) { + throw new Kohana_404_Exception(); + } + + // If the form validates, delete the specified menu. + $form = $this->get_delete_form($one_menu); + if ($form->validate()) { + $name = $one_menu->title; + $this->delete_sub_menus($one_menu->id); + $one_menu->delete(); + message::success(t("Deleted menu %menu_name", array("menu_name" => $name))); + log::success("custom_menus", t("Deleted menu %menu_name", array("menu_name" => $name))); + json::reply(array("result" => "success", "location" => url::site("admin/custom_menus"))); + } else { + print $form; + } + } + + function delete_sub_menus($parent_id) { + // Delete all sub menus associated with $parent_id. + $existing_menu = ORM::factory("custom_menu") + ->where("parent_id", "=", $parent_id) + ->order_by("title", "ASC") + ->find_all(); + foreach ($existing_menu as $one_menu) { + $this->delete_sub_menus($one_menu->id); + $one_menu->delete(); + } + } + + static function get_delete_form($one_menu) { + // Generate a new form asking the user if they want to delete a menu. + $form = new Forge("admin/custom_menus/delete/$one_menu->id", "", "post", array("id" => "g-delete-menu-form")); + $group = $form->group("delete_menu") + ->label(t("Really delete menu %menu_name & sub-menus?", array("menu_name" => $one_menu->title))); + $group->submit("")->value(t("Delete Menu")); + return $form; + } + + public function move_menu_up($id) { + // Move the specified menu item up one position. + $one_menu = ORM::factory("custom_menu", $id); + if ($one_menu->loaded()) { + $existing_menu = ORM::factory("custom_menu") + ->where("parent_id", "=", $one_menu->parent_id) + ->where("order_by", "<", $one_menu->order_by) + ->order_by("order_by", "DESC") + ->find_all(1); + if (count($existing_menu) > 0) { + $second_menu = ORM::factory("custom_menu", $existing_menu[0]->id); + $temp_position = $one_menu->order_by; + $one_menu->order_by = $second_menu->order_by; + $second_menu->order_by = $temp_position; + $one_menu->save(); + $second_menu->save(); + message::success(t("Menu %menu_title moved up", array("menu_title" => $one_menu->title))); + log::success("custom_menus", t("Menu %menu_title moved up", array("menu_title" => $one_menu->title))); + } + } + url::redirect("admin/custom_menus"); + } + + public function move_menu_down($id) { + // Move the specified menu item down one position. + $one_menu = ORM::factory("custom_menu", $id); + if ($one_menu->loaded()) { + $existing_menu = ORM::factory("custom_menu") + ->where("parent_id", "=", $one_menu->parent_id) + ->where("order_by", ">", $one_menu->order_by) + ->order_by("order_by", "ASC") + ->find_all(1); + if (count($existing_menu) > 0) { + $second_menu = ORM::factory("custom_menu", $existing_menu[0]->id); + $temp_position = $one_menu->order_by; + $one_menu->order_by = $second_menu->order_by; + $second_menu->order_by = $temp_position; + $one_menu->save(); + $second_menu->save(); + message::success(t("Menu %menu_title moved down", array("menu_title" => $one_menu->title))); + log::success("custom_menus", t("Menu %menu_title moved down", array("menu_title" => $one_menu->title))); + } + } + url::redirect("admin/custom_menus"); + } +} diff --git a/modules/custom_menus/helpers/custom_menus_event.php b/modules/custom_menus/helpers/custom_menus_event.php new file mode 100755 index 0000000..1c2bd39 --- /dev/null +++ b/modules/custom_menus/helpers/custom_menus_event.php @@ -0,0 +1,75 @@ +get("content_menu") + ->append(Menu::factory("link") + ->id("custom_menus") + ->label(t("Custom Menus Manager")) + ->url(url::site("admin/custom_menus"))); + } + + static function site_menu($menu, $theme) { + // Add user definied menu and sub-menu items to the site menu. + $existing_menu = ORM::factory("custom_menu") + ->where("parent_id", "=", "0") + ->order_by("order_by", "DESC") + ->find_all(); + if (count($existing_menu) > 0) { + foreach ($existing_menu as $one_menu) { + if ($one_menu->url == "") { + $menu->add_after("home", $new_menu = Menu::factory("submenu") + ->id("custom_menus-" . $one_menu->id) + ->label(t($one_menu->title))); + custom_menus_event::add_sub_menus($one_menu->id, $new_menu); + } else { + $menu->add_after("home", Menu::factory("link") + ->id("custom_menus-" . $one_menu->id) + ->label(t($one_menu->title)) + ->url($one_menu->url)); + } + } + } + } + + function add_sub_menus($parent_id, $parent_menu) { + // Populate the menu bar with any sub-menu items on the current menu ($parent_menu). + $existing_menu = ORM::factory("custom_menu") + ->where("parent_id", "=", $parent_id) + ->order_by("order_by", "ASC") + ->find_all(); + if (count($existing_menu) > 0) { + foreach ($existing_menu as $one_menu) { + if ($one_menu->url == "") { + $parent_menu->append($new_menu = Menu::factory("submenu") + ->id("custom_menus-" . $one_menu->id) + ->label(t($one_menu->title))); + custom_menus_event::add_sub_menus($one_menu->id, $new_menu); + } else { + $parent_menu->append(Menu::factory("link") + ->id("custom_menus-" . $one_menu->id) + ->label(t($one_menu->title)) + ->url($one_menu->url)); + } + } + } + } +} diff --git a/modules/custom_menus/helpers/custom_menus_installer.php b/modules/custom_menus/helpers/custom_menus_installer.php new file mode 100755 index 0000000..94b7d90 --- /dev/null +++ b/modules/custom_menus/helpers/custom_menus_installer.php @@ -0,0 +1,37 @@ +query("CREATE TABLE IF NOT EXISTS {custom_menus} ( + `id` int(9) NOT NULL auto_increment, + `title` varchar(255) default NULL, + `url` text default NULL, + `parent_id` int(9) NOT NULL default 0, + `order_by` int(9) NOT NULL default 0, + PRIMARY KEY (`id`), + UNIQUE KEY(`id`)) + DEFAULT CHARSET=utf8;"); + + // Set the module version number. + module::set_version("custom_menus", 1); + } +} diff --git a/modules/custom_menus/models/custom_menu.php b/modules/custom_menus/models/custom_menu.php new file mode 100755 index 0000000..e659cff --- /dev/null +++ b/modules/custom_menus/models/custom_menu.php @@ -0,0 +1,21 @@ + + diff --git a/modules/database_info/helpers/database_info_block.php b/modules/database_info/helpers/database_info_block.php new file mode 100755 index 0000000..7e3053f --- /dev/null +++ b/modules/database_info/helpers/database_info_block.php @@ -0,0 +1,36 @@ + t("Database info")); + } + + static function get($block_id) { + $block = new Block(); + switch ($block_id) { + case "database_info": + $block->css_id = "g-database-info"; + $block->title = t("Database information"); + $block->content = new View("admin_block_db.html"); + break; + } + return $block; + } +} diff --git a/modules/database_info/module.info b/modules/database_info/module.info new file mode 100755 index 0000000..500f7b8 --- /dev/null +++ b/modules/database_info/module.info @@ -0,0 +1,7 @@ +name = "Database Info" +description = "View information about your Gallery 3 database on the admin dashboard." +version = 1 +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" +info_url = "https://gallery3-contrib.gitlab.io/#Documentation:27018364" +discuss_url = "https://gitlab.com/eric2001/database_info/-/issues" diff --git a/modules/database_info/views/admin_block_db.html.php b/modules/database_info/views/admin_block_db.html.php new file mode 100755 index 0000000..d199541 --- /dev/null +++ b/modules/database_info/views/admin_block_db.html.php @@ -0,0 +1,18 @@ + +query("SHOW TABLE STATUS"); + $database_size = 0; + foreach($tables as $table) { + $database_size += ($table->Data_length + $table->Index_length); + } + $database_size = $database_size / 1024 / 1024; +?> +
      +
    • + number_format($database_size, 2))) ?> +
    • +
    • + count($tables))) ?> +
    • +
    diff --git a/modules/delete_cache/helpers/delete_cache_task.php b/modules/delete_cache/helpers/delete_cache_task.php new file mode 100755 index 0000000..98b1226 --- /dev/null +++ b/modules/delete_cache/helpers/delete_cache_task.php @@ -0,0 +1,70 @@ +callback("delete_cache_task::delete_cache") + ->name(t("Delete cache")) + ->description(t("Truncate the cache table from the database.")) + ->severity(log::SUCCESS), + ); + } + + static function delete_cache($task) { + $start = microtime(true); + + $total = $task->get("total"); + if (empty($total)) { + $task->set("total", $total = db::build()->count_records("caches")); + $task->set("last_id", 0); + $task->set("completed", 0); + } + + $last_id = $task->get("last_id"); + $completed = $task->get("completed"); + + foreach (ORM::factory("cache") + ->where("id", ">", $last_id) + ->find_all(100) as $item) { + + $last_id = $item->id; + $completed++; + + if ($completed == $total || microtime(true) - $start > 1.5) { + break; + } + } + + $task->set("completed", $completed); + $task->set("last_id", $last_id); + + if ($total == $completed) { + $task->done = true; + $task->state = "success"; + $task->percent_complete = 100; + $db = Database::instance(); + $db->query("TRUNCATE TABLE {caches}"); + } else { + $task->percent_complete = round(100 * $completed / $total); + } + $task->status = t2("One row updated", "%count / %total rows truncated from the cache table", $completed, + array("total" => $total)); + } +} diff --git a/modules/delete_cache/module.info b/modules/delete_cache/module.info new file mode 100755 index 0000000..b3f00d7 --- /dev/null +++ b/modules/delete_cache/module.info @@ -0,0 +1,7 @@ +name = "Delete cache" +description = "Delete various caches in your gallery install database" +version = 1 +author_name = "floridave" +author_url = "" +info_url = "http://codex.gallery2.org/Gallery3:Modules:delete_cache" +discuss_url = "http://gallery.menalto.com/forum_module_delete_cache" diff --git a/modules/downloadfullsize/controllers/admin_downloadfullsize.php b/modules/downloadfullsize/controllers/admin_downloadfullsize.php new file mode 100755 index 0000000..f862ea4 --- /dev/null +++ b/modules/downloadfullsize/controllers/admin_downloadfullsize.php @@ -0,0 +1,93 @@ +content = new View("admin_downloadfullsize.html"); + $view->content->downloadlinks_form = $this->_get_admin_form(); + print $view; + } + + public function saveprefs() { + // Prevent Cross Site Request Forgery + access::verify_csrf(); + + // Figure out which boxes where checked + $dlLinks_array = Input::instance()->post("DownloadLinkOptions"); + $fButton = false; + $download_original_button = false; + for ($i = 0; $i < count($dlLinks_array); $i++) { + if ($dlLinks_array[$i] == "fButton") { + $fButton = true; + } + } + + if (module::is_active("keeporiginal")) { + $keeporiginal_array = Input::instance()->post("DownloadOriginalOptions"); + for ($i = 0; $i < count($keeporiginal_array); $i++) { + if ($keeporiginal_array[$i] == "DownloadOriginalImage") { + $download_original_button = true; + } + } + module::set_var("downloadfullsize", "DownloadOriginalImage", $download_original_button); + } + + // Save Settings. + module::set_var("downloadfullsize", "fButton", $fButton); + message::success(t("Your Selection Has Been Saved.")); + + // Load Admin page. + $view = new Admin_View("admin.html"); + $view->content = new View("admin_downloadfullsize.html"); + $view->content->downloadlinks_form = $this->_get_admin_form(); + print $view; + + } + + private function _get_admin_form() { + // Make a new Form. + $form = new Forge("admin/downloadfullsize/saveprefs", "", "post", + array("id" => "g-download-fullsize-adminForm")); + + // Make an array for the different types of download links. + $linkOptions["fButton"] = array(t("Show Floppy Disk Picture Link"), module::get_var("downloadfullsize", "fButton")); + + // Setup a few checkboxes on the form. + $add_links = $form->group("DownloadLinks"); + $add_links->checklist("DownloadLinkOptions") + ->options($linkOptions); + + if (module::is_active("keeporiginal")) { + $KeepOriginalOptions["DownloadOriginalImage"] = array(t("Allow visitors to download the original image when available?"), module::get_var("downloadfullsize", "DownloadOriginalImage")); + $keeporiginal_group = $form->group("KeepOriginalPrefs") + ->label(t("KeepOriginal Preferences")); + $keeporiginal_group->checklist("DownloadOriginalOptions") + ->options($KeepOriginalOptions); + } + + // Add a save button to the form. + $form->submit("SaveLinks")->value(t("Save")); + + // Return the newly generated form. + return $form; + } +} \ No newline at end of file diff --git a/modules/downloadfullsize/controllers/downloadfullsize.php b/modules/downloadfullsize/controllers/downloadfullsize.php new file mode 100755 index 0000000..1f3b9a8 --- /dev/null +++ b/modules/downloadfullsize/controllers/downloadfullsize.php @@ -0,0 +1,37 @@ +is_photo() && module::get_var("downloadfullsize", "DownloadOriginalImage")) { + $original_image = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $item->file_path()); + if (file_exists($original_image)) { + download::force($original_image); + } else { + download::force($item->file_path()); + } + } else { + download::force($item->file_path()); + } + } +} diff --git a/modules/downloadfullsize/css/downloadfullsize_menu.css b/modules/downloadfullsize/css/downloadfullsize_menu.css new file mode 100755 index 0000000..a608a66 --- /dev/null +++ b/modules/downloadfullsize/css/downloadfullsize_menu.css @@ -0,0 +1,3 @@ +#g-view-menu #g-download-fullsize-link { + background-image: url('../images/ico-view-downloadfullsize.png'); +} diff --git a/modules/downloadfullsize/helpers/downloadfullsize_block.php b/modules/downloadfullsize/helpers/downloadfullsize_block.php new file mode 100755 index 0000000..2726107 --- /dev/null +++ b/modules/downloadfullsize/helpers/downloadfullsize_block.php @@ -0,0 +1,51 @@ + t("Download Item")); + } + + static function get($block_id, $theme) { + $item = $theme->item; + switch ($block_id) { + case "downloadfullsize": + + // If Item is movie then... + if ($item && $item->is_movie() && access::can("view_full", $item)) { + $block = new Block(); + $block->css_id = "g-download-fullsize"; + $block->title = t("Download Movie"); + $block->content = new View("downloadfullsize_block.html"); + return $block; + } + + // If Item is photo then... + if ($item && $item->is_photo() && access::can("view_full", $item)) { + $block = new Block(); + $block->css_id = "g-download-fullsize"; + $block->title = t("Download Photo"); + $block->content = new View("downloadfullsize_block.html"); + return $block; + } + } + return ""; + } + +} diff --git a/modules/downloadfullsize/helpers/downloadfullsize_event.php b/modules/downloadfullsize/helpers/downloadfullsize_event.php new file mode 100755 index 0000000..2871f9a --- /dev/null +++ b/modules/downloadfullsize/helpers/downloadfullsize_event.php @@ -0,0 +1,57 @@ +item)) { + if (module::get_var("downloadfullsize", "fButton")) { + $downloadLink = url::site("downloadfullsize/send/{$theme->item->id}"); + $menu + ->append(Menu::factory("link") + ->id("downloadfullsize") + ->label(t("Download Fullsize Image")) + ->url($downloadLink) + ->css_id("g-download-fullsize-link")); + } + } + } + + static function movie_menu($menu, $theme) { + if (access::can("view_full", $theme->item)) { + if (module::get_var("downloadfullsize", "fButton")) { + $downloadLink = url::site("downloadfullsize/send/{$theme->item->id}"); + $menu + ->append(Menu::factory("link") + ->id("downloadfullsize") + ->label(t("Download Video")) + ->url($downloadLink) + ->css_id("g-download-fullsize-link")); + } + } + } + + static function admin_menu($menu, $theme) { + $menu->get("settings_menu") + ->append(Menu::factory("link") + ->id("downloadfullsize") + ->label(t("Download Photo Links")) + ->url(url::site("admin/downloadfullsize"))); + } + +} diff --git a/modules/downloadfullsize/helpers/downloadfullsize_theme.php b/modules/downloadfullsize/helpers/downloadfullsize_theme.php new file mode 100755 index 0000000..45459a8 --- /dev/null +++ b/modules/downloadfullsize/helpers/downloadfullsize_theme.php @@ -0,0 +1,26 @@ +item && access::can("view_full", $theme->item)) { + return $theme->css("downloadfullsize_menu.css"); + } + } +} diff --git a/modules/downloadfullsize/images/ico-view-downloadfullsize.png b/modules/downloadfullsize/images/ico-view-downloadfullsize.png new file mode 100755 index 0000000..ce7804d Binary files /dev/null and b/modules/downloadfullsize/images/ico-view-downloadfullsize.png differ diff --git a/modules/downloadfullsize/module.info b/modules/downloadfullsize/module.info new file mode 100755 index 0000000..a690bf4 --- /dev/null +++ b/modules/downloadfullsize/module.info @@ -0,0 +1,7 @@ +name = "DownloadFullsize" +description = "Displays a link to download the fullsize version of the current photo." +version = 1 +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" +info_url = "https://gallery3-contrib.gitlab.io/#Documentation:27018368" +discuss_url = "https://gitlab.com/eric2001/downloadfullsize/-/issues" diff --git a/modules/downloadfullsize/views/admin_downloadfullsize.html.php b/modules/downloadfullsize/views/admin_downloadfullsize.html.php new file mode 100755 index 0000000..5dc5cef --- /dev/null +++ b/modules/downloadfullsize/views/admin_downloadfullsize.html.php @@ -0,0 +1,5 @@ + +
    +

    + +
    diff --git a/modules/downloadfullsize/views/downloadfullsize_block.html.php b/modules/downloadfullsize/views/downloadfullsize_block.html.php new file mode 100755 index 0000000..9cec2a8 --- /dev/null +++ b/modules/downloadfullsize/views/downloadfullsize_block.html.php @@ -0,0 +1,18 @@ + + +item->is_photo()) { ?> + + + +item->is_movie()) { ?> + + + diff --git a/modules/dupcheck/controllers/dupcheck.php b/modules/dupcheck/controllers/dupcheck.php new file mode 100755 index 0000000..357a788 --- /dev/null +++ b/modules/dupcheck/controllers/dupcheck.php @@ -0,0 +1,103 @@ +get("page", 1); + if ($page < 1) { + url::redirect("dupcheck/dupes"); + } + + // First item to display. + $offset = ($page - 1) * $page_size; + + // Determine the total number of items, + // for page numbering purposes. + $count = db::build() + ->select("itemmd5") + ->select(array("C" => "count(\"*\")")) + ->from("fullsize_md5sums") + ->group_by("itemmd5") + ->having("C", ">", 1) + ->execute()->count(); +~ + // Figure out what the highest page number is. + $max_pages = ceil($count / $page_size); + + // Don't let the visitor go past the last page. + if ($max_pages && $page > $max_pages) { + url::redirect("dupcheck/dupes?page=$max_pages"); + } + + // Figure out which items to display on this page. + foreach( db::build() + ->select("item_id") + ->select(array("C" => "count(\"*\")")) + ->from("fullsize_md5sums") + ->group_by("itemmd5") + ->having("C", ">", 1) + ->execute() + as $row ) { + $dupes[] = $row->item_id; + } + + if(empty($dupes)){ + $count = 0; + $dupes[0] = 9999999; + } + + $items = ORM::factory("item") + ->where("id", "IN", $dupes) + ->order_by("created", "DESC") + ->find_all($page_size, $offset); + + // Set up the previous and next page buttons. + if ($page > 1) { + $previous_page = $page - 1; + $view->previous_page_link = url::site("dupcheck/dupes?page={$previous_page}"); + } + if ($page < $max_pages) { + $next_page = $page + 1; + $view->next_page_link = url::site("dupcheck/dupes?page={$next_page}"); + } + + // Set up and display the actual page. + $template = new Theme_View("page.html", "collection", "DuplicatePhotos"); + $template->page_title = t("Gallery :: Duplicate Photos"); + $template->set_global("page", $page); + $template->set_global("page_size", $page_size); + $template->set_global("max_pages", $max_pages); + $template->set_global("children", $items); + $template->set_global("children_count", $count); + $template->content = new View("dupespage.html"); + if($dupes[0] == 9999999){ + $template->content->title = t("No Duplicate Photos Found"); + } else { + $template->content->title = t("Duplicate Photos"); + } + print $template; + } + +} diff --git a/modules/dupcheck/helpers/dupcheck.php b/modules/dupcheck/helpers/dupcheck.php new file mode 100755 index 0000000..d302283 --- /dev/null +++ b/modules/dupcheck/helpers/dupcheck.php @@ -0,0 +1,88 @@ +select("items.id") + ->from("items") + ->join("fullsize_md5sums", "items.id", "fullsize_md5sums.item_id", "left") + ->where("type", "=", "photo") + ->and_open() + ->where("fullsize_md5sums.item_id", "IS", null) + ->close() + ->execute() + ->count(); + + $total_items = ORM::factory("item")->where("type", "=", "photo")->count_all(); + if (!$total_items) { + return array(0, 0, 0); + } + $percent = round(100 * (($total_items - $missing_md5s) / $total_items)); + return array($missing_md5s, $total_items, $percent); + } + + static function grabmd5($item) { + if($item->is_photo()){ + $file_md5 = md5_file($item->file_path()); + $dupcheck = ORM::factory("fullsize_md5sum") + ->where("itemmd5", "=", $file_md5) + ->find_all(); + if($dupcheck->count() > 0) { + if(isset($GLOBALS['ignoredupewarning'])){ + unset($GLOBALS['ignoredupewarning']); + } else { + message::warning(t("The image just uploaded: '".$item->title."' appears to be a duplicate! Click id?csrf=__CSRF__")."\">-here- to delete it.")); + } + } +// Error check for bad md5sum? + if(strlen($file_md5) != 32){ + message::warning(t("Image: ".$item->file_path()." has an MD5 Err. ($file_md5)")); + } + $record = ORM::factory("fullsize_md5sum"); + $record->item_id = $item->id; + $record->itemmd5 = $file_md5; + $record->save(); + } + } + + static function updatemd5($item) { + if($item->is_photo()){ + $file_md5 = md5_file($item->file_path()); +// Error check for bad md5sum? + if(strlen($file_md5) != 32){ + message::warning(t("Image: ".$item->file_path()." has an MD5 Err. ($file_md5)")); + } + $record = ORM::factory("fullsize_md5sum")->where("item_id", "=", $item->id)->find(); + $record->itemmd5 = $file_md5; + $record->save(); + } + } + + static function check_index() { + list ($remaining) = dupcheck::stats(); + if ($remaining) { + site_status::warning( + t('Your MD5 index needs to be updated. Fix this now', + array("url" => html::mark_clean(url::site("admin/maintenance/start/dupcheck_task::update_md5s?csrf=__CSRF__")))), + "md5_index_out_of_date"); + } + } +} diff --git a/modules/dupcheck/helpers/dupcheck_event.php b/modules/dupcheck/helpers/dupcheck_event.php new file mode 100755 index 0000000..c4afe74 --- /dev/null +++ b/modules/dupcheck/helpers/dupcheck_event.php @@ -0,0 +1,46 @@ +is_photo()){ + db::build() + ->delete("fullsize_md5sums") + ->where("item_id", "=", $item->id) + ->execute(); + } + } + + static function item_updated_data_file($item) { + dupcheck::updatemd5($item); + } + + static function admin_menu($menu, $theme) { + $menu->get("content_menu") + ->append(Menu::factory("link") + ->id("dupcheck") + ->label(t("Gallery Photo Duplicates")) + ->url(url::site("dupcheck/dupes"))); + } + +} diff --git a/modules/dupcheck/helpers/dupcheck_installer.php b/modules/dupcheck/helpers/dupcheck_installer.php new file mode 100755 index 0000000..cd25713 --- /dev/null +++ b/modules/dupcheck/helpers/dupcheck_installer.php @@ -0,0 +1,43 @@ +query("CREATE TABLE IF NOT EXISTS {fullsize_md5sums} ( + `id` int(9) NOT NULL auto_increment, + `item_id` int(9) NOT NULL, + `itemmd5` varchar(128) NOT NULL, + PRIMARY KEY (`id`), + KEY(`item_id`, `id`)) + DEFAULT CHARSET=utf8;"); + + // Set the module version number. + module::set_version("dupcheck", 1); + } + + static function activate() { + dupcheck::check_index(); + } + + static function deactivate() { + site_status::clear("md5_index_out_of_date"); + } +} diff --git a/modules/dupcheck/helpers/dupcheck_task.php b/modules/dupcheck/helpers/dupcheck_task.php new file mode 100755 index 0000000..9903d4b --- /dev/null +++ b/modules/dupcheck/helpers/dupcheck_task.php @@ -0,0 +1,89 @@ +delete("fullsize_md5sums") + ->where("item_id", "NOT IN", + db::build()->select("id")->from("items")) + ->execute(); + +// hack to remove bad md5sums in DB for old or strange error + db::build() + ->delete("fullsize_md5sums") + ->where('length("itemmd5")',"!=","32") + ->execute(); +// hack done + + // Display an option on the maintenance screen for scanning existing photos + // for MD5SUMs (in case photos were uploaded before the module was active). + list ($remaining, $total, $percent) = dupcheck::stats(); + $percent = 100 - $percent; + if($percent < 1){ $percent = "less than 1"; } + return array(Task_Definition::factory() + ->callback("dupcheck_task::update_md5s") + ->name(t("Extract missing MD5SUMs")) + ->description($remaining + ? t2("1 photo needs to be scanned", + "%count (%percent%) of your photos need to be scanned", + $remaining, array("percent" => $percent)) + : t("All photo MD5sums are up-to-date")) + ->severity($remaining ? log::WARNING : log::SUCCESS)); + } + + static function update_md5s($task) { + $completed = $task->get("completed", 0); + $start = microtime(true); + foreach (ORM::factory("item") + ->join("fullsize_md5sums", "items.id", "fullsize_md5sums.item_id", "left") + ->where("type", "=", "photo") + ->and_open() + ->where("fullsize_md5sums.item_id", "IS", null) + ->close() + ->find_all(100) as $item) { + if(!isset($start)) { + $start = microtime(true); + } + + dupcheck::grabmd5($item); + $completed++; + + if (microtime(true) - $start > .75) { + break; + } + } + + list($remaining, $total, $percent) = dupcheck::stats(); + $task->set("completed", $completed); + if ($remaining == 0 || !($remaining + $completed)) { + $task->done = true; + $task->state = "success"; + site_status::clear("md5_index_out_of_date"); + $task->percent_complete = 100; + } else { + $task->percent_complete = round(100 * $completed / ($remaining + $completed)); + } + $task->status = t2("1 record updated, index is %percent% up-to-date", + "%count records updated, index is %percent% up-to-date", + $completed, array("percent" => $percent)); + } +} diff --git a/modules/dupcheck/models/fullsize_md5sum.php b/modules/dupcheck/models/fullsize_md5sum.php new file mode 100755 index 0000000..d0485c1 --- /dev/null +++ b/modules/dupcheck/models/fullsize_md5sum.php @@ -0,0 +1,21 @@ + | By J.E. Nash"; +version = 8 +author_name = "J.E. Nash" +author_url = "http://codex.gallery2.org/User:jnash" +info_url = "http://codex.gallery2.org/Gallery3:Modules:dupcheck" +discuss_url = "http://gallery.menalto.com/node/106123" diff --git a/modules/dupcheck/views/dupespage.html.php b/modules/dupcheck/views/dupespage.html.php new file mode 100755 index 0000000..ef0d033 --- /dev/null +++ b/modules/dupcheck/views/dupespage.html.php @@ -0,0 +1,54 @@ + +
    +
    + dynamic_top() ?> +
    +

    +
    + + +dynamic_bottom() ?> + +paginator() ?> diff --git a/modules/exif_gps/controllers/admin_exif_gps.php b/modules/exif_gps/controllers/admin_exif_gps.php new file mode 100755 index 0000000..d3b3872 --- /dev/null +++ b/modules/exif_gps/controllers/admin_exif_gps.php @@ -0,0 +1,158 @@ +content = new View("admin_exif_gps.html"); + $view->content->exifgps_form = $this->_get_admin_form(); + print $view; + } + + public function saveprefs() { + // Save user preferences to the database. + + // Prevent Cross Site Request Forgery + access::verify_csrf(); + + // Make sure the user filled out the form properly. + $form = $this->_get_admin_form(); + if ($form->validate()) { + // Save settings to Gallery's database. + module::set_var("exif_gps", "provider", $form->Global->provider->value); + // switch (module::get_var("exif_gps", "provider")) { + // case "gmaps": + module::set_var("exif_gps", "googlemap_api_key", $form->Global->google_api_key->value); + module::set_var("exif_gps", "googlemap_max_autozoom", $form->Global->max_auto_zoom_level->value); + module::set_var("exif_gps", "markercluster_gridsize", $form->markercluster->markercluster_gridsize->value); + module::set_var("exif_gps", "markercluster_maxzoom", $form->markercluster->markercluster_maxzoom->value); + module::set_var("exif_gps", "sidebar_zoom", $form->Sidebar->sidebar_default_zoom->value); + module::set_var("exif_gps", "sidebar_mapformat", $form->Sidebar->sidebar_mapformat->value); + module::set_var("exif_gps", "sidebar_maptype", $form->Sidebar->sidebar_maptype->value); + module::set_var("exif_gps", "largemap_maptype", $form->LargeMap->largemap_maptype->value); + module::set_var("exif_gps", "toolbar_map_album", $form->Global->toolbar_map_album->value); + module::set_var("exif_gps", "toolbar_map_user", $form->Global->toolbar_map_user->value); + module::set_var("exif_gps", "restrict_maps", $form->Global->restrict_maps->value); + // break; + // case "osm": + // + // break; + // } + + // Display a success message and redirect back to the TagsMap admin page. + message::success(t("Your settings have been saved.")); + message::success($form->Global->provider->value); + url::redirect("admin/exif_gps"); + } + + // Else show the page with errors + $view = new Admin_View("admin.html"); + $view->content = new View("admin_exif_gps.html"); + $view->content->exifgps_form = $form; + print $view; + } + + private function _get_admin_form() { + // Make a new Form. + $form = new Forge("admin/exif_gps/saveprefs", "", "post", + array("id" => "g-exif-gps-adminForm")); + + // Create group for global settings, like the Maps API Key + $gps_global_group = $form->group("Global") + ->label(t("Global Settings")); + $gps_global_group->dropdown("provider") + ->label(t("Map Provider")) + ->options(array( + "gmaps" => "Google Maps", + "osm" => "OpenStreetMap" + )) + ->selected(module::get_var("exif_gps", "provider")); + + // switch (module::get_var("exif_gps", "provider")) { + // case "gmaps": + $gps_global_group->input("google_api_key") + ->label(t("Google APIs Console key (optional):")) + ->value(module::get_var("exif_gps", "googlemap_api_key")); + $gps_global_group->input("max_auto_zoom_level") + ->label(t("Maximum Auto-Zoom Level:")) + ->value(module::get_var("exif_gps", "googlemap_max_autozoom")); + $gps_global_group->checkbox("toolbar_map_album")->label(t("Show \"Map this album\" icon?")) + ->checked(module::get_var("exif_gps", "toolbar_map_album", false)); + $gps_global_group->checkbox("toolbar_map_user")->label(t("Show \"Map this user\" icon?")) + ->checked(module::get_var("exif_gps", "toolbar_map_user", false)); + $gps_global_group->checkbox("restrict_maps")->label(t("Restrict maps to registered users?")) + ->checked(module::get_var("exif_gps", "restrict_maps", false)); + + // Create a group for marker cluster settings + $gps_markercluster = $form->group("markercluster") + ->label(t("Marker Cluster Settings")); + $gps_markercluster->input("markercluster_gridsize") + ->label(t("Grid Size")) + ->value(module::get_var("exif_gps", "markercluster_gridsize")) + ->rules("required"); + $gps_markercluster->input("markercluster_maxzoom") + ->label(t("Max Zoom")) + ->value(module::get_var("exif_gps", "markercluster_maxzoom")) + ->rules("required"); + + // Create a group for sidebar settings + $gps_sidebar = $form->group("Sidebar") + ->label(t("Sidebar Settings")); + $gps_sidebar->input("sidebar_default_zoom") + ->label(t("Default Zoom Level")) + ->value(module::get_var("exif_gps", "sidebar_zoom")) + ->rules("required"); + $gps_sidebar->dropdown("sidebar_mapformat") + ->label(t("Map Interface")) + ->options(array(t("Static"), t("Interactive"))) + ->selected(module::get_var("exif_gps", "sidebar_mapformat")); + $gps_sidebar->dropdown("sidebar_maptype") + ->label(t("Default Map Type")) + ->options(array(t("Map"), t("Satellite"), + t("Hybrid"), t("Terrain"))) + ->selected(module::get_var("exif_gps", "sidebar_maptype")); + + // Create a group for map album/user settings + $gps_large_map_group = $form->group("LargeMap") + ->label(t("Map Album/User Settings")); + $gps_large_map_group->dropdown("largemap_maptype") + ->label(t("Default Map Type")) + ->options(array(t("Map"), t("Satellite"), + t("Hybrid"), t("Terrain"))) + ->selected(module::get_var("exif_gps", "largemap_maptype")); + // break; + // case "osm": + // $gps_large_map_group->dropdown("xxx") + // ->label(t("Map Style")) + // ->options(array( + // "OSM Bright" + // )) + // ->selected(module::get_var("exif_gps", "osm_map_style")); + // break; + // } + + // Add a save button to the form. + $form->submit("SaveSettings")->value(t("Save")); + + // Return the newly generated form. + return $form; + } +} diff --git a/modules/exif_gps/controllers/exif_gps.php b/modules/exif_gps/controllers/exif_gps.php new file mode 100755 index 0000000..d6ee35d --- /dev/null +++ b/modules/exif_gps/controllers/exif_gps.php @@ -0,0 +1,175 @@ +abs_url()); + } + + public function xml($query_type, $query_id, $offset) { + // Generate an xml output of the photos to be mapped. + // $query_type can be either "album" or "user", $query_id is the id# of the album or user to map. + + // If the user can't view maps, don't let them view the xml. + if ((module::get_var("exif_gps", "restrict_maps") == true) && (identity::active_user()->guest)) { + throw new Kohana_404_Exception(); + } + + $items = ""; + if ($query_type == "user") { + $items = ORM::factory("item") + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->where("items.owner_id", "=", $query_id) + ->viewable() + ->order_by("exif_coordinates.latitude", "ASC") + ->find_all(EXIF_GPS_Controller::$xml_records_limit, $offset); + } elseif ($query_type == "album") { + $items = ORM::factory("item", $query_id) + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->viewable() + ->order_by("exif_coordinates.latitude", "ASC") + ->descendants(EXIF_GPS_Controller::$xml_records_limit, $offset); + } + $map_provider_id = module::get_var("exif_gps", "provider"); + $v = new View("$map_provider_id/exif_gps_coordinates_xml.html"); + $v->items = $items; + header("Content-type: text/xml; charset=utf-8"); + print $v; + } + + public function geojson($query_type, $query_id, $offset) { + // Generate an xml output of the photos to be mapped. + // $query_type can be either "album" or "user", $query_id is the id# of the album or user to map. + + // If the user can't view maps, don't let them view the xml. + if ((module::get_var("exif_gps", "restrict_maps") == true) && (identity::active_user()->guest)) { + throw new Kohana_404_Exception(); + } + + $items = ""; + if ($query_type == "user") { + $items = ORM::factory("item") + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->where("items.owner_id", "=", $query_id) + ->viewable() + ->order_by("exif_coordinates.latitude", "ASC") + ->find_all(EXIF_GPS_Controller::$xml_records_limit, $offset); + } elseif ($query_type == "album") { + $items = ORM::factory("item", $query_id) + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->viewable() + ->order_by("exif_coordinates.latitude", "ASC") + ->descendants(EXIF_GPS_Controller::$xml_records_limit, $offset); + } + $map_provider_id = module::get_var("exif_gps", "provider"); + $v = new View("$map_provider_id/exif_gps_coordinates_geojson.html"); + $v->items = $items; + header("Content-type: application/json; charset=utf-8"); + print $v; + } + + public function map($map_type, $type_id) { + // Map all items in the specified album or user. + // Valid values for $map_type are "album" or "user", $type_id is either an + // album id# or a user id#. + + // If the user can't view maps, throw a 404 error. + if ((module::get_var("exif_gps", "restrict_maps") == true) && (identity::active_user()->guest)) { + throw new Kohana_404_Exception(); + } + + // Figure out what to display for the page title and how many items to display. + $map_title = ""; + $items_count = 0; + if ($map_type == "album") { + $curr_album = ORM::factory("item")->where("id", "=", $type_id)->find_all(); + $map_title = $curr_album[0]->title; + $items_count = ORM::factory("item", $type_id) + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->viewable() + ->descendants_count(); + } elseif ($map_type == "user") { + $curr_user = ORM::factory("user")->where("id", "=", $type_id)->find_all(); + $map_title = $curr_user[0]->full_name . "'s " . t("Photos"); + $items_count = ORM::factory("item") + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->where("items.owner_id", "=", $type_id) + ->viewable() + ->count_all(); + } + + // Set up breadcrumbs. + $breadcrumbs = array(); + if ($map_type == "album") { + $counter = 0; + $breadcrumbs[] = Breadcrumb::instance(t("Map"), url::site("exif_gps/map/album/{$type_id}"))->set_last(); + $parent_item = ORM::factory("item", $type_id); + if (!$parent_item->loaded()) { + throw new Kohana_404_Exception(); + } + while ($parent_item->id != 1) { + $breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url()); + $parent_item = ORM::factory("item", $parent_item->parent_id); + } + $breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url())->set_first(); + $breadcrumbs = array_reverse($breadcrumbs, true); + } else { + $root = item::root(); + $breadcrumbs[] = Breadcrumb::instance($root->title, $root->url())->set_first(); + $breadcrumbs[] = Breadcrumb::instance(t("Photo Map"), url::site("exif_gps/map/{$map_type}/{$type_id}"))->set_last(); + } + + // Set up and display the actual page. + $template = new Theme_View("page.html", "other", "EXIF_GPS_MAP"); + $template->page_title = t("Gallery :: Map"); + $template->set_global(array("breadcrumbs" => $breadcrumbs)); + $map_provider_id = module::get_var("exif_gps", "provider"); + $template->content = new View("$map_provider_id/exif_gps_map.html"); + if ($map_title == "") { + $template->content->title = t("Map"); + } else { + $template->content->title = t("Map of") . " " . $map_title; + } + + // Figure out default map type. + $int_map_type = module::get_var("exif_gps", "largemap_maptype"); + if ($int_map_type == 0) $map_display_type = "ROADMAP"; + if ($int_map_type == 1) $map_display_type = "SATELLITE"; + if ($int_map_type == 2) $map_display_type = "HYBRID"; + if ($int_map_type == 3) $map_display_type = "TERRAIN"; + $template->content->map_type = $map_display_type; + + // These are used to set up the URL to the xml file. + $template->content->query_type = $map_type; + $template->content->query_id = $type_id; + $template->content->items_count = $items_count; + + // Load in module preferences. + $template->content->google_map_key = module::get_var("exif_gps", "googlemap_api_key"); + + // Display the page. + print $template; + } +} diff --git a/modules/exif_gps/css/exif_gps_menu.css b/modules/exif_gps/css/exif_gps_menu.css new file mode 100755 index 0000000..3f8afa2 --- /dev/null +++ b/modules/exif_gps/css/exif_gps_menu.css @@ -0,0 +1,6 @@ +#g-view-menu #g-exif-gps-album-link { + background-image: url('../images/ico-view-exif_gps_album.png'); +} +#g-view-menu #g-exif-gps-user-link { + background-image: url('../images/ico-view-exif_gps_user.png'); +} diff --git a/modules/exif_gps/helpers/exif_gps.php b/modules/exif_gps/helpers/exif_gps.php new file mode 100755 index 0000000..7ac1cc7 --- /dev/null +++ b/modules/exif_gps/helpers/exif_gps.php @@ -0,0 +1,72 @@ +is_photo() && $item->mime_type == "image/jpeg") { + $data = array(); + require_once(MODPATH . "exif/lib/exif.php"); + $exif_raw = read_exif_data_raw($item->file_path(), false); + if (isset($exif_raw['ValidEXIFData'])) { + foreach(self::_keys() as $field => $exifvar) { + if (isset($exif_raw[$exifvar[0]][$exifvar[1]])) { + $value = $exif_raw[$exifvar[0]][$exifvar[1]]; + if (function_exists("mb_detect_encoding") && mb_detect_encoding($value) != "UTF-8") { + $value = utf8_encode($value); + } + $keys[$field] = Input::clean($value); + } + } + } + } + + // If coordinates were extracted, save them to the database. + if (isset($keys["Latitude"]) && isset($keys["Longitude"])) { + $record = ORM::factory("exif_coordinate"); + $record->item_id = $item->id; + $record->latitude = str_replace(",", ".", $keys["Latitude"]); + $record->longitude = str_replace(",", ".", $keys["Longitude"]); + // Represent N/S/E/W as postive and negative numbers + if (substr(strtoupper($keys["Latitude Reference"]), 0, 1) == "S") { + $record->latitude = "-" . $record->latitude; + } + if (substr(strtoupper($keys["Longitude Reference"]), 0, 1) == "W") { + $record->longitude = "-" . $record->longitude; + } + $record->save(); + } + } + + private static function _keys() { + // EXIF fields to extract. + if (!isset(self::$exif_keys)) { + self::$exif_keys = array( + "Latitude Reference" => array("GPS", "Latitude Reference", t("GPS: Latitude Reference"), ), + "Longitude Reference" => array("GPS", "Longitude Reference", t("GPS: Longitude Reference"),), + "Latitude" => array("GPS", "Latitude", t("GPS: Latitude"), ), + "Longitude" => array("GPS", "Longitude", t("GPS: Longitude"), ) + ); + } + return self::$exif_keys; + } +} diff --git a/modules/exif_gps/helpers/exif_gps_block.php b/modules/exif_gps/helpers/exif_gps_block.php new file mode 100755 index 0000000..c213655 --- /dev/null +++ b/modules/exif_gps/helpers/exif_gps_block.php @@ -0,0 +1,163 @@ + t("EXIF GPS Location"), + "exif_gps_maps" => t("EXIF GPS Maps")); + } + + static function get($block_id, $theme) { + $block = ""; + + // Make sure the user can view maps before displaying any sidebars. + if ((module::get_var("exif_gps", "restrict_maps") == true) && (identity::active_user()->guest)) { + return; + } + + switch ($block_id) { + case "exif_gps_maps": + // Display links to a map of the current album and + // a map of the current user. + if ($theme->item()) { + $album_id = ""; + $user_name = ""; + $item = $theme->item; + if ($item->is_album()) { + $album_id = $item->id; + } else { + $album_id = $item->parent_id; + } + $curr_user = ORM::factory("user")->where("id", "=", $item->owner_id)->find_all(); + if (count($curr_user) > 0) { + $user_name = $curr_user[0]->full_name; + } + + // Make sure there are actually map-able items to display. + $album_items_count = ORM::factory("item", $album_id) + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->viewable() + ->descendants_count(); + $user_items_count = ORM::factory("item") + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->where("items.owner_id", "=", $item->owner_id) + ->viewable() + ->count_all(1); + + if (($album_items_count > 0) || ($user_items_count > 0)) { + $block = new Block(); + $block->css_id = "g-exif-gps-maps"; + $block->title = t("Maps"); + $map_provider_id = module::get_var("exif_gps", "provider"); + $block->content = new View("$map_provider_id/exif_gps_maps_sidebar.html"); + $block->content->album_id = $album_id; + $block->content->user_id = $item->owner_id; + $block->content->user_name = $user_name; + $block->content->album_items = $album_items_count; + $block->content->user_items = $user_items_count; + } + } + break; + + case "exif_gps_location": + // Look for coordinates to display. + $latitude = ""; + $longitude = ""; + if ($theme->item()) { + // Check and see if the item has exif coordinates associated with it. + $record = ORM::factory("exif_coordinate")->where("item_id", "=", $theme->item->id)->find(); + if ($record->loaded()) { + $latitude = $record->latitude; + $longitude = $record->longitude; + } elseif (module::is_active("tagsmap") && module::is_active("tag")) { + // If there are no exif coordinates, check for tagsmap coordinates instead. + $tagsItem = ORM::factory("tag") + ->join("items_tags", "tags.id", "items_tags.tag_id") + ->where("items_tags.item_id", "=", $theme->item->id) + ->find_all(); + if (count($tagsItem) > 0) { + foreach ($tagsItem as $oneTag) { + $tagsGPS = ORM::factory("tags_gps")->where("tag_id", "=", $oneTag->id)->find(); + if ($tagsGPS->loaded()) { + $latitude = $tagsGPS->latitude; + $longitude = $tagsGPS->longitude; + break; + } + } + } + } + } elseif ( ($theme->tag()) && (module::is_active("tagsmap") && module::is_active("tag")) ) { + // If the current page belongs to a tag, check and see if the tag has GPS coordinates. + $tagsGPS = ORM::factory("tags_gps")->where("tag_id", "=", $theme->tag()->id)->find(); + if ($tagsGPS->loaded()) { + $latitude = $tagsGPS->latitude; + $longitude = $tagsGPS->longitude; + } + } + + // If coordinates were found, create the block. + if ($latitude != "" && $longitude != "") { + $block = new Block(); + $block->css_id = "g-exif-gps-location"; + $block->title = t("Location"); + $map_provider_id = module::get_var("exif_gps", "provider"); + if (module::get_var("exif_gps", "sidebar_mapformat") == 1) { + $block->content = new View("$map_provider_id/exif_gps_dynamic_sidebar.html"); + if (module::get_var("exif_gps", "sidebar_maptype") == 0) $block->content->sidebar_map_type = "ROADMAP"; + if (module::get_var("exif_gps", "sidebar_maptype") == 1) $block->content->sidebar_map_type = "SATELLITE"; + if (module::get_var("exif_gps", "sidebar_maptype") == 2) $block->content->sidebar_map_type = "HYBRID"; + if (module::get_var("exif_gps", "sidebar_maptype") == 3) $block->content->sidebar_map_type = "TERRAIN"; + $block->content->items_count = 1; + } else { + $block->content = new View("$map_provider_id/exif_gps_static_sidebar.html"); + if (module::get_var("exif_gps", "sidebar_maptype") == 0) $block->content->sidebar_map_type = "roadmap"; + if (module::get_var("exif_gps", "sidebar_maptype") == 1) $block->content->sidebar_map_type = "satellite"; + if (module::get_var("exif_gps", "sidebar_maptype") == 2) $block->content->sidebar_map_type = "hybrid"; + if (module::get_var("exif_gps", "sidebar_maptype") == 3) $block->content->sidebar_map_type = "terrain"; + } + $block->content->latitude = $latitude; + $block->content->longitude = $longitude; + } elseif (($theme->item()) && ($theme->item->is_album() && (module::get_var("exif_gps", "sidebar_mapformat") == 1))) { + // If coordinates were NOT found, and this is an album with a dynamic map, then map the contents of the album. + $items_count = ORM::factory("item", $theme->item->id) + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->viewable() + ->descendants_count(); + if ($items_count > 0) { + $block = new Block(); + $block->css_id = "g-exif-gps-location"; + $block->title = t("Location"); + $map_provider_id = module::get_var("exif_gps", "provider"); + $block->content = new View("$map_provider_id/exif_gps_dynamic_sidebar.html"); + if (module::get_var("exif_gps", "sidebar_maptype") == 0) $block->content->sidebar_map_type = "ROADMAP"; + if (module::get_var("exif_gps", "sidebar_maptype") == 1) $block->content->sidebar_map_type = "SATELLITE"; + if (module::get_var("exif_gps", "sidebar_maptype") == 2) $block->content->sidebar_map_type = "HYBRID"; + if (module::get_var("exif_gps", "sidebar_maptype") == 3) $block->content->sidebar_map_type = "TERRAIN"; + $block->content->album_id = $theme->item->id; + $block->content->latitude = 0; + $block->content->longitude = 0; + $block->content->items_count = $items_count; + $block->content->google_map_key = module::get_var("exif_gps", "googlemap_api_key"); + } + } + break; + } + return $block; + } +} diff --git a/modules/exif_gps/helpers/exif_gps_event.php b/modules/exif_gps/helpers/exif_gps_event.php new file mode 100755 index 0000000..53b4433 --- /dev/null +++ b/modules/exif_gps/helpers/exif_gps_event.php @@ -0,0 +1,269 @@ +module == "exif") { + $data->messages["warn"][] = t("The EXIF_GPS module requires the EXIF module."); + } + } + + static function module_change($changes) { + // If EXIF is deactivated, display a warning that it is required for this module to function properly. + if (!module::is_active("exif") || in_array("exif", $changes->deactivate)) { + site_status::warning( + t("The EXIF_GPS module requires the EXIF module. " . + "Activate the EXIF module now", + array("url" => html::mark_clean(url::site("admin/modules")))), + "exif_gps_needs_exif"); + } else { + site_status::clear("exif_gps_needs_exif"); + } + } + + static function item_created($item) { + // Whenever a new non-album item is created, check it for GPS coordinates. + if (!$item->is_album()) { + exif_gps::extract($item); + } + } + + static function item_deleted($item) { + // Whenever an item is deleted, delete any corresponding GPS coordinates. + db::build() + ->delete("exif_coordinates") + ->where("item_id", "=", $item->id) + ->execute(); + } + + static function item_edit_form($item, $form) { + // Allow users to set / edit the GPS coordinates associated with the current item. + $record = ORM::factory("exif_coordinate")->where("item_id", "=", $item->id)->find(); + $gpsdata = $form->edit_item->group("gps_data")->label("GPS Data"); + if ($record->loaded()) { + $gpsdata->input("latitude")->label(t("Latitude")) + ->value($record->latitude); + $gpsdata->input("longitude")->label(t("Longitude")) + ->value($record->longitude); + } else { + $gpsdata->input("latitude")->label(t("Latitude")); + $gpsdata->input("longitude")->label(t("Longitude")); + } + } + + static function item_edit_form_completed($item, $form) { + // Update the db records with the user-specified coordinates. + + // Require a set of coordinates (both latitude and longitude). + // If one or both fields are blank, completely delete any coordinates associated with this item. + if (($form->edit_item->gps_data->latitude->value == "") || ($form->edit_item->gps_data->longitude->value == "")) { + db::build() + ->delete("exif_coordinates") + ->where("item_id", "=", $item->id) + ->execute(); + } else { + $record = ORM::factory("exif_coordinate")->where("item_id", "=", $item->id)->find(); + if (!$record->loaded()) { + $record->item_id = $item->id; + } + $record->latitude = $form->edit_item->gps_data->latitude->value; + $record->longitude = $form->edit_item->gps_data->longitude->value; + $record->save(); + } + } + + static function admin_menu($menu, $theme) { + // Add a link to the EXIF_GPS admin page to the Settings menu. + $menu->get("settings_menu") + ->append(Menu::factory("link") + ->id("exif_gps") + ->label(t("EXIF_GPS Settings")) + ->url(url::site("admin/exif_gps"))); + } + + static function photo_menu($menu, $theme) { + // Adds album and user map icons to photo pages. + + // Do not display icons if the user can't view the page. + if ((module::get_var("exif_gps", "restrict_maps") == true) && (identity::active_user()->guest)) { + return; + } + + $album_id = ""; + $item = $theme->item; + if ($item->is_album()) { + $album_id = $item->id; + } else { + $album_id = $item->parent_id; + } + $curr_user = ORM::factory("user")->where("id", "=", $item->owner_id)->find_all(); + $user_name = $curr_user[0]->full_name; + + // Make sure there are actually map-able items to display. + $album_items_count = ORM::factory("item", $album_id) + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->viewable() + ->descendants_count(); + $user_items_count = ORM::factory("item") + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->where("items.owner_id", "=", $item->owner_id) + ->viewable() + ->count_all(); + + if (($album_items_count > 0) && (module::get_var("exif_gps", "toolbar_map_album") == true)) { + $menu->append(Menu::factory("link") + ->id("exif_gps_album") + ->label(t("Map this album")) + ->url(url::site("exif_gps/map/album/" . $album_id)) + ->css_id("g-exif-gps-album-link")); + } + if (($user_items_count > 0) && (module::get_var("exif_gps", "toolbar_map_user") == true)) { + $menu->append(Menu::factory("link") + ->id("exif_gps_user") + ->label(t("Map ") . $user_name . t("'s photos")) + ->url(url::site("exif_gps/map/user/" . $item->owner_id)) + ->css_id("g-exif-gps-user-link")); + } + } + + static function movie_menu($menu, $theme) { + // Adds album and user map icons to movie pages. + + // Do not display icons if the user can't view the page. + if ((module::get_var("exif_gps", "restrict_maps") == true) && (identity::active_user()->guest)) { + return; + } + + $album_id = ""; + $item = $theme->item; + if ($item->is_album()) { + $album_id = $item->id; + } else { + $album_id = $item->parent_id; + } + $curr_user = ORM::factory("user")->where("id", "=", $item->owner_id)->find_all(); + $user_name = $curr_user[0]->full_name; + + // Make sure there are actually map-able items to display. + $album_items_count = ORM::factory("item", $album_id) + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->viewable() + ->descendants_count(); + $user_items_count = ORM::factory("item") + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->where("items.owner_id", "=", $item->owner_id) + ->viewable() + ->count_all(); + + if (($album_items_count > 0) && (module::get_var("exif_gps", "toolbar_map_album") == true)) { + $menu->append(Menu::factory("link") + ->id("exif_gps_album") + ->label(t("Map this album")) + ->url(url::site("exif_gps/map/album/" . $album_id)) + ->css_id("g-exif-gps-album-link")); + } + if (($user_items_count > 0) && (module::get_var("exif_gps", "toolbar_map_user") == true)) { + $menu->append(Menu::factory("link") + ->id("exif_gps_user") + ->label(t("Map ") . $user_name . t("'s photos")) + ->url(url::site("exif_gps/map/user/" . $item->owner_id)) + ->css_id("g-exif-gps-user-link")); + } + } + + static function album_menu($menu, $theme) { + // Adds album and user map icons to album pages. + + // Do not display icons if the user can't view the page. + if ((module::get_var("exif_gps", "restrict_maps") == true) && (identity::active_user()->guest)) { + return; + } + + $album_id = ""; + $item = $theme->item; + if ($item->is_album()) { + $album_id = $item->id; + } else { + $album_id = $item->parent_id; + } + $curr_user = ORM::factory("user")->where("id", "=", $item->owner_id)->find_all(); + $user_name = $curr_user[0]->full_name; + + // Make sure there are actually map-able items to display. + $album_items_count = ORM::factory("item", $album_id) + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->viewable() + ->descendants_count(); + $user_items_count = ORM::factory("item") + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->where("items.owner_id", "=", $item->owner_id) + ->viewable() + ->count_all(); + + if (($album_items_count > 0) && (module::get_var("exif_gps", "toolbar_map_album") == true)) { + $menu->append(Menu::factory("link") + ->id("exif_gps_album") + ->label(t("Map this album")) + ->url(url::site("exif_gps/map/album/" . $album_id)) + ->css_id("g-exif-gps-album-link")); + } + if (($user_items_count > 0) && (module::get_var("exif_gps", "toolbar_map_user") == true)) { + $menu->append(Menu::factory("link") + ->id("exif_gps_user") + ->label(t("Map ") . $user_name . t("'s photos")) + ->url(url::site("exif_gps/map/user/" . $item->owner_id)) + ->css_id("g-exif-gps-user-link")); + } + } + + static function show_user_profile($data) { + // Display a map on the user profile pages. + + // Make sure the user can view maps before displaying one. + if ((module::get_var("exif_gps", "restrict_maps") == true) && (identity::active_user()->guest)) { + return; + } + + // If there's nothing to map, hide the map. + $items_count = ORM::factory("item") + ->join("exif_coordinates", "items.id", "exif_coordinates.item_id") + ->where("items.owner_id", "=", $data->user->id) + ->viewable() + ->count_all(); + if ($items_count == 0) { + return; + } + + $map_provider_id = module::get_var("exif_gps", "provider"); + + // Display the map block. + $v = new View("$map_provider_id/user_profile_exif_gps.html"); + $int_map_type = module::get_var("exif_gps", "largemap_maptype"); + if ($int_map_type == 0) $map_type = "ROADMAP"; + if ($int_map_type == 1) $map_type = "SATELLITE"; + if ($int_map_type == 2) $map_type = "HYBRID"; + if ($int_map_type == 3) $map_type = "TERRAIN"; + $v->map_type = $map_type; + $v->user_id = $data->user->id; + $v->items_count = $items_count; + $v->google_map_key = module::get_var("exif_gps", "googlemap_api_key"); + $data->content[] = (object) array("title" => t("Photo Map"), "view" => $v); + } +} diff --git a/modules/exif_gps/helpers/exif_gps_installer.php b/modules/exif_gps/helpers/exif_gps_installer.php new file mode 100755 index 0000000..4b876a9 --- /dev/null +++ b/modules/exif_gps/helpers/exif_gps_installer.php @@ -0,0 +1,98 @@ +query("CREATE TABLE IF NOT EXISTS {exif_coordinates} ( + `id` int(9) NOT NULL auto_increment, + `item_id` int(9) NOT NULL, + `latitude` varchar(128) NOT NULL, + `longitude` varchar(128) NOT NULL, + PRIMARY KEY (`id`), + KEY(`item_id`, `id`)) + DEFAULT CHARSET=utf8;"); + + // If tagsmap is installed, copy the API key over. + if (module::is_active("tagsmap")) { + module::set_var("exif_gps", "googlemap_api_key", module::get_var("tagsmap", "googlemap_api_key")); + } else { + module::set_var("exif_gps", "googlemap_api_key", ""); + } + + // Set some default values. + module::set_var("exif_gps", "sidebar_zoom", "14"); + module::set_var("exif_gps", "sidebar_mapformat", "1"); + module::set_var("exif_gps", "sidebar_maptype", "1"); + module::set_var("exif_gps", "largemap_maptype", "2"); + module::set_var("exif_gps", "googlemap_max_autozoom", ""); + module::set_var("exif_gps", "toolbar_map_album", "0"); + module::set_var("exif_gps", "toolbar_map_user", "0"); + module::set_var("exif_gps", "markercluster_gridsize", "50"); + module::set_var("exif_gps", "markercluster_maxzoom", "15"); + module::set_var("exif_gps", "restrict_maps", "0"); + + // Set the module version number. + module::set_version("exif_gps", 3); + } + + static function upgrade($version) { + if ($version == 1) { + // If tagsmap is installed, copy the API key over. + if (module::is_active("tagsmap")) { + module::set_var("exif_gps", "googlemap_api_key", module::get_var("tagsmap", "googlemap_api_key")); + } else { + module::set_var("exif_gps", "googlemap_api_key", ""); + } + + // Set some default values. + module::set_var("exif_gps", "sidebar_zoom", "14"); + module::set_var("exif_gps", "sidebar_mapformat", "1"); + module::set_var("exif_gps", "sidebar_maptype", "1"); + module::set_var("exif_gps", "largemap_maptype", "2"); + module::set_version("exif_gps", 2); + } + if ($version == 2) { + module::set_var("exif_gps", "markercluster_gridsize", "50"); + module::set_var("exif_gps", "markercluster_maxzoom", "15"); + module::set_var("exif_gps", "restrict_maps", "0"); + module::set_version("exif_gps", 3); + } + } + + static function deactivate() { + site_status::clear("exif_gps_needs_exif"); + } + + static function can_activate() { + $messages = array(); + if (!module::is_active("exif")) { + $messages["warn"][] = t("The EXIF_GPS module requires the EXIF module."); + } + return $messages; + } + + static function uninstall() { + // Delete the GPS table before uninstalling. + $db = Database::instance(); + $db->query("DROP TABLE IF EXISTS {exif_coordinates};"); + module::delete("exif_gps"); + } +} diff --git a/modules/exif_gps/helpers/exif_gps_task.php b/modules/exif_gps/helpers/exif_gps_task.php new file mode 100755 index 0000000..fe23e6a --- /dev/null +++ b/modules/exif_gps/helpers/exif_gps_task.php @@ -0,0 +1,87 @@ +delete("exif_coordinates") + ->where("item_id", "NOT IN", + db::build()->select("id")->from("items")) + ->execute(); + + // Display an option on the maintance screen for scanning existing photos + // for GPS data (in case photos were uploaded before the module was active). + return array(Task_Definition::factory() + ->callback("exif_gps_task::update_gps_index") + ->name(t("Extract Exif GPS data")) + ->description(t("Scan all photos for missing GPS data")) + ->severity(log::SUCCESS)); + } + + static function update_gps_index($task) { + $start = microtime(true); + + // Figure out the total number of photos in the database. + // If this is the first run, also set last_id and completed to 0. + $total = $task->get("total"); + if (empty($total)) { + $task->set("total", $total = count(ORM::factory("item")->where("type", "=", "photo")->find_all())); + $task->set("last_id", 0); + $task->set("completed", 0); + } + $last_id = $task->get("last_id"); + $completed = $task->get("completed"); + + // Generate an array of the next 100 photos to check. + + // Check each photo in the array to see if it already has exif gps data associated with it. + // If it doesn't, attempt to extract gps coordinates. + foreach (ORM::factory("item") + ->where("id", ">", $last_id) + ->where("type", "=", "photo") + ->order_by("id") + ->find_all(100) as $item) { + + $record = ORM::factory("exif_coordinate")->where("item_id", "=", $item->id)->find(); + if (!$record->loaded()) { + exif_gps::extract($item); + } + $last_id = $item->id; + $completed++; + + if ($completed == $total || microtime(true) - $start > 1.5) { + break; + } + } + + $task->set("completed", $completed); + $task->set("last_id", $last_id); + + if ($total == $completed) { + $task->done = true; + $task->state = "success"; + $task->percent_complete = 100; + } else { + $task->percent_complete = round(100 * $completed / $total); + } + $task->status = t2("One photo scanned", "%count / %total photos scanned", $completed, + array("total" => $total)); + } +} diff --git a/modules/exif_gps/helpers/exif_gps_theme.php b/modules/exif_gps/helpers/exif_gps_theme.php new file mode 100755 index 0000000..697d5a8 --- /dev/null +++ b/modules/exif_gps/helpers/exif_gps_theme.php @@ -0,0 +1,25 @@ +css("exif_gps_menu.css") . + $theme->script("markerclusterer_compiled.js"); + } +} diff --git a/modules/exif_gps/images/exif_gps-loading-map-large.gif b/modules/exif_gps/images/exif_gps-loading-map-large.gif new file mode 100755 index 0000000..a259e22 Binary files /dev/null and b/modules/exif_gps/images/exif_gps-loading-map-large.gif differ diff --git a/modules/exif_gps/images/ico-view-exif_gps_album.png b/modules/exif_gps/images/ico-view-exif_gps_album.png new file mode 100755 index 0000000..255d649 Binary files /dev/null and b/modules/exif_gps/images/ico-view-exif_gps_album.png differ diff --git a/modules/exif_gps/images/ico-view-exif_gps_user.png b/modules/exif_gps/images/ico-view-exif_gps_user.png new file mode 100755 index 0000000..e9f72b3 Binary files /dev/null and b/modules/exif_gps/images/ico-view-exif_gps_user.png differ diff --git a/modules/exif_gps/js/markerclusterer_compiled.js b/modules/exif_gps/js/markerclusterer_compiled.js new file mode 100755 index 0000000..4ddf304 --- /dev/null +++ b/modules/exif_gps/js/markerclusterer_compiled.js @@ -0,0 +1,21 @@ +(function(){var d=null;function e(a){return function(b){this[a]=b}}function h(a){return function(){return this[a]}}var j; +function k(a,b,c){this.extend(k,google.maps.OverlayView);this.c=a;this.a=[];this.f=[];this.ca=[53,56,66,78,90];this.j=[];this.A=!1;c=c||{};this.g=c.gridSize||60;this.l=c.minimumClusterSize||2;this.J=c.maxZoom||d;this.j=c.styles||[];this.X=c.imagePath||this.Q;this.W=c.imageExtension||this.P;this.O=!0;if(c.zoomOnClick!=void 0)this.O=c.zoomOnClick;this.r=!1;if(c.averageCenter!=void 0)this.r=c.averageCenter;l(this);this.setMap(a);this.K=this.c.getZoom();var f=this;google.maps.event.addListener(this.c, +"zoom_changed",function(){var a=f.c.getZoom();if(f.K!=a)f.K=a,f.m()});google.maps.event.addListener(this.c,"idle",function(){f.i()});b&&b.length&&this.C(b,!1)}j=k.prototype;j.Q="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m";j.P="png";j.extend=function(a,b){return function(a){for(var b in a.prototype)this.prototype[b]=a.prototype[b];return this}.apply(a,[b])};j.onAdd=function(){if(!this.A)this.A=!0,n(this)};j.draw=function(){}; +function l(a){if(!a.j.length)for(var b=0,c;c=a.ca[b];b++)a.j.push({url:a.X+(b+1)+"."+a.W,height:c,width:c})}j.S=function(){for(var a=this.o(),b=new google.maps.LatLngBounds,c=0,f;f=a[c];c++)b.extend(f.getPosition());this.c.fitBounds(b)};j.z=h("j");j.o=h("a");j.V=function(){return this.a.length};j.ba=e("J");j.I=h("J");j.G=function(a,b){for(var c=0,f=a.length,g=f;g!==0;)g=parseInt(g/10,10),c++;c=Math.min(c,b);return{text:f,index:c}};j.$=e("G");j.H=h("G"); +j.C=function(a,b){for(var c=0,f;f=a[c];c++)q(this,f);b||this.i()};function q(a,b){b.s=!1;b.draggable&&google.maps.event.addListener(b,"dragend",function(){b.s=!1;a.L()});a.a.push(b)}j.q=function(a,b){q(this,a);b||this.i()};function r(a,b){var c=-1;if(a.a.indexOf)c=a.a.indexOf(b);else for(var f=0,g;g=a.a[f];f++)if(g==b){c=f;break}if(c==-1)return!1;b.setMap(d);a.a.splice(c,1);return!0}j.Y=function(a,b){var c=r(this,a);return!b&&c?(this.m(),this.i(),!0):!1}; +j.Z=function(a,b){for(var c=!1,f=0,g;g=a[f];f++)g=r(this,g),c=c||g;if(!b&&c)return this.m(),this.i(),!0};j.U=function(){return this.f.length};j.getMap=h("c");j.setMap=e("c");j.w=h("g");j.aa=e("g"); +j.v=function(a){var b=this.getProjection(),c=new google.maps.LatLng(a.getNorthEast().lat(),a.getNorthEast().lng()),f=new google.maps.LatLng(a.getSouthWest().lat(),a.getSouthWest().lng()),c=b.fromLatLngToDivPixel(c);c.x+=this.g;c.y-=this.g;f=b.fromLatLngToDivPixel(f);f.x-=this.g;f.y+=this.g;c=b.fromDivPixelToLatLng(c);b=b.fromDivPixelToLatLng(f);a.extend(c);a.extend(b);return a};j.R=function(){this.m(!0);this.a=[]}; +j.m=function(a){for(var b=0,c;c=this.f[b];b++)c.remove();for(b=0;c=this.a[b];b++)c.s=!1,a&&c.setMap(d);this.f=[]};j.L=function(){var a=this.f.slice();this.f.length=0;this.m();this.i();window.setTimeout(function(){for(var b=0,c;c=a[b];b++)c.remove()},0)};j.i=function(){n(this)}; +function n(a){if(a.A)for(var b=a.v(new google.maps.LatLngBounds(a.c.getBounds().getSouthWest(),a.c.getBounds().getNorthEast())),c=0,f;f=a.a[c];c++)if(!f.s&&b.contains(f.getPosition())){for(var g=a,u=4E4,o=d,v=0,m=void 0;m=g.f[v];v++){var i=m.getCenter();if(i){var p=f.getPosition();if(!i||!p)i=0;else var w=(p.lat()-i.lat())*Math.PI/180,x=(p.lng()-i.lng())*Math.PI/180,i=Math.sin(w/2)*Math.sin(w/2)+Math.cos(i.lat()*Math.PI/180)*Math.cos(p.lat()*Math.PI/180)*Math.sin(x/2)*Math.sin(x/2),i=6371*2*Math.atan2(Math.sqrt(i), +Math.sqrt(1-i));i=this.l&&a.setMap(d); +a=this.c.getZoom();if((b=this.k.I())&&a>b)for(a=0;b=this.a[a];a++)b.setMap(this.c);else if(this.a.length0&&a.e[0]0&&a.e[1] +
    +

    + +

    +
    + + +
    diff --git a/modules/exif_gps/views/osm/exif_gps_coordinates_geojson.html.php b/modules/exif_gps/views/osm/exif_gps_coordinates_geojson.html.php new file mode 100755 index 0000000..e90c770 --- /dev/null +++ b/modules/exif_gps/views/osm/exif_gps_coordinates_geojson.html.php @@ -0,0 +1,33 @@ + +[ +id); + $thumb_arr[$item->id] = $item->thumb_img(array("class" => "g-exif-gps-thumbnail")); + } + $item_coordinates_all = ORM::factory("exif_coordinate")->where("item_id", "IN", $items_id)->find_all(); + foreach ($item_coordinates_all as $zero_index => $item_coordinates) { + $thumb_html = base64_encode($thumb_arr[$item_coordinates->item_id]); + $separator = $zero_index == count($item_coordinates_all) - 1 ? "\n" : ",\n"; +?> + { + "type": "Feature", + "properties": { + "name": "name ?>", + "image_html_base64": "", + "url": "item_id"); ?>" + }, + "geometry": { + "type": "Point", + "coordinates": [ + "longitude; ?>", + "latitude; ?>" + ] + } + } + +] diff --git a/modules/exif_gps/views/osm/exif_gps_coordinates_xml.html.php b/modules/exif_gps/views/osm/exif_gps_coordinates_xml.html.php new file mode 100755 index 0000000..ebf8ad8 --- /dev/null +++ b/modules/exif_gps/views/osm/exif_gps_coordinates_xml.html.php @@ -0,0 +1,21 @@ + +\n"; ?> + +id); +$thumb_arr[$item->id] = $item->thumb_img(array("class" => "g-exif-gps-thumbnail")); +} +$item_coordinates_all = ORM::factory("exif_coordinate")->where("item_id", "IN", $items_id)->find_all(); +foreach ($item_coordinates_all as $item_coordinates) { +$str_thumb_html = str_replace("&", "&", $thumb_arr[$item_coordinates->item_id]); +$str_thumb_html = str_replace("\'", "'", $str_thumb_html); +$str_thumb_html = str_replace("<", "<", $str_thumb_html); +$str_thumb_html = str_replace(">", ">", $str_thumb_html); +$str_thumb_html = str_replace("\"", """, $str_thumb_html); +?> +item_id"); ?>" thumb="" /> + + diff --git a/modules/exif_gps/views/osm/exif_gps_dynamic_sidebar.html.php b/modules/exif_gps/views/osm/exif_gps_dynamic_sidebar.html.php new file mode 100755 index 0000000..9d3ce51 --- /dev/null +++ b/modules/exif_gps/views/osm/exif_gps_dynamic_sidebar.html.php @@ -0,0 +1,63 @@ + + +
    +
    +
    + + diff --git a/modules/exif_gps/views/osm/exif_gps_map.html.php b/modules/exif_gps/views/osm/exif_gps_map.html.php new file mode 100755 index 0000000..779da07 --- /dev/null +++ b/modules/exif_gps/views/osm/exif_gps_map.html.php @@ -0,0 +1,65 @@ + + +
    +
    + dynamic_top() ?> +
    +

    +
    +
    +
    +
    +
    + +dynamic_bottom() ?> diff --git a/modules/exif_gps/views/osm/exif_gps_maps_sidebar.html.php b/modules/exif_gps/views/osm/exif_gps_maps_sidebar.html.php new file mode 100755 index 0000000..be2498b --- /dev/null +++ b/modules/exif_gps/views/osm/exif_gps_maps_sidebar.html.php @@ -0,0 +1,9 @@ + +
      + 0)): ?> +
    • ">
    • + + 0)): ?> +
    • ">
    • + +
    diff --git a/modules/exif_gps/views/osm/user_profile_exif_gps.html.php b/modules/exif_gps/views/osm/user_profile_exif_gps.html.php new file mode 100755 index 0000000..10e9c37 --- /dev/null +++ b/modules/exif_gps/views/osm/user_profile_exif_gps.html.php @@ -0,0 +1,58 @@ + + +
    +
    +
    + diff --git a/modules/gallerystats/helpers/gallerystats_block.php b/modules/gallerystats/helpers/gallerystats_block.php new file mode 100755 index 0000000..e71e11e --- /dev/null +++ b/modules/gallerystats/helpers/gallerystats_block.php @@ -0,0 +1,46 @@ + t("Gallery Stats")); + } + + static function prepareBlockData($block) { + $block->content->album_count = ORM::factory("item")->where("type", "=", "album")->where("id", "<>", 1)->count_all(); + $block->content->photo_count = ORM::factory("item")->where("type", "=", "photo")->count_all(); + $block->content->view_count = Database::instance()->query("SELECT SUM({items}.view_count) as c FROM {items} WHERE type=\"photo\"")->current()->c; + } + + static function get($block_id, $theme) { + $block = ""; + switch ($block_id) { + case "gallerystats": + $block = new Block(); + + $block->css_id = "g-gallerystats"; + $block->title = t("Gallery Stats"); + $block->content = new View("gallerystats_block.html"); + self::prepareBlockData($block); + break; + } + return $block; + } +} \ No newline at end of file diff --git a/modules/gallerystats/helpers/gallerystats_installer.php b/modules/gallerystats/helpers/gallerystats_installer.php new file mode 100755 index 0000000..93fa1db --- /dev/null +++ b/modules/gallerystats/helpers/gallerystats_installer.php @@ -0,0 +1,24 @@ + + +
      +
    • + gallery::VERSION)) ?> +
    • +
    • + $album_count)) ?> +
    • +
    • + $photo_count)) ?> +
    • +
    • + $view_count)) ?> +
    • +
    diff --git a/modules/greydragon/changelog.txt b/modules/greydragon/changelog.txt new file mode 100755 index 0000000..ae8baf9 --- /dev/null +++ b/modules/greydragon/changelog.txt @@ -0,0 +1,11 @@ +GreyDragon Shared Module Changelog + +version 1.3: +- Added check to detect situation when CURL is not installed to disable Auto Update feature +- Improved CURL logic to properly handle redirects + +version 1.2: +- Fixed issue with some installations not taking relative path for CSS + +version 1.1: +- Initial release \ No newline at end of file diff --git a/modules/greydragon/css/gd_common.css b/modules/greydragon/css/gd_common.css new file mode 100755 index 0000000..32b780b --- /dev/null +++ b/modules/greydragon/css/gd_common.css @@ -0,0 +1,59 @@ +/** + * Gallery 3 Grey Dragon Common Module + * Copyright (C) 2012 Serguei Dosyukov + * + * CSS rules for admin section + */ + +body { min-width: 1200px; } + +#g-content { font-size: 1em; margin-bottom: 0; width: auto; padding-left: 1em; padding-right: 1em; } +#g-content ul { margin-bottom: 0; } + +#g-content h3 { color: #d54e21; border-bottom: #a2bdbf 1px solid; margin-top: 0.3em; margin-bottom: 0.3em; } +#g-content p { color: #333; } +#g-content table { margin-bottom: 0; } + +#g-content input { display: inline; float: left; margin-right: 0.8em; color: #555555; border: 1px solid #ccc; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } +#g-content textarea { height: 6em; color: #555555; border: 1px solid #ccc; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } +#g-content select { display: inline; float: left; margin-right: 0.8em; width: 50.6%; color: #555555; border: 1px solid #ccc; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } + +#g-content input[type='checkbox'] { border: none; } +#g-content input[type='text'] { width: 50%; } + +#g-content input.submit { display: inline-block; min-width: 100px; padding: 4px 10px 4px; font-size: 13px; line-height: 18px; color:#333333; text-align: center; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); background-color: #fafafa; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6)); background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6); background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-repeat: no-repeat; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0); border: 1px solid #ccc; border-bottom-color: #bbb; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05); cursor: pointer; *margin-left: .3em; } +#g-content input.submit:first-child { *margin-left: 0; } +#g-content input.submit:hover { color: #333333; text-decoration: none; background-color: #e6e6e6; background-position: 0 -15px; -webkit-transition: background-position 0.1s linear; -moz-transition: background-position 0.1s linear; -ms-transition: background-position 0.1s linear; -o-transition: background-position 0.1s linear; transition: background-position 0.1s linear; } + +#g-content input.g-error { padding-left: 30px; border: none; } +#g-content input.g-success { background-color: transparent; } +#g-content input.g-warning { background-color: transparent; border: none; } + +#g-content p.g-error { padding-left: 30px; border: none; margin-bottom: 0; background-image: none; } + +#gd-admin-header { padding: 7px 0; margin: 4px 0 0 0; background-color: #fbfbfb; background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5); background-image:- ms-linear-gradient(top, #ffffff, #f5f5f5); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5)); background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5); background-image: -o-linear-gradient(top, #ffffff, #f5f5f5); background-image: linear-gradient(top, #ffffff, #f5f5f5); background-repeat: repeat-x; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0); border: 1px solid #ddd; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: inset 0 1px 0 #ffffff; -moz-box-shadow: inset 0 1px 0 #ffffff; box-shadow: inset 0 1px 0 #ffffff; display: inline-block; width: 100%; } +#gd-admin-header .divider{padding:0 5px;color:#999999;} +#gd-admin-header .active a{color:#333333;} + +#gd-admin-version, +#gd-admin-version-2 { margin-top: 4px; padding: 7px 14px; background-color: rgb(217, 237, 247); border: 1px solid #bce8f1; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: inset 0 1px 0 #ffffff; -moz-box-shadow: inset 0 1px 0 #ffffff; box-shadow: inset 0 1px 0 #ffffff; } + +#gd-admin-title { float: left; padding-left: 10px; color: #333v42; font-weight: bold; font-size: 1.4em; text-shadow: #deeefa 0 1px 0; display: inline-block; } +#gd-admin-hlinks { float: right; padding-right: 10px; } +#gd-admin-hlinks li { list-style-type: none; float: left; color: #618299; display: inline; text-shadow: 0 1px 0 #ffffff; } +#gd-admin-hlinks a { line-height: 1.6em; } +#gd-admin-hlinks a[disabled="disabled"], #gd-admin-hlinks a[disabled="disabled"]:hover { text-decoration: none; cursor: default; } + +#g-autoupdate-config { display: none; border: 1px solid #ddd; border-top: none; width: 45%; height: 2.5em; margin-left: 54%; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: inset 0 1px 0 #ffffff; -moz-box-shadow: inset 0 1px 0 #ffffff; box-shadow: inset 0 1px 0 #ffffff; } +#g-autoupdate-config.visible { min-height: 30px; display: inline-block; } +#g-autoupdate-config ul { float: right; margin: 6px 10px;} +#g-autoupdate-config li { float: left; display: inline; line-height: 1.5em; } + +#g-admin-container { margin-top: 14px; font-size: 0.9em; line-height: 1.6em; } +#g-admin-container .column1 { float: left; width: 53%; min-width: 610px; } +#g-admin-container .column2 { float: right; width: 46%; min-width: 529px; } + +#g-admin-container fieldset { position: relative; border-top-left-radius: 0.4em; border-top-right-radius: 0.4em; overflow: hidden; } +#g-admin-container legend { position: absolute; left: 0; width: 100%; padding: 0.4em 0.8em; background: url(../images/blue-grad.png) #d5e6f2 repeat-x left top; border-bottom: #dfdfdf 1px solid; } +#g-admin-container fieldset ul { margin-top: 34px; } + diff --git a/modules/greydragon/images/blue-grad.png b/modules/greydragon/images/blue-grad.png new file mode 100755 index 0000000..868a657 Binary files /dev/null and b/modules/greydragon/images/blue-grad.png differ diff --git a/modules/greydragon/module.info b/modules/greydragon/module.info new file mode 100755 index 0000000..4a65e8c --- /dev/null +++ b/modules/greydragon/module.info @@ -0,0 +1,9 @@ +name = "GreyDragon Shared" +description = "Shared content for modules from GreyDragon. Need to be activated.
    Version 1.3 | By Serguei Dosyukov" +version = 13 +author_name = "Serguei Dosyukov" +author_url = "http://blog.dragonsoft.us/gallery-3/" +info_url = "" +discuss_url = "" + + diff --git a/modules/greydragon/views/gd_admin_include.html.php b/modules/greydragon/views/gd_admin_include.html.php new file mode 100755 index 0000000..73962cb --- /dev/null +++ b/modules/greydragon/views/gd_admin_include.html.php @@ -0,0 +1,180 @@ + + + + + +id == $downloadid): + $newversion = $json->version; + if ($json->version > $version): + return $json->version; + else: + return 0; + endif; + else: + return -1; + endif; + } catch (Exception $e) { + return -1; + } +} + +if ($is_module): + $admin_info = new ArrayObject(parse_ini_file(MODPATH . $name . "/module.info"), ArrayObject::ARRAY_AS_PROPS); + $version = number_format($admin_info->version / 10, 1, '.', ''); + $lastupdate = module::get_var($name, "last_update", time()); + $checkInDays = module::get_var($name, "auto_delay", 30); +else: + $admin_info = new ArrayObject(parse_ini_file(THEMEPATH . $name . "/theme.info"), ArrayObject::ARRAY_AS_PROPS); + $version = $admin_info->version; + $lastupdate = module::get_var("th_" . $name, "last_update", time()); + $checkInDays = module::get_var("th_" . $name, "auto_delay", 30); +endif; + +if (isCurlInstalled() && ($checkInDays > 0) && ((time() - $lastupdate) > ($checkInDays * 24 * 60 * 60))): // Check version every N days + $admin_info2 = new ArrayObject(parse_ini_file(MODPATH . "greydragon/module.info"), ArrayObject::ARRAY_AS_PROPS); + $version2 = number_format($admin_info2->version / 10, 1, '.', ''); + + $versionCheck = checkVersionInfo($downloadid, $version); + $versionCheck2 = checkVersionInfo(15, $version2); + + if (($versionCheck == 0) && ($versionCheck2 == 0)): + if ($is_module): + module::set_var($name, "last_update", time()); + else: + module::set_var("th_" . $name, "last_update", time()); + endif; + endif; +else: + $versionCheck = 0; + $versionCheck2 = 0; +endif; +?> + +
    +
    name) ?> -
    + +
    +
    +
    •   
    • +
    • +
    • + +
    •   |   
    • + +
    +
    + + +
    :
    + + +
    + + + +
    ' . t("here") . ' ' . t("for more info.") ?>
    + +
    + +
    + +
    +
    + +
    + + + +
    diff --git a/modules/image_fit/helpers/image_fit_theme.php b/modules/image_fit/helpers/image_fit_theme.php new file mode 100755 index 0000000..49e2c55 --- /dev/null +++ b/modules/image_fit/helpers/image_fit_theme.php @@ -0,0 +1,37 @@ +page_subtype == "photo") { + return $theme->script("jquery.imagefit.js"); + } + } + static function page_bottom($theme) { + $fit_code = " + + + "; + return $fit_code; + } +} diff --git a/modules/image_fit/js/jquery.imagefit.js b/modules/image_fit/js/jquery.imagefit.js new file mode 100755 index 0000000..bee06a1 --- /dev/null +++ b/modules/image_fit/js/jquery.imagefit.js @@ -0,0 +1,48 @@ +/* jquery.imagefit + * + * Version 0.2 by Oliver Boermans + * + * Extends jQuery + * + */ +(function($) { + $.fn.imagefit = function(options) { + var fit = { + all : function(imgs){ + imgs.each(function(){ + fit.one(this); + }) + }, + one : function(img){ + $(img) + .width('100%').each(function() + { + $(this).height(Math.round( + $(this).attr('startheight')*($(this).width()/$(this).attr('startwidth'))) + ); + }) + } + }; + + this.each(function(){ + var container = this; + + // store list of contained images (excluding those in tables) + var imgs = $('img', container).not($("table img")); + + // store initial dimensions on each image + imgs.each(function(){ + $(this).attr('startwidth', $(this).width()) + .attr('startheight', $(this).height()) + .css('max-width', $(this).attr('startwidth')+"px"); + + fit.one(this); + }); + // Re-adjust when window width is changed + $(window).bind('resize', function(){ + fit.all(imgs); + }); + }); + return this; + }; +})(jQuery); \ No newline at end of file diff --git a/modules/image_fit/module.info b/modules/image_fit/module.info new file mode 100755 index 0000000..1703d41 --- /dev/null +++ b/modules/image_fit/module.info @@ -0,0 +1,7 @@ +name = "Image fit" +description = "Fits the resized image to the available space. Scale down image if it is too big." +author_name = "floridave" +author_url = "http://codex.gallery2.org/User:Floridave" +info_url = "http://codex.gallery2.org/Gallery3:Modules:image_fit" +discuss_url = "http://gallery.menalto.com/forum_module_image_fit" +version = 1 diff --git a/modules/latestupdates/controllers/latestupdates.php b/modules/latestupdates/controllers/latestupdates.php new file mode 100755 index 0000000..fb9a8f2 --- /dev/null +++ b/modules/latestupdates/controllers/latestupdates.php @@ -0,0 +1,596 @@ +loaded()) { + throw new Kohana_404_Exception(); + } + + // Grab the first 10 items for the specified display type. + // Default to "popular" if display type is invalid. + $template = new View("latestupdates_user_profile_carousel.html"); + $template->items = latestupdates_Controller::items($str_display_type, $user_id, 10); + + // Figure out the text for the "View more" link. + if ($str_display_type == "recent") { + $template->str_view_more_title = t("View all recent uploads"); + } elseif ($str_display_type == "albums") { + $template->str_view_more_title = t("View all recent albums"); + } else { + $template->str_view_more_title = t("View more popular uploads"); + } + + // Set up a "View more" url. + $template->str_view_more_url = url::site("latestupdates/users/{$str_display_type}/{$user_id}"); + + // Display the page. + print $template; + + // Make item links in the carousel load as virtual albums for the view type instead of the regular album. + item::set_display_context_callback("latestupdates_Controller::get_display_context", + $str_display_type, $user_id); + return ; + } + + public function users($str_display_type, $user_id) { + // Generate a dynamic page with items uploaded by a specific user ($user_id). + + // Make sure user_id is valid. + $current_user = ORM::factory("user", $user_id); + if (!$current_user->loaded()) { + throw new Kohana_404_Exception(); + } + + // Figure out how many items to display on each page. + $page_size = module::get_var("gallery", "page_size", 9); + + // Figure out which page # the visitor is on and + // don't allow the visitor to go below page 1. + $page = Input::instance()->get("page", 1); + if ($page < 1) { + url::redirect("latestupdates/users/{$str_display_type}/{$user_id}"); + } + + // If this page was reached from a breadcrumb, figure out what page to load from the show id. + $show = Input::instance()->get("show"); + if ($show) { + $child = ORM::factory("item", $show); + $index = latestupdates_Controller::_get_position($child, $str_display_type, $user_id); + if ($index) { + $page = ceil($index / $page_size); + if ($page == 1) { + url::redirect("latestupdates/users/{$str_display_type}/{$user_id}"); + } else { + url::redirect("latestupdates/users/{$str_display_type}/{$user_id}?page=$page"); + } + } + } + + // First item to display. + $offset = ($page - 1) * $page_size; + + // Determine the total number of items, + // for page numbering purposes. + $count = latestupdates_Controller::items_count($str_display_type, $user_id); + + // Figure out what the highest page number is. + $max_pages = ceil($count / $page_size); + + // Don't let the visitor go past the last page. + if ($max_pages && $page > $max_pages) { + url::redirect("latestupdates/users/{$str_display_type}/{$user_id}?page=$max_pages"); + } + + // Figure out which items to display on this page. + $children = latestupdates_Controller::items($str_display_type, $user_id, $page_size, $offset); + + // Figure out the page title. + $str_page_title = ""; + if ($str_display_type == "recent") { + $str_page_title = t("Recent Uploads"); + } elseif ($str_display_type == "albums") { + $str_page_title = t("Recent Albums"); + } else { + $str_page_title = t("Most Viewed"); + } + + // Set up the previous and next page buttons. + if ($page > 1) { + $previous_page = $page - 1; + $view->previous_page_link = url::site("latestupdates/users/{$str_display_type}/{$user_id}?page={$previous_page}"); + } + if ($page < $max_pages) { + $next_page = $page + 1; + $view->next_page_link = url::site("latestupdates/users/{$str_display_type}/{$user_id}?page={$next_page}"); + } + + // Set up and display the actual page. + $root = item::root(); + $template = new Theme_View("page.html", "collection", "LatestUpdates"); + $template->page_title = t("Gallery :: Latest Updates"); + $template->set_global( + array("page" => $page, + "max_pages" => $max_pages, + "page_size" => $page_size, + "children" => $children, + "breadcrumbs" => array( + Breadcrumb::instance($root->title, $root->url())->set_first(), + Breadcrumb::instance(t("User profile: %name", array("name" => $current_user->display_name())), + url::site("user_profile/show/{$user_id}")), + Breadcrumb::instance($str_page_title, + url::site("latestupdates/users/{$str_display_type}/{$user_id}"))->set_last()), + "children_count" => $count)); + $template->content = new View("dynamic.html"); + $template->content->title = $str_page_title; + + // Display the page. + print $template; + + // Set up the callback so links within the photo page will lead to photos within the virtual album + // instead of the actual album. + item::set_display_context_callback("latestupdates_Controller::get_display_context", + $str_display_type, $user_id); + } + + public function albums($id) { + // Figure out how many items to display on each page. + $page_size = module::get_var("gallery", "page_size", 9); + + // Load the parent album. + $item = ORM::factory("item", $id); + + // Figure out which page # the visitor is on and + // don't allow the visitor to go below page 1. + $page = Input::instance()->get("page", 1); + if ($page < 1) { + url::redirect("latestupdates/albums/{$item->id}"); + } + + // If this page was reached from a breadcrumb, figure out what page to load from the show id. + $show = Input::instance()->get("show"); + if ($show) { + $child = ORM::factory("item", $show); + $index = latestupdates_Controller::_get_position($child, "descendants", $item->id); + if ($index) { + $page = ceil($index / $page_size); + if ($page == 1) { + url::redirect("latestupdates/albums/{$item->id}"); + } else { + url::redirect("latestupdates/albums/{$item->id}?page=$page"); + } + } + } + + // First item to display. + $offset = ($page - 1) * $page_size; + + // Determine the total number of items, + // for page numbering purposes. + $count = latestupdates_Controller::items_count("descendants", $item->id); + + // Figure out what the highest page number is. + $max_pages = ceil($count / $page_size); + + // Don't let the visitor go past the last page. + if ($max_pages && $page > $max_pages) { + url::redirect("latestupdates/albums/{$item->id}?page=$max_pages"); + } + + // Figure out which items to display on this page. + $children = latestupdates_Controller::items("descendants", $item->id, $page_size, $offset); + + // Set up the previous and next page buttons. + if ($page > 1) { + $previous_page = $page - 1; + $view->previous_page_link = url::site("latestupdates/albums/{$item->id}?page={$previous_page}"); + } + if ($page < $max_pages) { + $next_page = $page + 1; + $view->next_page_link = url::site("latestupdates/albums/{$item->id}?page={$next_page}"); + } + + // Set up breadcrumbs. + $breadcrumbs = array(); + $counter = 0; + $breadcrumbs[] = Breadcrumb::instance(t("Recent Uploads"), url::site("latestupdates/albums/{$item->id}"))->set_last(); + $parent_item = $item; + while ($parent_item->id != 1) { + $breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url()); + $parent_item = ORM::factory("item", $parent_item->parent_id); + } + $breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url())->set_first(); + $breadcrumbs = array_reverse($breadcrumbs, true); + + // Set up and display the actual page. + $root = item::root(); + $template = new Theme_View("page.html", "collection", "LatestUpdates"); + $template->page_title = t("Gallery :: Latest Updates"); + $template->set_global( + array("page" => $page, + "max_pages" => $max_pages, + "page_size" => $page_size, + "children" => $children, + "breadcrumbs" => $breadcrumbs, + "children_count" => $count)); + $template->content = new View("dynamic.html"); + $template->content->title = t("Recent Uploads"); + + // Display the page. + print $template; + + // Set up the callback so links within the photo page will lead to photos within the virtual album + // instead of the actual album. + item::set_display_context_callback("latestupdates_Controller::get_display_context", + "descendants", $item->id); + } + + public function updates() { + // Figure out how many items to display on each page. + $page_size = module::get_var("gallery", "page_size", 9); + + // Figure out which page # the visitor is on and + // don't allow the visitor to go below page 1. + $page = Input::instance()->get("page", 1); + if ($page < 1) { + url::redirect("latestupdates/updates"); + } + + // If this page was reached from a breadcrumb, figure out what page to load from the show id. + $show = Input::instance()->get("show"); + if ($show) { + $child = ORM::factory("item", $show); + $index = latestupdates_Controller::_get_position($child, "recent", 0); + if ($index) { + $page = ceil($index / $page_size); + if ($page == 1) { + url::redirect("latestupdates/updates"); + } else { + url::redirect("latestupdates/updates?page=$page"); + } + } + } + + // First item to display. + $offset = ($page - 1) * $page_size; + + // Determine the total number of items, + // for page numbering purposes. + $count = latestupdates_Controller::items_count("recent", 0); + + // Figure out what the highest page number is. + $max_pages = ceil($count / $page_size); + + // Don't let the visitor go past the last page. + if ($max_pages && $page > $max_pages) { + url::redirect("latestupdates/updates?page=$max_pages"); + } + + // Figure out which items to display on this page. + $items = latestupdates_Controller::items("recent", 0, $page_size, $offset); + + // Set up the previous and next page buttons. + if ($page > 1) { + $previous_page = $page - 1; + $view->previous_page_link = url::site("latestupdates/updates?page={$previous_page}"); + } + if ($page < $max_pages) { + $next_page = $page + 1; + $view->next_page_link = url::site("latestupdates/updates?page={$next_page}"); + } + + // Set up and display the actual page. + $root = item::root(); + $template = new Theme_View("page.html", "collection", "LatestUpdates"); + $template->page_title = t("Gallery :: Latest Updates"); + $template->set_global( + array("page" => $page, + "max_pages" => $max_pages, + "page_size" => $page_size, + "children" => $items, + "breadcrumbs" => array( + Breadcrumb::instance($root->title, $root->url())->set_first(), + Breadcrumb::instance(t("Recent Uploads"), + url::site("latestupdates/updates"))->set_last()), + "children_count" => $count)); + $template->content = new View("dynamic.html"); + $template->content->title = t("Recent Uploads"); + + // Display the page. + print $template; + + // Set up the callback so links within the photo page will lead to photos within the virtual album + // instead of the actual album. + item::set_display_context_callback("latestupdates_Controller::get_display_context", + "recent", 0); + } + + static function get_display_context($item, $str_display_type, $user_id) { + // Set up display elements on the photo page to link to the virtual album. + // Valid $str_display_type values are popular, recent, albums and descendants. + // $user_id can be set to "0" to search site wide. + // For "descendants", $user_id should be the album id #. + + // Figure out page title. + $str_page_title = ""; + if ($str_display_type == "recent") { + $str_page_title = t("Recent Uploads"); + } elseif ($str_display_type == "albums") { + $str_page_title = t("Recent Albums"); + } elseif ($str_display_type == "descendants") { + $str_page_title = t("Recent Uploads"); + } else { + $str_page_title = t("Most Viewed"); + } + + // Figure out item position. + $position = latestupdates_Controller::_get_position($item, $str_display_type, $user_id); + + // Figure out which items are the previous and next items with the virtual album. + if ($position > 1) { + list ($previous_item, $ignore, $next_item) = + latestupdates_Controller::items($str_display_type, $user_id, 3, $position - 2); + } else { + $previous_item = null; + list ($next_item) = latestupdates_Controller::items($str_display_type, $user_id, 1, $position); + } + + // Figure out total number of items (excluding albums). + $count = latestupdates_Controller::items_count($str_display_type, $user_id); + + // Set up breadcrumbs. + $root = item::root(); + $breadcrumbs = array(); + if ($user_id == 0) { + $breadcrumbs[0] = Breadcrumb::instance($root->title, $root->url())->set_first(); + $breadcrumbs[1] = Breadcrumb::instance($str_page_title, + url::site("latestupdates/updates?show={$item->id}")); + $breadcrumbs[2] = Breadcrumb::instance($item->title, $item->url())->set_last(); + } else { + if ($str_display_type == "descendants") { + $counter = 0; + $breadcrumbs[] = Breadcrumb::instance($item->title, $item->url())->set_last(); + $breadcrumbs[] = Breadcrumb::instance(t("Recent Uploads"), url::site("latestupdates/albums/{$user_id}?show={$item->id}")); + $parent_item = ORM::factory("item", $user_id); + while ($parent_item->id != 1) { + $breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url()); + $parent_item = ORM::factory("item", $parent_item->parent_id); + } + $breadcrumbs[] = Breadcrumb::instance($parent_item->title, $parent_item->url())->set_first(); + $breadcrumbs = array_reverse($breadcrumbs, true); + } else { + $current_user = ORM::factory("user", $user_id); + $breadcrumbs[0] = Breadcrumb::instance($root->title, $root->url())->set_first(); + $breadcrumbs[1] = Breadcrumb::instance(t("User profile: %name", array("name" => $current_user->display_name())), + url::site("user_profile/show/{$user_id}")); + $breadcrumbs[2] = Breadcrumb::instance($str_page_title, + url::site("latestupdates/users/{$str_display_type}/{$user_id}?show={$item->id}")); + $breadcrumbs[3] = Breadcrumb::instance($item->title, $item->url())->set_last(); + } + } + + // Return the display elements. + return array("position" => $position, + "previous_item" => $previous_item, + "next_item" => $next_item, + "sibling_count" => $count, + "siblings_callback" => array("latestupdates_Controller::items", array($str_display_type, $user_id)), + "breadcrumbs" => $breadcrumbs + ); + } + + static function items_count($str_display_type, $user_id) { + // Figure out the total number of items. + // Valid $str_display_type values are popular, recent, albums and descendants. + // $user_id can be set to "0" to search site wide. + // For "descendants", $user_id should be the album id #. + + // If $str_display_type is albums, then we only want albums. + // If it's not, then we want everything except albums. + if ($str_display_type == "albums") { + // This is only used for user profiles, so we always want + // results from a specific user. + $count = ORM::factory("item") + ->viewable() + ->where("type", "=", "album") + ->where("owner_id", "=", $user_id) + ->count_all(); + } else { + + // If $user_id is not 0 we only want results from a specific user, + // Or else we want results from any user. + if ($user_id == 0) { + $count = ORM::factory("item") + ->viewable() + ->where("type", "!=", "album") + ->count_all(); + } else { + + // If type is descendants, then user_id is actually an item id#. + if ($str_display_type == "descendants") { + $item = ORM::factory("item", $user_id); + $count = $item + ->viewable() + ->where("type", "!=", "album") + ->order_by("created", "DESC") + ->descendants_count(); + } else { + $count = ORM::factory("item") + ->viewable() + ->where("type", "!=", "album") + ->where("owner_id", "=", $user_id) + ->count_all(); + } + } + } + + return $count; + } + + static function items($str_display_type, $user_id, $limit=null, $offset=null) { + // Query the database for a list of items to display in the virtual album. + // Valid $str_display_type values are popular, recent, albums and descendants. + // $user_id can be set to "0" to search site wide. + // For "descendants", $user_id should be the album id #. + + // Figure out search parameters based on $str_display_type. + $str_where = array(); + $str_orderby_field = ""; + if ($str_display_type == "recent") { + $str_where = array(array("type", "!=", "album")); + $str_orderby_field = "created"; + } elseif ($str_display_type == "albums") { + $str_where = array(array("type", "=", "album")); + $str_orderby_field = "created"; + } else { + $str_where = array(array("type", "!=", "album")); + $str_orderby_field = "view_count"; + } + + // Search the database for matching items. + + // Searching for descendants of a parent album is significantly + // different from the other query types, so we're doing this one + // seperately. + if ($str_display_type == "descendants") { + $item = ORM::factory("item", $user_id); + return $item + ->viewable() + ->where("type", "!=", "album") + ->order_by("created", "DESC") + ->descendants($limit, $offset); + } + + // If $user_id is greater then 0, limit results + // to a specific user. + if ($user_id == 0) { + return ORM::factory("item") + ->viewable() + ->merge_where($str_where) + ->order_by($str_orderby_field, "DESC") + ->find_all($limit, $offset); + } else { + return ORM::factory("item") + ->viewable() + ->merge_where($str_where) + ->where("owner_id", "=", $user_id) + ->order_by($str_orderby_field, "DESC") + ->find_all($limit, $offset); + } + } + + private function _get_position($item, $str_display_type, $user_id) { + // Figure out the item's position within the virtual album. + // Valid $str_display_type values are popular, recent, albums and descendants. + // $user_id can be set to "0" to search site wide. + // For "descendants", $user_id should be the album id #. + + // Figure out search conditions. + $str_where = array(); + $str_orderby_field = ""; + if ($str_display_type == "recent") { + $str_where = array(array("type", "!=", "album")); + $str_orderby_field = "created"; + } elseif ($str_display_type == "albums") { + $str_where = array(array("type", "=", "album")); + $str_orderby_field = "created"; + } else { + $str_where = array(array("type", "!=", "album")); + $str_orderby_field = "view_count"; + } + + // Count the number of records that have a higher orderby_field value then + // the item we're looking for. + $position = 0; + if ($user_id == 0) { + $position = ORM::factory("item") + ->viewable() + ->merge_where($str_where) + ->where($str_orderby_field, ">", $item->$str_orderby_field) + ->order_by($str_orderby_field, "DESC") + ->count_all(); + } else { + if ($str_display_type == "descendants") { + $album_item = ORM::factory("item", $user_id); + $position = $album_item + ->viewable() + ->where("type", "!=", "album") + ->where("created", ">", $item->created) + ->order_by("created", "DESC") + ->descendants_count(); + } else { + $position = ORM::factory("item") + ->viewable() + ->where("owner_id", "=", $user_id) + ->merge_where($str_where) + ->where($str_orderby_field, ">", $item->$str_orderby_field) + ->order_by($str_orderby_field, "DESC") + ->count_all(); + } + } + + // Set up a db query for all records with the same orderby field value + // as the item we're looking for. + $items = ORM::factory("item"); + if ($user_id == 0) { + $items->viewable() + ->merge_where($str_where) + ->where($str_orderby_field, "=", $item->$str_orderby_field) + ->order_by($str_orderby_field, "DESC"); + } else { + if ($str_display_type == "descendants") { + $item_album = ORM::factory("item", $user_id); + $items = $item_album + ->viewable() + ->where("type", "!=", "album") + ->where("created", "=", $item->created) + ->order_by("created", "DESC"); + } else { + $items->viewable() + ->where("owner_id", "=", $user_id) + ->merge_where($str_where) + ->where($str_orderby_field, "=", $item->$str_orderby_field) + ->order_by($str_orderby_field, "DESC"); + } + } + + // Loop through each remaining match, increasing position by 1 each time + // until we find a match. + if ($str_display_type == "descendants") { + foreach ($items->descendants() as $row) { + $position++; + if ($row->id == $item->id) { + break; + } + } + } else { + foreach ($items->find_all() as $row) { + $position++; + if ($row->id == $item->id) { + break; + } + } + } + + // Return the result. + return $position; + } +} diff --git a/modules/latestupdates/css/latestupdates_jcarousel.css b/modules/latestupdates/css/latestupdates_jcarousel.css new file mode 100755 index 0000000..f123143 --- /dev/null +++ b/modules/latestupdates/css/latestupdates_jcarousel.css @@ -0,0 +1,95 @@ +#jCarouselLite .carousel { + padding: 10px 0 0 0; + margin: 0 0 20px 10px; + position: relative; +} + +#jCarouselLite .digg { + position: absolute; + left: 610px; + top: 110px; +} + +#jCarouselLite .main { + margin-left: 0px; +} + +#jCarouselLite .demo em { + color: #FF3300; + font-weight: bold; + font-size: 60%; + font-style: normal; +} + +#jCarouselLite .carousel a.prev, #jCarouselLite .carousel a.next { + display: block; + float: left; + width: 30px; + height: 90px; + text-decoration: none; + background: url("../images/imageNavLeft.gif") left 60px no-repeat; +} + +#jCarouselLite .carousel a.next { + background: url("../images/imageNavRight.gif") right 60px no-repeat; +} + +#jCarouselLite .carousel a.next:hover { + background-image: url("../images/imageNavRightHover.gif"); +} + +#jCarouselLite .carousel a.prev:hover { + background-image: url("../images/imageNavLeftHover.gif"); +} + +#jCarouselLite .carousel a:hover, #jCarouselLite .carousel a:active { + border: none; + outline: none; +} + +#jCarouselLite .carousel .jCarouselLite { + border: 1px solid black; + float: left; + background-color: #dfdfdf; + + /* Needed for rendering without flicker */ + position: relative; + visibility: hidden; + left: -5000px; +} + +#jCarouselLite .carousel ul { + margin: 0; +} + +#jCarouselLite .carousel li img, +#jCarouselLite .carousel li p { + background-color: #fff; + margin: 10px; +} + +#jCarouselLite .widget img { + cursor: pointer; +} + +#jCarouselLite .mid { + margin-left: 80px; + width: 400px; + height: 300px; +} + +#jCarouselLite .vertical { + margin-left: 90px; +} + +#jCarouselLite .vertical .jCarouselLite { /* so that in IE 6, the carousel div doesnt expand to fill the space */ + width: 90px; +} + +#jCarouselLite .imageSlider li img, +#jCarouselLite .imageSlider li p, +#jCarouselLite .imageSliderExt li img , +#jCarouselLite .imageSliderExt li p { + width: 400px; + height: 300px; +} diff --git a/modules/latestupdates/helpers/latestupdates_block.php b/modules/latestupdates/helpers/latestupdates_block.php new file mode 100755 index 0000000..b15b90f --- /dev/null +++ b/modules/latestupdates/helpers/latestupdates_block.php @@ -0,0 +1,52 @@ + t("Latest Updates")); + } + + static function get($block_id, $theme) { + $block = ""; + + switch ($block_id) { + case "latestupdates": + + // Make a new sidebar block. + $block = new Block(); + $block->css_id = "g-latest-updates"; + $block->title = t("Latest Updates"); + $block->content = new View("latestupdates_block.html"); + + if (!$theme->item()) { + $block->content->update_links = array( + "Entire Gallery" => url::site("latestupdates/updates")); + } else { + // Determine the ID# of the current album. + $albumID = $theme->item->is_album() ? $theme->item->id : $theme->item->parent_id; + $block->content->update_links = array( + "Entire Gallery" => url::site("latestupdates/updates"), + "This Album" => url::site("latestupdates/albums/$albumID") + ); + } + break; + } + return $block; + } +} diff --git a/modules/latestupdates/helpers/latestupdates_event.php b/modules/latestupdates/helpers/latestupdates_event.php new file mode 100755 index 0000000..3809933 --- /dev/null +++ b/modules/latestupdates/helpers/latestupdates_event.php @@ -0,0 +1,29 @@ +user_id = $data->user->id; + $data->content[] = (object) array("title" => t("Latest Updates"), "view" => $v); + } +} diff --git a/modules/latestupdates/helpers/latestupdates_theme.php b/modules/latestupdates/helpers/latestupdates_theme.php new file mode 100755 index 0000000..e6423a8 --- /dev/null +++ b/modules/latestupdates/helpers/latestupdates_theme.php @@ -0,0 +1,27 @@ +script("jcarousellite_1.0.1.js") . + $theme->css("latestupdates_jcarousel.css"); + } +} diff --git a/modules/latestupdates/images/imageNavLeft.gif b/modules/latestupdates/images/imageNavLeft.gif new file mode 100755 index 0000000..9c0e5af Binary files /dev/null and b/modules/latestupdates/images/imageNavLeft.gif differ diff --git a/modules/latestupdates/images/imageNavLeftHover.gif b/modules/latestupdates/images/imageNavLeftHover.gif new file mode 100755 index 0000000..0945b9e Binary files /dev/null and b/modules/latestupdates/images/imageNavLeftHover.gif differ diff --git a/modules/latestupdates/images/imageNavRight.gif b/modules/latestupdates/images/imageNavRight.gif new file mode 100755 index 0000000..ad4bb00 Binary files /dev/null and b/modules/latestupdates/images/imageNavRight.gif differ diff --git a/modules/latestupdates/images/imageNavRightHover.gif b/modules/latestupdates/images/imageNavRightHover.gif new file mode 100755 index 0000000..a5abcc9 Binary files /dev/null and b/modules/latestupdates/images/imageNavRightHover.gif differ diff --git a/modules/latestupdates/js/jcarousellite_1.0.1.js b/modules/latestupdates/js/jcarousellite_1.0.1.js new file mode 100755 index 0000000..07b82a6 --- /dev/null +++ b/modules/latestupdates/js/jcarousellite_1.0.1.js @@ -0,0 +1,341 @@ +/** + * jCarouselLite - jQuery plugin to navigate images/any content in a carousel style widget. + * @requires jQuery v1.2 or above + * + * http://gmarwaha.com/jquery/jcarousellite/ + * + * Copyright (c) 2007 Ganeshji Marwaha (gmarwaha.com) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Version: 1.0.1 + * Note: Requires jquery 1.2 or above from version 1.0.1 + */ + +/** + * Creates a carousel-style navigation widget for images/any-content from a simple HTML markup. + * + * The HTML markup that is used to build the carousel can be as simple as... + * + * + * + * As you can see, this snippet is nothing but a simple div containing an unordered list of images. + * You don't need any special "class" attribute, or a special "css" file for this plugin. + * I am using a class attribute just for the sake of explanation here. + * + * To navigate the elements of the carousel, you need some kind of navigation buttons. + * For example, you will need a "previous" button to go backward, and a "next" button to go forward. + * This need not be part of the carousel "div" itself. It can be any element in your page. + * Lets assume that the following elements in your document can be used as next, and prev buttons... + * + * + * + * + * Now, all you need to do is call the carousel component on the div element that represents it, and pass in the + * navigation buttons as options. + * + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev" + * }); + * + * That's it, you would have now converted your raw div, into a magnificient carousel. + * + * There are quite a few other options that you can use to customize it though. + * Each will be explained with an example below. + * + * @param an options object - You can specify all the options shown below as an options object param. + * + * @option btnPrev, btnNext : string - no defaults + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev" + * }); + * @desc Creates a basic carousel. Clicking "btnPrev" navigates backwards and "btnNext" navigates forward. + * + * @option btnGo - array - no defaults + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * btnGo: [".0", ".1", ".2"] + * }); + * @desc If you don't want next and previous buttons for navigation, instead you prefer custom navigation based on + * the item number within the carousel, you can use this option. Just supply an array of selectors for each element + * in the carousel. The index of the array represents the index of the element. What i mean is, if the + * first element in the array is ".0", it means that when the element represented by ".0" is clicked, the carousel + * will slide to the first element and so on and so forth. This feature is very powerful. For example, i made a tabbed + * interface out of it by making my navigation elements styled like tabs in css. As the carousel is capable of holding + * any content, not just images, you can have a very simple tabbed navigation in minutes without using any other plugin. + * The best part is that, the tab will "slide" based on the provided effect. :-) + * + * @option mouseWheel : boolean - default is false + * @example + * $(".carousel").jCarouselLite({ + * mouseWheel: true + * }); + * @desc The carousel can also be navigated using the mouse wheel interface of a scroll mouse instead of using buttons. + * To get this feature working, you have to do 2 things. First, you have to include the mouse-wheel plugin from brandon. + * Second, you will have to set the option "mouseWheel" to true. That's it, now you will be able to navigate your carousel + * using the mouse wheel. Using buttons and mouseWheel or not mutually exclusive. You can still have buttons for navigation + * as well. They complement each other. To use both together, just supply the options required for both as shown below. + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * mouseWheel: true + * }); + * + * @option auto : number - default is null, meaning autoscroll is disabled by default + * @example + * $(".carousel").jCarouselLite({ + * auto: 800, + * speed: 500 + * }); + * @desc You can make your carousel auto-navigate itself by specfying a millisecond value in this option. + * The value you specify is the amount of time between 2 slides. The default is null, and that disables auto scrolling. + * Specify this value and magically your carousel will start auto scrolling. + * + * @option speed : number - 200 is default + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * speed: 800 + * }); + * @desc Specifying a speed will slow-down or speed-up the sliding speed of your carousel. Try it out with + * different speeds like 800, 600, 1500 etc. Providing 0, will remove the slide effect. + * + * @option easing : string - no easing effects by default. + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * easing: "bounceout" + * }); + * @desc You can specify any easing effect. Note: You need easing plugin for that. Once specified, + * the carousel will slide based on the provided easing effect. + * + * @option vertical : boolean - default is false + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * vertical: true + * }); + * @desc Determines the direction of the carousel. true, means the carousel will display vertically. The next and + * prev buttons will slide the items vertically as well. The default is false, which means that the carousel will + * display horizontally. The next and prev items will slide the items from left-right in this case. + * + * @option circular : boolean - default is true + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * circular: false + * }); + * @desc Setting it to true enables circular navigation. This means, if you click "next" after you reach the last + * element, you will automatically slide to the first element and vice versa. If you set circular to false, then + * if you click on the "next" button after you reach the last element, you will stay in the last element itself + * and similarly for "previous" button and first element. + * + * @option visible : number - default is 3 + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * visible: 4 + * }); + * @desc This specifies the number of items visible at all times within the carousel. The default is 3. + * You are even free to experiment with real numbers. Eg: "3.5" will have 3 items fully visible and the + * last item half visible. This gives you the effect of showing the user that there are more images to the right. + * + * @option start : number - default is 0 + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * start: 2 + * }); + * @desc You can specify from which item the carousel should start. Remember, the first item in the carousel + * has a start of 0, and so on. + * + * @option scrool : number - default is 1 + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * scroll: 2 + * }); + * @desc The number of items that should scroll/slide when you click the next/prev navigation buttons. By + * default, only one item is scrolled, but you may set it to any number. Eg: setting it to "2" will scroll + * 2 items when you click the next or previous buttons. + * + * @option beforeStart, afterEnd : function - callbacks + * @example + * $(".carousel").jCarouselLite({ + * btnNext: ".next", + * btnPrev: ".prev", + * beforeStart: function(a) { + * alert("Before animation starts:" + a); + * }, + * afterEnd: function(a) { + * alert("After animation ends:" + a); + * } + * }); + * @desc If you wanted to do some logic in your page before the slide starts and after the slide ends, you can + * register these 2 callbacks. The functions will be passed an argument that represents an array of elements that + * are visible at the time of callback. + * + * + * @cat Plugins/Image Gallery + * @author Ganeshji Marwaha/ganeshread@gmail.com + */ + +(function($) { // Compliant with jquery.noConflict() +$.fn.jCarouselLite = function(o) { + o = $.extend({ + btnPrev: null, + btnNext: null, + btnGo: null, + mouseWheel: false, + auto: null, + + speed: 200, + easing: null, + + vertical: false, + circular: true, + visible: 3, + start: 0, + scroll: 1, + + beforeStart: null, + afterEnd: null + }, o || {}); + + return this.each(function() { // Returns the element collection. Chainable. + + var running = false, animCss=o.vertical?"top":"left", sizeCss=o.vertical?"height":"width"; + var div = $(this), ul = $("ul", div), tLi = $("li", ul), tl = tLi.size(), v = o.visible; + + if(o.circular) { + ul.prepend(tLi.slice(tl-v-1+1).clone()) + .append(tLi.slice(0,v).clone()); + o.start += v; + } + + var li = $("li", ul), itemLength = li.size(), curr = o.start; + div.css("visibility", "visible"); + + li.css({overflow: "hidden", float: o.vertical ? "none" : "left"}); + ul.css({margin: "0", padding: "0", position: "relative", "list-style-type": "none", "z-index": "1"}); + div.css({overflow: "hidden", position: "relative", "z-index": "2", left: "0px"}); + + var liSize = o.vertical ? height(li) : width(li); // Full li size(incl margin)-Used for animation + var ulSize = liSize * itemLength; // size of full ul(total length, not just for the visible items) + var divSize = liSize * v; // size of entire div(total length for just the visible items) + + li.css({width: li.width(), height: li.height()}); + ul.css(sizeCss, ulSize+"px").css(animCss, -(curr*liSize)); + + div.css(sizeCss, divSize+"px"); // Width of the DIV. length of visible images + + if(o.btnPrev) + $(o.btnPrev).click(function() { + return go(curr-o.scroll); + }); + + if(o.btnNext) + $(o.btnNext).click(function() { + return go(curr+o.scroll); + }); + + if(o.btnGo) + $.each(o.btnGo, function(i, val) { + $(val).click(function() { + return go(o.circular ? o.visible+i : i); + }); + }); + + if(o.mouseWheel && div.mousewheel) + div.mousewheel(function(e, d) { + return d>0 ? go(curr-o.scroll) : go(curr+o.scroll); + }); + + if(o.auto) + setInterval(function() { + go(curr+o.scroll); + }, o.auto+o.speed); + + function vis() { + return li.slice(curr).slice(0,v); + }; + + function go(to) { + if(!running) { + + if(o.beforeStart) + o.beforeStart.call(this, vis()); + + if(o.circular) { // If circular we are in first or last, then goto the other end + if(to<=o.start-v-1) { // If first, then goto last + ul.css(animCss, -((itemLength-(v*2))*liSize)+"px"); + // If "scroll" > 1, then the "to" might not be equal to the condition; it can be lesser depending on the number of elements. + curr = to==o.start-v-1 ? itemLength-(v*2)-1 : itemLength-(v*2)-o.scroll; + } else if(to>=itemLength-v+1) { // If last, then goto first + ul.css(animCss, -( (v) * liSize ) + "px" ); + // If "scroll" > 1, then the "to" might not be equal to the condition; it can be greater depending on the number of elements. + curr = to==itemLength-v+1 ? v+1 : v+o.scroll; + } else curr = to; + } else { // If non-circular and to points to first or last, we just return. + if(to<0 || to>itemLength-v) return; + else curr = to; + } // If neither overrides it, the curr will still be "to" and we can proceed. + + running = true; + + ul.animate( + animCss == "left" ? { left: -(curr*liSize) } : { top: -(curr*liSize) } , o.speed, o.easing, + function() { + if(o.afterEnd) + o.afterEnd.call(this, vis()); + running = false; + } + ); + // Disable buttons when the carousel reaches the last/first, and enable when not + if(!o.circular) { + $(o.btnPrev + "," + o.btnNext).removeClass("disabled"); + $( (curr-o.scroll<0 && o.btnPrev) + || + (curr+o.scroll > itemLength-v && o.btnNext) + || + [] + ).addClass("disabled"); + } + + } + return false; + }; + }); +}; + +function css(el, prop) { + return parseInt($.css(el[0], prop)) || 0; +}; +function width(el) { + return el[0].offsetWidth + css(el, 'marginLeft') + css(el, 'marginRight'); +}; +function height(el) { + return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom'); +}; + +})(jQuery); \ No newline at end of file diff --git a/modules/latestupdates/module.info b/modules/latestupdates/module.info new file mode 100755 index 0000000..95aba92 --- /dev/null +++ b/modules/latestupdates/module.info @@ -0,0 +1,7 @@ +name = "LatestUpdates" +description = "Display recently uploaded photos and videos." +version = 1 +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" +info_url = "http://codex.gallery2.org/Gallery3:Modules:latestupdates" +discuss_url = "http://gallery.menalto.com/node/88936" diff --git a/modules/latestupdates/views/latestupdates_block.html.php b/modules/latestupdates/views/latestupdates_block.html.php new file mode 100755 index 0000000..b1dd907 --- /dev/null +++ b/modules/latestupdates/views/latestupdates_block.html.php @@ -0,0 +1,10 @@ + +
      + $url): ?> +
    • + + + +
    • + +
    diff --git a/modules/latestupdates/views/latestupdates_user_profile_carousel.html.php b/modules/latestupdates/views/latestupdates_user_profile_carousel.html.php new file mode 100755 index 0000000..1a3ada2 --- /dev/null +++ b/modules/latestupdates/views/latestupdates_user_profile_carousel.html.php @@ -0,0 +1,37 @@ + + +
    + + + +
    + + diff --git a/modules/latestupdates/views/latestupdates_user_profile_info.html.php b/modules/latestupdates/views/latestupdates_user_profile_info.html.php new file mode 100755 index 0000000..175d137 --- /dev/null +++ b/modules/latestupdates/views/latestupdates_user_profile_info.html.php @@ -0,0 +1,14 @@ + + +
    + diff --git a/modules/moduleorder/controllers/admin_moduleorder.php b/modules/moduleorder/controllers/admin_moduleorder.php new file mode 100755 index 0000000..ff29ebd --- /dev/null +++ b/modules/moduleorder/controllers/admin_moduleorder.php @@ -0,0 +1,83 @@ +_get_view(); + } + + private function _get_view() { + $view = new Admin_View("admin.html"); + $view->page_title = t("Manage module order"); + $view->content = new View("admin_moduleorder.html"); + $view->content->csrf = access::csrf_token(); + $view->content->available = new View("admin_moduleorder_blocks.html"); + $view->content->active = new View("admin_moduleorder_blocks.html"); + if (module::get_version("gallery") > 31) { + $view->content->available->modules = $this->_get_modules(); + } + return $view; + } + + public function update() { + //Get the ordered list of modules + $modulerawlist = explode("&", trim($_POST['modulelist'], "&")); + + //Make sure that gallery and user modules are first in the list + $current_weight = 2; + $identity_provider = module::get_var("gallery", "identity_provider"); + foreach ($modulerawlist as $row) { + $currentry = explode("=", $row); + $currentry = explode(":", $currentry[1]); + if ($currentry[0] == "gallery") { + $modulelist[0] = $row; + } elseif ($currentry[0] == $identity_provider) { + $modulelist[1] = $row; + } else { + $modulelist[$current_weight] = $row; + $current_weight++; + } + } + ksort($modulelist); + + //Write the correct weight values + $current_weight = 0; + foreach ($modulelist as $row) { + $current_weight++; + $currentry = explode("=", $row); + $currentry = explode(":", $currentry[1]); + db::build() + ->update("modules") + ->set("weight", $current_weight) + ->where("id", "=", $currentry[1]) + ->execute(); + } + + message::success(t("Your settings have been saved.")); + url::redirect("admin/moduleorder"); + print $this->_get_view(); + } + + private function _get_modules() { + $active_blocks = array(); + $available_modules = moduleorder::get_available_site_modules(); + return $available_modules; + } +} + diff --git a/modules/moduleorder/helpers/moduleorder.php b/modules/moduleorder/helpers/moduleorder.php new file mode 100755 index 0000000..4c08286 --- /dev/null +++ b/modules/moduleorder/helpers/moduleorder.php @@ -0,0 +1,32 @@ +select("*")->from("modules")->order_by("weight")->execute() as $row) { + $modules["{$row->name}:$row->id"] = $row->name; + } + return $modules; + } +} diff --git a/modules/moduleorder/helpers/moduleorder_event.php b/modules/moduleorder/helpers/moduleorder_event.php new file mode 100755 index 0000000..df92e93 --- /dev/null +++ b/modules/moduleorder/helpers/moduleorder_event.php @@ -0,0 +1,39 @@ += 32 + if (module::get_version("gallery") < 32) { + site_status::warning( + t("The module 'Module Order' requires Gallery core version of 32 or higher."), + "moduleorder_needs_higherversion"); + } else { + site_status::clear("moduleorder_needs_higherversion"); + } + } + + static function admin_menu($menu, $theme) { + $menu->get("settings_menu") + ->append(Menu::factory("link") + ->id("moduleorder_menu") + ->label(t("Module order")) + ->url(url::site("admin/moduleorder"))); + } +} diff --git a/modules/moduleorder/helpers/moduleorder_installer.php b/modules/moduleorder/helpers/moduleorder_installer.php new file mode 100755 index 0000000..dfb19e4 --- /dev/null +++ b/modules/moduleorder/helpers/moduleorder_installer.php @@ -0,0 +1,38 @@ + + 31): ?> + + + +
    +

    + +

    +

    + +

    + +

    + +

    +

    +

    + +

    + +
    +
    +
    +

    +
    +
      + +
    +
    +
    +
    +
    " method="post"> + +
    +
    + Save + +
    diff --git a/modules/moduleorder/views/admin_moduleorder_blocks.html.php b/modules/moduleorder/views/admin_moduleorder_blocks.html.php new file mode 100755 index 0000000..b7d9458 --- /dev/null +++ b/modules/moduleorder/views/admin_moduleorder_blocks.html.php @@ -0,0 +1,10 @@ + + + $text): ?> + +name == ""): ?> +
  • + +
  • name ?>
  • + + diff --git a/modules/movie_tools/controllers/admin_movie_tools.php b/modules/movie_tools/controllers/admin_movie_tools.php new file mode 100755 index 0000000..18d2875 --- /dev/null +++ b/modules/movie_tools/controllers/admin_movie_tools.php @@ -0,0 +1,99 @@ +_get_admin_form(); + $this->_print_view($form); + } + + public function save() { + access::verify_csrf(); + $form = $this->_get_admin_form(); + if ($form->validate()) { + $formats = movie_tools::get_formats(); + foreach ($formats as $id => $data) { + module::set_var("movie_tools", "allow_$id", ($form->formats->{$id}->value == 1)); + } + module::set_var("movie_tools", "custom_formats", + movie_tools::formats_string_to_json($form->formats->custom_formats->value)); + module::set_var("gallery", "movie_extract_frame_time", + $form->thumbs->extract_frame_time->value); + // All done - redirect with message. + message::success(t("Movie tools settings updated successfully")); + url::redirect("admin/movie_tools"); + } + // Something went wrong - print view from existing form. + $this->_print_view($form); + } + + private function _print_view($form) { + $view = new Admin_View("admin.html"); + $view->page_title = t("Movie tools"); + $view->content = new View("admin_movie_tools.html"); + $view->content->form = $this->_get_admin_form(); + $view->content->formats = + array_merge(movie_tools::get_default_formats(), movie_tools::get_formats()); + print $view; + } + + private function _get_admin_form() { + $form = new Forge("admin/movie_tools/save", "", "post", array("id" => "g-movie-tools-admin-form")); + + $formats = movie_tools::get_formats(); + $settings_formats = $form->group("formats")->label(t("Movie format supported")); + foreach ($formats as $id => $data) { + $settings_formats->checkbox($id) + ->label($data["name"]) + ->checked(module::get_var("movie_tools", "allow_$id", false)); + } + $settings_formats->input("custom_formats") + ->label(t("Additional movie formats (enter using the same formatting as the table above)")) + ->callback(array($this, "_validate_custom_formats")) + ->error_messages("valid_custom_formats", t("You must enter valid formats like the examples in the table")) + ->value(movie_tools::formats_json_to_string(module::get_var("movie_tools", "custom_formats", ""))); + + $settings_thumbs = $form->group("thumbs")->label(t("Movie thumbnails")); + $settings_thumbs->input("extract_frame_time") + ->label(t("Seconds from start of movie at which thumbnails are extracted (default: 3)")) + ->rules("required|valid_numeric") + ->callback(array($this, "_validate_extract_frame_time")) + ->error_messages("required", t("You must enter a number")) + ->error_messages("valid_numeric", t("You must enter a number")) + ->error_messages("valid_min", t("The value cannot be negative")) + ->value(module::get_var("gallery", "movie_extract_frame_time", 3)); + + $form->submit("save")->value(t("Save")); + return $form; + } + + function _validate_extract_frame_time($input) { + if ($input->value < 0) { + $input->add_error("valid_min", true); + } + } + + function _validate_custom_formats($input) { + if ($input->value && !movie_tools::formats_string_to_array($input->value)) { + // Input isn't empty, but doesn't parse correctly - it's invalid. + $input->add_error("valid_custom_formats", true); + } + } +} diff --git a/modules/movie_tools/helpers/movie_tools.php b/modules/movie_tools/helpers/movie_tools.php new file mode 100755 index 0000000..dc07258 --- /dev/null +++ b/modules/movie_tools/helpers/movie_tools.php @@ -0,0 +1,141 @@ + t("Supported by Flowplayer 3"), + "desc" => t("Formats that should be viewable with Gallery's standard movie player"), + "types" => array("mov" => "video/quicktime", + "f4v" => "video/x-m4v")); + $data["html5"] = array("name" => t("HTML5 video"), + "desc" => t("Along with MP4, generally considered 'HTML5-compatible' formats"), + "types" => array("webm" => "video/webm", + "ogv" => "video/ogg")); + $data["mts"] = array("name" => t("MPEG transport stream"), + "desc" => t("Not a standard web format, but still supported by FFMpeg"), + "types" => array("ts" => "video/mp2t", + "mts" => "video/mp2t", + "m2ts" => "video/mp2t")); + $data["mpeg"] = array("name" => t("MPEG-1 and MPEG-2"), + "desc" => t("Not a standard web format, but still supported by FFMpeg"), + "types" => array("mpe" => "video/mpeg", + "mpeg" => "video/mpeg", + "mpg" => "video/mpeg", + "m1v" => "video/mpeg", + "m2v" => "video/mpeg")); + $data["mpeg4"] = array("name" => t("Additional MPEG-4"), + "desc" => t("Not a standard web format, but still supported by FFMpeg"), + "types" => array("mp4v" => "video/mp4", + "mpg4" => "video/mp4")); + $data["msapple"] = array("name" => t("Microsoft and Apple"), + "desc" => t("Not a standard web format, but still supported by FFMpeg"), + "types" => array("qt" => "video/quicktime", + "wmv" => "video/x-ms-wmv", + "avi" => "video/x-msvideo", + "asf" => "video/x-ms-asf")); + $data["3gphone"] = array("name" => t("3G mobile phone video"), + "desc" => t("Not a standard web format, but still supported by FFMpeg"), + "types" => array("3gp" => "video/3gpp", + "3g2" => "video/3gpp2")); + return $data; + } + + /** + * Return data similar to that of the above function but for the default Gallery formats. + * These formats are not available as options; they're just used for display purposes. + */ + static function get_default_formats() { + $data = array(); + $data["default"] = array("name" => t("Gallery's defaults"), + "desc" => t("Enabled by default on all Gallery installations"), + "types" => array("mp4" => "video/mp4", + "flv" => "video/x-flv", + "m4v" => "video/x-m4v")); + return $data; + } + + /** + * Return formats string converted to array, e.g. convert "mp4 (video/mp4), webm (video/webm)" to + * array("mp4" => "video/mp4", "webm" => "video/webm") if the string is formatted correctly; + * return null if not. + */ + static function formats_string_to_array($input) { + $format_strings = explode(",", $input); + $formats = array(); + + foreach ($format_strings as $format_string) { + $format_string = strtolower(trim($format_string)); + if (!$format_string) { + // It's blank - skip it. + continue; + } + if (preg_match("|([0-9a-z]+)\s*\(([0-9a-z]+/[0-9a-z-]+)\)|", $format_string, $matches)) { + // It's valid - include it. + $formats[$matches[1]] = $matches[2]; + } else { + // It's invalid - break out of function and return null. + return null; + } + } + + return $formats; + } + + /** + * Return formats array as string, i.e. the inverse of the function above. + */ + static function formats_array_to_string($input) { + $formats = array(); + if (!$input) { + return array(); + } + foreach ($input as $extension => $mime_type) { + $formats[] = "$extension ($mime_type)"; + } + return implode(", ", $formats); + } + + /** + * Wrapper around formats_string_to_array() to convert straight to json and handle empty inputs. + */ + static function formats_string_to_json($input) { + $array = movie_tools::formats_string_to_array($input); + if ($array) { + return json_encode($array); + } else { + return ""; + } + } + + /** + * Wrapper around formats_array_to_string() to convert straight from json and handle empty inputs. + */ + static function formats_json_to_string($input) { + if ($input) { + return movie_tools::formats_array_to_string(json_decode($input, true)); + } else { + return ""; + } + } +} diff --git a/modules/movie_tools/helpers/movie_tools_event.php b/modules/movie_tools/helpers/movie_tools_event.php new file mode 100755 index 0000000..23eeb2b --- /dev/null +++ b/modules/movie_tools/helpers/movie_tools_event.php @@ -0,0 +1,42 @@ +get("settings_menu") + ->append(Menu::factory("link") + ->id("movie_tools") + ->label(t("Movie tools")) + ->url(url::site("admin/movie_tools"))); + } + + static function movie_types_by_extension($types_by_extension_wrapper) { + $formats = movie_tools::get_formats(); + foreach ($formats as $id => $data) { + if (module::get_var("movie_tools", "allow_$id", false)) { + $types_by_extension_wrapper->types_by_extension = array_merge_recursive( + $types_by_extension_wrapper->types_by_extension, $data["types"]); + } + } + if ($custom_formats = module::get_var("movie_tools", "custom_formats", "")) { + $types_by_extension_wrapper->types_by_extension = array_merge_recursive( + $types_by_extension_wrapper->types_by_extension, json_decode($custom_formats, true)); + } + } +} diff --git a/modules/movie_tools/helpers/movie_tools_installer.php b/modules/movie_tools/helpers/movie_tools_installer.php new file mode 100755 index 0000000..4edb0c8 --- /dev/null +++ b/modules/movie_tools/helpers/movie_tools_installer.php @@ -0,0 +1,39 @@ + $data) { + module::set_var("movie_tools", "allow_$id", 0); + } + } + + static function can_activate() { + $messages = array(); + if (module::get_version("gallery") < 56) { + $messages["warn"][] = t("Movie Tools requires Gallery v3.0.5 or newer."); + } + return $messages; + } + + static function uninstall() { + module::clear_all_vars("movie_tools"); + } +} diff --git a/modules/movie_tools/module.info b/modules/movie_tools/module.info new file mode 100755 index 0000000..4974a38 --- /dev/null +++ b/modules/movie_tools/module.info @@ -0,0 +1,7 @@ +name = "Movie Tools" +description = "Add support for custom movie thumbs and additional movie formats" +version = 1 +author_name = "Shad Laws" +author_url = "" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:movie_tools" +discuss_url = "" diff --git a/modules/movie_tools/views/admin_movie_tools.html.php b/modules/movie_tools/views/admin_movie_tools.html.php new file mode 100755 index 0000000..5e9e8d1 --- /dev/null +++ b/modules/movie_tools/views/admin_movie_tools.html.php @@ -0,0 +1,37 @@ + +
    +

    +

    + +

    +

    + + + + +

    +

    + + + + +

    +

    + + + + + + + $data): ?> + + + + + + +
    CategoryDescriptionFormats
    +

    + + +
    diff --git a/modules/permissions_dialog_usability/module.info b/modules/permissions_dialog_usability/module.info new file mode 100755 index 0000000..3597354 --- /dev/null +++ b/modules/permissions_dialog_usability/module.info @@ -0,0 +1,7 @@ +name = "Permissions dialog usability" +description = "Usability improvments for the permissions dialog." +author_name = "floridave" +author_url = "http://codex.gallery2.org/User:Floridave" +info_url = "http://codex.gallery2.org/Gallery3:Modules:permissions_dialog_usability" +discuss_url = "http://gallery.menalto.com/forum_module_permissions_dialog_usability" +version = 1 diff --git a/modules/permissions_dialog_usability/views/permissions_form.html.php b/modules/permissions_dialog_usability/views/permissions_form.html.php new file mode 100755 index 0000000..ab22278 --- /dev/null +++ b/modules/permissions_dialog_usability/views/permissions_form.html.php @@ -0,0 +1,92 @@ + +
    + + + + + + + + + + + + + + name, $item) ?> + name, $item) ?> + name, $item) ?> + + + + + + + + + + + + + + + + + + + + + +
    display_name) ?>
    name) ?> + + " + title="for_html_attr() ?>" + alt="for_html_attr() ?>" /> + + " alt="for_html_attr() ?>" /> + + + + " alt="for_html_attr() ?>" /> + + + " alt="for_html_attr() ?>" /> + + + + " alt="for_html_attr() ?>" /> + + + " alt="for_html_attr() ?>" /> + + + + " alt="for_html_attr() ?>" /> + + id == 1): ?> + " alt="for_html_attr() ?>" title="for_html_attr() ?>"/> + + + " alt="for_html_attr() ?>" /> + + + + id == 1): ?> + " title="for_html_attr() ?>" alt="for_html_attr() ?>" /> + + + " alt="for_html_attr() ?>" /> + + + + " alt="for_html_attr() ?>" /> + +
    +
    diff --git a/modules/reset_counts/controllers/admin_reset_count.php b/modules/reset_counts/controllers/admin_reset_count.php new file mode 100755 index 0000000..07569b8 --- /dev/null +++ b/modules/reset_counts/controllers/admin_reset_count.php @@ -0,0 +1,75 @@ +get("item_id"); + print $this->_get_view($item_id); + } + + public function handler() { + $item_id = Input::instance()->get("item_id"); + access::verify_csrf(); + $form = $this->_get_form(); + if ($form->validate()) { + $reset_count = $form->reset->reset_count->value; + $item = ORM::factory("item", $item_id); + $count = $form->reset->count->value; + if ($reset_count): + db::build() + ->update("items") + ->set("view_count", $count) + ->where("id", "=", $item_id) + ->execute(); + message::success(t('The view count has been updated. Return to item.', + array("url" => html::mark_clean(url::site("items/$item_id"))))); + endif; + url::redirect("admin/reset_count?item_id=$item_id"); + } + print $this->_get_view($form); + } + + private function _get_view($item_id) { + $v = new Admin_View("admin.html"); + $v->content = new View("admin_reset_count.html"); + $v->content->form = empty($form) ? $this->_get_form($item_id) : $form; + return $v; + } + + private function _get_form() { + $item_id = Input::instance()->get("item_id"); + $item = ORM::factory("item", $item_id); + $form = new Forge("admin/reset_count/handler?item_id=$item_id", "", "post", array("id" => "g-admin-form")); + + $group = $form->group("reset") + ->label(t('Reset count')); + $group->input("item_id")->label(t("Item to be changed:")) + ->value($item->title)->disabled(true); + $group->input("count")->label(t("new count for this item:")) + ->value("") + ->rules("required") + ->rules("valid_numeric|length[1,5]"); + $group->checkbox("reset_count")->label(t("Check to reset the item count for this item.")) + ->checked(false); + + $group->submit("submit")->value(t("Commit changes")); + + return $form; + } +} \ No newline at end of file diff --git a/modules/reset_counts/controllers/admin_reset_counts.php b/modules/reset_counts/controllers/admin_reset_counts.php new file mode 100755 index 0000000..c41a4f1 --- /dev/null +++ b/modules/reset_counts/controllers/admin_reset_counts.php @@ -0,0 +1,71 @@ +get("album_id"); + print $this->_get_view($album_id); + } + + public function handler() { + $album_id = Input::instance()->get("album_id"); + access::verify_csrf(); + $form = $this->_get_form(); + if ($form->validate()) { + $reset_counts = $form->reset->reset_counts->value; + $item = ORM::factory("item", $album_id); + if ($reset_counts): + db::build() + ->update("items") + ->set("view_count", 0) + ->where("left_ptr", ">=", $item->left_ptr) + ->where("right_ptr", "<=", $item->right_ptr) + ->execute(); + message::success(t('The view counts have been updated. Return to album.', + array("url" => html::mark_clean(url::site("items/$album_id"))))); + endif; + url::redirect("admin/reset_counts?album_id=$album_id"); + } + print $this->_get_view($form); + } + + private function _get_view($album_id) { + $v = new Admin_View("admin.html"); + $v->content = new View("admin_reset_counts.html"); + $v->content->form = empty($form) ? $this->_get_form($album_id) : $form; + return $v; + } + + private function _get_form() { + $album_id = Input::instance()->get("album_id"); + $album = ORM::factory("item", $album_id); + $form = new Forge("admin/reset_counts/handler?album_id=$album_id", "", "post", array("id" => "g-admin-form")); + + $group = $form->group("reset") + ->label(t('Reset counts')); + $group->input("album_id")->label(t("Items in this album will be changed:")) + ->value($album->title)->disabled(true); + $group->checkbox("reset_counts")->label(t("Check to reset the item counts in this album.")) + ->checked(false); + + $group->submit("submit")->value(t("Commit changes")); + + return $form; + } +} \ No newline at end of file diff --git a/modules/reset_counts/helpers/reset_counts_event.php b/modules/reset_counts/helpers/reset_counts_event.php new file mode 100755 index 0000000..66a3af2 --- /dev/null +++ b/modules/reset_counts/helpers/reset_counts_event.php @@ -0,0 +1,62 @@ +item(); + $user = identity::active_user(); + if ($item && $item->is_album() && $user->admin) { + $menu->get("options_menu") + ->append(Menu::factory("link") + ->id("reset") + ->label(t("Reset item counts")) + ->css_id("g-menu-reset-link") + ->url(url::site("admin/reset_counts?album_id={$item->id}"))); + } + if ($item && ($item->is_photo() || $item->is_movie()) && $user->admin) { + $menu->get("options_menu") + ->append(Menu::factory("link") + ->id("reset") + ->label(t("Reset item count")) + ->css_id("g-menu-reset-link") + ->url(url::site("admin/reset_count?item_id={$item->id}"))); + } + } + + static function context_menu($menu, $theme, $item) { + $user = identity::active_user(); + if ($user->admin) { + if ($item->is_album()) { + $menu->get("options_menu") + ->append(Menu::factory("link") + ->id("reset") + ->label(t("Reset album only count")) + ->css_class("ui-icon-refresh") + ->url(url::site("admin/reset_count?item_id={$item->id}"))); + } else { + $menu->get("options_menu") + ->append(Menu::factory("link") + ->id("reset") + ->label(t("Reset count")) + ->css_class("ui-icon-refresh") + ->url(url::site("admin/reset_count?item_id={$item->id}"))); + } + } + } +} \ No newline at end of file diff --git a/modules/reset_counts/helpers/reset_counts_installer.php b/modules/reset_counts/helpers/reset_counts_installer.php new file mode 100755 index 0000000..b510da5 --- /dev/null +++ b/modules/reset_counts/helpers/reset_counts_installer.php @@ -0,0 +1,28 @@ + +
    +

    + +
    diff --git a/modules/reset_counts/views/admin_reset_counts.html.php b/modules/reset_counts/views/admin_reset_counts.html.php new file mode 100755 index 0000000..12edf83 --- /dev/null +++ b/modules/reset_counts/views/admin_reset_counts.html.php @@ -0,0 +1,6 @@ + +
    +

    +

    + +
    diff --git a/modules/rwinfo/helpers/rwinfo_block.php b/modules/rwinfo/helpers/rwinfo_block.php new file mode 100755 index 0000000..e20d291 --- /dev/null +++ b/modules/rwinfo/helpers/rwinfo_block.php @@ -0,0 +1,178 @@ + t("rWInfo")); + } + + static function get($block_id, $theme) { + $block = ""; + switch ($block_id) { + case "rwinfo": + if ($theme->item()) { + + // rWatcher Edit: Don't display on root album. + if ($theme->item->id == 1) { + return ""; + } + // End rWatcher Edit + + $block = new Block(); + $block->css_id = "g-metadata"; + $block->title = $theme->item()->is_album() ? t("Album info") : + ($theme->item()->is_movie() ? t("Movie info") : t("Photo info")); + + // rWatcher Edit: File Name change. + $block->content = new View("rwinfo_block.html"); + + if ($theme->item->title && module::get_var("rwinfo", "show_title")) { //rWatcher Edit: rwinfo + $info["title"] = array( + "label" => t("Title:"), + "value" => html::purify($theme->item->title) + ); + } + if ($theme->item->description && module::get_var("rwinfo", "show_description")) { //rWatcher Edit: rwinfo + $info["description"] = array( + "label" => t("Description:"), + "value" => nl2br(html::purify($theme->item->description)) + ); + } + if (!$theme->item->is_album() && module::get_var("rwinfo", "show_name")) { //rWatcher Edit: rwinfo + $info["file_name"] = array( + "label" => t("File name:"), + "value" => html::clean($theme->item->name) + ); + } + + // rWatcher Edit: Display file size + if (!$theme->item->is_album()) { + // Calculate file size. + $filesize_unit = array("B","kB","MB","GB","TB","PB","EB","ZB","YB"); + $item_filesize = filesize($theme->item->file_path()); + $unit_counter = 0; + while ($item_filesize >= 1024) { + $item_filesize = $item_filesize / 1024; + $unit_counter++; + } + $item_filesize = number_format($item_filesize, 2) . " " . $filesize_unit[$unit_counter]; + $info["file_size"] = array( + "label" => t("File size:"), + "value" => $item_filesize + ); + } + // End rWatcher Edit + + // rWatcher Edit: Remove Show Captured for everything -- Show created DATE for album, captured DATE/TIME for everything else. + //if ($theme->item->captured && module::get_var("info", "show_captured")) { + // $info["captured"] = array( + // "label" => t("Captured:"), + // "value" => gallery::date_time($theme->item->captured) + // ); + //} + if ($theme->item->is_album() && $theme->item->created && module::get_var("rwinfo", "show_captured")) { + $info["captured"] = array( + "label" => t("Date:"), + "value" => gallery::date($theme->item->created) + ); + } + if (!$theme->item->is_album() && $theme->item->captured && module::get_var("rwinfo", "show_captured")) { + $info["captured"] = array( + "label" => t("Date:"), + "value" => gallery::date_time($theme->item->captured) + ); + } + else if (!$theme->item->is_album() && $theme->item->created && module::get_var("rwinfo", "show_captured")) { + $info["captured"] = array( + "label" => t("Date:"), + "value" => gallery::date_time($theme->item->created) + ); + } + // End rWatcher Edit + + if ($theme->item->owner && module::get_var("info", "show_owner")) { + $display_name = $theme->item->owner->display_name(); + + // rWatcher Edit: Display profile instead of web site, if viewable. + $str_owner_url = $theme->item->owner->url; + if (rwinfo_block_Core::_can_view_profile_pages(identity::lookup_user($theme->item->owner->id))) { + $str_owner_url = user_profile::url($theme->item->owner->id); + } + // rWatcher End Edit + + if ($str_owner_url) { //rW Edit $str_owner_url. + $info["owner"] = array( + "label" => t("Owner:"), + "value" => html::anchor( + html::clean($str_owner_url), //rW Edit $str_owner_url. + html::clean($display_name)) + ); + } else { + $info["owner"] = array( + "label" => t("Owner:"), + "value" => html::clean($display_name) + ); + } + } + if (($theme->item->width && $theme->item->height) && + module::get_var("info", "show_dimensions")) { + $info["size"] = array( + "label" => t("Dimensions:"), + "value" => t( + "%width x %height px", + array("width" => $theme->item->width, "height" => $theme->item->height)) + ); + } + + $block->content->metadata = $info; + + module::event("info_block_get_metadata", $block, $theme->item); + } + break; + } + return $block; + } + + // rWatcher Edit: This came from modules/gallery/controllers/user_profile.php, I modified it to be static. + static private function _can_view_profile_pages($user) { + if (!$user->loaded()) { + return false; + } + + if ($user->id == identity::active_user()->id) { + // You can always view your own profile + return true; + } + + switch (module::get_var("gallery", "show_user_profiles_to")) { + case "admin_users": + return identity::active_user()->admin; + + case "registered_users": + return !identity::active_user()->guest; + + case "everybody": + return true; + + default: + // Fail in private mode on an invalid setting + return false; + } + } +} \ No newline at end of file diff --git a/modules/rwinfo/helpers/rwinfo_installer.php b/modules/rwinfo/helpers/rwinfo_installer.php new file mode 100755 index 0000000..19052d2 --- /dev/null +++ b/modules/rwinfo/helpers/rwinfo_installer.php @@ -0,0 +1,45 @@ +view_count) { + $results .= "
  • "; + $results .= t("Views: %view_count", array("view_count" => $item->view_count)); + $results .= "
  • "; + } + + // rWatcher Edit: Display Tags on Thumbnails + if (module::is_active("tag")) { + $tags = ORM::factory("tag") + ->join("items_tags", "tags.id", "items_tags.tag_id") + ->where("items_tags.item_id", "=", $item->id) + ->find_all(); + if (count($tags) > 0) { + $results .= "
  • "; + $results .= t("Tags:") . " "; + $anchors = array(); + foreach ($tags as $tag) { + $anchors[] = "" . html::clean($tag->name) . ""; + } + $results .= join(", ", $anchors) . "
  • "; + } + } + // rWatcher End Edit + + if ($item->owner) { + // rWatcher Edit: Display profile instead of web site, if viewable. + $str_owner_url = $item->owner->url; + if (rwinfo_theme_Core::_can_view_profile_pages(identity::lookup_user($item->owner->id))) { + $str_owner_url = user_profile::url($item->owner->id); + } + // rWatcher End Edit + + $results .= "
  • "; + if ($str_owner_url) { //rW Edit str_owner_url + $results .= t("By: %owner_name", + array("owner_name" => $item->owner->display_name(), + "owner_url" => $str_owner_url)); // rW Edit str_owner_url + } else { + $results .= t("By: %owner_name", array("owner_name" => $item->owner->display_name())); + } + $results .= "
  • "; + } + return $results; + } + + // rWatcher Edit: This came from modules/gallery/controllers/user_profile.php, I modified it to be static. + static private function _can_view_profile_pages($user) { + if (!$user->loaded()) { + return false; + } + + if ($user->id == identity::active_user()->id) { + // You can always view your own profile + return true; + } + + switch (module::get_var("gallery", "show_user_profiles_to")) { + case "admin_users": + return identity::active_user()->admin; + + case "registered_users": + return !identity::active_user()->guest; + + case "everybody": + return true; + + default: + // Fail in private mode on an invalid setting + return false; + } + } +} \ No newline at end of file diff --git a/modules/rwinfo/module.info b/modules/rwinfo/module.info new file mode 100755 index 0000000..d1bf3ff --- /dev/null +++ b/modules/rwinfo/module.info @@ -0,0 +1,7 @@ +name = "rWInfo" +description = "Display extra information about photos and albums" +version = 3 +author_name = "Gallery Team & rWatcher" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:rwinfo" +discuss_url = "http://gallery.menalto.com/forum_module_rwinfo" diff --git a/modules/rwinfo/notes.txt b/modules/rwinfo/notes.txt new file mode 100755 index 0000000..5085b0d --- /dev/null +++ b/modules/rwinfo/notes.txt @@ -0,0 +1,10 @@ +Turn Title and Description off by Default in the installer.(they're displayed elsewhere in the default theme, no reason to show them twice on the same page) +Hide the info sidebar for the root album (without title and description there really isn't anything worth displaying here) +Display tags when mousing over the thumbnails (if tags module is active). +Display "Movie Info" on movies instead of "Photo Info" like the Gallery Info module does. +Changed block name on sidebar to rWInfo, to make it stick out more (helpers\rwinfo_block.php -> return array("metadata" => t("rWInfo")); +Change label for "captured" to "Date", display "created" for albums, "captured" for everything else. +Use gallery::date for formating the albums Date, and gallery::date_time for everything else. (I only want to see the Date an album was created, the time doesn't matter). +Change all occurences of get_var("info" to get_var("rwinfo" to avoid conflicts with the original info module. + + diff --git a/modules/rwinfo/views/rwinfo_block.html.php b/modules/rwinfo/views/rwinfo_block.html.php new file mode 100755 index 0000000..3795347 --- /dev/null +++ b/modules/rwinfo/views/rwinfo_block.html.php @@ -0,0 +1,8 @@ + + diff --git a/modules/tag_cloud_page/controllers/tag_cloud_page.php b/modules/tag_cloud_page/controllers/tag_cloud_page.php new file mode 100755 index 0000000..f0dde67 --- /dev/null +++ b/modules/tag_cloud_page/controllers/tag_cloud_page.php @@ -0,0 +1,66 @@ +content = new View("tag_cloud_page_cloud.html"); + $template->content->title = t("Tag Cloud"); + + // If the tag cloud module is active, load its settings from the database. + if (module::is_active("tag_cloud")) { + $options = array(); + foreach (array("tagcolor", "background_color", "mouseover", "transparent", "speed", "distribution") + as $option) { + $value = module::get_var("tag_cloud", $option, null); + if (!empty($value)) { + switch ($option) { + case "tagcolor": + $options["tcolor"] = $value; + break; + case "mouseover": + $options["hicolor"] = $value; + break; + case "background_color": + $options["bgColor"] = $value; + break; + case "transparent": + $options["wmode"] = "transparent"; + break; + case "speed": + $options["tspeed"] = $value; + break; + case "distribution": + $options["distr"] = "true"; + break; + } + } + } + $template->content->options = $options; + } + + // Display the page. + print $template; + } +} diff --git a/modules/tag_cloud_page/css/tag_cloud_page.css b/modules/tag_cloud_page/css/tag_cloud_page.css new file mode 100755 index 0000000..1eacad2 --- /dev/null +++ b/modules/tag_cloud_page/css/tag_cloud_page.css @@ -0,0 +1,73 @@ +/* Tag cloud page ~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-tag-cloud-page ul { + font-size: 1.2em; + text-align: justify; +} + +#g-tag-cloud-page ul li { + display: inline; + line-height: 1.5em; + text-align: justify; +} + +#g-tag-cloud-page ul li a { + text-decoration: none; +} + +#g-tag-cloud-page ul li span { + display: none; +} + +#g-tag-cloud-page ul li.size0 a { + color: #9cf; + font-size: 70%; + font-weight: 100; +} + +#g-tag-cloud-page ul li.size1 a { + color: #9cf; + font-size: 80%; + font-weight: 100; +} + +#g-tag-cloud-page ul li.size2 a { + color: #69f; + font-size: 90%; + font-weight: 300; +} + +#g-tag-cloud-page ul li.size3 a { + color: #69c; + font-size: 100%; + font-weight: 500; +} + +#g-tag-cloud-page ul li.size4 a { + color: #369; + font-size: 110%; + font-weight: 700; +} + +#g-tag-cloud-page ul li.size5 a { + color: #0e2b52; + font-size: 120%; + font-weight: 900; +} + +#g-tag-cloud-page ul li.size6 a { + color: #0e2b52; + font-size: 130%; + font-weight: 900; +} + +#g-tag-cloud-page ul li.size7 a { + color: #0e2b52; + font-size: 140%; + font-weight: 900; +} + +#g-tag-cloud-page ul li a:hover { + color: #f30; + text-decoration: underline; +} diff --git a/modules/tag_cloud_page/helpers/tag_cloud_page_block.php b/modules/tag_cloud_page/helpers/tag_cloud_page_block.php new file mode 100755 index 0000000..4878588 --- /dev/null +++ b/modules/tag_cloud_page/helpers/tag_cloud_page_block.php @@ -0,0 +1,40 @@ + t("Tag Cloud Page Link")); + } + + static function get($block_id, $theme) { + // Generate the sidebar block for linking to the tag cloud page. + $block = ""; + switch ($block_id) { + case "tag_cloud_page": + $block = new Block(); + $block->css_id = "g-tag-cloud-page"; + $block->title = t("Tag Cloud"); + $block->content = new View("tag_cloud_page_block.html"); + + break; + } + return $block; + } +} diff --git a/modules/tag_cloud_page/helpers/tag_cloud_page_event.php b/modules/tag_cloud_page/helpers/tag_cloud_page_event.php new file mode 100755 index 0000000..a52d05b --- /dev/null +++ b/modules/tag_cloud_page/helpers/tag_cloud_page_event.php @@ -0,0 +1,40 @@ +deactivate)) { + site_status::warning( + t("The Tag Cloud Page module requires the Tags module. " . + "Activate the Tags module now", + array("url" => url::site("admin/modules"))), + "tag_cloud_page_needs_tag"); + } else { + site_status::clear("tag_cloud_page_needs_tag"); + } + } + + static function pre_deactivate($data) { + if ($data->module == "tag") { + $data->messages["warn"][] = t("The Tag Cloud Page module requires the Tags module."); + } + } +} diff --git a/modules/tag_cloud_page/helpers/tag_cloud_page_installer.php b/modules/tag_cloud_page/helpers/tag_cloud_page_installer.php new file mode 100755 index 0000000..3085852 --- /dev/null +++ b/modules/tag_cloud_page/helpers/tag_cloud_page_installer.php @@ -0,0 +1,32 @@ +script("tag_cloud_page.js"); + } + + // Load the tag cloud page's css code. + return $theme->css("tag_cloud_page.css"); + } +} diff --git a/modules/tag_cloud_page/js/tag_cloud_page.js b/modules/tag_cloud_page/js/tag_cloud_page.js new file mode 100755 index 0000000..66d1dda --- /dev/null +++ b/modules/tag_cloud_page/js/tag_cloud_page.js @@ -0,0 +1,89 @@ +(function($) { + $.widget("ui.gallery_tag_cloud_page", { + _init: function() { + var self = this; + self._set_tag_cloud(); + this._ajax_form(); + this._autocomplete(); + }, + + _autocomplete: function() { + var url = $("#g-tag-cloud-page-animation").attr("ref") + "/autocomplete"; + $("#g-add-tag-form input:text").autocomplete( + url, { + max: 30, + multiple: true, + multipleSeparator: ',', + cacheLength: 1} + ); + }, + + _ajax_form: function() { + var self = this; + var form = $("#g-add-tag-form"); + form.ajaxForm({ + dataType: "json", + success: function(data) { + if (data.result == "success") { + $.get($("#g-tag-cloud-page-animation").attr("ref"), function(data, textStatus) { + $("#g-tag-cloud-movie-page").remove(); + $("#g-tag-cloud-page-animation").append("
    " + data + "
    "); + self._set_tag_cloud(); + }); + } + form.resetForm(); + $("#g-add-tag-form :text").blur(); + } + }); + }, + + _set_tag_cloud: function() { + var self = this; + var taglist = $("#g-tag-cloud-page-animation a"); + + if (taglist.length == 0) { + return; + } + var width = $("#g-tag-cloud-page-animation").width(); + var tags = document.createElement("tags"); + taglist.each(function(i) { + var addr = $(this).clone(); + $(addr).attr("style", "font-size: 14pt;"); + $(tags).append(addr); + }); + + var flashvars = { + tcolor: self.options.tcolor, + tcolor2: self.options.tcolor2, + mode: "tags", + distr: self.options.distr, + tspeed: self.options.tspeed, + hicolor: self.options.hicolor, + tagcloud: escape("" + $(tags).html() + "").toLowerCase() + }; + var params = { + bgcolor: self.options.bgColor, + wmode: self.options.wmode, + allowscriptaccess: self.options.scriptAccess + }; + + swfobject.embedSWF(self.options.movie, "g-tag-cloud-movie-page", width, .60 * width, "9", false, + flashvars, params); + } + }); + + $.extend($.ui.gallery_tag_cloud_page, { + defaults: { + bgColor: "0xFFFFFF", + wmode: "transparent", + scriptAccess: "always", + tcolor: "0x333333", + tcolor2: "0x009900", + hicolor: "0x000000", + tspeed: "100", + distr: "true", + mode: "tag" + } + }); + +})(jQuery); diff --git a/modules/tag_cloud_page/module.info b/modules/tag_cloud_page/module.info new file mode 100755 index 0000000..be9f659 --- /dev/null +++ b/modules/tag_cloud_page/module.info @@ -0,0 +1,7 @@ +name = "Tag Cloud Page" +description = "Displays a tag cloud of all tags used in the Gallery on a seperate page." +version = 1 +author_name = "rWatcher" +author_url = "http://codex.gallery2.org/User:RWatcher" +info_url = "http://codex.gallery2.org/Gallery3:Modules:tag_cloud_page" +discuss_url = "http://gallery.menalto.com/node/101279" diff --git a/modules/tag_cloud_page/views/tag_cloud_page_block.html.php b/modules/tag_cloud_page/views/tag_cloud_page_block.html.php new file mode 100755 index 0000000..46fd70e --- /dev/null +++ b/modules/tag_cloud_page/views/tag_cloud_page_block.html.php @@ -0,0 +1,2 @@ + +">View cloud diff --git a/modules/tag_cloud_page/views/tag_cloud_page_cloud.html.php b/modules/tag_cloud_page/views/tag_cloud_page_cloud.html.php new file mode 100755 index 0000000..acd31ed --- /dev/null +++ b/modules/tag_cloud_page/views/tag_cloud_page_cloud.html.php @@ -0,0 +1,35 @@ + +
    +
    + dynamic_top() ?> +
    +

    +
    +
    + + + +
    +
    "> +
    + count_all()); ?> +
    +
    +
    + + +
    + count_all()); ?> +
    + + +dynamic_bottom() ?> diff --git a/modules/themedispatcher/controllers/admin_themedispatcher.php b/modules/themedispatcher/controllers/admin_themedispatcher.php new file mode 100755 index 0000000..3e17533 --- /dev/null +++ b/modules/themedispatcher/controllers/admin_themedispatcher.php @@ -0,0 +1,105 @@ +page_title = t("Select theme based on user-agent"); + $view->content = new View("admin_themedispatcher.html"); + $view->content->form = $this->_get_admin_form(); + $uas = unserialize(module::get_var("themedispatcher", "useragents", "a:0:{}")); + $view->content->uas = array_keys($uas); + + print $view; + } + + public function add_ua() { + access::verify_csrf(); + + $form = $this->_get_admin_form(); + $form->validate(); + + $uas = unserialize(module::get_var("themedispatcher", "useragents", "a:0:{}")); + $ua = $form->add_ua->ua->value; + if ($ua) { + $uas[$ua] = 1; + module::set_var("themedispatcher", "useragents", serialize($uas)); + } + module::set_var("themedispatcher", "theme", $form->target_theme->theme->value); + module::set_var("themedispatcher", "overridedispatch", $form->target_theme->overridedispatch->value); + message::success(t("Settings saved")); + themedispatcher::check_config($uas); + url::redirect("admin/themedispatcher"); + + $view = new Admin_View("admin.html"); + $view->content = new View("admin_themedispatcher.html"); + $view->content->form = $form; + $view->content->uas = array_keys($uas); + print $view; + } + + public function remove_ua() { + access::verify_csrf(); + + $ua = Input::instance()->get("ua"); + $uas = unserialize(module::get_var("themedispatcher", "useragents")); + if (isset($uas[$ua])) { + unset($uas[$ua]); + message::success(t("Removed user-agent %ua", array("ua" => $ua))); + module::set_var("themedispatcher", "useragents", serialize($uas)); + themedispatcher::check_config($uas); + } + url::redirect("admin/themedispatcher"); + } + + private function _get_admin_form() { + $form = new Forge("admin/themedispatcher/add_ua", "", "post", array("id" => "g-themedispatcher-admin-form")); + $target_theme = $form->group("target_theme")->label(t("Theme")); + $target_theme->dropdown("theme") + ->label(t("Target Theme")) + ->options($this->_get_themes()) + ->selected(module::get_var("themedispatcher", "theme")); + $target_theme->checkbox("overridedispatch")->label(t("Places a link in the theme footer to allow users to manually switch between target and default theme.")) + ->checked(module::get_var("themedispatcher", "overridedispatch", 0) == 1); + $target_theme->submit("save")->value(t("Save")); + + $add_ua = $form->group("add_ua")->label(t("User-Agents")); + $add_ua->input("ua")->label(t("User-Agent"))->rules("required")->id("g-ua"); + $add_ua->submit("add")->value(t("Add User-Agent")); + return $form; + } + + private function _get_themes() { + $themes = array(); + foreach (scandir(THEMEPATH) as $theme_name) { + if ($theme_name[0] == ".") { + continue; + } + $theme_name = preg_replace("/[^a-zA-Z0-9\._-]/", "", $theme_name); + if (file_exists(THEMEPATH . "$theme_name/theme.info")) { + $themeinfo = theme::get_info($theme_name); + if ($themeinfo->site) { + $themes[$theme_name] = theme::get_info($theme_name)->name; + } + } + } + return $themes; + } +} diff --git a/modules/themedispatcher/controllers/themedispatcher.php b/modules/themedispatcher/controllers/themedispatcher.php new file mode 100755 index 0000000..c0f1b5c --- /dev/null +++ b/modules/themedispatcher/controllers/themedispatcher.php @@ -0,0 +1,40 @@ +server("HTTP_REFERER")) { + url::redirect($referer); + } else { + url::redirect(item::root()->abs_url()); + } + } + + public function overrideoff() { + cookie::delete("g3themeoverride"); + if ($referer = Input::instance()->server("HTTP_REFERER")) { + url::redirect($referer); + } else { + url::redirect(item::root()->abs_url()); + } + } + +} diff --git a/modules/themedispatcher/css/admin_themedispatcher.css b/modules/themedispatcher/css/admin_themedispatcher.css new file mode 100755 index 0000000..962ad76 --- /dev/null +++ b/modules/themedispatcher/css/admin_themedispatcher.css @@ -0,0 +1,15 @@ +#g-themedispatcher button { + margin-bottom: .5em; +} + +#g-themedispatcher ul ul li { + padding-left: 1.2em; +} + +#g-themedispatcher-uas li .ui-icon { + margin-top: .4em; +} + +#g-themedispatcher-admin-form .textbox { + width: 400px; +} diff --git a/modules/themedispatcher/css/themedispatcher.css b/modules/themedispatcher/css/themedispatcher.css new file mode 100755 index 0000000..4e35288 --- /dev/null +++ b/modules/themedispatcher/css/themedispatcher.css @@ -0,0 +1,7 @@ +.g-themedispatcher { + font-size: 10px; + text-align: center; + padding-bottom: 0.5em; + padding-top: 0.5em; +} + diff --git a/modules/themedispatcher/helpers/MY_theme.php b/modules/themedispatcher/helpers/MY_theme.php new file mode 100755 index 0000000..3dfa438 --- /dev/null +++ b/modules/themedispatcher/helpers/MY_theme.php @@ -0,0 +1,102 @@ +server("PATH_INFO"); + if (empty($path)) { + $path = "/" . $input->get("kohana_uri"); + } + + $config = Kohana_Config::instance(); + $modules = $config->get("core.modules"); + self::$is_admin = $path == "/admin" || !strncmp($path, "/admin/", 7); + + // Select different theme based on specific user agent + self::$dispatch = false; + $ua_list = module::get_var("themedispatcher", "useragents"); + if ($ua_list) { + $ua_list = unserialize($ua_list); + foreach( $ua_list as $key => $val) { + $agent = request::user_agent("agent"); + if (($agent) && stristr($agent, $key)) { + self::$dispatch = true; + } + } + } + $dispatchoverride = cookie::get("g3themeoverride", 0); + + if ((self::$dispatch) && !($dispatchoverride)) { + self::$site_theme_name = module::get_var("themedispatcher", "theme"); + } else { + self::$site_theme_name = module::get_var("gallery", "active_site_theme"); + } + + if (self::$is_admin) { + // Load the admin theme + self::$admin_theme_name = module::get_var("gallery", "active_admin_theme"); + array_unshift($modules, THEMEPATH . self::$admin_theme_name); + + // If the site theme has an admin subdir, load that as a module so that + // themes can provide their own code. + if (file_exists(THEMEPATH . self::$site_theme_name . "/admin")) { + array_unshift($modules, THEMEPATH . self::$site_theme_name . "/admin"); + } + // Admins can override the site theme, temporarily. This lets us preview themes. + if (identity::active_user()->admin && $override = $input->get("theme")) { + if (file_exists(THEMEPATH . $override)) { + self::$admin_theme_name = $override; + array_unshift($modules, THEMEPATH . self::$admin_theme_name); + } else { + Kohana_Log::add("error", "Missing override admin theme: '$override'"); + } + } + } else { + // Admins can override the site theme, temporarily. This lets us preview themes. + if (identity::active_user()->admin && $override = $input->get("theme")) { + if (file_exists(THEMEPATH . $override)) { + self::$site_theme_name = $override; + } else { + Kohana_Log::add("error", "Missing override site theme: '$override'"); + } + } + array_unshift($modules, THEMEPATH . self::$site_theme_name); + } + + $config->set("core.modules", $modules); + } + +} + diff --git a/modules/themedispatcher/helpers/themedispatcher.php b/modules/themedispatcher/helpers/themedispatcher.php new file mode 100755 index 0000000..8255d9d --- /dev/null +++ b/modules/themedispatcher/helpers/themedispatcher.php @@ -0,0 +1,34 @@ +Configure it now!", + array("url" => html::mark_clean(url::site("admin/themedispatcher")))), + "themedispatcher_configuration"); + } else { + site_status::clear("themedispatcher_configuration"); + } + } +} diff --git a/modules/themedispatcher/helpers/themedispatcher_event.php b/modules/themedispatcher/helpers/themedispatcher_event.php new file mode 100755 index 0000000..470ae89 --- /dev/null +++ b/modules/themedispatcher/helpers/themedispatcher_event.php @@ -0,0 +1,28 @@ +get("settings_menu") + ->append(Menu::factory("link") + ->id("themedispatcher") + ->label(t("Theme dispatcher")) + ->url(url::site("admin/themedispatcher"))); + } +} diff --git a/modules/themedispatcher/helpers/themedispatcher_installer.php b/modules/themedispatcher/helpers/themedispatcher_installer.php new file mode 100755 index 0000000..3b74392 --- /dev/null +++ b/modules/themedispatcher/helpers/themedispatcher_installer.php @@ -0,0 +1,29 @@ +css("admin_themedispatcher.css"); + } + + return $buf; + } + + static function head($theme) { + $buf = $theme->css("themedispatcher.css"); + return $buf; + } + + static function page_bottom($theme) { + $buf = ""; + if ((module::get_var("themedispatcher", "overridedispatch", 0) == 1) && (theme::$dispatch)) { + $buf .= "
    "; + if (theme::$site_theme_name == module::get_var("gallery", "active_site_theme")) { + $buf .= "".t("Mobile")." | ".t("Full Version"); + } else { + $buf .= t("Mobile")." | ".t("Full")." ".t("Version"); + } + $buf .= "
    "; + } + return $buf; + } +} diff --git a/modules/themedispatcher/module.info b/modules/themedispatcher/module.info new file mode 100755 index 0000000..2af7bca --- /dev/null +++ b/modules/themedispatcher/module.info @@ -0,0 +1,7 @@ +name = "Theme dispatcher" +description = "Select theme based on user-agent" +version = 6 +author_name = "calleh" +author_url = +info_url = "http://codex.gallery2.org/Gallery3:Modules:themedispatcher" +discuss_url = "http://gallery.menalto.com/node/101768" diff --git a/modules/themedispatcher/views/admin_themedispatcher.html.php b/modules/themedispatcher/views/admin_themedispatcher.html.php new file mode 100755 index 0000000..427b4f6 --- /dev/null +++ b/modules/themedispatcher/views/admin_themedispatcher.html.php @@ -0,0 +1,23 @@ + +
    +

    +
    + +
    + + +
    +
    +
    diff --git a/modules/treeview/controllers/admin_treeview.php b/modules/treeview/controllers/admin_treeview.php new file mode 100755 index 0000000..a9c80a8 --- /dev/null +++ b/modules/treeview/controllers/admin_treeview.php @@ -0,0 +1,116 @@ +content = new View("admin_treeview.html"); + $view->content->treeview_admin_form = $this->_get_admin_form(); + print $view; + } + + private function _get_admin_form() { + $form = new Forge("admin/treeview/saveprefs", "", "post", + array("id" => "g-treeview-admin-form")); + + $group = $form->group("preferences")->label(t("Settings")); + + $group->input("treeview_menutitle") + ->label(t("Menu Title")) + ->value(module::get_var("treeview", "menutitle", "Tree View")); + $group->dropdown("treeview_viewtype") + ->id("treeview_viewtype") + ->label(t("View Type")) + ->options(array("list" => t("List"), "csstree" => t("CSS Tree"), "dtree" => t("DTree"))) + ->selected(module::get_var("treeview", "viewstyle", "list")); + $group->checkbox("treeview_hidemenu") + ->label(t("Hide menu link to \"Tree View\"")) + ->checked( module::get_var("treeview", "hidemenu") ); + $group->checkbox("treeview_showdetails") + ->label(t("Display details (thumbnail, description) in \"Tree View\".")) + ->checked( module::get_var("treeview", "showdetails") ); + + $group_modules = $form->group("preferences_modules")->label(t("Module Integration")); + if (module::is_active("dynamic")) { + $group_modules->checkbox("treeview_showdynamic") + ->label(t("Display albums, provided by the \"dynamic\" module.")) + ->checked( module::get_var("treeview", "showdynamic") ); + } + if (module::is_active("tag_cloud_page")) { + $group_modules->checkbox("treeview_showtagcloudpage") + ->label(t("Display Tag Coud, provided by the \"Tag Cloud Page\" module.")) + ->checked( module::get_var("treeview", "showtagcloudpage") ); + } + if (module::is_active("pages")) { + $group_modules->checkbox("treeview_showpages") + ->label(t("Display pages, provided by the \"pages\" module.")) + ->checked( module::get_var("treeview", "showpages") ); + } + + $group_dtree = $form->group("preferences_dtree")->label(t("DTree Settings")); + $group_dtree->checkbox("dtree_onmouseover") + ->label(t("Open subalbums on mouseover '+'.")) + ->checked( module::get_var("treeview", "dtree_openonmouseover") ); + $group_dtree->checkbox("dtree_closesamelevel") + ->label(t("Close other albums in in the same level.")) + ->checked( module::get_var("treeview", "dtree_closesamelevel") ); + + // Add a save button to the form. + $form->submit("SaveSettings")->value(t("Save")); + + // Return the newly generated form. + return $form; + } + + public function saveprefs() { + // Prevent Cross Site Request Forgery + access::verify_csrf(); + + $form = $this->_get_admin_form(); + if ($form->validate()) { + Kohana_Log::add("error",print_r($form,1)); + + // Save form variables. + $treeview_menutitle = Input::instance()->post("treeview_menutitle"); + if ( $treeview_menutitle == "" ) { $treeview_menutitle = "Tree View"; } + module::set_var("treeview", "menutitle", $treeview_menutitle); + + module::set_var("treeview", "viewstyle", Input::instance()->post("treeview_viewtype")); + module::set_var("treeview", "hidemenu", Input::instance()->post("treeview_hidemenu")); + module::set_var("treeview", "showdetails", Input::instance()->post("treeview_showdetails")); + module::set_var("treeview", "showdynamic", Input::instance()->post("treeview_showdynamic")); + module::set_var("treeview", "showtagcloudpage", Input::instance()->post("treeview_showtagcloudpage")); + module::set_var("treeview", "showpages", Input::instance()->post("treeview_showpages")); + module::set_var("treeview", "modulesexpandable", Input::instance()->post("treeview_modulesexpandable")); + module::set_var("treeview", "dtree_openonmouseover", Input::instance()->post("dtree_onmouseover")); + module::set_var("treeview", "dtree_closesamelevel", Input::instance()->post("dtree_closesamelevel")); + message::success(t("Your settings have been saved.")); + + url::redirect("admin/treeview"); + } + + // Else show the page with errors + $view = new Admin_View("admin.html"); + $view->content = new View("admin_treeview.html"); + $view->content->treeview_admin_form = $form; + print $view; + } +} diff --git a/modules/treeview/controllers/treeview.php b/modules/treeview/controllers/treeview.php new file mode 100755 index 0000000..de46e78 --- /dev/null +++ b/modules/treeview/controllers/treeview.php @@ -0,0 +1,44 @@ +title, $root->url())->set_first(); + $breadcrumbs[] = Breadcrumb::instance(t("Album Tree View"), url::site("treeview"))->set_last(); + + // Set up and display the actual page. + $style = module::get_var("treeview", "viewstyle", "list"); + $template = new Theme_View("page.html", "other", "Tree View"); + $template->set_global(array("breadcrumbs" => $breadcrumbs)); + $template->page_title = t("Gallery :: Album Tree View"); + $template->content = new View("treeview_page_{$style}.html"); + $template->content->title = t("Album Tree View"); + $template->content->root = item::root(); + + // Display the page. + print $template; + } +} diff --git a/modules/treeview/css/treeview.css b/modules/treeview/css/treeview.css new file mode 100755 index 0000000..3e3e6b4 --- /dev/null +++ b/modules/treeview/css/treeview.css @@ -0,0 +1,91 @@ +/* Tree view page ~~~~~~~~~~~~~~~~~~~~~~~ + Styles for Treeview (Gallery3 Module) + Written by itzling +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-treeview-body { + font-size: .9em; + padding-bottom: 11em; +} + +/* List view ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +.g-treeview-root { + padding-bottom: 1.5em; +} +ul.g-treeview-albumnav { + padding-left: 1em; +} +li.g-treeview-album { + list-style-type: disc; + list-style-position: outside; +} +.g-treeview-album .g-treeview-details, +a.node .g-treeview-details, +a.nodeSel .g-treeview-details { + display: none; + background-color: #ffffff; + padding: .6em .6em; + text-align: center; + font-size: .8em; + max-width: 280px; +} +.g-treeview-album .g-treeview-details .g-metadata, +a.node .g-treeview-details .g-metadata { + color: #191919; + white-space: normal; +} +.g-treeview-album a:hover .g-treeview-details, +a.node:hover .g-treeview-details { + display: block; + border: 1px solid #191919; + position: fixed !important; +/* left: 20em;*/ + left: 50%; + top: 100px; + z-index: 1000 !important; + border-top-left-radius: .3em; + border-top-right-radius: .3em; + -moz-border-radius-topleft: .3em; + -moz-border-radius-topright: .3em; + -webkit-border-radius: .3em; + -moz-box-shadow: 0 .12em .3em #191919, 0 .12em .37em #191919; + box-shadow: 0 .12em .3em #191919, 0 .12em .37em #191919; + -webkit-box-shadow: 0 .12em .3em #191919, 0 .12em .37em #191919; +} + +/* CSS Tree view ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +div.g-treeview-root { + float: none; + margin-left: .1em; +} +.g-treeview-haschildren { + background: transparent url(../images/nolines_plus.gif) no-repeat 0 0; + padding-left: 18px; +} +.g-treeview-item { + padding-left: 18px; +} +.g-treeview-lv0 { + background: none!important; + padding-left: 0!important; +} +.g-treeview-open { display: block; } +.g-treeview-lv1 .g-treeview-lv1-children { display: none; } +.g-treeview-lv1:hover .g-treeview-lv1-children { display: block;} +.g-treeview-lv2 .g-treeview-lv2-children { display: none; } +.g-treeview-lv2:hover .g-treeview-lv2-children { display: block; } +.g-treeview-lv3 .g-treeview-lv3-children { display: none; } +.g-treeview-lv3:hover .g-treeview-lv3-children { display: block; } +.g-treeview-lv4 .g-treeview-lv4-children { display: none; } +.g-treeview-lv4:hover .g-treeview-lv4-children { display: block; } +.g-treeview-lv5 .g-treeview-lv5-children { display: none; } +.g-treeview-lv5:hover .g-treeview-lv5-children { display: block; } +.g-treeview-lv6 .g-treeview-lv6-children { display: none; } +.g-treeview-lv6:hover .g-treeview-lv6-children { display: block; } +.g-treeview-lv7 .g-treeview-lv7-children { display: none; } +.g-treeview-lv7:hover .g-treeview-lv7-children { display: block; } +.g-treeview-lv8 .g-treeview-lv8-children { display: none; } +.g-treeview-lv8:hover .g-treeview-lv8-children { display: block; } +.g-treeview-lv9 .g-treeview-lv9-children { display: none; } +.g-treeview-lv9:hover .g-treeview-lv9-children { display: block; } + diff --git a/modules/treeview/helpers/treeview_block.php b/modules/treeview/helpers/treeview_block.php new file mode 100755 index 0000000..225af43 --- /dev/null +++ b/modules/treeview/helpers/treeview_block.php @@ -0,0 +1,39 @@ + t("Tree View")); + } + + static function get($block_id, $theme) { + // Generate the sidebar block for linking to the tree view page. + $block = ""; + switch ($block_id) { + case "treeview_block": + $block = new Block(); + $block->css_id = "g-treeview"; + $block->title = t("Tree View"); + $block->content = new View("treeview_block.html"); + break; + } + return $block; + } +} diff --git a/modules/treeview/helpers/treeview_event.php b/modules/treeview/helpers/treeview_event.php new file mode 100755 index 0000000..4414aa9 --- /dev/null +++ b/modules/treeview/helpers/treeview_event.php @@ -0,0 +1,40 @@ +get("settings_menu") + ->append(Menu::factory("link") + ->id("treeview") + ->label(t("Tree View")) + ->url(url::site("admin/treeview"))); + } + + static function site_menu($menu, $theme) { + if (module::get_var("treeview", "hidemenu") != true) { + $menu->add_after("home", Menu::factory("link") + ->id("treeview") + ->label(t(module::get_var("treeview", "menutitle"))) + ->url(url::site("treeview/"))); + } + } + +} diff --git a/modules/treeview/helpers/treeview_installer.php b/modules/treeview/helpers/treeview_installer.php new file mode 100755 index 0000000..8bcd11e --- /dev/null +++ b/modules/treeview/helpers/treeview_installer.php @@ -0,0 +1,59 @@ +css("treeview.css"); + } +} diff --git a/modules/treeview/images/empty.gif b/modules/treeview/images/empty.gif new file mode 100755 index 0000000..b5cf523 Binary files /dev/null and b/modules/treeview/images/empty.gif differ diff --git a/modules/treeview/images/join.gif b/modules/treeview/images/join.gif new file mode 100755 index 0000000..34dd476 Binary files /dev/null and b/modules/treeview/images/join.gif differ diff --git a/modules/treeview/images/join_rtl.gif b/modules/treeview/images/join_rtl.gif new file mode 100755 index 0000000..04bc3a7 Binary files /dev/null and b/modules/treeview/images/join_rtl.gif differ diff --git a/modules/treeview/images/joinbottom.gif b/modules/treeview/images/joinbottom.gif new file mode 100755 index 0000000..48b81c8 Binary files /dev/null and b/modules/treeview/images/joinbottom.gif differ diff --git a/modules/treeview/images/joinbottom_rtl.gif b/modules/treeview/images/joinbottom_rtl.gif new file mode 100755 index 0000000..24fdbce Binary files /dev/null and b/modules/treeview/images/joinbottom_rtl.gif differ diff --git a/modules/treeview/images/line.gif b/modules/treeview/images/line.gif new file mode 100755 index 0000000..1a259ee Binary files /dev/null and b/modules/treeview/images/line.gif differ diff --git a/modules/treeview/images/line_rtl.gif b/modules/treeview/images/line_rtl.gif new file mode 100755 index 0000000..704b07d Binary files /dev/null and b/modules/treeview/images/line_rtl.gif differ diff --git a/modules/treeview/images/minus.gif b/modules/treeview/images/minus.gif new file mode 100755 index 0000000..ba5e58a Binary files /dev/null and b/modules/treeview/images/minus.gif differ diff --git a/modules/treeview/images/minus_rtl.gif b/modules/treeview/images/minus_rtl.gif new file mode 100755 index 0000000..c80d49d Binary files /dev/null and b/modules/treeview/images/minus_rtl.gif differ diff --git a/modules/treeview/images/minusbottom.gif b/modules/treeview/images/minusbottom.gif new file mode 100755 index 0000000..b966e4d Binary files /dev/null and b/modules/treeview/images/minusbottom.gif differ diff --git a/modules/treeview/images/minusbottom_rtl.gif b/modules/treeview/images/minusbottom_rtl.gif new file mode 100755 index 0000000..ab940c6 Binary files /dev/null and b/modules/treeview/images/minusbottom_rtl.gif differ diff --git a/modules/treeview/images/nolines_minus.gif b/modules/treeview/images/nolines_minus.gif new file mode 100755 index 0000000..d0e8471 Binary files /dev/null and b/modules/treeview/images/nolines_minus.gif differ diff --git a/modules/treeview/images/nolines_plus.gif b/modules/treeview/images/nolines_plus.gif new file mode 100755 index 0000000..370fc27 Binary files /dev/null and b/modules/treeview/images/nolines_plus.gif differ diff --git a/modules/treeview/images/plus.gif b/modules/treeview/images/plus.gif new file mode 100755 index 0000000..5eaa7fb Binary files /dev/null and b/modules/treeview/images/plus.gif differ diff --git a/modules/treeview/images/plus_rtl.gif b/modules/treeview/images/plus_rtl.gif new file mode 100755 index 0000000..b6282f6 Binary files /dev/null and b/modules/treeview/images/plus_rtl.gif differ diff --git a/modules/treeview/images/plusbottom.gif b/modules/treeview/images/plusbottom.gif new file mode 100755 index 0000000..076ff98 Binary files /dev/null and b/modules/treeview/images/plusbottom.gif differ diff --git a/modules/treeview/images/plusbottom_rtl.gif b/modules/treeview/images/plusbottom_rtl.gif new file mode 100755 index 0000000..90571f2 Binary files /dev/null and b/modules/treeview/images/plusbottom_rtl.gif differ diff --git a/modules/treeview/module.info b/modules/treeview/module.info new file mode 100755 index 0000000..a07d843 --- /dev/null +++ b/modules/treeview/module.info @@ -0,0 +1,7 @@ +name = "Tree View Page" +description = "Displays links to all albums in the gallery on a seperate page." +version = 4 +author_name = "itzling" +author_url = "http://codex.galleryproject.org/User:Itzling" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:treeview" +discuss_url = "http://galleryproject.org/node/112461" diff --git a/modules/treeview/views/admin_treeview.html.php b/modules/treeview/views/admin_treeview.html.php new file mode 100755 index 0000000..ea62e94 --- /dev/null +++ b/modules/treeview/views/admin_treeview.html.php @@ -0,0 +1,11 @@ + + +
    +

    +
    +
    + +
    +
    diff --git a/modules/treeview/views/treeview_block.html.php b/modules/treeview/views/treeview_block.html.php new file mode 100755 index 0000000..382550e --- /dev/null +++ b/modules/treeview/views/treeview_block.html.php @@ -0,0 +1,2 @@ + +"> diff --git a/modules/treeview/views/treeview_page_csstree.html.php b/modules/treeview/views/treeview_page_csstree.html.php new file mode 100755 index 0000000..68a48a5 --- /dev/null +++ b/modules/treeview/views/treeview_page_csstree.html.php @@ -0,0 +1,133 @@ + + +
    +

    +
    +
    +
    + + + viewable()->children_count(array(array("type", "=", "album")))) { ?> + + + +
    +

    +
    +
    +
    + +
    + + "> +
    +
    + + + + + + "> +
    + + +
    + + "> +
    + +
    +
    + + + +
    +

    +
    +
    +order_by("title", "ASC")->find_all(); + $pages_count = count($pages); + if ($pages_count > 0) { + // Loop through each page and generate an HTML list of their links and titles. + foreach ($pages as $one_page) { +?> + + +
    + + +
    diff --git a/modules/treeview/views/treeview_page_dtree.html.php b/modules/treeview/views/treeview_page_dtree.html.php new file mode 100755 index 0000000..8ba4826 --- /dev/null +++ b/modules/treeview/views/treeview_page_dtree.html.php @@ -0,0 +1,529 @@ + + + + + +
    +

    +
    +
    +
    + +
    + + +
    +

    +
    +
    +
    + +
    + + "> +
    +
    + + + + + + "> +
    + + +
    + + "> +
    + +
    +
    + + + +
    +

    +
    +
    +order_by("title", "ASC")->find_all(); + $pages_count = count($pages); + if ($pages_count > 0) { + // Loop through each page and generate an HTML list of their links and titles. + foreach ($pages as $one_page) { +?> + + +
    + +
    diff --git a/modules/treeview/views/treeview_page_list.html.php b/modules/treeview/views/treeview_page_list.html.php new file mode 100755 index 0000000..18a4c51 --- /dev/null +++ b/modules/treeview/views/treeview_page_list.html.php @@ -0,0 +1,115 @@ + + + +
    +

    +
    +
    + + + + +
    +

    +
    +
      + +
    • + "> +
    • +
    • + "> +
    • + + +
    • + "> +
    • + +
    + + + +
    +

    +
    + + + +
    diff --git a/modules/user_info/controllers/admin_user_info.php b/modules/user_info/controllers/admin_user_info.php new file mode 100755 index 0000000..e483938 --- /dev/null +++ b/modules/user_info/controllers/admin_user_info.php @@ -0,0 +1,250 @@ +page_title = t("User Information Settings"); + $view->content = new View("admin_user_info.html"); + $view->content->user_info_form = $this->_get_admin_form(); + print $view; + } + + public function saveprefs() { + // Prevent Cross Site Request Forgery + access::verify_csrf(); + + // Figure out the values of the text boxes + $str_per_page = Input::instance()->post("per_page"); + $str_default_sort_column = Input::instance()->post("default_sort_column"); + $str_default_sort_order = Input::instance()->post("default_sort_order"); + $str_use_default_gallery_date_format = Input::instance()->post("use_default_gallery_date_format"); + $str_date_format = Input::instance()->post("date_format"); + $str_log_logins = Input::instance()->post("log_logins"); + $str_color_login = Input::instance()->post("color_login"); + $str_log_logouts = Input::instance()->post("log_logouts"); + $str_color_logout = Input::instance()->post("color_logout"); + $str_log_failed_logins = Input::instance()->post("log_failed_logins"); + $str_color_failed_login = Input::instance()->post("color_failed_login"); + $str_log_re_authenticate_logins = Input::instance()->post("log_re_authenticate_logins"); + $str_color_re_authenticate_login = Input::instance()->post("color_re_authenticate_login"); + $str_log_user_created = Input::instance()->post("log_user_created"); + $str_color_user_created = Input::instance()->post("color_user_created"); + + // Save Settings. + module::set_var("user_info", "per_page", $str_per_page); + module::set_var("user_info", "default_sort_column", $str_default_sort_column); + module::set_var("user_info", "default_sort_order", $str_default_sort_order); + module::set_var("user_info", "use_default_gallery_date_format", $str_use_default_gallery_date_format); + module::set_var("user_info", "date_format", $str_date_format); + module::set_var("user_info", "log_logins", $str_log_logins); + module::set_var("user_info", "color_login", $str_color_login); + module::set_var("user_info", "log_logouts", $str_log_logouts); + module::set_var("user_info", "color_logout", $str_color_logout); + module::set_var("user_info", "log_failed_logins", $str_log_failed_logins); + module::set_var("user_info", "color_failed_login", $str_color_failed_login); + module::set_var("user_info", "log_re_authenticate_logins", $str_log_re_authenticate_logins); + module::set_var("user_info", "color_re_authenticate_login", $str_color_re_authenticate_login); + module::set_var("user_info", "log_user_created", $str_log_user_created); + module::set_var("user_info", "color_user_created", $str_color_user_created); + message::success(t("Your Settings Have Been Saved.")); + + // Load Admin page. + $view = new Admin_View("admin.html"); + $view->page_title = t("User Information Settings"); + $view->content = new View("admin_user_info.html"); + $view->content->user_info_form = $this->_get_admin_form(); + print $view; + } + + private function _get_admin_form() { + // Make a new Form. + $form = new Forge("admin/user_info/saveprefs", "", "post", + array("id" => "g-user_info-admin-form")); + + // Create the input boxes for the User Information Settings + $user_infoGroup = $form->group("UserInformationSettings"); + $user_infoGroup->dropdown("per_page") + ->label(t("Number of records to display per page")) + ->options(array("5" => t("5"), + "10" => t("10"), + "15" => t("15"), + "25" => t("25"), + "50" => t("50"), + "75" => t("75"), + "100" => t("100"), + "125" => t("125"))) + ->selected(module::get_var("user_info", "per_page")); + $user_infoGroup->dropdown("default_sort_column") + ->label(t("Default Column to Sort By")) + ->options(array("id" => t("id"), + "user_id" => t("user_id"), + "user_name" => t("user_name"), + "ip_address" => t("ip_address"), + "time_stamp" => t("time_stamp"), + "action" => t("action"))) + ->selected(module::get_var("user_info", "default_sort_column")); + $user_infoGroup->dropdown("default_sort_order") + ->label(t("Default Sort Order")) + ->options(array("ASC" => t("Ascending"), + "DESC" => t("Descending"))) + ->selected(module::get_var("user_info", "default_sort_order")); + $user_infoGroup->dropdown("use_default_gallery_date_format") + ->label(t("Use Default Gallery Date/Time Format")) + ->options(array("Yes" => t("Yes"), + "No" => t("No"))) + ->selected(module::get_var("user_info", "use_default_gallery_date_format")); + $user_infoGroup->input("date_format") + ->label(t("Format of the Date & Time - PHP Date")) + ->value(module::get_var("user_info", "date_format")); + $user_infoGroup->dropdown("log_logins") + ->label(t("Log Logins")) + ->options(array("Yes" => t("Yes"), + "No" => t("No"))) + ->selected(module::get_var("user_info", "log_logins")); + $user_infoGroup->input("color_login") + ->label(t("Login Color - Hex Only - HTML Colors",array("color_login" => module::get_var("user_info", "color_login")))) + ->value(module::get_var("user_info", "color_login")); + $user_infoGroup->dropdown("log_logouts") + ->label(t("Log Logouts")) + ->options(array("Yes" => t("Yes"), + "No" => t("No"))) + ->selected(module::get_var("user_info", "log_logouts")); + $user_infoGroup->input("color_logout") + ->label(t("Logout Color - Hex Only - HTML Colors",array("color_logout" => module::get_var("user_info", "color_logout")))) + ->value(module::get_var("user_info", "color_logout")); + $user_infoGroup->dropdown("log_failed_logins") + ->label(t("Log Failed Logins")) + ->options(array("Yes" => t("Yes"), + "No" => t("No"))) + ->selected(module::get_var("user_info", "log_failed_logins")); + $user_infoGroup->input("color_failed_login") + ->label(t("Failed Login Color - Hex Only - HTML Colors",array("color_failed_login" => module::get_var("user_info", "color_failed_login")))) + ->value(module::get_var("user_info", "color_failed_login")); + $user_infoGroup->dropdown("log_re_authenticate_logins") + ->label(t("Log Re-Authenticate Logins")) + ->options(array("Yes" => t("Yes"), + "No" => t("No"))) + ->selected(module::get_var("user_info", "log_re_authenticate_logins")); + $user_infoGroup->input("color_re_authenticate_login") + ->label(t("Re-Authenticate Login Color - Hex Only - HTML Colors",array("color_re_authenticate_login" => module::get_var("user_info", "color_re_authenticate_login")))) + ->value(module::get_var("user_info", "color_re_authenticate_login")); + $user_infoGroup->dropdown("log_user_created") + ->label(t("Log User Created")) + ->options(array("Yes" => t("Yes"), + "No" => t("No"))) + ->selected(module::get_var("user_info", "log_user_created")); + $user_infoGroup->input("color_user_created") + ->label(t("User Created Color - Hex Only - HTML Colors",array("color_user_created" => module::get_var("user_info", "color_user_created")))) + ->value(module::get_var("user_info", "color_user_created")); + + // Add a save button to the form. + $form->submit("SaveSettings")->value(t("Save")); + + // Return the newly generated form. + return $form; + } + + + + + + + public function lookupip() { + // Generate a new admin page. + $view = new Admin_View("admin.html"); + $view->page_title = t("User Info: Lookup IP Address"); + $view->content = new View("admin_user_info_lookupip.html"); +// $view->content->block_ip_address = $this->_get_block_ip_address_form(); + print $view; + } + + + + + + + public function blockip() { + // Prevent Cross Site Request Forgery + access::verify_csrf(); + + // Figure out the values of the text boxes + // Figure out the ip address to block + $str_per_page = Input::instance()->post("per_page"); + $str_default_sort_column = Input::instance()->post("default_sort_column"); + + // Block IP Addresss. + module::set_var("user_info", "per_page", $str_per_page); + message::success(t("Your Settings Have Been Saved.")); + + // Load Admin page. + // $view = new Admin_View("admin.html"); + // $view->page_title = t("User Information Settings"); + // $view->content = new View("admin_user_info.html"); + // $view->content->user_info_form = $this->_get_admin_form(); + // print $view; + + $view = new Admin_View("admin.html"); + $view->page_title = t("User Info: Lookup IP Address"); + $view->content = new View("admin_user_info_lookupip.html"); + $view->content->block_ip_address = $this->_get_block_ip_address_form(); + + print $view; + + } + + + private function _get_block_ip_address_form() { + // Make a new Form. +// $form = new Forge("admin/user_info/blockip", "", "post", +// array("id" => "g-user_info-block-ip-address-form")); +// +// // Create the input boxes for the User Information Settings +// $block_ipGroup = $form->group("BlockIPAddress"); +// $block_ipGroup->dropdown("per_page") +// ->label(t("Number of records to display per page")) +// ->options(array("25" => t("25"), +// "50" => t("50"), +// "75" => t("75"), +// "100" => t("100"), +// "125" => t("125"), +// "150" => t("150"))) +// ->selected(module::get_var("user_info", "per_page")); +// $block_ipGroup->input("date_format") +// ->label(t("Format of the Date & Time - PHP Date")) +// ->value(module::get_var("user_info", "date_format")); +// $block_ipGroup->input("color_login") +// ->label(t("Login Color - HTML Colors")) +// ->value(module::get_var("user_info", "color_login")); +// ->value(module::get_var("user_info", "color_failed_login")); +// +// // Add a save button to the form. +// $form->submit("SaveSettings")->value(t("Block IP Address")); +// +// // Return the newly generated form. +// return $form; + } + + + + +} + diff --git a/modules/user_info/helpers/user_info_block.php b/modules/user_info/helpers/user_info_block.php new file mode 100755 index 0000000..86820c9 --- /dev/null +++ b/modules/user_info/helpers/user_info_block.php @@ -0,0 +1,56 @@ + t("User Information")); + } + + static function get($block_id) { + $block = new Block(); + switch ($block_id) { + case "user_info": + $block->css_id = "g-user_info"; + $block->title = t("User Information"); + $block->content = new View("admin_block_user_info.html"); + $block->content->number_of_records = ORM::factory("user_info")->count_all(); + + // helps build the pagniation + $page_size = module::get_var("user_info", "per_page"); + $page = Input::instance()->get("page", "1"); + $builder = db::build(); + $user_count = $builder->from("user_infos")->count_records(); + $block->content->pager = new Pagination(); + $block->content->pager->initialize( + array("query_string" => "page", + "total_items" => $user_count, + "items_per_page" => $page_size, + "style" => "classic")); + // Make sure that the page references a valid offset + if ($page < 1) { +// This prevents the admin page from displaying if there are no records in the database, commented out to temp. fix +// url::redirect(url::merge(array("page" => 1))); + url::site("admin"); //This should fix the issue I think + } else if ($page > $block->content->pager->total_pages) { + url::redirect(url::merge(array("page" => $block->content->pager->total_pages))); + } + // Get the user defined settings for sort by and sort order + $default_sort_column = module::get_var("user_info", "default_sort_column"); + $default_sort_order = module::get_var("user_info", "default_sort_order"); + $block->content->data = ORM::factory("user_info") + ->order_by($default_sort_column, $default_sort_order) + ->find_all($page_size, $block->content->pager->sql_offset); + +// $block->content->data = ORM::factory("user_info")->find_all(); + + $block->content->use_default_gallery_date_format = module::get_var("user_info", "use_default_gallery_date_format"); + $block->content->date_format = module::get_var("user_info", "date_format"); + $block->content->color_login = module::get_var("user_info", "color_login"); + $block->content->color_logout = module::get_var("user_info", "color_logout"); + $block->content->color_failed_login = module::get_var("user_info", "color_failed_login"); + $block->content->color_re_authenticate_login = module::get_var("user_info", "color_re_authenticate_login"); + $block->content->color_user_created = module::get_var("user_info", "color_user_created"); + + break; + } + return $block; + } +} diff --git a/modules/user_info/helpers/user_info_event.php b/modules/user_info/helpers/user_info_event.php new file mode 100755 index 0000000..8a76ba0 --- /dev/null +++ b/modules/user_info/helpers/user_info_event.php @@ -0,0 +1,100 @@ +get("settings_menu") + ->append(Menu::factory("link") + ->id("user_info") + ->label(t("User Info")) + ->url(url::site("admin/user_info"))); + } + + static function user_login() { + $log_logins = module::get_var("user_info", "log_logins"); + if ($log_logins == "Yes") { + $user_info = ORM::factory("user_info"); + $user_info->user_id = identity::active_user()->id; + $user_info->user_name = identity::active_user()->name; + $user_info->ip_address = $_SERVER['REMOTE_ADDR']; + $user_info->time_stamp = time(); + $user_info->action = "Login"; + $user_info->save(); + } + } + + static function user_logout($user) { + $log_logouts = module::get_var("user_info", "log_logouts"); + if ($log_logouts == "Yes") { + $user_info = ORM::factory("user_info"); + $user_info->user_id = $user->id; + $user_info->user_name = $user->name; + $user_info->ip_address = $_SERVER['REMOTE_ADDR']; + $user_info->time_stamp = time(); + $user_info->action = "Logout"; + $user_info->save(); + } + } + + static function user_auth_failed($user_name) { + $log_failed_logins = module::get_var("user_info", "log_failed_logins"); + if ($log_failed_logins == "Yes") { + $user_info = ORM::factory("user_info"); + if (identity::lookup_user_by_name($user_name)) { + $user_info->user_id = identity::lookup_user_by_name($user_name)->id; + } else { + $user_info->user_id = ""; + } + $user_info->user_name = $user_name; + $user_info->ip_address = $_SERVER['REMOTE_ADDR']; + $user_info->time_stamp = time(); + $user_info->action = "Failed Login"; + $user_info->save(); + } + } + + static function user_auth($user) { + $log_re_authenticate_logins = module::get_var("user_info", "log_re_authenticate_logins"); + if ($log_re_authenticate_logins == "Yes") { + $user_info = ORM::factory("user_info"); + $user_info->user_id = $user->id; + $user_info->user_name = $user->name; + $user_info->ip_address = $_SERVER['REMOTE_ADDR']; + $user_info->time_stamp = time(); + $user_info->action = "Re-Authenticate Login"; + $user_info->save(); + } + } + + static function user_created($pending_user) { + $log_user_created = module::get_var("user_info", "log_user_created"); + if ($log_user_created == "Yes") { + $user_info = ORM::factory("user_info"); + $user_info->user_id = $pending_user->id; + $user_info->user_name = $pending_user->name; + $user_info->ip_address = $_SERVER['REMOTE_ADDR']; + $user_info->time_stamp = time(); + $user_info->action = "User Created"; + $user_info->save(); + } + } + + +} diff --git a/modules/user_info/helpers/user_info_installer.php b/modules/user_info/helpers/user_info_installer.php new file mode 100755 index 0000000..2bb0b69 --- /dev/null +++ b/modules/user_info/helpers/user_info_installer.php @@ -0,0 +1,82 @@ +query("CREATE TABLE IF NOT EXISTS {user_infos} ( + `id` int(11) NOT NULL auto_increment, + `user_id` varchar(128) default NULL, + `user_name` varchar(128) default NULL, + `ip_address` varchar(255) default NULL, + `time_stamp` varchar(128) default NULL, + `action` varchar(128) default NULL, + PRIMARY KEY (`id`)) + DEFAULT CHARSET=utf8;"); + + module::set_var("user_info", "per_page", 25); + module::set_var("user_info", "default_sort_column", "id"); + module::set_var("user_info", "default_sort_order", "DESC"); + module::set_var("user_info", "use_default_gallery_date_format", "Yes"); + module::set_var("user_info", "date_format", "D d M Y h:i:s A T"); + module::set_var("user_info", "log_logins", "Yes"); + module::set_var("user_info", "color_login", "#008000"); + module::set_var("user_info", "log_logouts", "Yes"); + module::set_var("user_info", "color_logout", "#0000FF"); + module::set_var("user_info", "log_failed_logins", "Yes"); + module::set_var("user_info", "color_failed_login", "#FF0000"); + module::set_var("user_info", "log_re_authenticate_logins", "No"); + module::set_var("user_info", "color_re_authenticate_login", "#800080"); + module::set_var("user_info", "log_user_created", "No"); + module::set_var("user_info", "color_user_created", "#FF8C00"); + module::set_version("user_info", 1); + } + + + static function upgrade($version) { +// $db = Database::instance(); + if ($version == 1) { +// $db->query("ALTER TABLE {comments} CHANGE `state` `state` varchar(15) default 'unpublished'"); + module::set_version("user_info", $version = 2); + } +// +// if ($version == 2) { +// module::set_var("comment", "access_permissions", "everybody"); +// module::set_version("comment", $version = 3); +// } + } + + + + static function uninstall() { +// $db = Database::instance(); +// $db->query("DROP TABLE IF EXISTS {userinfo};"); +// /* @todo Put database table drops here */ +// module::delete("userinfo"); + } + + +// static function deactivate() { +// site_status::clear("user_info"); +// $db = Database::instance(); +// $db->query("DROP TABLE IF EXISTS {user_infos};"); +// } + + +} diff --git a/modules/user_info/models/user_info.php b/modules/user_info/models/user_info.php new file mode 100755 index 0000000..ec07b7e --- /dev/null +++ b/modules/user_info/models/user_info.php @@ -0,0 +1,21 @@ + + +
    +

    here.

    User Created - Logs users that the Admin creates and can log the users that are created by visitors when using the Registration Module and the Registration Module is set to 'Visitors can create accounts and no administrator approval is required'.", + array("user_info_configure" => html::mark_clean(url::site("admin/user_info")))) ?>

    +
    + +
    + + + + + 0) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + 0) { ?> + + + + + + + + + + + + + + + + + + + + + +
    $number_of_records)) ?>
    id ?>user_id ?> + user_id){ ?> + user_id") ?>" target="_blank">user_name) ?> + + user_name ?>
    + +
    + ip_address") ?>" target="_blank">ip_address) ?> + + + time_stamp) ?> + time_stamp); + } + ?> + + action) + { + case "Failed Login": + echo ""; + echo $myData->action; + echo ""; + break; + + case "Login": + echo ""; + echo $myData->action; + echo ""; + break; + + case "Logout": + echo ""; + echo $myData->action; + echo ""; + break; + + case "Re-Authenticate Login": + echo ""; + echo $myData->action; + echo ""; + break; + + case "User Created": + echo ""; + echo $myData->action; + echo ""; + break; + + default: + echo ""; + echo $myData->action; + echo ""; + } + ?> +
    +
    diff --git a/modules/user_info/views/admin_user_info.html.php b/modules/user_info/views/admin_user_info.html.php new file mode 100755 index 0000000..3ae6986 --- /dev/null +++ b/modules/user_info/views/admin_user_info.html.php @@ -0,0 +1,6 @@ + +
    +

    + +
    + diff --git a/modules/user_info/views/admin_user_info_lookupip.html.php b/modules/user_info/views/admin_user_info_lookupip.html.php new file mode 100755 index 0000000..4be1b29 --- /dev/null +++ b/modules/user_info/views/admin_user_info_lookupip.html.php @@ -0,0 +1,8 @@ + + +

    +

    +

    [x]

    + diff --git a/themes/clean_canvas/admin/controllers/admin_theme_options.php b/themes/clean_canvas/admin/controllers/admin_theme_options.php new file mode 100755 index 0000000..68dc189 --- /dev/null +++ b/themes/clean_canvas/admin/controllers/admin_theme_options.php @@ -0,0 +1,134 @@ +page_title = t("Theme options"); + $view->content = new View("admin_theme_options.html"); + $view->content->form = $this->_get_edit_form_admin(); + print $view; + } + + public function save() { + access::verify_csrf(); + + $form = $this->_get_edit_form_admin(); + if ($form->validate()) { + module::set_var("theme_clean_canvas", "wide", $form->theme_appearance->wide->value); + module::set_var("theme_clean_canvas", "color_variant", $form->theme_appearance->color_variant->value); + + module::set_var("theme_clean_canvas", "use_shadowbox", $form->additional_modules->use_shadowbox->value); + module::set_var("theme_clean_canvas", "use_shadowbox_instead_photopage", $form->additional_modules->use_shadowbox_instead_photopage->value); + + module::set_var("gallery", "page_size", $form->edit_theme->page_size->value); + + $thumb_size = $form->edit_theme->thumb_size->value; + $thumb_dirty = false; + if (module::get_var("gallery", "thumb_size") != $thumb_size) { + graphics::remove_rule("gallery", "thumb", "gallery_graphics::resize"); + graphics::add_rule( + "gallery", "thumb", "gallery_graphics::resize", + array("width" => $thumb_size, "height" => $thumb_size, "master" => Image::AUTO), + 100); + module::set_var("gallery", "thumb_size", $thumb_size); + } + + $resize_size = $form->edit_theme->resize_size->value; + $resize_dirty = false; + if (module::get_var("gallery", "resize_size") != $resize_size) { + graphics::remove_rule("gallery", "resize", "gallery_graphics::resize"); + graphics::add_rule( + "gallery", "resize", "gallery_graphics::resize", + array("width" => $resize_size, "height" => $resize_size, "master" => Image::AUTO), + 100); + module::set_var("gallery", "resize_size", $resize_size); + } + + module::set_var("gallery", "header_text", $form->edit_theme->header_text->value); + module::set_var("gallery", "footer_text", $form->edit_theme->footer_text->value); + module::set_var("gallery", "show_credits", $form->edit_theme->show_credits->value); + module::set_var("gallery", "favicon_url", $form->edit_theme->favicon_url->value); + + module::event("theme_edit_form_completed", $form); + + message::success(t("Updated theme details")); + url::redirect("admin/theme_options"); + } else { + $view = new Admin_View("admin.html"); + $view->content = new View("admin_theme_options.html"); + $view->content->form = $form; + print $view; + } + } + + private function _get_edit_form_admin() { + $form = new Forge("admin/theme_options/save/", "", null, array("id" =>"g-theme-options-form")); + + $group = $form->group("theme_appearance")->label("Theme appearance"); + $group->checkbox("wide")->label(t("Use wide layout instead of fixed width")) + ->checked((module::get_var("theme_clean_canvas", "wide"))); + $group->dropdown("color_variant")->label(t("Color variant")) + ->options(array("clean" => t("Clean Canvas"), "dark" => t("Dark Canvas"))) + ->selected(module::get_var("theme_clean_canvas", "color_variant")); + + $group = $form->group("additional_modules")->label("Additional supported modules"); + $group->checkbox("shadowbox_available")->label(t("Shadowbox module available")) + ->checked((module::is_active("shadowbox")))->disabled(true); + $group->checkBox("use_shadowbox")->label(t("Use shadowbox functionality")) + ->checked((module::get_var("theme_clean_canvas", "use_shadowbox"))) + ->enabled(module::is_active("shadowbox")); + $group->checkBox("use_shadowbox_instead_photopage")->label(t("Use shadowbox functionality in album instead of going to photo page (experimental)")) + ->checked((module::get_var("theme_clean_canvas", "use_shadowbox_instead_photopage"))) + ->enabled(module::is_active("shadowbox")); + + $group = $form->group("edit_theme")->label(t("Theme layout")); + $group->input("page_size")->label(t("Items per page"))->id("g-page-size") + ->rules("required|valid_digit") + ->error_messages("required", t("You must enter a number")) + ->error_messages("valid_digit", t("You must enter a number")) + ->value(module::get_var("gallery", "page_size")); + $group->input("thumb_size")->label(t("Thumbnail size (in pixels)"))->id("g-thumb-size") + ->rules("required|valid_digit") + ->error_messages("required", t("You must enter a number")) + ->error_messages("valid_digit", t("You must enter a number")) + ->value(module::get_var("gallery", "thumb_size")); + $group->input("resize_size")->label(t("Resized image size (in pixels)"))->id("g-resize-size") + ->rules("required|valid_digit") + ->error_messages("required", t("You must enter a number")) + ->error_messages("valid_digit", t("You must enter a number")) + ->value(module::get_var("gallery", "resize_size")); + $group->input("favicon_url")->label(t("URL (or relative path) to your favicon.ico")) + ->id("g-favicon") + ->value(module::get_var("gallery", "favicon_url")); + $group->textarea("header_text")->label(t("Header text"))->id("g-header-text") + ->value(module::get_var("gallery", "header_text")); + $group->textarea("footer_text")->label(t("Footer text"))->id("g-footer-text") + ->value(module::get_var("gallery", "footer_text")); + $group->checkbox("show_credits")->label(t("Show site credits"))->id("g-footer-text") + ->checked(module::get_var("gallery", "show_credits")); + + module::event("theme_edit_form", $form); + + $group = $form->group("buttons"); + $group->submit("")->value(t("Save")); + return $form; + } +} + diff --git a/themes/clean_canvas/css/calendarview_menu.css b/themes/clean_canvas/css/calendarview_menu.css new file mode 100755 index 0000000..600cc15 --- /dev/null +++ b/themes/clean_canvas/css/calendarview_menu.css @@ -0,0 +1,3 @@ +#g-view-menu #g-calendarview-link { + background-image: url('../images/ico-view-calendarview.png'); +} diff --git a/themes/clean_canvas/css/clean/screen_candy.css b/themes/clean_canvas/css/clean/screen_candy.css new file mode 100755 index 0000000..2cb9d6e --- /dev/null +++ b/themes/clean_canvas/css/clean/screen_candy.css @@ -0,0 +1,406 @@ +/** + * Gallery 3 Clean Canvas Theme Screen Styles + * + * @requires YUI reset, font, grids CSS + * + * Sheet organization: + * 1) Font sizes, base HTML elements + * 2) Reusable content blocks + * 3) Page layout containers + * 4) Content blocks in specific layout containers + * 5) States and interactions + * 6) Positioning and order + * 7) Navigation and menus + * 8) jQuery and jQuery UI + * 9) Right-to-left language styles + */ + +/** ******************************************************************* + * 1) Font sizes, base HTML elements + **********************************************************************/ + +#g-sidebar .g-block h2 { + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -khtml-border-radius: 5px; + border-radius: 5px; +} + +#g-sidebar{ + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + -khtml-border-radius: 10px; + border-radius: 10px; + box-shadow: 1px 2px 8px #333; + -moz-box-shadow: 1px 2px 8px #333; + -webkit-box-shadow: 1px 2px 8px #333; +} + +.g-thumbnail, #g-photo img +{ + -webkit-border-radius: 10px; + -khtml-border-radius: 10px; + border-radius: 10px; + box-shadow: 3px 3px 8px #333; + -moz-box-shadow: 3px 3px 8px #333; + -webkit-box-shadow: 3px 3px 8px #333; +} + +/* Links ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +a, +.g-menu a, +#g-dialog a, +.g-button, +.g-button:hover, +.g-button:active, +a.ui-state-hover, +input.ui-state-hover, +button.ui-state-hover { + -moz-outline-style: none; +} + +#g-banner a +{ + cursor: pointer !important; + -moz-outline-style: none; +} + +/* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +fieldset { + border: 1px solid #ccc; +} + +#g-banner fieldset, +#g-sidebar fieldset { + border: none; +} + +input.textbox, +input[type="text"], +input[type="password"], +textarea { + border: 1px solid #e8e8e8; + +} + + +/* Forms in dialogs and panels ~~~~~~~~~ */ + + +#g-dialog fieldset, +#g-panel fieldset { + border: none; +} + +/* Short forms ~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-short-form fieldset { + border: none; +} + +.g-short-form .textbox.g-error { + border: 1px solid #f00; +} + +/* Tables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +th, +td { + border: none; + border-bottom: 1px solid #ccc; +} + +/** ******************************************************************* + * 2) Reusable content blocks + *********************************************************************/ + + +/*** ****************************************************************** + * 3) Page layout containers + *********************************************************************/ + +/* View container ~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-view { + border-bottom: none; +} + +/* Layout containers ~~~~~~~~~~~~~~~~~~~~~ */ + +#g-banner { + -moz-border-radius: 10px 10px 0px 0px; + -webkit-border-radius: 10px 10px 0px 0px; + -khtml-border-radius: 10px 10px 0px 0px; + border-radius: 10px 10px 0px 0px; +} + +/** ******************************************************************* + * 4) Content blocks in specific layout containers + *********************************************************************/ + + +#g-content #g-album-grid .g-hover-item { + -moz-border-radius: 10px 10px 0px 0px; + -webkit-border-radius: 10px 10px 0px 0px; + -khtml-border-radius: 10px 10px 0px 0px; + border-radius: 10px 10px 0px 0px; + + box-shadow: 3px 3px 8px #333; + -moz-box-shadow: 3px 3px 8px #333; + -webkit-box-shadow: 3px 3px 8px #333; +} + + + +#g-edit-permissions-form fieldset { + border: 1px solid #ccc; +} + +#g-permissions .g-breadcrumbs a { + border: 1px solid #fff; +} + +.g-editable:hover { + cursor: text; +} + +.g-draggable { + cursor: move; +} + +.g-draggable:hover { + border: 1px dashed #000; +} + + +/** ******************************************************************* + * 6) Positioning and order + **********************************************************************/ + +/** ******************************************************************* + * 7) Navigation and menus + *********************************************************************/ + +/* Login menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + +/* Site Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +#g-site-menu ul li:hover { + border-radius: 10px; + -moz-border-radius: 10px; + -webkit-border-radius; 10px; +} + +#g-site-menu ul li ul li:hover, #g-site-menu a:hover, #g-site-menu a:active, #g-site-menu a:focus { + border-radius: 10px; + -moz-border-radius: 10px; + -webkit-border-radius; 10px; +} + +#g-site-menu ul { + border-radius: 10px; + -moz-border-radius: 10px; + -webkit-border-radius; 10px; +} + +/* Context Menu ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + +.g-context-menu li { + border-left: none; + border-right: none; + border-bottom: none; +} + +.g-context-menu li a { + line-height: 1.6em; +} + +/* View Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-view-menu { + border-bottom: 1px solid #050505; +} + +#g-view-menu a { + background-repeat: no-repeat; + background-position: 50% 50%; +} + +/** ******************************************************************* + * 8) jQuery and jQuery UI + *********************************************************************/ + +.sf-menu a +{ + border: 0 none; +} + +/* jQuery UI Dialog ~~~~~~~~~~~~~~~~~~~~~~ */ + +.ui-widget-overlay { + opacity: .7; +} + +/* Buttons ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-button, +.g-button:hover, +.g-button:active { + cursor: pointer !important; + outline: 0; + -moz-outline-style: none; +} + + +/* jQuery UI ThemeRoller buttons ~~~~~~~~~ */ + + +/* Status and validation messages ~~~~ */ + +.g-message-block { + border: 1px solid #ccc; +} + + +/** ******************************************************************* + * 9) Right to left language styles + *********************************************************************/ + + +/* RTL Corner radius ~~~~~~~~~~~~~~~~~~~~~~ */ +.rtl .g-buttonset .ui-corner-tl { + -moz-border-radius-topleft: 0; + -webkit-border-top-left-radius: 0; + border-top-left-radius: 0; + -moz-border-radius-topright: 5px !important; + -webkit-border-top-right-radius: 5px !important; + border-top-right-radius: 5px !important; +} + +.rtl .g-buttonset .ui-corner-tr { + -moz-border-radius-topright: 0; + -webkit-border-top-right-radius: 0; + border-top-right-radius: 0; + -moz-border-radius-topleft: 5px !important; + -webkit-border-top-left-radius: 5px !important; + border-top-left-radius: 5px !important; +} + +.rtl .g-buttonset .ui-corner-bl { + -moz-border-radius-bottomleft: 0; + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-bottomright: 5px !important; + -webkit-border-bottom-right-radius: 5px !important; + border-bottom-right-radius: 5px !important; +} + +.rtl .g-buttonset .ui-corner-br { + -moz-border-radius-bottomright: 0; + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomleft: 5px !important; + -webkit-border-bottom-left-radius: 5px !important; + border-bottom-left-radius: 5px !important; +} + +.rtl .g-buttonset .ui-corner-right, +.rtl .ui-progressbar .ui-corner-right { + -moz-border-radius-topright: 0; + -webkit-border-top-right-radius: 0; + border-top-right-radius: 0; + -moz-border-radius-topleft: 5px !important; + -webkit-border-top-left-radius: 5px !important; + border-top-left-radius: 5px !important; + -moz-border-radius-bottomright: 0; + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomleft: 5px !important; + -webkit-border-bottom-left-radius: 5px !important; + border-bottom-left-radius: 5px !important; +} + +.rtl .g-buttonset .ui-corner-left, +.rtl .ui-progressbar .ui-corner-left { + -moz-border-radius-topleft: 0; + -webkit-border-top-left-radius: 0; + border-top-left-radius: 0; + -moz-border-radius-topright: 5px !important; + -webkit-border-top-right-radius: 5px !important; + border-top-right-radius: 5px !important; + -moz-border-radius-bottomleft: 0; + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-bottomright: 5px !important; + -webkit-border-bottom-right-radius: 5px !important; + border-bottom-right-radius: 5px !important; +} + +/* RTL Superfish ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.rtl .sf-menu a { + border-left: none; + border-right:1px solid #fff; +} + +/*** shadows for all but IE6 ***/ +.rtl .sf-shadow ul { + border-top-right-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-topright: 0; + -moz-border-radius-bottomleft: 0; + -webkit-border-top-right-radius: 0; + -webkit-border-bottom-left-radius: 0; + -moz-border-radius-topleft: 17px; + -moz-border-radius-bottomright: 17px; + -webkit-border-top-left-radius: 17px; + -webkit-border-bottom-right-radius: 17px; + border-top-left-radius: 17px; + border-bottom-right-radius: 17px; +} + + + +#doc3 +{ + box-shadow: 4px 4px 12px #333; + -moz-box-shadow: 4px 4px 12px #333; + -webkit-box-shadow: 4px 4px 12px #333; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + -khtml-border-radius: 10px; + border-radius: 10px; +} + +#doc4 +{ + box-shadow: 4px 4px 12px #333; + -moz-box-shadow: 4px 4px 12px #333; + -webkit-box-shadow: 4px 4px 12px #333; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + -khtml-border-radius: 10px; + border-radius: 10px; +} +.g-thumbnail:hover { + box-shadow: 4px 4px 12px #333; + -moz-box-shadow: 4px 4px 12px #333; + -webkit-box-shadow: 4px 4px 12px #333; +} +#g-banner { + border-bottom: 1px solid #050505; + -moz-opacity:.9; + -webkit-opacity:.9; + opacity:.9; +} + +#g-footer { + border-top: 1px solid #050505; + -moz-border-radius: 0px 0px 10px 10px; + -webkit-border-radius: 0px 0px 10px 10px; + -khtml-border-radius: 0px 0px 10px 10px; + border-radius: 0px 0px 10px 10px; +} + diff --git a/themes/clean_canvas/css/clean/screen_colors.css b/themes/clean_canvas/css/clean/screen_colors.css new file mode 100755 index 0000000..14a4fb6 --- /dev/null +++ b/themes/clean_canvas/css/clean/screen_colors.css @@ -0,0 +1,407 @@ +/** + * Gallery 3 Clean Canvas Theme Screen Styles + * + * @requires YUI reset, font, grids CSS + * + * Sheet organization: + * 1) Font sizes, base HTML elements + * 2) Reusable content blocks + * 3) Page layout containers + * 4) Content blocks in specific layout containers + * 5) States and interactions + * 6) Positioning and order + * 7) Navigation and menus + * 8) jQuery and jQuery UI + * 9) Right-to-left language styles + */ + +/** ******************************************************************* + * 1) Font sizes, base HTML elements + **********************************************************************/ + +body, html { + background-color: #fff; + background: url("../../images/clean/page_background.jpg"); + color: #555; /* font-family: 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;*/ +} + +#g-sidebar .g-block h2 { + background: rgba( 255,255,255,0.5 ); +} + +#g-sidebar{ + background:url("../../images/clean/background_header.jpg"); +} + + +/* Links ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +a, +.g-menu a, +#g-dialog a, +.g-button, +.g-button:hover, +.g-button:active, +a.ui-state-hover, +input.ui-state-hover, +button.ui-state-hover { + color: #3C5580 !important; +} + +#g-banner a +{ + color: #3C5580; +} + +.g-menu li, +.g-menu ul { + background: transparent !important; +} + +/* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +input.textbox, +input[type="text"], +input[type="password"], +textarea { + border-top-color: #ccc; + border-left-color: #ccc; + color: #333; +} + +input:focus, +input.textbox:focus, +input[type=text]:focus, +textarea:focus, +option:focus { + background-color: #ffc; + color: #000; +} + +input[readonly] { + background-color: #F4F4FC; +} + +/* Short forms ~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-short-form .textbox, +.g-short-form input[type=text] { + color: #666; +} + +.g-short-form .textbox.g-error { + color: #f00; +} + + +/** ******************************************************************* + * 2) Reusable content blocks + *********************************************************************/ + + +/*** ****************************************************************** + * 3) Page layout containers + *********************************************************************/ + +/* View container ~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-view { + background: url("../../images/clean/background2.jpg"); +} + +/* Layout containers ~~~~~~~~~~~~~~~~~~~~~ */ + +#g-banner { + background: url("../../images/clean/background_header.jpg"); +} + +#g-footer { + background:url("../../images/clean/background_header.jpg"); +} + +/** ******************************************************************* + * 4) Content blocks in specific layout containers + *********************************************************************/ + +/* Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-content .g-block h2 { + background-color: transparent; +} + +/* Album content ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-content #g-album-grid .g-album h2 span.g-album { + background: transparent url('../../images/clean/ico-album.png') no-repeat top left; +} + +#g-content #g-album-grid .g-hover-item { + background:url("../../images/clean/background_header.jpg"); +} + + +/* In-line editing ~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-in-place-edit-message { + background-color: #fff; +} + +/* Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +#g-edit-permissions-form td { + background-image: none; +} + +#g-permissions .g-denied { + background-color: #fcc; +} + +#g-permissions .g-allowed { + background-color: #cfc; +} + + +#g-permissions .g-active a { + background: #eee; +} + +/** ******************************************************************* + * 5) States and interactions + **********************************************************************/ + +.g-inactive, +.g-disabled, +.g-unavailable, +.g-uneditable, +.g-locked, +.g-deselected, +.g-understate { + color: #ccc; +} + +.g-editable:hover { + background-color: #ffc; +} + +form li.g-error, +form li.g-info, +form li.g-success, +form li.g-warning { + background-image: none; +} + +.g-error, +.g-denied, +tr.g-error td.g-error, +#g-add-photos-status .g-error { + background: #f6cbca url('../../images/clean/ico-error.png') no-repeat .4em 50%; + color: #f00; +} + +.g-info { + background: #e8e8e8 url('../../images/clean/ico-info.png') no-repeat .4em 50%; +} + +.g-success, +.g-allowed, +#g-add-photos-status .g-success { + background: #d9efc2 url('../../images/clean/ico-success.png') no-repeat .4em 50%; +} + +tr.g-success { + background-image: none; +} + +tr.g-success td.g-success { + background-image: url('../../images/clean/ico-success.png'); +} + +.g-warning, +tr.g-warning td.g-warning { + background: #fcf9ce url('../../images/clean/ico-warning.png') no-repeat .4em 50%; +} + +form .g-error { + background-color: #fff; +} + +.g-installed { + background-color: #eeeeee; +} + +.g-default { + background-color: #c5dbec; +} + +.ui-sortable .g-target, +.ui-state-highlight { + background-color: #fcf9ce; +} + +/* Ajax loading indicator ~~~~~~~~~~~~~~~~ */ + +.g-loading-large, +.g-dialog-loading-large { + background: #e8e8e8 url('../../images/clean/loading-large.gif') no-repeat center center !important; +} + +.g-loading-small { + background: #e8e8e8 url('../../images/clean/loading-small.gif') no-repeat center center !important; +} + +/** ******************************************************************* + * 6) Positioning and order + **********************************************************************/ + +.g-even { + background-color: #fff; +} + +.g-odd { + background-color: #eee; +} + +/** ******************************************************************* + * 7) Navigation and menus + *********************************************************************/ + + +#g-site-menu ul li:hover { + background-color: #CCC !important; +} + +#g-site-menu ul li ul li:hover, #g-site-menu a:hover, #g-site-menu a:active, #g-site-menu a:focus { + background-color: #AAA !important; +} +#g-site-menu ul { + background-color: #CCC; +} + +#g-site-menu ul li ul { + background-color: #CCC !important; +} + +/* Context Menu ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-context-menu { + background-color: #fff; +} + +#g-view-menu #g-slideshow-link { + background-image: url('../../images/clean/ico-view-slideshow.png'); +} + +#g-view-menu .g-fullsize-link { + background-image: url('../../images/clean/ico-view-fullsize.png'); +} + +#g-view-menu #g-comments-link { + background-image: url('../../images/clean/ico-view-comments.png'); +} + +#g-view-menu #g-print-digibug-link { + background-image: url('../../images/clean/ico-print.png'); +} + +/** ******************************************************************* + * 8) jQuery and jQuery UI + *********************************************************************/ + +.sfHover li +{ + background-color: #CCC; +} + +.sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active +{ + background-color: #FFF; +} +.sf-menu li li, +.sf-menu li li ul li { + /* background: rgba( 255,255,255,0.5 );*/ + background-color: #CCC; +} + +.sfmenu li { + background-color: #CCC; + background:#CCC; +} + +.sf-menu li:hover { +/* background-color: #dfe9ff;*/ + background-color: #CCC; +} + +/* jQuery UI Dialog ~~~~~~~~~~~~~~~~~~~~~~ */ + +.ui-widget-overlay { + background: #000; +} + + + +/* Breadcrumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-breadcrumbs li { + background: transparent url('../../images/clean/ico-separator.gif') no-repeat scroll left center; +} + +.g-breadcrumbs .g-first { + background: none; +} + + +/* Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-paginator .g-info { + background: none; +} + + +/* Autocomplete ~~~~~~~~~~ */ +.ac_loading { + background: white url('../../images/clean/loading-small.gif') right center no-repeat !important; +} + +/** ******************************************************************* + * 9) Right to left language styles + *********************************************************************/ + + +.rtl .g-breadcrumbs li { + background: transparent url('../../images/clean/ico-separator-rtl.gif') no-repeat scroll right center; +} + +.rtl .g-breadcrumbs .g-first { + background: none; +} + + +/* RTL Superfish ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.rtl .sf-sub-indicator { + background: url('../../../../lib/superfish/images/arrows-ffffff-rtl.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */ +} + +/*** shadows for all but IE6 ***/ +.rtl .sf-shadow ul { + background: url('../../../../lib/superfish/images/shadow.png') no-repeat bottom left; +} + +.rtl #g-view-menu #g-slideshow-link { + background-image: url('../../images/clean/ico-view-slideshow-rtl.png'); +} + +#g-banner ul li a +{ + color: #3C5580 !important; +} + +#g-site-menu ul li a +{ + color: #3C5580 !important; +} + +#g-view-menu #g-download-archive-link { + background-image: url('../../images/clean/ico-view-downloadarchive_new.png') !important; +} + diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-bg_flat_0_aaaaaa_40x100.png b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100755 index 0000000..5b5dab2 Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-bg_flat_20_aaaaaa_40x100.png b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_flat_20_aaaaaa_40x100.png new file mode 100755 index 0000000..5b5dab2 Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_flat_20_aaaaaa_40x100.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-bg_flat_55_e6e4d0_40x100.png b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_flat_55_e6e4d0_40x100.png new file mode 100755 index 0000000..04cbfd1 Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_flat_55_e6e4d0_40x100.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-bg_glass_75_dedede_1x400.png b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_glass_75_dedede_1x400.png new file mode 100755 index 0000000..c83fe5f Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_glass_75_dedede_1x400.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-bg_glass_85_e6e6e6_1x400.png b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_glass_85_e6e6e6_1x400.png new file mode 100755 index 0000000..c1377bd Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_glass_85_e6e6e6_1x400.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-bg_glass_95_f4f2f1_1x400.png b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_glass_95_f4f2f1_1x400.png new file mode 100755 index 0000000..7a6e70d Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_glass_95_f4f2f1_1x400.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-bg_gloss-wave_55_7a7a7a_500x100.png b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_gloss-wave_55_7a7a7a_500x100.png new file mode 100755 index 0000000..22f1f30 Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_gloss-wave_55_7a7a7a_500x100.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-bg_inset-hard_100_f5f8f9_1x100.png b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_inset-hard_100_f5f8f9_1x100.png new file mode 100755 index 0000000..4f3faf8 Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_inset-hard_100_f5f8f9_1x100.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-bg_inset-hard_100_fcfdfd_1x100.png b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_inset-hard_100_fcfdfd_1x100.png new file mode 100755 index 0000000..38c3833 Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-bg_inset-hard_100_fcfdfd_1x100.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-icons_6f8bb3_256x240.png b/themes/clean_canvas/css/clean/themeroller/images/ui-icons_6f8bb3_256x240.png new file mode 100755 index 0000000..50e1ae4 Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-icons_6f8bb3_256x240.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-icons_737373_256x240.png b/themes/clean_canvas/css/clean/themeroller/images/ui-icons_737373_256x240.png new file mode 100755 index 0000000..9e13fe6 Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-icons_737373_256x240.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-icons_833434_256x240.png b/themes/clean_canvas/css/clean/themeroller/images/ui-icons_833434_256x240.png new file mode 100755 index 0000000..c934bdf Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-icons_833434_256x240.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-icons_8f8461_256x240.png b/themes/clean_canvas/css/clean/themeroller/images/ui-icons_8f8461_256x240.png new file mode 100755 index 0000000..046b1f9 Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-icons_8f8461_256x240.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-icons_8f8f8f_256x240.png b/themes/clean_canvas/css/clean/themeroller/images/ui-icons_8f8f8f_256x240.png new file mode 100755 index 0000000..ab8b269 Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-icons_8f8f8f_256x240.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-icons_9e9e9e_256x240.png b/themes/clean_canvas/css/clean/themeroller/images/ui-icons_9e9e9e_256x240.png new file mode 100755 index 0000000..e2684f7 Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-icons_9e9e9e_256x240.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/images/ui-icons_dedede_256x240.png b/themes/clean_canvas/css/clean/themeroller/images/ui-icons_dedede_256x240.png new file mode 100755 index 0000000..91aada0 Binary files /dev/null and b/themes/clean_canvas/css/clean/themeroller/images/ui-icons_dedede_256x240.png differ diff --git a/themes/clean_canvas/css/clean/themeroller/ui.base.css b/themes/clean_canvas/css/clean/themeroller/ui.base.css new file mode 100755 index 0000000..1a1810c --- /dev/null +++ b/themes/clean_canvas/css/clean/themeroller/ui.base.css @@ -0,0 +1,7 @@ +@import "ui.core.css"; +@import "ui.theme.css"; +@import "ui.datepicker.css"; +@import "ui.dialog.css"; +@import "ui.progressbar.css"; +@import "ui.resizable.css"; +@import "ui.tabs.css"; diff --git a/themes/clean_canvas/css/clean/themeroller/ui.core.css b/themes/clean_canvas/css/clean/themeroller/ui.core.css new file mode 100755 index 0000000..d832ad7 --- /dev/null +++ b/themes/clean_canvas/css/clean/themeroller/ui.core.css @@ -0,0 +1,37 @@ +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://ui.jquery.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +*/ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } \ No newline at end of file diff --git a/themes/clean_canvas/css/clean/themeroller/ui.datepicker.css b/themes/clean_canvas/css/clean/themeroller/ui.datepicker.css new file mode 100755 index 0000000..92986c9 --- /dev/null +++ b/themes/clean_canvas/css/clean/themeroller/ui.datepicker.css @@ -0,0 +1,62 @@ +/* Datepicker +----------------------------------*/ +.ui-datepicker { width: 17em; padding: .2em .2em 0; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; } +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:left; width:100%; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +} \ No newline at end of file diff --git a/themes/clean_canvas/css/clean/themeroller/ui.dialog.css b/themes/clean_canvas/css/clean/themeroller/ui.dialog.css new file mode 100755 index 0000000..7078f5a --- /dev/null +++ b/themes/clean_canvas/css/clean/themeroller/ui.dialog.css @@ -0,0 +1,13 @@ +/* Dialog +----------------------------------*/ +.ui-dialog { position: relative; padding: .2em; width: 300px; } +.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } diff --git a/themes/clean_canvas/css/clean/themeroller/ui.progressbar.css b/themes/clean_canvas/css/clean/themeroller/ui.progressbar.css new file mode 100755 index 0000000..bc0939e --- /dev/null +++ b/themes/clean_canvas/css/clean/themeroller/ui.progressbar.css @@ -0,0 +1,4 @@ +/* Progressbar +----------------------------------*/ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/themes/clean_canvas/css/clean/themeroller/ui.resizable.css b/themes/clean_canvas/css/clean/themeroller/ui.resizable.css new file mode 100755 index 0000000..44efeb2 --- /dev/null +++ b/themes/clean_canvas/css/clean/themeroller/ui.resizable.css @@ -0,0 +1,13 @@ +/* Resizable +----------------------------------*/ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} \ No newline at end of file diff --git a/themes/clean_canvas/css/clean/themeroller/ui.tabs.css b/themes/clean_canvas/css/clean/themeroller/ui.tabs.css new file mode 100755 index 0000000..70ed3ef --- /dev/null +++ b/themes/clean_canvas/css/clean/themeroller/ui.tabs.css @@ -0,0 +1,9 @@ +/* Tabs +----------------------------------*/ +.ui-tabs {padding: .2em;} +.ui-tabs .ui-tabs-nav { padding: .2em .2em 0 .2em; position: relative; } +.ui-tabs .ui-tabs-nav li { float: left; border-bottom: 0 !important; margin: 0 .2em -1px 0; padding: 0; list-style: none; } +.ui-tabs .ui-tabs-nav li a { display:block; text-decoration: none; padding: .5em 1em; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: .1em; border-bottom: 0; } +.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border: 0; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } \ No newline at end of file diff --git a/themes/clean_canvas/css/clean/themeroller/ui.theme.css b/themes/clean_canvas/css/clean/themeroller/ui.theme.css new file mode 100755 index 0000000..6d522a8 --- /dev/null +++ b/themes/clean_canvas/css/clean/themeroller/ui.theme.css @@ -0,0 +1,246 @@ + + +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller&ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=7a7a7a&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=5e5e5e&fcHeader=ffffff&iconColorHeader=dedede&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=b8b8b8&fcContent=222222&iconColorContent=8f8f8f&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=dbdbdb&fcDefault=636363&iconColorDefault=9e9e9e&bgColorHover=dedede&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=ababab&fcHover=4a4a4a&iconColorHover=737373&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=a8a8a8&fcActive=877464&iconColorActive=8f8461&bgColorHighlight=e6e4d0&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=b2a670&fcHighlight=363636&iconColorHighlight=6f8bb3&bgColorError=f4f2f1&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=944242&fcError=7f4848&iconColorError=833434&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=20&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px +*/ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; } +.ui-widget-header { border: 1px solid #5e5e5e; background: #7a7a7a url(images/ui-bg_gloss-wave_55_7a7a7a_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } +.ui-widget-header a { color: #ffffff; } +.ui-widget-content { border: 1px solid #b8b8b8; background: #fcfdfd url(images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x; color: #222222; } + +.ui-widget-content a { color: #222222; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #dbdbdb; background: #e6e6e6 url(images/ui-bg_glass_85_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #636363; outline: none; } +.ui-state-default a { color: #636363; text-decoration: none; outline: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #ababab; background: #dedede url(images/ui-bg_glass_75_dedede_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #4a4a4a; outline: none; } +.ui-state-hover a { color: #4a4a4a; text-decoration: none; outline: none; } +.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #a8a8a8; background: #f5f8f9 url(images/ui-bg_inset-hard_100_f5f8f9_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #877464; outline: none; } +.ui-state-active a { color: #877464; outline: none; text-decoration: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #b2a670; background: #e6e4d0 url(images/ui-bg_flat_55_e6e4d0_40x100.png) 50% 50% repeat-x; color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #944242; background: #f4f2f1 url(images/ui-bg_glass_95_f4f2f1_1x400.png) 50% 50% repeat-x; color: #7f4848; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #7f4848; } +.ui-state-error a, .ui-widget-content .ui-state-error a { color: #7f4848; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_8f8f8f_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_8f8f8f_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_dedede_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_9e9e9e_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_737373_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_8f8461_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_6f8bb3_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_833434_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; } +.ui-corner-tr { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; } +.ui-corner-bl { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; } +.ui-corner-br { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; } +.ui-corner-top { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; } +.ui-corner-right { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; } +.ui-corner-left { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; } +.ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } +.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_20_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; } \ No newline at end of file diff --git a/themes/clean_canvas/css/dark/screen_candy.css b/themes/clean_canvas/css/dark/screen_candy.css new file mode 100755 index 0000000..3bad68e --- /dev/null +++ b/themes/clean_canvas/css/dark/screen_candy.css @@ -0,0 +1,419 @@ +/** + * Gallery 3 Clean Canvas Theme Screen Styles + * + * @requires YUI reset, font, grids CSS + * + * Sheet organization: + * 1) Font sizes, base HTML elements + * 2) Reusable content blocks + * 3) Page layout containers + * 4) Content blocks in specific layout containers + * 5) States and interactions + * 6) Positioning and order + * 7) Navigation and menus + * 8) jQuery and jQuery UI + * 9) Right-to-left language styles + */ + +/** ******************************************************************* + * 1) Font sizes, base HTML elements + **********************************************************************/ + +#g-sidebar .g-block h2 { + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -khtml-border-radius: 5px; + border-radius: 5px; +} + +#g-sidebar{ + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + -khtml-border-radius: 10px; + border-radius: 10px; + box-shadow: 1px 2px 8px #333; + -moz-box-shadow: 1px 2px 8px #333; + -webkit-box-shadow: 1px 2px 8px #333; +} + +.g-thumbnail, #g-photo img +{ + -webkit-border-radius: 10px; + -khtml-border-radius: 10px; + border-radius: 10px; + box-shadow: 3px 3px 8px #333; + -moz-box-shadow: 3px 3px 8px #333; + -webkit-box-shadow: 3px 3px 8px #333; +} + +/* Links ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +a, +.g-menu a, +#g-dialog a, +.g-button, +.g-button:hover, +.g-button:active, +a.ui-state-hover, +input.ui-state-hover, +button.ui-state-hover { + -moz-outline-style: none; +} + +#g-banner a +{ + cursor: pointer !important; + -moz-outline-style: none; +} + +/* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +fieldset { + border: 1px solid #ccc; +} + +#g-banner fieldset, +#g-sidebar fieldset { + border: none; +} + +input.textbox, +input[type="text"], +input[type="password"], +textarea { + border: 1px solid #e8e8e8; + border-top-color: #ccc; + border-left-color: #ccc; +} + + +/* Forms in dialogs and panels ~~~~~~~~~ */ + + +#g-dialog fieldset, +#g-panel fieldset { + border: none; +} + +/* Short forms ~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-short-form fieldset { + border: none; +} + +.g-short-form .textbox.g-error { + border: 1px solid #f00; +} + +/* Tables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +th, +td { + border: none; + border-bottom: 1px solid #ccc; +} + +/** ******************************************************************* + * 2) Reusable content blocks + *********************************************************************/ + + +/*** ****************************************************************** + * 3) Page layout containers + *********************************************************************/ + +/* View container ~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-view { + border-bottom: none; +} + +/* Layout containers ~~~~~~~~~~~~~~~~~~~~~ */ + +#g-banner { + -moz-border-radius: 10px 10px 0px 0px; + -webkit-border-radius: 10px 10px 0px 0px; + -khtml-border-radius: 10px 10px 0px 0px; + border-radius: 10px 10px 0px 0px; +} + +/** ******************************************************************* + * 4) Content blocks in specific layout containers + *********************************************************************/ + + +#g-content #g-album-grid .g-hover-item { + -moz-border-radius: 10px 10px 0px 0px; + -webkit-border-radius: 10px 10px 0px 0px; + -khtml-border-radius: 10px 10px 0px 0px; + border-radius: 10px 10px 0px 0px; + + box-shadow: 3px 3px 8px #333; + -moz-box-shadow: 3px 3px 8px #333; + -webkit-box-shadow: 3px 3px 8px #333; +} + + + +#g-edit-permissions-form fieldset { + border: 1px solid #ccc; +} + +#g-permissions .g-breadcrumbs a { + border: 1px solid #fff; + color: #000000 !important; +} + +.g-editable:hover { + cursor: text; +} + +.g-draggable { + cursor: move; +} + +.g-draggable:hover { + border: 1px dashed #000; +} + + +/** ******************************************************************* + * 6) Positioning and order + **********************************************************************/ + +/** ******************************************************************* + * 7) Navigation and menus + *********************************************************************/ + +/* Login menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-site-menu { + left: 200px; +} + +/* Site Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +#g-site-menu ul li:hover { + border-radius: 10px; + -moz-border-radius: 10px; + -webkit-border-radius; 10px; +} + +#g-site-menu ul li ul li:hover, #g-site-menu a:hover, #g-site-menu a:active, #g-site-menu a:focus { + border-radius: 10px; + -moz-border-radius: 10px; + -webkit-border-radius; 10px; +} + +#g-site-menu ul { + border-radius: 10px; + -moz-border-radius: 10px; + -webkit-border-radius; 10px; +} + +/* Context Menu ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + +.g-context-menu li { + border-left: none; + border-right: none; + border-bottom: none; +} + +.g-context-menu li a { + line-height: 1.6em; +} + +/* View Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-view-menu { + border-bottom: 1px solid #ffffff; +} + +#g-view-menu a { + background-repeat: no-repeat; + background-position: 50% 50%; +} + +/** ******************************************************************* + * 8) jQuery and jQuery UI + *********************************************************************/ + +.sf-menu a +{ + border: 0 none; +} + +/* jQuery UI Dialog ~~~~~~~~~~~~~~~~~~~~~~ */ + +.ui-widget-overlay { + opacity: .7; +} + +/* Buttons ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-button, +.g-button:hover, +.g-button:active { + cursor: pointer !important; + outline: 0; + -moz-outline-style: none; +} + + +/* jQuery UI ThemeRoller buttons ~~~~~~~~~ */ + + +/* Status and validation messages ~~~~ */ + +.g-message-block { + border: 1px solid #ccc; +} + + +/** ******************************************************************* + * 9) Right to left language styles + *********************************************************************/ + + + +/* RTL Corner radius ~~~~~~~~~~~~~~~~~~~~~~ */ +.rtl .g-buttonset .ui-corner-tl { + -moz-border-radius-topleft: 0; + -webkit-border-top-left-radius: 0; + border-top-left-radius: 0; + -moz-border-radius-topright: 5px !important; + -webkit-border-top-right-radius: 5px !important; + border-top-right-radius: 5px !important; +} + +.rtl .g-buttonset .ui-corner-tr { + -moz-border-radius-topright: 0; + -webkit-border-top-right-radius: 0; + border-top-right-radius: 0; + -moz-border-radius-topleft: 5px !important; + -webkit-border-top-left-radius: 5px !important; + border-top-left-radius: 5px !important; +} + +.rtl .g-buttonset .ui-corner-bl { + -moz-border-radius-bottomleft: 0; + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-bottomright: 5px !important; + -webkit-border-bottom-right-radius: 5px !important; + border-bottom-right-radius: 5px !important; +} + +.rtl .g-buttonset .ui-corner-br { + -moz-border-radius-bottomright: 0; + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomleft: 5px !important; + -webkit-border-bottom-left-radius: 5px !important; + border-bottom-left-radius: 5px !important; +} + +.rtl .g-buttonset .ui-corner-right, +.rtl .ui-progressbar .ui-corner-right { + -moz-border-radius-topright: 0; + -webkit-border-top-right-radius: 0; + border-top-right-radius: 0; + -moz-border-radius-topleft: 5px !important; + -webkit-border-top-left-radius: 5px !important; + border-top-left-radius: 5px !important; + -moz-border-radius-bottomright: 0; + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomleft: 5px !important; + -webkit-border-bottom-left-radius: 5px !important; + border-bottom-left-radius: 5px !important; +} + +.rtl .g-buttonset .ui-corner-left, +.rtl .ui-progressbar .ui-corner-left { + -moz-border-radius-topleft: 0; + -webkit-border-top-left-radius: 0; + border-top-left-radius: 0; + -moz-border-radius-topright: 5px !important; + -webkit-border-top-right-radius: 5px !important; + border-top-right-radius: 5px !important; + -moz-border-radius-bottomleft: 0; + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-bottomright: 5px !important; + -webkit-border-bottom-right-radius: 5px !important; + border-bottom-right-radius: 5px !important; +} + +/* RTL Superfish ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.rtl .sf-menu a { + border-left: none; + border-right:1px solid #fff; +} + +/*** shadows for all but IE6 ***/ +.rtl .sf-shadow ul { + padding: 0 0 9px 8px; + border-top-right-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-topright: 0; + -moz-border-radius-bottomleft: 0; + -webkit-border-top-right-radius: 0; + -webkit-border-bottom-left-radius: 0; + -moz-border-radius-topleft: 17px; + -moz-border-radius-bottomright: 17px; + -webkit-border-top-left-radius: 17px; + -webkit-border-bottom-right-radius: 17px; + border-top-left-radius: 17px; + border-bottom-right-radius: 17px; +} + + + +#doc3 +{ + box-shadow: 4px 4px 12px #333; + -moz-box-shadow: 4px 4px 12px #333; + -webkit-box-shadow: 4px 4px 12px #333; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + -khtml-border-radius: 10px; + border-radius: 10px; +} + +#doc4 +{ + box-shadow: 4px 4px 12px #333; + -moz-box-shadow: 4px 4px 12px #333; + -webkit-box-shadow: 4px 4px 12px #333; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + -khtml-border-radius: 10px; + border-radius: 10px; +} + +#g-info +{ + display: none; +} + +.g-thumbnail:hover { + box-shadow: 4px 4px 12px #333; + -moz-box-shadow: 4px 4px 12px #333; + -webkit-box-shadow: 4px 4px 12px #333; +} +#g-banner { + border-bottom: 1px solid #050505; + -moz-opacity:.9; + -webkit-opacity:.9; + opacity:.9; +} + +#g-footer { + border-top: 1px solid #050505; + -moz-border-radius: 0px 0px 10px 10px; + -webkit-border-radius: 0px 0px 10px 10px; + -khtml-border-radius: 0px 0px 10px 10px; + border-radius: 0px 0px 10px 10px; +} + diff --git a/themes/clean_canvas/css/dark/screen_colors.css b/themes/clean_canvas/css/dark/screen_colors.css new file mode 100755 index 0000000..e36b3f7 --- /dev/null +++ b/themes/clean_canvas/css/dark/screen_colors.css @@ -0,0 +1,422 @@ +/** + * Gallery 3 Clean Canvas Theme Screen Styles + * + * @requires YUI reset, font, grids CSS + * + * Sheet organization: + * 1) Font sizes, base HTML elements + * 2) Reusable content blocks + * 3) Page layout containers + * 4) Content blocks in specific layout containers + * 5) States and interactions + * 6) Positioning and order + * 7) Navigation and menus + * 8) jQuery and jQuery UI + * 9) Right-to-left language styles + */ + +/** ******************************************************************* + * 1) Font sizes, base HTML elements + **********************************************************************/ + +body, html { + background-color: #000; + color: #aaa; /* font-family: 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;*/ +} + +legend { + color: #ffffff; +} + +#g-sidebar .g-block h2 { + background: url(../../images/dark/dark_grid_bg.gif); +} + +#g-sidebar{ + background-color: #171717; +} + + +/* Links ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +a, +.g-menu a, +#g-dialog a, +.g-button, +.g-button:hover, +.g-button:active, +a.ui-state-hover, +input.ui-state-hover, +button.ui-state-hover { + color: #ffffff !important; +} + +#g-banner a +{ + color: #000000; +} + +.g-menu li, +.g-menu ul { + background: transparent !important; +} + +/* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +input.textbox, +input[type="text"], +input[type="password"], +textarea { + border-top-color: #ccc; + border-left-color: #ccc; + color: #333; +} + +input:focus, +input.textbox:focus, +input[type=text]:focus, +textarea:focus, +option:focus { + background-color: #ffc; + color: #000; +} + +input[readonly] { + background-color: #F4F4FC; +} + +/* Short forms ~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-short-form .textbox, +.g-short-form input[type=text] { + color: #666; +} + +.g-short-form .textbox.g-error { + color: #f00; +} + + +/** ******************************************************************* + * 2) Reusable content blocks + *********************************************************************/ + + +/*** ****************************************************************** + * 3) Page layout containers + *********************************************************************/ + +/* View container ~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-view { + background: url("../../images/dark/dark_grid_bg.gif"); +} + +/* Layout containers ~~~~~~~~~~~~~~~~~~~~~ */ + +#g-banner { + background-color: #171717; +} + +#g-footer { + background-color: #171717; +} + +/** ******************************************************************* + * 4) Content blocks in specific layout containers + *********************************************************************/ + +/* Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-content .g-block h2 { + background-color: transparent; +} + +/* Album content ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-content #g-album-grid .g-album h2 span.g-album { + background: transparent url('../../images/dark/ico-album.png') no-repeat top left; +} + +#g-content #g-album-grid .g-hover-item { + background-color: #171717; +} + + +/* In-line editing ~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-in-place-edit-message { + background-color: #fff; +} + +/* Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +#g-edit-permissions-form td { + background-image: none; +} + +#g-permissions .g-denied { + background-color: #fcc; +} + +#g-permissions .g-allowed { + background-color: #cfc; +} + + +#g-permissions .g-active a { + background: #eee; +} + +/** ******************************************************************* + * 5) States and interactions + **********************************************************************/ + +.g-inactive, +.g-disabled, +.g-unavailable, +.g-uneditable, +.g-locked, +.g-deselected, +.g-understate { + color: #ccc; +} + +.g-editable:hover { + background-color: #ffc; + cursor: text; +} + +form li.g-error, +form li.g-info, +form li.g-success, +form li.g-warning { + background-image: none; +} + +.g-error, +.g-denied, +tr.g-error td.g-error, +#g-add-photos-status .g-error { + background: #f6cbca url('../../images/dark/ico-error.png') no-repeat .4em 50%; + color: #f00; +} + +.g-info { + background: #e8e8e8 url('../../images/dark/ico-info.png') no-repeat .4em 50%; +} + +.g-success, +.g-allowed, +#g-add-photos-status .g-success { + background: #d9efc2 url('../../images/dark/ico-success.png') no-repeat .4em 50%; +} + +tr.g-success { + background-image: none; +} + +tr.g-success td.g-success { + background-image: url('../../images/dark/ico-success.png'); +} + +.g-warning, +tr.g-warning td.g-warning { + background: #fcf9ce url('../../images/dark/ico-warning.png') no-repeat .4em 50%; +} + +form .g-error { + background-color: #fff; +} + +.g-installed { + background-color: #eeeeee; +} + +.g-default { + background-color: #c5dbec; +} + +.ui-sortable .g-target, +.ui-state-highlight { + background-color: #fcf9ce; +} + +/* Ajax loading indicator ~~~~~~~~~~~~~~~~ */ + +.g-loading-large, +.g-dialog-loading-large { + background: #e8e8e8 url('../../images/dark/loading-large.gif') no-repeat center center !important; +} + +.g-loading-small { + background: #e8e8e8 url('../../images/dark/loading-small.gif') no-repeat center center !important; +} + +/** ******************************************************************* + * 6) Positioning and order + **********************************************************************/ + +.g-even { + background-color: #fff; +} + +.g-odd { + background-color: #eee; +} + +/** ******************************************************************* + * 7) Navigation and menus + *********************************************************************/ + +/* Site Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-site-menu { + left: 200px; +} + +#g-site-menu ul li:hover { + background-color: #666666 !important; +} + +#g-site-menu ul li ul li:hover, #g-site-menu a:hover, #g-site-menu a:active, #g-site-menu a:focus { + background-color: #333333 !important; +} +#g-site-menu ul { +} + +#g-site-menu ul li ul { + background-color: #666666 !important; +} + +/* Context Menu ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-context-menu { + background-color: #fff; +} + +/* View Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-view-menu { + border-bottom: 1px solid #ffffff; +} + +#g-view-menu #g-slideshow-link { + background-image: url('../../images/dark/ico-view-slideshow.png'); +} + +#g-view-menu .g-fullsize-link { + background-image: url('../../images/dark/ico-view-fullsize.png'); +} + +#g-view-menu #g-comments-link { + background-image: url('../../images/dark/ico-view-comments.png'); +} + +#g-view-menu #g-print-digibug-link { + background-image: url('../../images/dark/ico-print.png'); +} + +/** ******************************************************************* + * 8) jQuery and jQuery UI + *********************************************************************/ + +.sfHover li +{ + background-color: #CCC; +} + +.sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active +{ + background-color: #FFF; +} +.sf-menu li li, +.sf-menu li li ul li { + /* background: rgba( 255,255,255,0.5 );*/ + background-color: #CCC; +} + +.sfmenu li { + background-color: #CCC; + background:#CCC; +} + +.sf-menu li:hover { +/* background-color: #dfe9ff;*/ + background-color: #CCC; +} + +/* jQuery UI Dialog ~~~~~~~~~~~~~~~~~~~~~~ */ + +.ui-widget-overlay { + background: #000; + opacity: .7; +} + + + +/* Breadcrumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-breadcrumbs li { + background: transparent url('../../images/dark/ico-separator.gif') no-repeat scroll left center; +} + +.g-breadcrumbs .g-first { + background: none; +} + + +/* Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-paginator .g-info { + background: none; +} + + +/* Autocomplete ~~~~~~~~~~ */ +.ac_loading { + background: white url('../../images/dark/loading-small.gif') right center no-repeat !important; +} + +/** ******************************************************************* + * 9) Right to left language styles + *********************************************************************/ + + +.rtl .g-breadcrumbs li { + background: transparent url('../../images/dark/ico-separator-rtl.gif') no-repeat scroll right center; +} + +.rtl .g-breadcrumbs .g-first { + background: none; +} + + +/* RTL Superfish ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.rtl .sf-sub-indicator { + background: url('../../../../lib/superfish/images/arrows-ffffff-rtl.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */ +} + +/*** shadows for all but IE6 ***/ +.rtl .sf-shadow ul { + background: url('../../../../lib/superfish/images/shadow.png') no-repeat bottom left; +} + +.rtl #g-view-menu #g-slideshow-link { + background-image: url('../../images/dark/ico-view-slideshow-rtl.png'); +} + +#g-banner ul li a +{ + color: #ffffff !important; +} + +#g-site-menu ul li a +{ + color: #FFFFFF !important; +} + +#g-view-menu #g-download-archive-link { + background-image: url('../../images/dark/ico-view-downloadarchive_new.png') !important; +} + diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-bg_flat_0_aaaaaa_40x100.png b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100755 index 0000000..5b5dab2 Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-bg_flat_20_aaaaaa_40x100.png b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_flat_20_aaaaaa_40x100.png new file mode 100755 index 0000000..5b5dab2 Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_flat_20_aaaaaa_40x100.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-bg_flat_55_e6e4d0_40x100.png b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_flat_55_e6e4d0_40x100.png new file mode 100755 index 0000000..04cbfd1 Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_flat_55_e6e4d0_40x100.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-bg_glass_75_dedede_1x400.png b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_glass_75_dedede_1x400.png new file mode 100755 index 0000000..c83fe5f Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_glass_75_dedede_1x400.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-bg_glass_85_e6e6e6_1x400.png b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_glass_85_e6e6e6_1x400.png new file mode 100755 index 0000000..c1377bd Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_glass_85_e6e6e6_1x400.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-bg_glass_95_f4f2f1_1x400.png b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_glass_95_f4f2f1_1x400.png new file mode 100755 index 0000000..7a6e70d Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_glass_95_f4f2f1_1x400.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-bg_gloss-wave_55_7a7a7a_500x100.png b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_gloss-wave_55_7a7a7a_500x100.png new file mode 100755 index 0000000..22f1f30 Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_gloss-wave_55_7a7a7a_500x100.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-bg_inset-hard_100_f5f8f9_1x100.png b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_inset-hard_100_f5f8f9_1x100.png new file mode 100755 index 0000000..4f3faf8 Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_inset-hard_100_f5f8f9_1x100.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-bg_inset-hard_100_fcfdfd_1x100.png b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_inset-hard_100_fcfdfd_1x100.png new file mode 100755 index 0000000..38c3833 Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-bg_inset-hard_100_fcfdfd_1x100.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-icons_6f8bb3_256x240.png b/themes/clean_canvas/css/dark/themeroller/images/ui-icons_6f8bb3_256x240.png new file mode 100755 index 0000000..50e1ae4 Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-icons_6f8bb3_256x240.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-icons_737373_256x240.png b/themes/clean_canvas/css/dark/themeroller/images/ui-icons_737373_256x240.png new file mode 100755 index 0000000..9e13fe6 Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-icons_737373_256x240.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-icons_833434_256x240.png b/themes/clean_canvas/css/dark/themeroller/images/ui-icons_833434_256x240.png new file mode 100755 index 0000000..c934bdf Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-icons_833434_256x240.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-icons_8f8461_256x240.png b/themes/clean_canvas/css/dark/themeroller/images/ui-icons_8f8461_256x240.png new file mode 100755 index 0000000..046b1f9 Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-icons_8f8461_256x240.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-icons_8f8f8f_256x240.png b/themes/clean_canvas/css/dark/themeroller/images/ui-icons_8f8f8f_256x240.png new file mode 100755 index 0000000..ab8b269 Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-icons_8f8f8f_256x240.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-icons_9e9e9e_256x240.png b/themes/clean_canvas/css/dark/themeroller/images/ui-icons_9e9e9e_256x240.png new file mode 100755 index 0000000..e2684f7 Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-icons_9e9e9e_256x240.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/images/ui-icons_dedede_256x240.png b/themes/clean_canvas/css/dark/themeroller/images/ui-icons_dedede_256x240.png new file mode 100755 index 0000000..91aada0 Binary files /dev/null and b/themes/clean_canvas/css/dark/themeroller/images/ui-icons_dedede_256x240.png differ diff --git a/themes/clean_canvas/css/dark/themeroller/ui.base.css b/themes/clean_canvas/css/dark/themeroller/ui.base.css new file mode 100755 index 0000000..e189f1b --- /dev/null +++ b/themes/clean_canvas/css/dark/themeroller/ui.base.css @@ -0,0 +1,7 @@ +@import "ui.core.css"; +@import "ui.theme.css"; +@import "ui.datepicker.css"; +@import "ui.dialog.css"; +@import "ui.progressbar.css"; +@import "ui.resizable.css"; +@import "ui.tabs.css"; diff --git a/themes/clean_canvas/css/dark/themeroller/ui.core.css b/themes/clean_canvas/css/dark/themeroller/ui.core.css new file mode 100755 index 0000000..6f4ca8a --- /dev/null +++ b/themes/clean_canvas/css/dark/themeroller/ui.core.css @@ -0,0 +1,37 @@ +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://ui.jquery.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +*/ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } \ No newline at end of file diff --git a/themes/clean_canvas/css/dark/themeroller/ui.datepicker.css b/themes/clean_canvas/css/dark/themeroller/ui.datepicker.css new file mode 100755 index 0000000..b14821c --- /dev/null +++ b/themes/clean_canvas/css/dark/themeroller/ui.datepicker.css @@ -0,0 +1,62 @@ +/* Datepicker +----------------------------------*/ +.ui-datepicker { width: 17em; padding: .2em .2em 0; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; } +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:left; width:100%; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +} \ No newline at end of file diff --git a/themes/clean_canvas/css/dark/themeroller/ui.dialog.css b/themes/clean_canvas/css/dark/themeroller/ui.dialog.css new file mode 100755 index 0000000..9e9afc2 --- /dev/null +++ b/themes/clean_canvas/css/dark/themeroller/ui.dialog.css @@ -0,0 +1,13 @@ +/* Dialog +----------------------------------*/ +.ui-dialog { position: relative; padding: .2em; width: 300px; } +.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } diff --git a/themes/clean_canvas/css/dark/themeroller/ui.progressbar.css b/themes/clean_canvas/css/dark/themeroller/ui.progressbar.css new file mode 100755 index 0000000..2ec9e59 --- /dev/null +++ b/themes/clean_canvas/css/dark/themeroller/ui.progressbar.css @@ -0,0 +1,4 @@ +/* Progressbar +----------------------------------*/ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/themes/clean_canvas/css/dark/themeroller/ui.resizable.css b/themes/clean_canvas/css/dark/themeroller/ui.resizable.css new file mode 100755 index 0000000..3080d37 --- /dev/null +++ b/themes/clean_canvas/css/dark/themeroller/ui.resizable.css @@ -0,0 +1,13 @@ +/* Resizable +----------------------------------*/ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} \ No newline at end of file diff --git a/themes/clean_canvas/css/dark/themeroller/ui.tabs.css b/themes/clean_canvas/css/dark/themeroller/ui.tabs.css new file mode 100755 index 0000000..749a240 --- /dev/null +++ b/themes/clean_canvas/css/dark/themeroller/ui.tabs.css @@ -0,0 +1,9 @@ +/* Tabs +----------------------------------*/ +.ui-tabs {padding: .2em;} +.ui-tabs .ui-tabs-nav { padding: .2em .2em 0 .2em; position: relative; } +.ui-tabs .ui-tabs-nav li { float: left; border-bottom: 0 !important; margin: 0 .2em -1px 0; padding: 0; list-style: none; } +.ui-tabs .ui-tabs-nav li a { display:block; text-decoration: none; padding: .5em 1em; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: .1em; border-bottom: 0; } +.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border: 0; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } \ No newline at end of file diff --git a/themes/clean_canvas/css/dark/themeroller/ui.theme.css b/themes/clean_canvas/css/dark/themeroller/ui.theme.css new file mode 100755 index 0000000..0d737a1 --- /dev/null +++ b/themes/clean_canvas/css/dark/themeroller/ui.theme.css @@ -0,0 +1,246 @@ + + +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller&ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=7a7a7a&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=5e5e5e&fcHeader=ffffff&iconColorHeader=dedede&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=b8b8b8&fcContent=222222&iconColorContent=8f8f8f&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=dbdbdb&fcDefault=636363&iconColorDefault=9e9e9e&bgColorHover=dedede&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=ababab&fcHover=4a4a4a&iconColorHover=737373&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=a8a8a8&fcActive=877464&iconColorActive=8f8461&bgColorHighlight=e6e4d0&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=b2a670&fcHighlight=363636&iconColorHighlight=6f8bb3&bgColorError=f4f2f1&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=944242&fcError=7f4848&iconColorError=833434&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=20&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px +*/ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; } +.ui-widget-header { border: 1px solid #5e5e5e; background: #7a7a7a url(images/ui-bg_gloss-wave_55_7a7a7a_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } +.ui-widget-header a { color: #ffffff; } +.ui-widget-content { border: 1px solid #b8b8b8; background: #fcfdfd url(images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x; color: #222222; } + +.ui-widget-content a { color: #222222; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #dbdbdb; background-color: #171717; font-weight: bold; color: #ffffff; outline: none; } +.ui-state-default a { color: #636363; text-decoration: none; outline: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #ababab; background-color: #272727; font-weight: bold; color: #4a4a4a; outline: none; } +.ui-state-hover a { color: #4a4a4a; text-decoration: none; outline: none; } +.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #a8a8a8; background: #f5f8f9 url(images/ui-bg_inset-hard_100_f5f8f9_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #877464; outline: none; } +.ui-state-active a { color: #877464; outline: none; text-decoration: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #b2a670; background: #e6e4d0 url(images/ui-bg_flat_55_e6e4d0_40x100.png) 50% 50% repeat-x; color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #944242; background: #f4f2f1 url(images/ui-bg_glass_95_f4f2f1_1x400.png) 50% 50% repeat-x; color: #7f4848; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #7f4848; } +.ui-state-error a, .ui-widget-content .ui-state-error a { color: #7f4848; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_8f8f8f_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_8f8f8f_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_dedede_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_9e9e9e_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_737373_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_8f8461_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_6f8bb3_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_833434_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; } +.ui-corner-tr { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; } +.ui-corner-bl { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; } +.ui-corner-br { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; } +.ui-corner-top { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; } +.ui-corner-right { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; } +.ui-corner-left { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; } +.ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } +.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_20_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; } diff --git a/themes/clean_canvas/css/downloadfullsize_menu.css b/themes/clean_canvas/css/downloadfullsize_menu.css new file mode 100755 index 0000000..a608a66 --- /dev/null +++ b/themes/clean_canvas/css/downloadfullsize_menu.css @@ -0,0 +1,3 @@ +#g-view-menu #g-download-fullsize-link { + background-image: url('../images/ico-view-downloadfullsize.png'); +} diff --git a/themes/clean_canvas/css/embedlinks_menu.css b/themes/clean_canvas/css/embedlinks_menu.css new file mode 100755 index 0000000..6a4af40 --- /dev/null +++ b/themes/clean_canvas/css/embedlinks_menu.css @@ -0,0 +1,3 @@ +#g-view-menu #g-embedlinks-link { + background-image: url('../images/ico-view-embedlinks.png'); +} diff --git a/themes/clean_canvas/css/fix-ie.css b/themes/clean_canvas/css/fix-ie.css new file mode 100755 index 0000000..a4fbaf2 --- /dev/null +++ b/themes/clean_canvas/css/fix-ie.css @@ -0,0 +1,153 @@ +/** + * Fix display in IE 6, 7, and 8 + */ + +#g-banner { + z-index: 2; + zoom: 1; +} + +#g-sidebar { + overflow: hidden; +} + +#g-photo, +#g-movie { + zoom: 1; +} + +#g-photo .g-context-menu, +#g-movie .g-context-menu { + width: 240px; +} + +input.submit { + clear: none !important; + display: inline !important; +} + +.g-short-form input.text, +.g-short-form input.submit { + font-size: 1em; + line-height: 1em; + padding: .38em .3em; +} + +#g-search-form input#q { + width: 300px; +} + +#g-add-tag-form input.textbox { + width: 110px !important; +} + +#g-add-tag-form input[type='submit'] { + padding: .3em 0 !important; +} + +#g-dialog .g-cancel { + display: inline-block !important; + float: none !important; +} + +.g-paginator .g-text-right { + width: 29%; +} + +.g-paginator .ui-icon-right { + width: 60px; +} + +/** + * Gallery 3 Clean Canvas Theme Screen Styles + * + * @requires YUI reset, font, grids CSS + * + * Sheet organization: + * 1) Font sizes, base HTML elements + * 2) Reusable content blocks + * 3) Page layout containers + * 4) Content blocks in specific layout containers + * 5) States and interactions + * 6) Positioning and order + * 7) Navigation and menus + * 8) jQuery and jQuery UI + * 9) Right-to-left language styles + */ + +/** ******************************************************************* + * 1) Font sizes, base HTML elements + **********************************************************************/ + + +#g-sidebar{ + filter: progid:DXImageTransform.Microsoft.dropShadow(color=#555, offX=1, offY=2, positive=true); +} + +.g-thumbnail, #g-photo img +{ + filter: progid:DXImageTransform.Microsoft.dropShadow(color=#555, offX=0, offY=3, positive=true); +} + + +/** ******************************************************************* + * 2) Reusable content blocks + *********************************************************************/ + + +/*** ****************************************************************** + * 3) Page layout containers + *********************************************************************/ + + +/* View container ~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-view { + filter: alpha(opacity=60); +} + + +/** ******************************************************************* + * 4) Content blocks in specific layout containers + *********************************************************************/ + +/* Album content ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-content #g-album-grid .g-hover-item { + filter: progid:DXImageTransform.Microsoft.dropShadow(color=#777, offX=0, offY=3, positive=true); +} + +/** ******************************************************************* + * 5) States and interactions + **********************************************************************/ + +/** ******************************************************************* + * 6) Positioning and order + **********************************************************************/ + +/** ******************************************************************* + * 7) Navigation and menus + *********************************************************************/ + +/** ******************************************************************* + * 8) jQuery and jQuery UI + *********************************************************************/ + +/** ******************************************************************* + * 9) Right to left language styles + *********************************************************************/ + + +#doc3 +{ + filter: progid:DXImageTransform.Microsoft.dropShadow(color=#777, offX=4, offY=4, positive=true); +} + +#doc4 +{ + filter: progid:DXImageTransform.Microsoft.dropShadow(color=#777, offX=4, offY=4, positive=true); +} + +.g-thumbnail:hover { + filter: progid:DXImageTransform.Microsoft.dropShadow(color=#777, offX=4, offY=4, positive=true); +} diff --git a/themes/clean_canvas/css/minislideshow_menu.css b/themes/clean_canvas/css/minislideshow_menu.css new file mode 100755 index 0000000..d1f5271 --- /dev/null +++ b/themes/clean_canvas/css/minislideshow_menu.css @@ -0,0 +1,3 @@ +#g-view-menu #g-mini-slideshow-link { + background-image: url('../images/ico-view-minislideshow.png'); +} diff --git a/themes/clean_canvas/css/screen_fonts.css b/themes/clean_canvas/css/screen_fonts.css new file mode 100755 index 0000000..b36c20e --- /dev/null +++ b/themes/clean_canvas/css/screen_fonts.css @@ -0,0 +1,298 @@ +/** + * Gallery 3 Clean Canvas Theme Screen Styles + * + * @requires YUI reset, font, grids CSS + * + * Sheet organization: + * 1) Font sizes, base HTML elements + * 2) Reusable content blocks + * 3) Page layout containers + * 4) Content blocks in specific layout containers + * 5) States and interactions + * 6) Positioning and order + * 7) Navigation and menus + * 8) jQuery and jQuery UI + * 9) Right-to-left language styles + */ + +/** ******************************************************************* + * 1) Font sizes, base HTML elements + **********************************************************************/ + +body, html { + font-family: Verdana, Geneva, sans-serif; +} + +em { + font-style: oblique; +} + +h1, h2, h3, h4, h5, strong, th { + font-weight: bold; +} + +h1 { + font-size: 1.0em; +} + +#g-dialog h1 { + font-size: 0.8em; +} + +/* auf photopage oben navigation */ +.g-paginator .g-info, +.g-paginator li +{ + font-size: 0.85em; +} + +#g-info h1 +{ + font-size: 0.8em; +} + +h2 { + font-size: 1.3em; +} + +#g-sidebar .g-block h2 { + font-size: 1.0em; +} + +#g-content, +#g-site-menu, +h3 { + font-size: 1.0em; +} + +#g-site-menu +{ + font-size: 1.1em; +} + +#g-sidebar, +.g-breadcrumbs { + font-size: .8em; +} + +#g-banner, +#g-footer, +.g-message { + font-size: 0.7em; +} + +#g-album-grid .g-item, +#g-item #g-photo, +#g-item #g-movie { + font-size: 0.8em; +} + +/* comment button */ +#g-admin-comment-button +{ + font-size: 1.8em; +} + +/* comment entry */ +#g-content #g-comments .g-author +{ + font-size: 0.8em; +} + +/* kommentar an sich */ +#g-content #g-comments ul li div +{ + font-size: 0.8em; +} + +#bd +{ +/* box-shadow: 4px 4px #666;*/ +} + +/* Links ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +a, +.g-menu a, +#g-dialog a, +.g-button, +.g-button:hover, +.g-button:active, +a.ui-state-hover, +input.ui-state-hover, +button.ui-state-hover { + text-decoration: none; +} + +#g-banner a +{ + text-decoration: none; +} +a:hover, +#g-dialog a:hover { + text-decoration: underline; +} + +.g-menu a:hover { + text-decoration: none; +} + +/* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +legend { + font-weight: bold; +} + +caption, +th { + text-align: left; +} + + +/* Text ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +.g-text-small { + font-size: .8em; +} + +.g-text-big { + font-size: 1.2em; +} + +.g-text-right { + text-align: right; +} + +/** ******************************************************************* + * 2) Reusable content blocks + *********************************************************************/ + +.g-block-content li{ + font-size: 1.0em; +} + +/* View container ~~~~~~~~~~~~~~~~~~~~~~~~ */ + + +/** ******************************************************************* + * 4) Content blocks in specific layout containers + *********************************************************************/ + +#g-comments .g-block h2 { + font-size: 0.8em !important; +} + +#g-content #g-album-grid .g-item { + text-align: center; +} + +/** ******************************************************************* + * 5) States and interactions + **********************************************************************/ + +.g-active, +.g-enabled, +.g-available, +.g-selected, +.g-highlight { + font-weight: bold; +} + +.g-inactive, +.g-disabled, +.g-unavailable, +.g-uneditable, +.g-locked, +.g-deselected, +.g-understate { + font-weight: normal; +} + +/** ******************************************************************* + * 6) Positioning and order + **********************************************************************/ + + +/** ******************************************************************* + * 7) Navigation and menus + *********************************************************************/ + +.g-hover-item .g-context-menu li { + text-align: left; +} + +.g-hover-item .g-context-menu a:hover { + text-decoration: none; +} + +.g-button, +.g-button:hover, +.g-button:active { + text-decoration: none; +} + +.g-paginator .g-info { + text-align: center; +} + +/* Dialogs and panels ~~~~~~~~~~~~~~~~~~ */ + +#g-dialog { + text-align: left; +} + + +/** ******************************************************************* + * 9) Right to left language styles + *********************************************************************/ + +.rtl { + direction: rtl; +} + +.rtl #g-header, +.rtl #g-content, +.rtl #g-sidebar, +.rtl #g-footer, +.rtl caption, +.rtl th, +.rtl #g-dialog, +.rtl .g-context-menu li a, +.rtl .g-message-box li, +.rtl #g-site-status li { + text-align: right; +} + +.rtl .g-text-right { + text-align: left; +} + + +/* RTL Superfish ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-tag-cloud +{ + font-size: 0.8em; +} + +#g-info h1 +{ + font-size: 1.2em; +} +#g-info +{ + font-size:0.9em; +} +#g-comments +{ + font-size: 0.9em; +} + +#g-comment-detail +{ + font-size: 1.3em; +} + +.g-valign h2 +{ + font-size: 1.2em; +} + diff --git a/themes/clean_canvas/css/screen_layout_base.css b/themes/clean_canvas/css/screen_layout_base.css new file mode 100755 index 0000000..45e7a5c --- /dev/null +++ b/themes/clean_canvas/css/screen_layout_base.css @@ -0,0 +1,960 @@ +/** + * Gallery 3 Clean Canvas Theme Screen Styles + * + * @requires YUI reset, font, grids CSS + * + * Sheet organization: + * 1) Font sizes, base HTML elements + * 2) Reusable content blocks + * 3) Page layout containers + * 4) Content blocks in specific layout containers + * 5) States and interactions + * 6) Positioning and order + * 7) Navigation and menus + * 8) jQuery and jQuery UI + * 9) Right-to-left language styles + */ + +/** ******************************************************************* + * 1) Font sizes, base HTML elements + **********************************************************************/ + +p { + margin-bottom: 1em; +} + +#g-sidebar .g-block li { + margin-bottom: .7em; +} + +#g-sidebar{ + top: -30px; +} + +.g-no-breadcrumb-sidebar-correction{ + top:160px; +} + +/* Links ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-dialog #g-action-status li { + width: 400px; + white-space: normal; + padding-left: 32px; +} + +/* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +form { + margin: 0; +} + +fieldset { + padding: 0 1em .8em 1em; +} + +#g-banner fieldset, +#g-sidebar fieldset { + padding: 0; +} + +legend { + margin: 0; + padding: 0 .2em; +} + +#g-banner legend, +#g-sidebar legend, +input[type="hidden"] { + display: none; +} + +input.textbox, +input[type="text"], +input[type="password"], +textarea { + clear: both; + width: 50%; +} + +textarea { + height: 12em; + width: 97%; +} + +input.checkbox, +input[type=checkbox], +input.radio, +input[type=radio] { + float: left; + margin-right: .4em; +} + +/* Form layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +form li { + margin: 0; + padding: 0 0 .2em 0; +} + +form ul { + margin-top: 0; +} + +form ul ul { + clear: both; +} + +form ul ul li { + float: left; +} + +input, +select, +textarea { + display: block; + clear: both; + padding: .2em; +} + +input[type="submit"], +input[type="reset"] { + display: inline; + clear: none; + float: left; +} + +/* Forms in dialogs and panels ~~~~~~~~~ */ + +#g-dialog ul li { + padding-bottom: .8em; +} + +#g-dialog fieldset, +#g-panel fieldset { + padding: 0; +} + +#g-panel legend { + display: none; +} + +#g-dialog input.textbox, +#g-dialog input[type=text], +#g-dialog input[type=password], +#g-dialog textarea { + width: 97%; +} + +/* Short forms ~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-short-form legend, +.g-short-form label { + display: none; +} + +.g-short-form fieldset { + padding: 0; +} + +.g-short-form li { + float: left; + margin: 0 !important; + padding: .4em 0; +} + +.g-short-form .textbox, +.g-short-form input[type=text] { + padding: .3em .6em; + width: 100%; +} + +.g-short-form .textbox.g-error { + padding-left: 24px; +} + +.g-short-form .g-cancel { + display: block; + margin: .3em .8em; +} + +#g-sidebar .g-short-form li { + padding-left: 0; + padding-right: 0; +} + +/* Tables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +table { + width: 100%; +} + +#g-content table { + margin: 1em 0; +} + +th, +td { + padding: .5em; +} + +td { + vertical-align: top; +} + +/** ******************************************************************* + * 2) Reusable content blocks + *********************************************************************/ + +.g-block h2 { +/* background-color: #e8e8e8;*/ + padding: .3em .8em; +} + +.g-block-content { + margin-top: 1em; +} + +/*** ****************************************************************** + * 3) Page layout containers + *********************************************************************/ + + /* Dimension and scale ~~~~~~~~~~~~~~~~~~~ */ +.g-one-quarter { + width: 25%; +} + +.g-one-third { + width: 33%; +} + +.g-one-half { + width: 50%; +} + +.g-two-thirds { + width: 66%; +} + +.g-three-quarters { + width: 75%; +} + +.g-whole { + width: 100%; +} + +/* View container ~~~~~~~~~~~~~~~~~~~~~~~~ */ + +/* Layout containers ~~~~~~~~~~~~~~~~~~~~~ */ + +#g-header { + margin-bottom: 1em; +} + +#g-banner { + min-height: 5em; + padding: 1em 20px; + position: relative; +} + +#g-content { + padding-left: 20px; + position: relative; +} + +#g-sidebar { + padding: 10px 10px; + width: 220px; +} + +#g-footer { + margin-top: 20px; + padding: 10px 20px; +} + +/** ******************************************************************* + * 4) Content blocks in specific layout containers + *********************************************************************/ + +/* Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-banner #g-quick-search-form { + clear: right; + float: right; + margin-top: 1em; +} + +#g-banner #g-quick-search-form input[type='text'] { + width: 17em; +} + +#g-content .g-block h2 { + padding-left: 0; +} + +#g-sidebar .g-block-content { + padding-left: 1em; +} + +/* Album content ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-content #g-album-grid { + margin: 1em 0; + position: relative; + z-index: 1; +} + +#g-content #g-album-grid .g-item { + float: left; + padding: 1.6em 8px; + position: relative; + width: 213px; + z-index: 1; +} + +#g-content #g-album-grid .g-item h2 { + margin: 5px 0; +} + +#g-content .g-photo h2, +#g-content .g-item .g-metadata { + display: block; + margin-bottom: .6em; +} + +#g-content #g-album-grid .g-album h2 span.g-album { + display: inline-block; + height: 20px; + margin-right: 2px; + width: 20px; +} + +#g-content #g-album-grid .g-hover-item { + position: absolute !important; + z-index: 1000 !important; +} + +#g-content .g-hover-item h2, +#g-content .g-hover-item .g-metadata { + display: block; +} + +#g-content #g-album-grid #g-place-holder { + position: relative; + visibility: hidden; + z-index: 1; +} + +/* Search results ~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-content #g-search-results { + margin-top: 1em; + padding-top: 1em; +} + +/* Individual photo content ~~~~~~~~~~~~~~ */ + +#g-item { + position: relative; + width: 100%; +} + +#g-item #g-photo, +#g-item #g-movie { + padding: 2.2em 0; + position: relative; +} + +#g-item img.g-resize, +#g-item a.g-movie { + display: block; + margin: 0 auto; +} + + +/* Footer content ~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-footer #g-credits li { + padding-right: 1.2em; +} + + +/** ******************************************************************* + * 5) States and interactions + **********************************************************************/ + +.g-editable { + padding: .2em .3em; +} + +.g-error, +.g-info, +.g-success, +.g-warning { + padding-left: 30px; +} + +form li.g-error, +form li.g-info, +form li.g-success, +form li.g-warning { + padding: .3em .8em .3em 0; +} + +.g-short-form li.g-error { + padding: .3em 0; +} + +form.g-error input[type="text"], +li.g-error input[type="text"], +form.g-error input[type="password"], +li.g-error input[type="password"], +form.g-error input[type="checkbox"], +li.g-error input[type="checkbox"], +form.g-error input[type="radio"], +li.g-error input[type="radio"], +form.g-error textarea, +li.g-error textarea, +form.g-error select, +li.g-error select { + border: 2px solid #f00; + margin-bottom: .2em; +} + +form .g-error { + padding-left: 20px; +} + +.ui-sortable .g-target, +.ui-state-highlight { + height: 2em; + margin: 1em 0; +} + + +/** ******************************************************************* + * 6) Positioning and order + **********************************************************************/ + +.g-left { + clear: none; + float: left; +} + +.g-right { + clear: none; + float: right; +} + +/** ******************************************************************* + * 7) Navigation and menus + *********************************************************************/ + +/* Login menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-banner-languages +{ + position:absolute; + right:250px; + float: right; + margin-top: -5px; +} + +#g-banner #g-login-menu { +/* color: #999;*/ +float: right; +margin-top: -5px; +} + +#g-banner #g-login-menu li { + padding-left: 1.2em; +} + + +/* Site Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-site-menu { + bottom: 0; + left: 160px; + position: absolute; +} + +#g-site-menu ul li ul { + padding: 0; +} + +/* Context Menu ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-context-menu { + bottom: 0; + left: 0; + position: absolute; + margin-top: 2em; + z-index: 100; +} + +.g-item .g-context-menu { + display: none; + margin-top: 2em; + width: 100%; +} + +#g-item .g-context-menu ul { + display: none; +} + +.g-context-menu li a { + display: block; +} + +.g-hover-item .g-context-menu { + display: block; +} + +.g-hover-item .g-context-menu li { + text-align: left; +} + +.g-hover-item .g-context-menu a:hover { + text-decoration: none; +} + +/* View Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-view-menu { + padding-bottom: 5px; + margin-bottom: 1em; +} + +#g-view-menu a { + background-position: 50% 50%; + height: 22px !important; + width: 40px !important; +} + +/** ******************************************************************* + * 8) jQuery and jQuery UI + *********************************************************************/ + + /* Generic block container ~~~~~~~~~~~~~~~ */ + +.g-block { + clear: both; + margin-bottom: 2.5em; +} + +.g-block-content { +} + +/* Superfish menu overrides ~~~~~~~~~~~~~~ */ + +.sf-menu ul { + width: 12em; +} + +ul.sf-menu li li:hover ul, +ul.sf-menu li li.sfHover ul { + left: 12em; +} + +ul.sf-menu li li li:hover ul, +ul.sf-menu li li li.sfHover ul { + left: 12em; +} + + +/* Buttons ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-button { + display: inline-block; + margin: 0 4px 0 0; + padding: .2em .4em; +} + +button { + padding: 2px 4px 2px 4px; +} + +/* jQuery UI ThemeRoller buttons ~~~~~~~~~ */ + +.g-buttonset { + padding-left: 1px; +} + +.g-buttonset li { + float: left; +} + +.g-buttonset .g-button { + margin: 0; +} + +.ui-icon-left .ui-icon { + float: left; + margin-right: .2em; +} + +.ui-icon-right .ui-icon { + float: right; + margin-left: .2em; +} + +/* Rotate icon, ThemeRoller only provides one of these */ + +.ui-icon-rotate-ccw { + background-position: -192px -64px; +} + +.ui-icon-rotate-cw { + background-position: -208px -64px; +} + +.g-progress-bar { + height: 1em; + width: 100%; + margin-top: .5em; + display: inline-block; +} + +/* Status and validation messages ~~~~ */ + +.g-message-block { + background-position: .4em .3em; + padding: 0; +} + +#g-action-status { + margin-bottom: 1em; +} + +#g-action-status li, +p#g-action-status, +div#g-action-status { + padding: .3em .3em .3em 30px; +} + +#g-site-status li { + padding: .3em .3em .3em 30px; +} + +.g-module-status { + clear: both; + margin-bottom: 1em; +} + +.g-message { + background-position: 0 50%; +} + +/* Breadcrumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-breadcrumbs { + clear: both; + padding: 0 20px; +} + +.g-breadcrumbs li { + float: left; + padding: 1em 8px 1em 18px; +} + +.g-breadcrumbs .g-first { + padding-left: 0; +} + +.g-breadcrumbs li a, +.g-breadcrumbs li span { + display: block; +} + +#g-dialog ul.g-breadcrumbs { + margin-left: 0; + padding-left: 0; +} + +/* Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-paginator { + padding: .2em 0; + width: 100%; +} + +.g-paginator li { + float: left; + width: 30%; +} + +.g-paginator .g-info { + padding: .2em 0; + width: 40%; +} + +/* Dialogs and panels ~~~~~~~~~~~~~~~~~~ */ + +#g-dialog legend { + display: none; +} + +#g-dialog .g-cancel { + margin: .4em 1em; +} + +#g-panel { + display: none; + padding: 1em; +} + +/* Inline layout ~~~~~~~~~~ */ + +.g-inline li { + float: left; + margin-left: 1.8em; + padding-left: 0 !important; +} + +.g-inline li.g-first { + margin-left: 0; +} + + +/** ******************************************************************* + * 9) Right to left language styles + *********************************************************************/ + +.rtl .g-error, +.rtl .g-info, +.rtl .g-success, +.rtl .g-warning, +.rtl #g-add-photos-status .g-success, +.rtl #g-add-photos-status .g-error { + background-position: center right; + padding-right: 30px !important; +} + +.rtl form li.g-error, +.rtl form li.g-info, +.rtl form li.g-success, +.rtl form li.g-warning { + padding-right: 0 !important; +} + +.rtl .g-left, +.rtl .g-inline li, +.rtl #g-content #g-album-grid .g-item, +.rtl .sf-menu li, +.rtl .g-breadcrumbs li, +.rtl .g-paginator li, +.rtl .g-buttonset li, +.rtl .ui-icon-left .ui-icon, +.rtl .g-short-form li, +.rtl form ul ul li, +.rtl input[type="submit"], +.rtl input[type="reset"], +.rtl input.checkbox, +.rtl input[type=checkbox], +.rtl input.radio, +.rtl input[type=radio] { + float: right; +} + +.rtl .g-right, +.rtl .ui-icon-right .ui-icon { + float: left; +} + +.rtl .g-inline li { + margin-right: 1em; +} + +.rtl .g-inline li.g-first { + margin-right: 0; +} + +.rtl .g-breadcrumbs li { + padding: 1em 18px 1em 8px; +} + +.rtl .g-breadcrumbs .g-first { + padding-right: 0; +} + +.rtl input.checkbox { + margin-left: .4em; +} + +.rtl #g-add-comment { + right: inherit; + left: 0; +} + +.rtl .ui-icon-left .ui-icon { + margin-left: .2em; +} + +.rtl .ui-icon-right .ui-icon { + margin-right: .2em; +} + +/* RTL Superfish ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.rtl .sf-menu a.sf-with-ul { + padding-left: 2.25em; + padding-right: 1em; +} + +.rtl .sf-sub-indicator { + left: .75em !important; + right: auto; +} +.rtl a > .sf-sub-indicator { /* give all except IE6 the correct values */ + top: .8em; + background-position: -10px -100px; /* use translucent arrow for modern browsers*/ +} +/* apply hovers to modern browsers */ +.rtl a:focus > .sf-sub-indicator, +.rtl a:hover > .sf-sub-indicator, +.rtl a:active > .sf-sub-indicator, +.rtl li:hover > a > .sf-sub-indicator, +.rtl li.sfHover > a > .sf-sub-indicator { + background-position: 0 -100px; /* arrow hovers for modern browsers*/ +} + +/* point right for anchors in subs */ +.rtl .sf-menu ul .sf-sub-indicator { background-position: 0 0; } +.rtl .sf-menu ul a > .sf-sub-indicator { background-position: -10px 0; } +/* apply hovers to modern browsers */ +.rtl .sf-menu ul a:focus > .sf-sub-indicator, +.rtl .sf-menu ul a:hover > .sf-sub-indicator, +.rtl .sf-menu ul a:active > .sf-sub-indicator, +.rtl .sf-menu ul li:hover > a > .sf-sub-indicator, +.rtl .sf-menu ul li.sfHover > a > .sf-sub-indicator { + background-position: 0 0; /* arrow hovers for modern browsers*/ +} + +.rtl .sf-menu li:hover ul, +.rtl .sf-menu li.sfHover ul { + right: 0; + left: auto; +} + +.rtl ul.sf-menu li li:hover ul, +.rtl ul.sf-menu li li.sfHover ul { + right: 12em; /* match ul width */ + left: auto; +} +.rtl ul.sf-menu li li li:hover ul, +.rtl ul.sf-menu li li li.sfHover ul { + right: 12em; /* match ul width */ + left: auto; +} + +/*** shadows for all but IE6 ***/ +.rtl .sf-shadow ul { + padding: 0 0 9px 8px; +} + +/* RTL ThemeRoller ~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.rtl .ui-dialog .ui-dialog-titlebar { + padding: 0.5em 1em 0.3em 0.3em; +} + +.rtl .ui-dialog .ui-dialog-title { + float: right; +} + +.rtl .ui-dialog .ui-dialog-titlebar-close { + left: 0.3em; + right: auto; +} + + +/* RTL paginator ~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.rtl .g-paginator .g-info { + width: 35%; +} + +.rtl .g-paginator .g-text-right { + margin-left: 0; +} + +.rtl .g-paginator .ui-icon-seek-end { + background-position: -80px -160px; +} + +.rtl .g-paginator .ui-icon-seek-next { + background-position: -48px -160px; +} + +.rtl .g-paginator .ui-icon-seek-prev { + background-position: -32px -160px; +} + +.rtl .g-paginator .ui-icon-seek-first { + background-position: -64px -160px; +} + +.rtl #g-header #g-login-menu, +.rtl #g-header #g-quick-search-form { + clear: left; + float: left; +} + +.rtl #g-header #g-login-menu li { + margin-left: 0; + padding-left: 0; + padding-right: 1.2em; +} + +.rtl #g-site-menu { + left: auto; + right: 150px; +} + +#g-logo +{ + position: absolute; + bottom: 0px; +} + +#g-info +{ + padding-left: 20px; + padding-right: 20px; + padding-bottom: 10px; +} +#g-comments +{ + padding: 20px; +} + +.yui-t5 #yui-main .yui-b +{ + margin-right: 210px; +} + +#g-photo +{ + padding: 20px; +} + +#g-banner { + position: relative; + z-index: 3; +} + +#g-exif-block-content { + padding: 0px 0px 0px 30px; +} + +/* Internet explorer workarounds */ +#g-banner { + z-index: 2; + zoom: 1; +} + +#g-photo, +#g-movie { + zoom: 1; +} diff --git a/themes/clean_canvas/css/screen_layout_fixed.css b/themes/clean_canvas/css/screen_layout_fixed.css new file mode 100755 index 0000000..2db05d9 --- /dev/null +++ b/themes/clean_canvas/css/screen_layout_fixed.css @@ -0,0 +1,70 @@ +/** + * Gallery 3 Clean Canvas Theme Screen Styles + * + * @requires YUI reset, font, grids CSS + * + * Sheet organization: + * 1) Font sizes, base HTML elements + * 2) Reusable content blocks + * 3) Page layout containers + * 4) Content blocks in specific layout containers + * 5) States and interactions + * 6) Positioning and order + * 7) Navigation and menus + * 8) jQuery and jQuery UI + * 9) Right-to-left language styles + */ + +/** ******************************************************************* + * 1) Font sizes, base HTML elements + **********************************************************************/ + +#g-sidebar{ + left: 90px; +} + +/** ******************************************************************* + * 2) Reusable content blocks + *********************************************************************/ + +/*** ****************************************************************** + * 3) Page layout containers + *********************************************************************/ + +/* Layout containers ~~~~~~~~~~~~~~~~~~~~~ */ + +#g-content { + width: 690px; +} + +/** ******************************************************************* + * 4) Content blocks in specific layout containers + *********************************************************************/ + +/** ******************************************************************* + * 5) States and interactions + **********************************************************************/ + +/** ******************************************************************* + * 6) Positioning and order + **********************************************************************/ + +/** ******************************************************************* + * 7) Navigation and menus + *********************************************************************/ + +/** ******************************************************************* + * 8) jQuery and jQuery UI + *********************************************************************/ + +/** ******************************************************************* + * 9) Right to left language styles + *********************************************************************/ + +#doc4 +{ + margin-top: 7px; + margin-bottom: 7px; + width: 880px !important; +} + diff --git a/themes/clean_canvas/css/screen_layout_wide.css b/themes/clean_canvas/css/screen_layout_wide.css new file mode 100755 index 0000000..bbe74cc --- /dev/null +++ b/themes/clean_canvas/css/screen_layout_wide.css @@ -0,0 +1,69 @@ +/** + * Gallery 3 Clean Canvas Theme Screen Styles + * + * @requires YUI reset, font, grids CSS + * + * Sheet organization: + * 1) Font sizes, base HTML elements + * 2) Reusable content blocks + * 3) Page layout containers + * 4) Content blocks in specific layout containers + * 5) States and interactions + * 6) Positioning and order + * 7) Navigation and menus + * 8) jQuery and jQuery UI + * 9) Right-to-left language styles + */ + +/** ******************************************************************* + * 1) Font sizes, base HTML elements + **********************************************************************/ + +#g-sidebar{ + left: 40px; +} + +/** ******************************************************************* + * 2) Reusable content blocks + *********************************************************************/ + +/*** ****************************************************************** + * 3) Page layout containers + *********************************************************************/ + +/* Layout containers ~~~~~~~~~~~~~~~~~~~~~ */ + +#g-content { + width: auto; +} + +/** ******************************************************************* + * 4) Content blocks in specific layout containers + *********************************************************************/ + +/** ******************************************************************* + * 5) States and interactions + **********************************************************************/ + +/** ******************************************************************* + * 6) Positioning and order + **********************************************************************/ + +/** ******************************************************************* + * 7) Navigation and menus + *********************************************************************/ + +/** ******************************************************************* + * 8) jQuery and jQuery UI + *********************************************************************/ + +/** ******************************************************************* + * 9) Right to left language styles + *********************************************************************/ + + +#doc3 +{ + margin: 3px 70px 0px 30px; + min-width: 700px; +} diff --git a/themes/clean_canvas/css/tagsmap_menu.css b/themes/clean_canvas/css/tagsmap_menu.css new file mode 100755 index 0000000..119cf7d --- /dev/null +++ b/themes/clean_canvas/css/tagsmap_menu.css @@ -0,0 +1,7 @@ +#g-view-menu #g-tagsmap-link { + background-image: url('../images/ico-view-tagsmap.png'); +} +#g-tagsmap-dialog { + color: black; +} +#g-tagsmap-dialog a { color: blue !important; } \ No newline at end of file diff --git a/themes/clean_canvas/images/avatar.jpg b/themes/clean_canvas/images/avatar.jpg new file mode 100755 index 0000000..ff2da23 Binary files /dev/null and b/themes/clean_canvas/images/avatar.jpg differ diff --git a/themes/clean_canvas/images/avatar.png b/themes/clean_canvas/images/avatar.png new file mode 100755 index 0000000..ff2da23 Binary files /dev/null and b/themes/clean_canvas/images/avatar.png differ diff --git a/themes/clean_canvas/images/canvaslogo.png b/themes/clean_canvas/images/canvaslogo.png new file mode 100755 index 0000000..fdc9e75 Binary files /dev/null and b/themes/clean_canvas/images/canvaslogo.png differ diff --git a/themes/clean_canvas/images/clean/background2.jpg b/themes/clean_canvas/images/clean/background2.jpg new file mode 100755 index 0000000..08f519b Binary files /dev/null and b/themes/clean_canvas/images/clean/background2.jpg differ diff --git a/themes/clean_canvas/images/clean/background_header.jpg b/themes/clean_canvas/images/clean/background_header.jpg new file mode 100755 index 0000000..f33f0c6 Binary files /dev/null and b/themes/clean_canvas/images/clean/background_header.jpg differ diff --git a/themes/clean_canvas/images/clean/ico-album.png b/themes/clean_canvas/images/clean/ico-album.png new file mode 100755 index 0000000..236035c Binary files /dev/null and b/themes/clean_canvas/images/clean/ico-album.png differ diff --git a/themes/clean_canvas/images/clean/ico-error.png b/themes/clean_canvas/images/clean/ico-error.png new file mode 100755 index 0000000..c37bd06 Binary files /dev/null and b/themes/clean_canvas/images/clean/ico-error.png differ diff --git a/themes/clean_canvas/images/clean/ico-info.png b/themes/clean_canvas/images/clean/ico-info.png new file mode 100755 index 0000000..12cd1ae Binary files /dev/null and b/themes/clean_canvas/images/clean/ico-info.png differ diff --git a/themes/clean_canvas/images/clean/ico-print.png b/themes/clean_canvas/images/clean/ico-print.png new file mode 100755 index 0000000..b82a8e1 Binary files /dev/null and b/themes/clean_canvas/images/clean/ico-print.png differ diff --git a/themes/clean_canvas/images/clean/ico-separator-rtl.gif b/themes/clean_canvas/images/clean/ico-separator-rtl.gif new file mode 100755 index 0000000..d9061a4 Binary files /dev/null and b/themes/clean_canvas/images/clean/ico-separator-rtl.gif differ diff --git a/themes/clean_canvas/images/clean/ico-separator.gif b/themes/clean_canvas/images/clean/ico-separator.gif new file mode 100755 index 0000000..3de2d0d Binary files /dev/null and b/themes/clean_canvas/images/clean/ico-separator.gif differ diff --git a/themes/clean_canvas/images/clean/ico-success.png b/themes/clean_canvas/images/clean/ico-success.png new file mode 100755 index 0000000..a9925a0 Binary files /dev/null and b/themes/clean_canvas/images/clean/ico-success.png differ diff --git a/themes/clean_canvas/images/clean/ico-view-comments.png b/themes/clean_canvas/images/clean/ico-view-comments.png new file mode 100755 index 0000000..e80eaf8 Binary files /dev/null and b/themes/clean_canvas/images/clean/ico-view-comments.png differ diff --git a/themes/clean_canvas/images/clean/ico-view-downloadarchive_new.png b/themes/clean_canvas/images/clean/ico-view-downloadarchive_new.png new file mode 100755 index 0000000..df8d24a Binary files /dev/null and b/themes/clean_canvas/images/clean/ico-view-downloadarchive_new.png differ diff --git a/themes/clean_canvas/images/clean/ico-view-fullsize.png b/themes/clean_canvas/images/clean/ico-view-fullsize.png new file mode 100755 index 0000000..7b7c905 Binary files /dev/null and b/themes/clean_canvas/images/clean/ico-view-fullsize.png differ diff --git a/themes/clean_canvas/images/clean/ico-view-slideshow-rtl.png b/themes/clean_canvas/images/clean/ico-view-slideshow-rtl.png new file mode 100755 index 0000000..5788b3c Binary files /dev/null and b/themes/clean_canvas/images/clean/ico-view-slideshow-rtl.png differ diff --git a/themes/clean_canvas/images/clean/ico-view-slideshow.png b/themes/clean_canvas/images/clean/ico-view-slideshow.png new file mode 100755 index 0000000..351e301 Binary files /dev/null and b/themes/clean_canvas/images/clean/ico-view-slideshow.png differ diff --git a/themes/clean_canvas/images/clean/ico-warning.png b/themes/clean_canvas/images/clean/ico-warning.png new file mode 100755 index 0000000..628cf2d Binary files /dev/null and b/themes/clean_canvas/images/clean/ico-warning.png differ diff --git a/themes/clean_canvas/images/clean/loading-large.gif b/themes/clean_canvas/images/clean/loading-large.gif new file mode 100755 index 0000000..cc70a7a Binary files /dev/null and b/themes/clean_canvas/images/clean/loading-large.gif differ diff --git a/themes/clean_canvas/images/clean/loading-small.gif b/themes/clean_canvas/images/clean/loading-small.gif new file mode 100755 index 0000000..d0bce15 Binary files /dev/null and b/themes/clean_canvas/images/clean/loading-small.gif differ diff --git a/themes/clean_canvas/images/clean/page_background.jpg b/themes/clean_canvas/images/clean/page_background.jpg new file mode 100755 index 0000000..b5fe588 Binary files /dev/null and b/themes/clean_canvas/images/clean/page_background.jpg differ diff --git a/themes/clean_canvas/images/dark/dark_grid_bg.gif b/themes/clean_canvas/images/dark/dark_grid_bg.gif new file mode 100755 index 0000000..5cd1589 Binary files /dev/null and b/themes/clean_canvas/images/dark/dark_grid_bg.gif differ diff --git a/themes/clean_canvas/images/dark/ico-album.png b/themes/clean_canvas/images/dark/ico-album.png new file mode 100755 index 0000000..236035c Binary files /dev/null and b/themes/clean_canvas/images/dark/ico-album.png differ diff --git a/themes/clean_canvas/images/dark/ico-error.png b/themes/clean_canvas/images/dark/ico-error.png new file mode 100755 index 0000000..c37bd06 Binary files /dev/null and b/themes/clean_canvas/images/dark/ico-error.png differ diff --git a/themes/clean_canvas/images/dark/ico-info.png b/themes/clean_canvas/images/dark/ico-info.png new file mode 100755 index 0000000..12cd1ae Binary files /dev/null and b/themes/clean_canvas/images/dark/ico-info.png differ diff --git a/themes/clean_canvas/images/dark/ico-print.png b/themes/clean_canvas/images/dark/ico-print.png new file mode 100755 index 0000000..b82a8e1 Binary files /dev/null and b/themes/clean_canvas/images/dark/ico-print.png differ diff --git a/themes/clean_canvas/images/dark/ico-separator-rtl.gif b/themes/clean_canvas/images/dark/ico-separator-rtl.gif new file mode 100755 index 0000000..d9061a4 Binary files /dev/null and b/themes/clean_canvas/images/dark/ico-separator-rtl.gif differ diff --git a/themes/clean_canvas/images/dark/ico-separator.gif b/themes/clean_canvas/images/dark/ico-separator.gif new file mode 100755 index 0000000..3de2d0d Binary files /dev/null and b/themes/clean_canvas/images/dark/ico-separator.gif differ diff --git a/themes/clean_canvas/images/dark/ico-success.png b/themes/clean_canvas/images/dark/ico-success.png new file mode 100755 index 0000000..a9925a0 Binary files /dev/null and b/themes/clean_canvas/images/dark/ico-success.png differ diff --git a/themes/clean_canvas/images/dark/ico-view-comments.png b/themes/clean_canvas/images/dark/ico-view-comments.png new file mode 100755 index 0000000..e80eaf8 Binary files /dev/null and b/themes/clean_canvas/images/dark/ico-view-comments.png differ diff --git a/themes/clean_canvas/images/dark/ico-view-downloadarchive_new.png b/themes/clean_canvas/images/dark/ico-view-downloadarchive_new.png new file mode 100755 index 0000000..df8d24a Binary files /dev/null and b/themes/clean_canvas/images/dark/ico-view-downloadarchive_new.png differ diff --git a/themes/clean_canvas/images/dark/ico-view-fullsize.png b/themes/clean_canvas/images/dark/ico-view-fullsize.png new file mode 100755 index 0000000..7b7c905 Binary files /dev/null and b/themes/clean_canvas/images/dark/ico-view-fullsize.png differ diff --git a/themes/clean_canvas/images/dark/ico-view-slideshow-rtl.png b/themes/clean_canvas/images/dark/ico-view-slideshow-rtl.png new file mode 100755 index 0000000..5788b3c Binary files /dev/null and b/themes/clean_canvas/images/dark/ico-view-slideshow-rtl.png differ diff --git a/themes/clean_canvas/images/dark/ico-view-slideshow.png b/themes/clean_canvas/images/dark/ico-view-slideshow.png new file mode 100755 index 0000000..351e301 Binary files /dev/null and b/themes/clean_canvas/images/dark/ico-view-slideshow.png differ diff --git a/themes/clean_canvas/images/dark/ico-warning.png b/themes/clean_canvas/images/dark/ico-warning.png new file mode 100755 index 0000000..628cf2d Binary files /dev/null and b/themes/clean_canvas/images/dark/ico-warning.png differ diff --git a/themes/clean_canvas/images/dark/loading-large.gif b/themes/clean_canvas/images/dark/loading-large.gif new file mode 100755 index 0000000..cc70a7a Binary files /dev/null and b/themes/clean_canvas/images/dark/loading-large.gif differ diff --git a/themes/clean_canvas/images/dark/loading-small.gif b/themes/clean_canvas/images/dark/loading-small.gif new file mode 100755 index 0000000..d0bce15 Binary files /dev/null and b/themes/clean_canvas/images/dark/loading-small.gif differ diff --git a/themes/clean_canvas/images/ico-denied-inactive.png b/themes/clean_canvas/images/ico-denied-inactive.png new file mode 100755 index 0000000..56db3ff Binary files /dev/null and b/themes/clean_canvas/images/ico-denied-inactive.png differ diff --git a/themes/clean_canvas/images/ico-denied-passive.png b/themes/clean_canvas/images/ico-denied-passive.png new file mode 100755 index 0000000..1e99223 Binary files /dev/null and b/themes/clean_canvas/images/ico-denied-passive.png differ diff --git a/themes/clean_canvas/images/ico-denied.png b/themes/clean_canvas/images/ico-denied.png new file mode 100755 index 0000000..08f2493 Binary files /dev/null and b/themes/clean_canvas/images/ico-denied.png differ diff --git a/themes/clean_canvas/images/ico-lock.png b/themes/clean_canvas/images/ico-lock.png new file mode 100755 index 0000000..2ebc4f6 Binary files /dev/null and b/themes/clean_canvas/images/ico-lock.png differ diff --git a/themes/clean_canvas/images/ico-success-inactive.png b/themes/clean_canvas/images/ico-success-inactive.png new file mode 100755 index 0000000..74b2032 Binary files /dev/null and b/themes/clean_canvas/images/ico-success-inactive.png differ diff --git a/themes/clean_canvas/images/ico-success-passive.png b/themes/clean_canvas/images/ico-success-passive.png new file mode 100755 index 0000000..dc8d1de Binary files /dev/null and b/themes/clean_canvas/images/ico-success-passive.png differ diff --git a/themes/clean_canvas/images/ico-success.png b/themes/clean_canvas/images/ico-success.png new file mode 100755 index 0000000..a9925a0 Binary files /dev/null and b/themes/clean_canvas/images/ico-success.png differ diff --git a/themes/clean_canvas/images/ico-view-calendarview.png b/themes/clean_canvas/images/ico-view-calendarview.png new file mode 100755 index 0000000..c5a1248 Binary files /dev/null and b/themes/clean_canvas/images/ico-view-calendarview.png differ diff --git a/themes/clean_canvas/images/ico-view-downloadfullsize.png b/themes/clean_canvas/images/ico-view-downloadfullsize.png new file mode 100755 index 0000000..4960351 Binary files /dev/null and b/themes/clean_canvas/images/ico-view-downloadfullsize.png differ diff --git a/themes/clean_canvas/images/ico-view-embedlinks.png b/themes/clean_canvas/images/ico-view-embedlinks.png new file mode 100755 index 0000000..ef8bd23 Binary files /dev/null and b/themes/clean_canvas/images/ico-view-embedlinks.png differ diff --git a/themes/clean_canvas/images/ico-view-minislideshow.png b/themes/clean_canvas/images/ico-view-minislideshow.png new file mode 100755 index 0000000..ad13671 Binary files /dev/null and b/themes/clean_canvas/images/ico-view-minislideshow.png differ diff --git a/themes/clean_canvas/images/ico-view-tagsmap.png b/themes/clean_canvas/images/ico-view-tagsmap.png new file mode 100755 index 0000000..6856aa5 Binary files /dev/null and b/themes/clean_canvas/images/ico-view-tagsmap.png differ diff --git a/themes/clean_canvas/js/ui.init.js b/themes/clean_canvas/js/ui.init.js new file mode 100755 index 0000000..3ee3e32 --- /dev/null +++ b/themes/clean_canvas/js/ui.init.js @@ -0,0 +1,131 @@ +/** + * Initialize jQuery UI and Gallery Plugins + */ + +$(document).ready(function() { + + // Initialize Superfish menus (hidden, then shown to address IE issue) + $("#g-site-menu .g-menu").hide().addClass("sf-menu"); + $("#g-site-menu .g-menu").superfish({ + delay: 500, + animation: { + opacity:'show', + height:'show' + }, + pathClass: "g-selected", + speed: 'fast' + }).show(); + + // Initialize status message effects + $("#g-action-status li").gallery_show_message(); + + // Initialize dialogs + $(".g-dialog-link").gallery_dialog(); + + // Initialize short forms + $(".g-short-form").gallery_short_form(); + + // Apply jQuery UI icon, hover, and rounded corner styles + $("input[type=submit]:not(.g-short-form input)").addClass("ui-state-default ui-corner-all"); + if ($("#g-view-menu").length) { + $("#g-view-menu ul").removeClass("g-menu").removeClass("sf-menu"); + $("#g-view-menu a").addClass("ui-icon"); + } + + // Apply jQuery UI icon and hover styles to context menus + if ($(".g-context-menu").length) { + $(".g-context-menu li").addClass("ui-state-default"); + $(".g-context-menu a").addClass("g-button ui-icon-left"); + $(".g-context-menu a").prepend(""); + $(".g-context-menu a span").each(function() { + var iconClass = $(this).parent().attr("class").match(/ui-icon-.[^\s]+/).toString(); + $(this).addClass(iconClass); + }); + } + + // Remove titles for menu options since we're displaying that text anyway + $(".sf-menu a, .sf-menu li").removeAttr("title"); + + // Album and search results views + if ($("#g-album-grid").length) { + // Set equal height for album items and vertically align thumbnails/metadata + $('.g-item').equal_heights().gallery_valign(); + + // Initialize thumbnail hover effect + $(".g-item").hover( + function() { + // Insert a placeholder to hold the item's position in the grid + var placeHolder = $(this).clone().attr("id", "g-place-holder"); + $(this).after($(placeHolder)); + // Style and position the hover item + var position = $(this).position(); + $(this).css("top", position.top).css("left", position.left); + $(this).addClass("g-hover-item"); + // Initialize the contextual menu + $(this).gallery_context_menu(); + // Set the hover item's height + $(this).height("auto"); + var context_menu = $(this).find(".g-context-menu"); + var adj_height = $(this).height() + context_menu.height(); + if ($(this).next().height() > $(this).height()) { + $(this).height($(this).next().height()); + } else if ($(this).prev().height() > $(this).height()) { + $(this).height($(this).prev().height()); + } else { + $(this).height(adj_height); + } + }, + function() { + // Reset item height and position + if ($(this).next().height()) { + var sib_height = $(this).next().height(); + } else { + var sib_height = $(this).prev().height(); + } + if ($.browser.msie && $.browser.version <= 8) { + sib_height = sib_height + 1; + } + $(this).css("height", sib_height); + $(this).css("position", "relative"); + $(this).css("top", 0).css("left", 0); + // Remove the placeholder and hover class from the item + $(this).removeClass("g-hover-item"); + $(this).gallery_valign(); + $("#g-place-holder").remove(); + } + ); + + // Realign any thumbnails that change so that when we rotate a thumb it stays centered. + $(".g-item").bind("gallery.change", function() { + $(".g-item").each(function() { + $(this).height($(this).find("img").height() + 2); + }); + $(".g-item").equal_heights().gallery_valign(); + }); + } + + // Photo/Item item view + if ($("#g-photo,#g-movie").length) { + // Ensure the resized image fits within its container + $("#g-photo,#g-movie").gallery_fit_photo(); + + // Initialize context menus + $("#g-photo,#g-movie").hover(function(){ + $(this).gallery_context_menu(); + }); + + // Add scroll effect for links to named anchors + $.localScroll({ + queue: true, + duration: 1000, + hash: true + }); + + $(this).find(".g-dialog-link").gallery_dialog(); + $(this).find(".g-ajax-link").gallery_ajax(); + } + + // Initialize button hover effect + $.fn.gallery_hover_init(); + +}); diff --git a/themes/clean_canvas/theme.info b/themes/clean_canvas/theme.info new file mode 100755 index 0000000..f0969ef --- /dev/null +++ b/themes/clean_canvas/theme.info @@ -0,0 +1,6 @@ +name = "Clean Canvas Theme" +description = "This is thought to be a color neutral and clean, simple but elegant theme for Gallery 3. A small thank you to the community behind. Some compromise were to be made with Internet Explorer compatibility, though. Hope you like it! - The dark version was provided by Hukoeth." +version = 1.08 +author = "marshfire, Ronny Schulz, darkened by hukoeth" +site = 1 +admin = 0 diff --git a/themes/clean_canvas/thumbnail.png b/themes/clean_canvas/thumbnail.png new file mode 100755 index 0000000..6ee9433 Binary files /dev/null and b/themes/clean_canvas/thumbnail.png differ diff --git a/themes/clean_canvas/views/album.html.php b/themes/clean_canvas/views/album.html.php new file mode 100755 index 0000000..f1fa1d4 --- /dev/null +++ b/themes/clean_canvas/views/album.html.php @@ -0,0 +1,73 @@ + + + + + + + + + + +
    + album_top() ?> +

    title) ?>

    +
    description)) ?>
    +
    + + +album_bottom() ?> + +paginator() ?> diff --git a/themes/clean_canvas/views/block.html.php b/themes/clean_canvas/views/block.html.php new file mode 100755 index 0000000..699d7c2 --- /dev/null +++ b/themes/clean_canvas/views/block.html.php @@ -0,0 +1,10 @@ + + + + +
    +

    +
    + +
    +
    diff --git a/themes/clean_canvas/views/comment.html.php b/themes/clean_canvas/views/comment.html.php new file mode 100755 index 0000000..5abaf32 --- /dev/null +++ b/themes/clean_canvas/views/comment.html.php @@ -0,0 +1,25 @@ + +
  • +

    + + " + class="g-avatar" + alt="author_name()) ?>" + width="40" + height="40" /> + + author()->guest): ?> + gallery::date_time($comment->created), + "name" => html::clean($comment->author_name()))) ?> + + %name said", + array("date_time" => gallery::date_time($comment->created), + "url" => user_profile::url($comment->author_id), + "name" => html::clean($comment->author_name()))) ?> + +

    +
    + text)) ?> +
    +
  • diff --git a/themes/clean_canvas/views/dynamic.html.php b/themes/clean_canvas/views/dynamic.html.php new file mode 100755 index 0000000..a8a4d36 --- /dev/null +++ b/themes/clean_canvas/views/dynamic.html.php @@ -0,0 +1,29 @@ + +
    +
    + dynamic_top() ?> +
    +

    +
    + +
      + $child): ?> +
    • "> + thumb_top($child) ?> + + photo + +

      title) ?>

      + thumb_bottom($child) ?> + +
    • + +
    +dynamic_bottom() ?> + +paginator() ?> diff --git a/themes/clean_canvas/views/info_block.html.php b/themes/clean_canvas/views/info_block.html.php new file mode 100755 index 0000000..3edfca5 --- /dev/null +++ b/themes/clean_canvas/views/info_block.html.php @@ -0,0 +1,31 @@ + + diff --git a/themes/clean_canvas/views/info_theme.php b/themes/clean_canvas/views/info_theme.php new file mode 100755 index 0000000..3382d88 --- /dev/null +++ b/themes/clean_canvas/views/info_theme.php @@ -0,0 +1,30 @@ +view_count) { + $results .= "
  • "; + $results .= t("Views: %view_count", array("view_count" => $item->view_count)); + $results .= "
  • "; + } + return $results; + } +} \ No newline at end of file diff --git a/themes/clean_canvas/views/movie.html.php b/themes/clean_canvas/views/movie.html.php new file mode 100755 index 0000000..158857d --- /dev/null +++ b/themes/clean_canvas/views/movie.html.php @@ -0,0 +1,19 @@ + +
    + photo_top() ?> + + paginator() ?> + +
    + resize_top($item) ?> + movie_img(array("class" => "g-movie", "id" => "g-item-id-{$item->id}")) ?> + resize_bottom($item) ?> +
    + +
    +

    title) ?>

    +
    description)) ?>
    +
    + + photo_bottom() ?> +
    diff --git a/themes/clean_canvas/views/no_sidebar.html.php b/themes/clean_canvas/views/no_sidebar.html.php new file mode 100755 index 0000000..58c5725 --- /dev/null +++ b/themes/clean_canvas/views/no_sidebar.html.php @@ -0,0 +1,11 @@ + +
      +
    • + + + + + + "> +
    • +
    diff --git a/themes/clean_canvas/views/page.html.php b/themes/clean_canvas/views/page.html.php new file mode 100755 index 0000000..641d2cf --- /dev/null +++ b/themes/clean_canvas/views/page.html.php @@ -0,0 +1,188 @@ + + +html_attributes() ?> xml:lang="en" lang="en"> + + + start_combining("script,css") ?> + + <? if ($page_title): ?> + <?= $page_title ?> + <? else: ?> + <? if ($theme->item()): ?> + <?= $theme->item()->title ?> + <? elseif ($theme->tag()): ?> + <?= t("Photos tagged with %tag_title", array("tag_title" => $theme->tag()->name)) ?> + <? else: /* Not an item, not a tag, no page_title specified. Help! */ ?> + <?= item::root()->title ?> + <? endif ?> + <? endif ?> + + " + type="image/x-icon" /> + " /> + page_type == "collection"): ?> + thumb_proportion($theme->item())) != 1): ?> + + + + + + + script("json2-min.js") ?> + script("jquery.js") ?> + script("jquery.form.js") ?> + script("jquery-ui.js") ?> + script("gallery.common.js") ?> + + + script("gallery.ajax.js") ?> + script("gallery.dialog.js") ?> + script("superfish/js/superfish.js") ?> + script("jquery.localscroll.js") ?> + + + page_subtype == "photo"): ?> + script("jquery.scrollTo.js") ?> + script("gallery.show_full_size.js") ?> + page_subtype == "movie"): ?> + script("flowplayer.js") ?> + + + head() ?> + + + script("ui.init.js") ?> + css("yui/reset-fonts-grids.css") ?> + css("superfish/css/superfish.css") ?> + + css("dark/themeroller/ui.base.css") ?> + css("dark/screen_colors.css") ?> + css("dark/screen_candy.css") ?> + + css("clean/themeroller/ui.base.css") ?> + css("clean/screen_colors.css") ?> + css("clean/screen_candy.css") ?> + + css("screen_layout_base.css") ?> + css("screen_fonts.css") ?> + + css("screen_layout_wide.css") ?> + + css("screen_layout_fixed.css") ?> + + + + + get_combined("script") ?> + + + get_combined("css") ?> + + + body_attributes() ?>> + page_top() ?> + +
    + +
    + + site_status() ?> +
    +
    + + + + + + user_menu() ?> + header_top() ?> +
    + + 1 ) { ?> + $display_name) { ?> + + + + installed_locales = array_merge(array("" => t("« none »")), $locales); ?> + selected = (string) locales::cookie_locale(); ?> + + +
    + + + + + header_bottom() ?> +
    + + + + +
    +
    +
    +
    +
    + messages() ?> + +
    +
    +
    + item() && !empty($parents))): ?> + + +
    + page_subtype != "login"): ?> + + +
    +
    + +
    + page_bottom() ?> + + diff --git a/themes/clean_canvas/views/paginator.html.php b/themes/clean_canvas/views/paginator.html.php new file mode 100755 index 0000000..5034c96 --- /dev/null +++ b/themes/clean_canvas/views/paginator.html.php @@ -0,0 +1,87 @@ + + + +
      +
    • + + + + + + + + + + + + + + + + + +
    • + +
    • + + + $first_visible_position, + "to_number" => $last_visible_position, + "count" => $total)) ?> + + $position, "total" => $total)) ?> + + + + +
    • + +
    • + + + + + + + + + + + + + + + + + +
    • +
    diff --git a/themes/clean_canvas/views/photo.html.php b/themes/clean_canvas/views/photo.html.php new file mode 100755 index 0000000..12f1b39 --- /dev/null +++ b/themes/clean_canvas/views/photo.html.php @@ -0,0 +1,97 @@ + + + + + +item())): ?> + + + + + + + + + + + + +
    + photo_top() ?> + + paginator() ?> + + +
    + parent()->children() as $i => $child): ?> + id === $item->id ): ?> +
    + + + +
    + + + dummy + + + +
    + + + + + +
    +

    title) ?>

    +
    description)) ?>
    +
    + + photo_bottom() ?> +
    + diff --git a/themes/clean_canvas/views/sidebar.html.php b/themes/clean_canvas/views/sidebar.html.php new file mode 100755 index 0000000..086d135 --- /dev/null +++ b/themes/clean_canvas/views/sidebar.html.php @@ -0,0 +1,16 @@ + +sidebar_top() ?> +
    + + album_menu() ?> + + photo_menu() ?> + + movie_menu() ?> + + tag_menu() ?> + +
    + +sidebar_blocks() ?> +sidebar_bottom() ?> diff --git a/themes/clean_canvas/views/user_languages_block.html.php b/themes/clean_canvas/views/user_languages_block.html.php new file mode 100755 index 0000000..60ec269 --- /dev/null +++ b/themes/clean_canvas/views/user_languages_block.html.php @@ -0,0 +1,23 @@ + + + + + + $value): ?> + 0) : ?> 1) : ?> | + + diff --git a/themes/greydragon/admin/controllers/admin_theme_options.php b/themes/greydragon/admin/controllers/admin_theme_options.php new file mode 100755 index 0000000..e8094e8 --- /dev/null +++ b/themes/greydragon/admin/controllers/admin_theme_options.php @@ -0,0 +1,860 @@ + +load_theme_info(); + return ($theme_info->version); + } + + private function get_theme_name() { + $theme_info = $this->load_theme_info(); + return ($theme_info->name); + } + + private function get_packlist($type, $filename) { + $packlist = array(); + $packroot = THEMEPATH . 'greydragon/css/' . $type . '/'; + + foreach (scandir($packroot) as $pack_name): + if (file_exists($packroot . "$pack_name/css/" . $filename . ".css")): + if ($pack_name[0] == "."): + continue; + endif; + + $packlist[$pack_name] = t($pack_name); + endif; + endforeach; + return $packlist; + } + + private function get_colorpacks() { + return $this->get_packlist('colorpacks', 'colors'); + } + + private function get_framepacks() { + return $this->get_packlist('framepacks', 'frame'); + } + + private function prerequisite_check($group, $id, $is_ok, $caption, $caption_ok, $caption_failed, $iswarning, $msg_error) { + $confirmation_caption = ($is_ok)? $caption_ok : $caption_failed; + $checkbox = $group->checkbox($id) + ->label($caption . " " . $confirmation_caption) + ->checked($is_ok) + ->disabled(true); + if ($is_ok): + $checkbox->class("g-success"); + elseif ($iswarning): + $checkbox->class("g-prerequisite g-warning")->error_messages("failed", $msg_error)->add_error("failed", 1); + else: + $checkbox->class("g-error")->error_messages("failed", $msg_error)->add_error("failed", 1); + endif; + } + + /* Convert old values ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + protected function upgrade_settings() { + if (module::get_var("th_greydragon", "hide_thumbmeta")): + module::set_var("th_greydragon", "thumb_metamode", "hide"); + module::clear_var("th_greydragon", "hide_thumbmeta"); + endif; + + if (module::get_var("gallery", "appletouchicon_url")): + $temp = module::get_var("gallery", "appletouchicon_url"); + module::set_var("gallery", "apple_touch_icon_url", $temp); + module::clear_var("gallery", "appletouchicon_url"); + endif; + + if (module::get_var("th_greydragon", "flex_rows", FALSE)): + module::set_var("th_greydragon", "column_count", -1); + module::clear_var("th_greydragon", "flex_rows"); + endif; + + if (module::get_var("th_greydragon", "thumb_descmode") == "overlay_static"): + module::set_var("th_greydragon", "thumb_descmode", "overlay_top"); + endif; + + if (module::get_var("th_greydragon", "mainmenu_position") == "1"): + module::set_var("th_greydragon", "mainmenu_position", "top"); + endif; + + if (module::get_var("th_greydragon", "hide_breadcrumbs")): + module::set_var("th_greydragon", "breadcrumbs_position", "hide"); + module::clear_var("th_greydragon", "hide_breadcrumbs"); + endif; + + if (module::get_var("th_greydragon", "photonav_position")): + $temp = module::get_var("th_greydragon", "photonav_position"); + module::set_var("th_greydragon", "paginator_album", $temp); + module::set_var("th_greydragon", "paginator_photo", $temp); + module::clear_var("th_greydragon", "photonav_position"); + endif; + + if (module::get_var("th_greydragon", "sidebar_allowed") == "none"): + module::set_var("th_greydragon", "sidebar_allowed", "default"); + endif; + + if (module::get_var("th_greydragon", "thumb_topalign")): + module::set_var("th_greydragon", "thumb_imgalign", "top"); + module::clear_var("th_greydragon", "thumb_topalign"); + elseif ((module::get_var("th_greydragon", "thumb_ratio") == "photo") && (!module::get_var("th_greydragon", "thumb_imgalign"))): + module::set_var("th_greydragon", "thumb_imgalign", "center"); + endif; + } + + protected function isCurlInstalled() { + if (in_array('curl', get_loaded_extensions())) { + return true; + } else { + return false; + } + } + + protected function get_edit_form_admin() { + $this->upgrade_settings(); + + $form = new Forge("admin/theme_options/save/", "", null, array("id" =>"g-theme-options-form")); + + $rssmodulecheck = (module::is_active("rss") && module::info("rss")); + + /* Prerequisites ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + $group = $form->group("requirements")->label(t("Prerequisites")); + $gallery_ver = module::get_version("gallery"); + $this->prerequisite_check($group, "vercheck", $gallery_ver >= $this->min_gallery_ver, + t("Gallery 3 Core v.") . $this->min_gallery_ver . "+", t("Installed"), t("Required"), FALSE, sprintf(t("Check Failed. Minimum Required Version is %s. Found %s."), $this->min_gallery_ver, $gallery_ver)); + if (module::get_var("th_greydragon", "allow_root_page")): + $this->prerequisite_check($group, "rsscheck", $rssmodulecheck, + t("RSS Module"), t("Found"), t("not Found"), TRUE, t("Install RSS module to Enable Root Page Support")); + endif; + $this->prerequisite_check($group, "curlcheck", ($this->isCurlInstalled()), + t("PHP CURL Support is"), t("Enabled"), t("Disabled"), TRUE, t("Please make sure CURL support is enabled in PHP")); + + /* Suggested Modules ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + $group = $form->group("recommended")->label(t("Suggested Modules")); + + $check_infos = array(); + if (!module::get_var("th_greydragon", "hide_thumbmeta")): + $this->prerequisite_check($group, "info", (module::is_active("info") and module::info("info")), + t("Info Module"), t("Found"), t("Required"), FALSE, t("Check Failed. Module is required to display Thumb metadata.")); + endif; + + if (module::is_active("fancybox") && module::info("fancybox")): + $check_infos[] = array("module" => "fancybox", "module_name" => "Fancybox", "link" => ''); + endif; + if (module::is_active("colorbox") && module::info("colorbox")): + $check_infos[] = array("module" => "colorbox", "module_name" => "Colorbox", "link" => ''); + endif; + if (module::is_active("shadowbox") && module::info("shadowbox")): + $check_infos[] = array("module" => "shadowbox", "module_name" => "Shadowbox", "link" => ''); + endif; + + switch (count($check_infos)): + case 0: + $check_infos[] = array("module" => "fancybox", "module_name" => "Fancybox", "link" => ''); + $this->prerequisite_check($group, "fancybox", FALSE, + t("Fancybox/Colorbox/Shadowbox") . " " . t("Module"), t("Found"), t("not Found"), TRUE, sprintf(t("Install %smodule%s to Enable %s Support"), '', '', t("Fancybox"))); + break; + case 1: + $check_info = $check_infos[0]; + $this->prerequisite_check($group, $check_info["module"], TRUE, + t($check_info["module_name"]) . " " . t("Module"), t("Found"), t("not Found"), TRUE, sprintf(t("Install %smodule%s to Enable %s Support"), $check_info["link"], '', t($check_info["module_name"]))); + break; + default: + $list = ""; + $first = TRUE; + foreach ($check_infos as $key => $check_info): + if ($first): + $list .= $check_infos[$key]["module_name"]; + $first = FALSE; + else: + $list .= ", " . $check_infos[$key]["module_name"]; + endif; + endforeach; + + $this->prerequisite_check($group, "fancybox", FALSE, + t($list . " Modules are Active"), + "", + "", + TRUE, + t("Slideshow feature would not work correctly. Please activate just one of these modules.")); + + break; + endswitch; + + $check_info = $check_infos[0]; + $thumbnavcheck = module::is_active("thumbnav") and module::info("thumbnav"); + + $this->prerequisite_check($group, "kbdnavcheck", ((module::is_active("kbd_nav")) and (module::info("kbd_nav"))), + t("Kbd Navigation Module"), t("Found"), t("not Found"), TRUE, sprintf(t("Install %smodule%s to Enable Keyboard Navigation Support"), '', '')); + $this->prerequisite_check($group, "thumbnavcheck", $thumbnavcheck, + t("ThumbNav Module"), t("Found"), t("not Found"), TRUE, sprintf(t("Install %smodule%s to Enable Thumb Navigation Support"), '', '')); + + $thumb_ratio = module::get_var("th_greydragon", "thumb_ratio", "photo"); + $thumb_ratio_ex = FALSE; + switch ($thumb_ratio): + case "photo_ex": + $thumb_ratio = "photo"; + $thumb_ratio_ex = TRUE; + break; + case "film_ex": + $thumb_ratio = "film"; + $thumb_ratio_ex = TRUE; + break; + case "digital_ex": + $thumb_ratio = "digital"; + $thumb_ratio_ex = TRUE; + break; + case "wide_ex": + $thumb_ratio = "wide"; + $thumb_ratio_ex = TRUE; + break; + default: + break; + endswitch; + + /* General Settings ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + $sidebar_allowed = module::get_var("th_greydragon", "sidebar_allowed"); + $sidebar_visible = module::get_var("th_greydragon", "sidebar_visible"); + + $group = $form->group("edit_theme")->label(t("General Settings")); + $group->hidden("g_auto_delay") + ->value(module::get_var("th_greydragon", "auto_delay", 30)); + $group->input("row_count") + ->label(t("Rows per Album Page")) + ->rules("required|valid_digit") + ->error_messages("required", t("You must enter a number")) + ->error_messages("valid_digit", t("You must enter a number")) + ->value(module::get_var("th_greydragon", "row_count", 3)); + $group->dropdown("column_count") + ->label(t("Columns per Album Page")) + ->options(array("2" => t("2 columns"), "3" => t("3 columns"), "4" => t("4 columns"), "5" => t("5 columns"), "-1" => t("Flexible (3 x Number of Rows)"))) + ->selected(module::get_var("th_greydragon", "column_count", 3)); + $group->input("resize_size") + ->label(t("Resized Image Size (in pixels)")) + ->rules("required|valid_digit") + ->error_messages("required", t("You must enter a number")) + ->error_messages("valid_digit", t("You must enter a number")) + ->value(module::get_var("gallery", "resize_size")); + $group->input("logo_path") + ->label(t("Alternate Logo Image")) + ->value(module::get_var("th_greydragon", "logo_path")); + $group->input("favicon") + ->label(t("URL (or relative path) to your favicon.ico")) + ->value(module::get_var("gallery", "favicon_url")); + $group->input("appletouchicon") + ->label(t("URL (or relative path) to your Apple Touch icon")) + ->value(module::get_var("gallery", "apple_touch_icon_url")); + $group->input("header_text") + ->label(t("Header Text")) + ->value(module::get_var("gallery", "header_text")); + $group->input("footer_text") + ->label(t("Footer Text")) + ->value(module::get_var("gallery", "footer_text")); + $group->input("copyright") + ->label(t("Copyright Message")) + ->value(module::get_var("th_greydragon", "copyright")); + $group->dropdown("colorpack") + ->label(t("Color Pack/Site theme")) + ->options(self::get_colorpacks()) + ->selected(module::get_var("th_greydragon", "color_pack", "greydragon")); + $group->dropdown("framepack") + ->label(t("Thumb Frame Pack")) + ->options(self::get_framepacks()) + ->selected(module::get_var("th_greydragon", "frame_pack", "greydragon")); + + /* Advanced Options - General ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + $group = $form->group("edit_theme_adv_main")->label(t("Advanced Options - General")); + $group->dropdown("viewmode") + ->label(t("Theme View Mode")) + ->options(array("default" => t("Full Mode (Default)"), "mini" => t("Mini Mode"))) + ->selected(module::get_var("th_greydragon", "viewmode", "default")); + $group->dropdown("mainmenu_position") + ->label(t("Main Menu Position")) + ->options(array("default" => t("Bottom-Left (Default)"), "top" => t("Top-Left"), "bar" => t("Top Bar"))) + ->selected(module::get_var("th_greydragon", "mainmenu_position")); + $group->dropdown("loginmenu_position") + ->label(t("Login Menu Position")) + ->options(array("header" => t("Header"), "default" => t("Footer (Default)"), "hide" => t("Hide"))) + ->selected(module::get_var("th_greydragon", "loginmenu_position", "default")); + $group->dropdown("breadcrumbs_position") + ->label(t("Breadcrumbs Position")) + ->options(array("default" => t("Bottom-Right (Default)"), "bottom-left" => t("Bottom-Left"), "top-right" => t("Top-Right"), "top-left" => t("Top-Left"), "hide" => t("Hide"))) + ->selected(module::get_var("th_greydragon", "breadcrumbs_position")); + $group->dropdown("title_source") + ->label(t("Title Source")) + ->options(array("default" => t("Title (Default)"), "no-filename" => t("Title/Suppress File Name"), "description" => t("Description"))) + ->selected(module::get_var("th_greydragon", "title_source", "default")); + $group->input("custom_css_path") + ->label(t("File Name of custom.css or equivalent")) + ->value(module::get_var("th_greydragon", "custom_css_path")); + $group->input("resize_quality") + ->label(t("Resized Image Quallity (in %)")) + ->rules("required|valid_digit") + ->error_messages("required", t("You must enter a number")) + ->error_messages("valid_digit", t("You must enter a number")) + ->value(module::get_var("gallery", "image_quality", 100)); + $group->input("visible_title_length") + ->label(t("Visible Title Length")) + ->rules("required|valid_digit") + ->error_messages("required", t("You must enter a number")) + ->error_messages("valid_digit", t("You must enter a number")) + ->value(module::get_var("gallery", "visible_title_length", 15)); + + $group->checkbox("show_guest_menu") + ->label(t("Show Main Menu for Guest Users")) + ->checked(module::get_var("th_greydragon", "show_guest_menu")); + $group->checkbox("toolbar_large") + ->label(t("Use Large Toolbar Buttons")) + ->checked(module::get_var("th_greydragon", "toolbar_large")); + $group->checkbox("show_credits") + ->label(t("Show Site Credits")) + ->checked(module::get_var("gallery", "show_credits")); + $group->checkbox("breadcrumbs_showinroot") + ->label(t("Show Breadcrumbs in root album/root page")) + ->checked(module::get_var("th_greydragon", "breadcrumbs_showinroot")); + $group->checkbox("disable_seosupport") + ->label(t("Disallow Search Engine Indexing (No Bots)")) + ->checked(module::get_var("th_greydragon", "disable_seosupport")); + $group->checkbox("desc_allowbbcode") + ->label(t("Allow BBCode/HTML in Descriptions")) + ->checked(module::get_var("th_greydragon", "desc_allowbbcode")); + $group->checkbox("use_permalinks") + ->label(t("Use Permalinks for Navigation")) + ->checked(module::get_var("th_greydragon", "use_permalinks")); + + /* Advanced Options - Album page ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + $group = $form->group("edit_theme_adv_album")->label(t("Advanced Options - Album Page")); + $group->dropdown("paginator_album") + ->label(t("Paginator Position")) + ->options(array("top" => t("Top"), "bottom" => t("Bottom"), "both" => t("Both"), "none" => t("None"))) + ->selected(module::get_var("th_greydragon", "paginator_album")); + $group->dropdown("album_descmode") + ->label(t("Description Display Mode")) + ->options(array("hide" => t("Hide"), "top" => t("Top"), "bottom" => t("Bottom"))) + ->selected(module::get_var("th_greydragon", "album_descmode")); + $group->checkbox("disablephotopage") + ->label(t("Disable Photo Page (use Slideshow Mode)")) + ->checked(module::get_var("th_greydragon", "disablephotopage")); + $group->checkbox("hidecontextmenu") + ->label(t("Hide Context Menu")) + ->checked(module::get_var("th_greydragon", "hidecontextmenu")); + + /* Advanced Options - Album page - Thumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + $group = $form->group("edit_theme_adv_thumb")->label(t("Advanced Options - Album page - Thumbs")); + $group->dropdown("thumb_ratio") + ->label(t("Aspect Ratio")) + ->options(array("photo" => t("Actual"), "film" => t("Film/Full Frame 3:2"), "digital" => t("Digital 4:3"), "wide" => t("Wide/HDTV 16:9"))) + ->selected($thumb_ratio); + $group->checkbox("thumb_ratio_ex") + ->label(t("Expanded Aspect Ratio (300px wide)")) + ->checked($thumb_ratio_ex); + $group->dropdown("thumb_imgalign") + ->label(t("Thumb Image Align")) + ->options(array("top" => t("Top"), "center" => t("Center"), "bottom" => t("Bottom"), "fit" => t("Fit"))) + ->selected(module::get_var("th_greydragon", "thumb_imgalign")); + + $group->dropdown("thumb_descmode_a") + ->label(t("Title Display Mode (Album)")) + ->options(array("overlay" => t("Overlay Top"), "overlay_top" => t("Overlay Top (Static)"), + "overlay_bottom" => t("Overlay Bottom (Static)"), "bottom" => t("Bottom"), "hide" => t("Hide"))) + ->selected(module::get_var("th_greydragon", "thumb_descmode_a")); + $group->dropdown("thumb_descmode") + ->label(t("Title Display Mode (Photo)")) + ->options(array("overlay" => t("Overlay Top"), "overlay_top" => t("Overlay Top (Static)"), + "overlay_bottom" => t("Overlay Bottom (Static)"), "bottom" => t("Bottom"), "hide" => t("Hide"))) + ->selected(module::get_var("th_greydragon", "thumb_descmode")); + $group->dropdown("thumb_metamode") + ->label(t("Meta Data Display Mode")) + ->options(array("default" => t("Overlay (Default)"), "merged" => t("Merge with Title"), "hide" => t("Hide"))) + ->selected(module::get_var("th_greydragon", "thumb_metamode", "default")); + $group->checkbox("thumb_random") + ->label(t("Randomize Thumb Image")) + ->checked(module::get_var("th_greydragon", "thumb_random")); + + /* Advanced Options - Photo page ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + $group = $form->group("edit_theme_adv_photo")->label(t("Advanced Options - Photo Page")); + $group->dropdown("paginator_photo") + ->label(t("Paginator Position")) + ->options(array("top" => t("Top"), "bottom" => t("Bottom"), "both" => t("Both"), "none" => t("None"))) + ->selected(module::get_var("th_greydragon", "paginator_photo")); + $group->dropdown("photo_descmode") + ->label(t("Description Display Mode")) + ->options(array("overlay_top" => t("Overlay Top"), "overlay_bottom" => t("Overlay Bottom"), "overlay_top_s" => t("Overlay Top (Static)"), + "overlay_bottom_s" => t("Overlay Bottom (Static)"), "bottom" => t("Bottom"), "top" => t("Top"), "hide" => t("Hide"))) + ->selected(module::get_var("th_greydragon", "photo_descmode")); + $group->dropdown("photo_popupbox") + ->label(t($check_info["module_name"]) . " " . t("Mode")) + ->options(array("default" => t("Default (Slideshow/Preview)"), "preview" => t("Preview Only"), "none" => t("Disable"))) + ->selected(module::get_var("th_greydragon", "photo_popupbox")); + $group->checkbox("thumb_inpage") + ->label(t("Keep Thumb Nav Block on the side")) + ->checked(module::get_var("th_greydragon", "thumb_inpage")); + if (!$thumbnavcheck): + $group->thumb_inpage->disabled(true); + endif; + $group->checkbox("hide_photometa") + ->label(t("Hide Item Meta Data")) + ->checked(module::get_var("th_greydragon", "hide_photometa", TRUE)); + + /* Advanced Options - Root Page ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + $group = $form->group("edit_theme_adv_root")->label(t("Advanced Options - Root Page")); + $group->checkbox("allow_root_page") + ->label(t("Allow root page")) + ->checked(module::get_var("th_greydragon", "allow_root_page")); + $group->checkbox("show_root_desc") + ->label(t("Show Gallery Description")) + ->checked(!module::get_var("th_greydragon", "hide_root_desc")); + $group->input("root_feed") + ->label(t("Slideshow RSS Feed URL")) + ->value(module::get_var("th_greydragon", "root_feed", "/gallery3/index.php/rss/feed/gallery/latest")); + $group->dropdown("root_cyclemode") + ->label(t("Cycle Effect (Default: Fade)")) + ->options(array("fade" => t("Fade"), "fadeout" => t("Fade Out"), "fadeZoom" => t("Fade Zoom"), "blindX" => t("Blind X"), "blindY" => t("Blind Y"), + "blindZ" => t("Blind Z"), "cover" => t("Cover"), "curtainX" => t("Curtain X"), "curtainY" => t("Curtain Y"), "growX" => t("Grow X"), + "growY" => t("Grow Y"), "none" => t("None"), "scrollUp" => t("Scroll Up"), "scrollDown" => t("Scroll Down"), "scrollLeft" => t("Scroll Left"), + "scrollRight" => t("Scroll Right"), "scrollHorz" => t("Scroll Horz"), "scrollVert" => t("Scroll Vert"), "shuffle" => t("Shuffle"), + "slideX" => t("Slide X"), "slideY" => t("Slide Y"), "toss" => t("Toss"), "turnUp" => t("Turn Up"), "turnDown" => t("Turn Down"), + "turnLeft" => t("Turn Left"), "turnRight" => t("Turn Right"), "uncover" => t("Uncover"), "wipe" => t("Wipe"), "zoom" => t("Zoom"))) + ->selected(module::get_var("th_greydragon", "root_cyclemode")); + $group->input("root_delay") + ->label(t("Slideshow Delay (Default: 15)")) + ->rules("required|valid_digit") + ->error_messages("required", t("You must enter a number")) + ->error_messages("valid_digit", t("You must enter a number")) + ->value(module::get_var("th_greydragon", "root_delay", "15")); + $group->checkbox("hide_root_sidebar") + ->label(t("Hide Sidebar")) + ->checked(module::get_var("th_greydragon", "hide_root_sidebar")); + $group->textarea("root_description") + ->label(t("Alternative Description (optional)")) + ->value(module::get_var("th_greydragon", "root_description")); + + /* Sidebar Options ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + $group = $form->group("edit_theme_side")->label(t("Sidebar Options")); + $group->checkbox("hide_blockheader") + ->label(t("Hide Block Header")) + ->checked(module::get_var("th_greydragon", "hide_blockheader")); + $group->checkbox("sidebar_albumonly") + ->label(t("Show Sidebar for Albums Only")) + ->checked(module::get_var("th_greydragon", "sidebar_albumonly")); + $group->checkbox("sidebar_hideguest") + ->label(t("Show Sidebar for Guest Users")) + ->checked(!module::get_var("th_greydragon", "sidebar_hideguest")); + $group->dropdown("sidebar_allowed") + ->label(t("Allowed Sidebar Positions")) + ->options(array("any" => t("Any"), "left" => t("Left"), "right" => t("Right"), "bottom" => t("Bottom"), "top" => t("Top"), "default" => t("Default Only"))) + ->selected($sidebar_allowed); + $group->dropdown("sidebar_visible") + ->label(t("Default Sidebar Position")) + ->options(array("right" => t("Right"), "left" => t("Left"), "bottom" => t("Bottom"), "top" => t("Top"), "none" => t("No sidebar"))) + ->selected($sidebar_visible); + + /* Maintenance ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + $group = $form->group("maintenance")->label(t("Maintenance")); + $group->checkbox("build_thumbs")->label(t("Mark all Thumbnails for Rebuild"))->checked(false); + $group->checkbox("build_resize")->label(t("Mark all Image Resizes for Rebuild"))->checked(false); + $group->checkbox("build_exif")->label(t("Mark Exif Info data for reload"))->checked(false); + $group->checkbox("purge_cache")->label(t("Purge cache data"))->checked(false); + $group->checkbox("reset_theme")->label(t("Reset Theme to a Default State"))->checked(false); + + module::event("theme_edit_form", $form); + + $form->submit("g-theme-options-save")->value(t("Save Changes")); + + return $form; + } + + protected function get_edit_form_help() { + $help = '
    '; + $help .= '' . t("Help") . '
      '; + $help .= '
    • ' . t("Prerequisites") . '

      +

      ' . t("REQUIREMENTS NEED TO BE MET FOR THE THEME TO FUNCTION PROPERLY.") . '
      + ' . t("Please refer to the section on the left.") . ' +

    • '; + + $help .= '
    • ' . t("General Settings") . '

      + ' . t("

      Theme is designed to display thumbnails as a table. + You can choose different number of Rows/Columns per Album Page or can use Flexible Columns. +

      Default G3 logo can be replaced with your own by providing Alternate Logo Image. Recommended logo size + is within 300x80px. If you need bigger space for your logo, CSS would have to be adjusted. Otherwise, Logo could be + suppressed altogether by providing Header Text to replace it. Footer Text would be simply placed next + to Site's credits. +

      Copyright Message can be placed in the right top corner of the footer. +

      Important feature of the theme is a support for Color Packs which is managed by Selected Color Pack Option. + Color Pack allows changing colors, styles, theme for the pages. By default 6 color packs are included, + but it could be easily extended. Visit Theme's Download page for additional information. + Frame Pack allows change Frames used for Thumbs in album pages.") . ' +

    • '; + + $help .= '
    • ' . t("Advanced Options - General") . '

      + ' . t("

      In order to allow easier integration of Gallery 3 within other site infrastructure, Theme supports Special View Mode + - when Mini Mode is selected, attempt would be made to minimize space associated with Header/Footer by trimming of + the some information. Use with caution. Theme supports CMD parameter to override this selection - add + \"?viewmode=default|full|mini\" to site URL in order to trigger a switch for specific browser session. When browser session + is restarted, view mode would revert back to default set in Admin Panel. +

      Show your appreciation for our hard work by allowing Show Site Credits or contributing to our Coffee Fund. +

      If main menu has functionality intended for guest users you can use Show Main Menu for Guest Users to keep it + visible. +
      You can go even further and move main menu to the top of the header with breadcrumbs taking it place by selecting + Alternate Header Layout.
      Then if you prefer breadcrumbs not being used, simply hide it with Hide + Breadcrumbs option. +
      Then you can decide if you want to Show Breadcrumbs in the root album/root page. +

      If you like to add some cool effects while navigating between pages, + enable Blend Page Transition. +

      Paginator Position could be changed to display it above and/or below the main content. +

      You can further fine tune theme using custom CSS file by providing file name (file need to be located in themes/custom + folder) or more specific location in form of your_path/your_file_name.css if different. +

      Block web crawlers from indexing your Gallery with Disallow Search Engine Indexing Option.") . ' +

    • '; + $help .= '
    • ' . t("Advanced Options - Album page - Thumbs") . '

      + ' . t("

      Options in this section adjust how Photo's Thumb images are displayed. +

      Aspect Ratio specifies layout/size of the thumb. Setting should be used with understanding that some + information may be out of visible area (crop). When switching to/from Actual Size, it is recommended to rebuild + thumbs so that proper settings are used for thumb resize logic (see Maintenance section below). Combined with + Expanded Aspect Ratio (300px wide) you can switch between 200px and 300px wide thumb images. +

      Title Display Mode and Meta Data Display Mode allows changing how Item's caption and Meta Data is + displayed. And selecting Merge with Title would place meta data with the Title. +

      Randomize your thumbs by enabling Randomize Thumb Image (Please use with caution as it does introduce extra + load for database.).") . ' +

    • '; + $help .= '
    • ' . t("Advanced Options - Photo Page") . '

      + ' . t("

      Options in this section adjust how individual Photo are presented to the viewer. +

      With ShadowBox Mode, theme's logic could be adjusted in how Slideshow module is integrated. +
      As with Title in Photo Thumbs, Description Display Mode changes how Photo Description is displayed. +
      You can choose to Keep Thumb Nav Block on the side of the Photo when Page is displayed with bottom aligned + or hidden Sidebar. +
      And if metadata (owner/clicks/etc.) is unnecessary, it could be removed with Hide Item Meta Data. +

      Theme allows use of BBCode/HTML in item's descriptions, to enable it select Allow BBCode/HTML in Descriptions.") . ' +

    • '; + $help .= '
    • ' . t("Advanced Options - Root Page") . '

      + ' . t("

      Special option which allows adding special root/landing page with slideshow utilizing specified Slideshow RSS Feed + URL (Default: /gallery3/index.php/rss/feed/gallery/latest). +

      To enable it, select Allow root page. +

      Add small description on the side of the slideshow with Show Gallery Description. +
      Adjust rotation delay with Slideshow Delay. +
      If Sidebar is not desired in the Root Page it could be hidden with Hide Sidebar option. +
      By default, description content is populated from description of the root album, but by providing Alternative + Description you can overwrite it.") . ' +

    • '; + $help .= '
    • ' . t("Sidebar Options") . '

      + ' . t("

      If Block's header is not desired, it could be removed using Hide Block Header. +

      Sidebar visibility could be limited to individual Photo pages with + Show Sidebar for Albums Only. +

      When sidebar is visible it can be placed on the left or right of the + screen or removed altogether using Allowed Sidebar Positions. + If more than one position is allowed, Default Sidebar Position + would indicate default state, but visitor would able change it later.") . ' +

    • '; + $help .= '
    • ' . t("Maintenance") . '

      + ' . t("

      Without changing image size, you can Mark all Resizes for Rebuild. + Then you need to visit Admin\Maintenance to initiate the process. +

      Same can be done for image thumbs with Mark all Thumbnails for Rebuild. +

      Mark Exif/IPTC Info for reload would mark all Exif or IPTC records as \"Dirty\" allowing it to be repopulated. +

      And just in case you think that something is not right, you can always Reset Theme to a Default State.") . ' +

    • '; + $help .= '
    '; + return $help; + } + + private function save_item_state($statename, $state, $value) { + if ($state): + module::set_var("th_greydragon", $statename, $value); + else: + module::clear_var("th_greydragon", $statename); + endif; + } + + protected function legacy() { + module::clear_var("th_greydragon", "photonav_top"); + module::clear_var("th_greydragon", "photonav_bottom"); + module::clear_var("th_greydragon", "hide_sidebar_photo"); + module::clear_var("th_greydragon", "hide_thumbdesc"); + module::clear_var("th_greydragon", "use_detailview"); + module::clear_var("th_greydragon", "horizontal_crop"); + module::clear_var("th_greydragon", "photo_shadowbox"); + module::clear_var("th_greydragon", "root_text"); + module::clear_var("th_greydragon", "enable_pagecache"); + + module::clear_var("th_greydragon", "navigator_album"); + module::clear_var("th_greydragon", "navigator_photo"); + + module::clear_var("th_greydragon", "blendpagetrans"); + module::clear_var("th_greydragon", "last_update"); + module::clear_var("th_greydragon", "thumb_quality"); + } + + protected function reset_theme() { + // Default core theme settings + module::set_var("gallery", "page_size", 9); + module::set_var("gallery", "resize_size", 640); + module::set_var("gallery", "thumb_size", 200); + module::set_var("gallery", "header_text", ""); + module::set_var("gallery", "footer_text", ""); + module::set_var("gallery", "show_credits", FALSE); + + module::clear_all_vars("th_greydragon"); + } + + public function save() { + site_status::clear("gd_init_configuration"); + access::verify_csrf(); + + $form = self::get_edit_form_admin(); + + if ($form->validate()): + $this->legacy(); + + if ($form->maintenance->reset_theme->value): + $this->reset_theme(); + module::event("theme_edit_form_completed", $form); + message::success(t("Theme details are reset")); + else: + // * General Settings **************************************************** + + $resize_size = $form->edit_theme->resize_size->value; + + $build_resize = $form->maintenance->build_resize->value; + $build_thumbs = $form->maintenance->build_thumbs->value; + $build_exif = $form->maintenance->build_exif->value; + if (module::is_active("iptc") and module::info("iptc")): + $build_iptc = $form->maintenance->build_iptc->value; + else: + $build_iptc = FALSE; + endif; + $purge_cache = $form->maintenance->purge_cache->value; + + $color_pack = $form->edit_theme->colorpack->value; + $frame_pack = $form->edit_theme->framepack->value; + $thumb_imgalign = $form->edit_theme_adv_thumb->thumb_imgalign->value; + $thumb_descmode_a = $form->edit_theme_adv_thumb->thumb_descmode_a->value; + $thumb_descmode = $form->edit_theme_adv_thumb->thumb_descmode->value; + $thumb_metamode = $form->edit_theme_adv_thumb->thumb_metamode->value; + $photo_descmode = $form->edit_theme_adv_photo->photo_descmode->value; + $photo_popupbox = $form->edit_theme_adv_photo->photo_popupbox->value; + $resize_quality = $form->edit_theme_adv_main->resize_quality->value; + + if ($build_resize): + graphics::remove_rule("gallery", "resize", "gallery_graphics::resize"); + graphics::add_rule("gallery", "resize", "gallery_graphics::resize", + array("width" => $resize_size, "height" => $resize_size, "master" => Image::AUTO), 100); + endif; + + if (module::get_var("gallery", "image_quality") != $resize_quality): + module::set_var("gallery", "image_quality", $resize_quality); + endif; + + if (module::get_var("gallery", "resize_size") != $resize_size): + module::set_var("gallery", "resize_size", $resize_size); + endif; + + $_priorratio = module::get_var("th_greydragon", "thumb_ratio", "photo"); + $thumb_ratio = $form->edit_theme_adv_thumb->thumb_ratio->value; + $thumb_ratio_ex = $form->edit_theme_adv_thumb->thumb_ratio_ex->value; + if ($thumb_ratio_ex): + $thumb_ratio .= "_ex"; + endif; + + if ($thumb_ratio_ex): + $thumb_size = 300; + else: + $thumb_size = 200; + endif; + + if ($thumb_ratio == "photo"): + $rule = Image::AUTO; + else: + $rule = Image::WIDTH; + endif; + + if ($build_thumbs): + graphics::remove_rule("gallery", "thumb", "gallery_graphics::resize"); + graphics::add_rule("gallery", "thumb", "gallery_graphics::resize", + array("width" => $thumb_size, "height" => $thumb_size, "master" => $rule), 100); + endif; + + if (module::get_var("gallery", "thumb_size") != $thumb_size): + module::set_var("gallery", "thumb_size", $thumb_size); + endif; + + $row_count = $form->edit_theme->row_count->value; + $column_count = $form->edit_theme->column_count->value; + $this->save_item_state("row_count", 3, $row_count); + $this->save_item_state("column_count", 3, $column_count); + if ($column_count == -1): + $column_count = 3; + endif; + module::set_var("gallery", "page_size", $row_count * $column_count); + module::set_var("gallery", "header_text", $form->edit_theme->header_text->value); + module::set_var("gallery", "footer_text", $form->edit_theme->footer_text->value); + module::set_var("gallery", "favicon_url", $form->edit_theme->favicon->value); + module::set_var("gallery", "apple_touch_icon_url", $form->edit_theme->appletouchicon->value); + + $this->save_item_state("copyright", $form->edit_theme->copyright->value, $form->edit_theme->copyright->value); + $this->save_item_state("logo_path", $form->edit_theme->logo_path->value, $form->edit_theme->logo_path->value); + $this->save_item_state("color_pack", (($color_pack) and ($color_pack != "greydragon")), $color_pack); + $this->save_item_state("frame_pack", (($frame_pack) and ($frame_pack != "greydragon")), $frame_pack); + + $auto_delay = $form->edit_theme->g_auto_delay->value; + $this->save_item_state("auto_delay", $auto_delay != 30, $auto_delay); + + // * Advanced Options - General ****************************************** + + $this->save_item_state("viewmode", $form->edit_theme_adv_main->viewmode->value != "default", $form->edit_theme_adv_main->viewmode->value); + $this->save_item_state("toolbar_large", $form->edit_theme_adv_main->toolbar_large->value, TRUE); + module::set_var("gallery", "show_credits", $form->edit_theme_adv_main->show_credits->value); + $this->save_item_state("show_guest_menu", $form->edit_theme_adv_main->show_guest_menu->value, TRUE); + $this->save_item_state("loginmenu_position", $form->edit_theme_adv_main->loginmenu_position->value != "default", $form->edit_theme_adv_main->loginmenu_position->value); + $this->save_item_state("mainmenu_position", $form->edit_theme_adv_main->mainmenu_position->value != "default", $form->edit_theme_adv_main->mainmenu_position->value); + $this->save_item_state("breadcrumbs_position", $form->edit_theme_adv_main->breadcrumbs_position->value != "default", $form->edit_theme_adv_main->breadcrumbs_position->value); + $this->save_item_state("breadcrumbs_showinroot",$form->edit_theme_adv_main->breadcrumbs_showinroot->value, TRUE); + $this->save_item_state("custom_css_path", $form->edit_theme_adv_main->custom_css_path->value != "", $form->edit_theme_adv_main->custom_css_path->value); + $this->save_item_state("disable_seosupport", $form->edit_theme_adv_main->disable_seosupport->value, TRUE); + $this->save_item_state("desc_allowbbcode", $form->edit_theme_adv_main->desc_allowbbcode->value, TRUE); + module::set_var("gallery", "visible_title_length", $form->edit_theme_adv_main->visible_title_length->value); + $this->save_item_state("title_source", $form->edit_theme_adv_main->title_source->value != "default", $form->edit_theme_adv_main->title_source->value); + $this->save_item_state("use_permalinks", $form->edit_theme_adv_main->use_permalinks->value, TRUE); + + // * Advanced Options - Album page *************************************** + + $this->save_item_state("album_descmode", $form->edit_theme_adv_album->album_descmode->value != "hide", $form->edit_theme_adv_album->album_descmode->value); + $this->save_item_state("paginator_album", $form->edit_theme_adv_album->paginator_album->value != "top", $form->edit_theme_adv_album->paginator_album->value); + $this->save_item_state("disablephotopage", $form->edit_theme_adv_album->disablephotopage->value, TRUE); + $this->save_item_state("hidecontextmenu", $form->edit_theme_adv_album->hidecontextmenu->value, TRUE); + + // * Advanced Options - Album page - Thumbs ****************************** + + $this->save_item_state("thumb_ratio", $thumb_ratio != "photo", $thumb_ratio); + $this->save_item_state("thumb_imgalign", $thumb_imgalign != "top", $thumb_imgalign); + $this->save_item_state("thumb_descmode_a", $thumb_descmode_a != "overlay", $thumb_descmode_a); + $this->save_item_state("thumb_descmode", $thumb_descmode != "overlay", $thumb_descmode); + $this->save_item_state("thumb_metamode", $thumb_metamode != "default", $thumb_metamode); + $this->save_item_state("thumb_random", $form->edit_theme_adv_thumb->thumb_random->value, TRUE); + + // * Advanced Options - Photo page *************************************** + + $this->save_item_state("paginator_photo", $form->edit_theme_adv_photo->paginator_photo->value != "top", $form->edit_theme_adv_photo->paginator_photo->value); + $this->save_item_state("photo_descmode", $photo_descmode != "overlay_top", $photo_descmode); + $this->save_item_state("photo_popupbox", $photo_popupbox != "default", $photo_popupbox); + $this->save_item_state("thumb_inpage", $form->edit_theme_adv_photo->thumb_inpage->value, TRUE); + $this->save_item_state("hide_photometa", !$form->edit_theme_adv_photo->hide_photometa->value, FALSE); + + // * Advanced Options - Root page **************************************** + + $rssmodulecheck = module::is_active("rss") and module::info("rss"); + + $root_feed = $form->edit_theme_adv_root->root_feed->value; + $root_cyclemode = $form->edit_theme_adv_root->root_cyclemode->value; + $root_delay = $form->edit_theme_adv_root->root_delay->value; + $root_description = $form->edit_theme_adv_root->root_description->value; + + $this->save_item_state("allow_root_page", $form->edit_theme_adv_root->allow_root_page->value, TRUE); + $this->save_item_state("hide_root_desc", !$form->edit_theme_adv_root->show_root_desc->value, TRUE); + $this->save_item_state("root_feed", $root_feed != "gallery/latest", $root_feed); + $this->save_item_state("root_cyclemode", $root_cyclemode != "fade", $root_cyclemode); + $this->save_item_state("root_delay", $root_delay != "15", $root_delay); + $this->save_item_state("hide_root_sidebar", $form->edit_theme_adv_root->hide_root_sidebar->value, TRUE); + $this->save_item_state("root_description", $root_description, $root_description); + + // * Sidebar Options ***************************************************** + + $sidebar_allowed = $form->edit_theme_side->sidebar_allowed->value; + $sidebar_visible = $form->edit_theme_side->sidebar_visible->value; + + if ($sidebar_allowed == "right"): + $sidebar_visible = "right"; + endif; + if ($sidebar_allowed == "left"): + $sidebar_visible = "left"; + endif; + + $this->save_item_state("hide_blockheader", $form->edit_theme_side->hide_blockheader->value, TRUE); + $this->save_item_state("sidebar_albumonly", $form->edit_theme_side->sidebar_albumonly->value, TRUE); + $this->save_item_state("sidebar_hideguest", !$form->edit_theme_side->sidebar_hideguest->value, TRUE); + $this->save_item_state("sidebar_allowed", $sidebar_allowed != "any", $sidebar_allowed); + $this->save_item_state("sidebar_visible", $sidebar_visible != "right", $sidebar_visible); + + $this->save_item_state("last_update", TRUE, time()); + + module::event("theme_edit_form_completed", $form); + + if ($_priorratio != $thumb_ratio): + message::warning(t("Thumb aspect ratio has been changed. Consider rebuilding thumbs if needed.")); + endif; + + message::success(t("Updated theme details")); + + if ($build_exif): + db::update('exif_records') + ->set(array('dirty'=>'1')) + ->execute(); + endif; + + if ($build_iptc): + db::update('iptc_records') + ->set(array('dirty'=>'1')) + ->execute(); + endif; + + if ($purge_cache): + db::build() + ->delete("caches") + ->execute(); + endif; + endif; + url::redirect("admin/theme_options"); + else: + print $this->get_admin_view(); + endif; + } + + protected function get_admin_view() { + $view = new Admin_View("admin.html"); + $view->page_title = t("Grey Dragon Theme"); + $view->content = new View("admin_theme_options.html"); + $view->content->name = self::get_theme_name(); + $view->content->version = self::get_theme_version(); + $view->content->form = self::get_edit_form_admin(); + $view->content->help = self::get_edit_form_help(); + return $view; + } + + public function index() { + site_status::clear("gd_init_configuration"); + print $this->get_admin_view(); + } +} +?> \ No newline at end of file diff --git a/themes/greydragon/admin/views/admin_theme_options.html.php b/themes/greydragon/admin/views/admin_theme_options.html.php new file mode 100755 index 0000000..0e9f404 --- /dev/null +++ b/themes/greydragon/admin/views/admin_theme_options.html.php @@ -0,0 +1,38 @@ + +is_module = FALSE; + $view->downloadid = 1; + $view->name = "greydragon"; + $view->form = $form; + $view->help = $help; + else: + $view = '
    '; + $view .= "

    " . t("Prerequisite") . "


    "; + $view .= "

    " . t("This theme requires GreyDragon shared module to be installed and actived first.") . "

    "; + $view .= "

    " . t("Please download it") . ' ' . t("here") . " " . t("and install. Make sure it is activated.") . "

    "; + $view .= "
    "; + endif; + + print $view; +?> + diff --git a/themes/greydragon/changelog.txt b/themes/greydragon/changelog.txt new file mode 100755 index 0000000..04ca0d4 --- /dev/null +++ b/themes/greydragon/changelog.txt @@ -0,0 +1,641 @@ +=== Grey Dragon Theme === +Grey Dragon Theme - a custom theme for Gallery 3 + +This theme was designed and built by Serguei Dosyukov, whose blog you will find +at http://blog.dragonsoft.us/ +Copyright (C) 2009-2012 Serguei Dosyukov + +Tested up to: G3 3.0.3 build 55 +Minimum requirement: G3 3.0.2 build 49 + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 2 of the License, or (at your option) any later +version. This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street Fifth Floor, Boston, MA 02110-1301, USA. + +=== Open issues === +- RTL layout support + +=== Changelog === +version 4.0.2 +- Incompatability fix for PHP5.4 and below causing crash and blank page. http://galleryproject.org/forum_theme_greydragon?page=48#comment-408923 +- Fix to allow thumbnail rotation update when operation is performed. http://galleryproject.org/forum_theme_greydragon?page=48#comment-408993 +- Cycle JS: Added fadeout support. Fixed issue in root page when "Click to Enter" link would disappear with some effects + +version 4.0.1 +- Code converted to use latest jQuery library +- Added support for RWInfo meta data injection +- CSS: Fixes a phenomenon where dialog content not setting proper width in FF/Ch +- CSS: Fixes a phenomenon where context menu shows empty space above first item +- Added support for g-movie class in thumbs +- Admin: Better help translation +- Logic to load frame template optimized to prevent exception +- thumb_top()/thumb_botom() call moved inside div.g-thumbslide per Dave's request +- Markup cleanup for W3C validation +- CSS: small layout size adjustments in Simple Frame Pack +- Photo Page: fixed issue with image preload logic when one of the items is an album +- Added code protection to paginator when item is not well defined - missing ->url() method +- Breadcrumbs to take advantage of new logic introduced in latest G3 core for tags and search +- Added support for tag_albums module for pagination +- FP: Fix for Book frame pack - missing frame for movie thumbs +- Photo pages in Tag based collections do not support full item list. As result First/Last page paginator buttons and page list need to be disabled. +- Updated jQuery Cycle plug-in to latest version +- CSS: fixes for movie thumbnail in greydragon framepack + +version 3.2.2 +- CSS: Fixes a phenomenon where dialog content not aligning properly under some conditions +- CSS: Fixes a phenomenon where login dialog for error/login and reauthenticate pages were not in sync +- Movie thumb and Photo IDs are adjusted to comply with 3.0.3 notation +- Photo page image precache javascript moved into .ready to speed up the page load +- CP: Roundrobin styles improvements - top login positioning adjusted, removed padding for root page when sidebar is used +- ADMIN: Added prerequisite check for CURL support in PHP + +version 3.2.1 +- Logic to process command line parameters changed to prevent unhandled exception on some LAMP instances + +version 3.2.0 +- Theme is now HTML 5 +- CSS: Dropped support for IE 6 +- IMPORTANT: .g-extended class moved from .g-item level into a to allow layout manipulation based on thumb formats. Styles are affected. +- Added class marker to page's element to indicate current sidebar mode - g-sidebar-xxxxxxxx +- CSS: Min width of the gallery is now enforced based on number of columns and sidebar visibility - extended thumbs 3/4 columns +- CSS: Decrease size of the column for 3 column layout to 31% to prevent wrapping in some browser modes +- ADMIN: Logic added to inform site owner about new versions of the theme +- ADMIN: Admin page layout is now based on shared GreyDragon module which is now required +- ADMIN: "Visible Title Length" option - access to G3 title length setting. +- ADMIN: Use Permalinks for navigation - allows /root, /enter be used for root page access. + Requires the following rules added in .htaccess section + + ########## Enable /root url ################ + # + RewriteRule ^root ?root=yes [NC] + RewriteRule ^enter ?root=no [NC] + # + ############################################ + +- Visible Title Length is now taken in consideration when displaying Photo Titles in thumbs, breadcrumbs, etc. +- Improved file name detection for Title Source +- CP: new color pack - Round Robin \ +- FP: new frame pack - Round Corners / combined would give look of Clean Canvas theme +- FP: Book frame pack : removed right padding to prevent wrapping on smaller resolutions +- FP: Wall frame pack : min width decreased to all proper alignment of tiles +- jquery.cycle.js updated to v.2.9999.4 +- Synchronize Calendar page with page.html.php +- CSS: forms.css - fixed two misspelled rules +- Added code protection from Camel case in CMD parameters +- Fixed issue with missing status icons for some colorpacks in Upload dialog +- Added code protection in Root page to detect situation when roller is empty and then do not initialize the cycle plugin +- Added translation support for default thumb caption (Photo #, Movie #, etc) + +version 3.1.4 +- ADMIN: Option to specify image quality level for Photo resizes and Thumbs +- ADMIN: Additional Description Display Mode for Photo page : Overlay Top (Static), Overlay Bottom (Static) +- ADMIN: Title Source - manage what thumb/image title is based on : Title | Title/Suppress Filename | Description +- Added support for normalize.css - see http://necolas.github.com/normalize.css/ for more details +- Added rel=nofollow for sidebar mode switch links to prevent indexing +- Fix: module check failing in admin section when none of colorbox, shadowbox or fancybox is intalled +- Fix: CSS: Added missing rule for size of the thumb in Wall frame pack for "Actual" aspect ratio +- Fix: CSS: Fixed "Forgot password" misalignment in Login dialog +- G3 version requirement increased to 3.0.2 + +version 3.1.3 +- Removed validation for ImageBlockEx preventing use of RootPage option +- Removed JS code - attempt to have fadeIn effect + +version 3.1.2 +- CSS: Fixed issue with breadcrumbs divider in colorpacks +- CSS: Fixed issue with thumb description positioning + +version 3.1.1 +- Removed some redundant code in page.html.php +- Fixed issue with fixed Columns style not being applied +- Added code protection for situation when $position is not defined in paginator.html.php +- CSS: Fixed issues with popup menu positioning + +version 3.1.0 +- CSS: !!! Folder Structure Change !!! colors.css and frame.css added to aggregated CSS. +- ADMIN: Root Page is now iPad/Mac compatible - Flash player has been replaced with jquery.cycle - option added to manage + rotation mode. ImageBlockEx module is no longer required. For hosts where there is a block accessing local RSS feed, + rootpage.html.php_fix can be used (old style) by renaming it and placing into /themes/custom/views folder +- ADMIN: New option - Hide Context Menu for thumbs +- ADMIN: New option - Disable photo page - open FancyBox style slideshow directly from album page +- ADMIN: New option - Show Sidebar for Guest Users +- ADMIN: Option for Thumb alignment extended to Top/Center/Bottom/Fit +- ADMIN: Option's order change in Advanced Options - General +- ADMIN: Large toolbar buttons +- ADMIN: "Blend Page Transitions" is replaced with JS version +- ADMIN: Corrected setting for Apple Touch Fav Icon to use G3 default setting +- ADMIN: "Login Menu Position" expanded to allow login to be hidden. Admin can access Admin area using http://site_url/admin URL +- CP: New color pack - White Hawk +- FP: New frame pack - Wall +- FP: Support for custom frame content added - frame.html.php +- Core: Current framepack is now referenced by the page +- Core: Body class logic moved into theme's library class +- Core: "Up" navigation button now would take you to item's associated page rather then to first page of the album +- Core: Fixed issue of Sidebar position setting not being picked up under some conditions +- Core: Improved detection for root page - if root album id <> 1 +- Core: Framepack and viewmode URL parameter value is now retained for duration of the session +- Core: In "Disable photo page" mode, if EXIF module is disabled, thumb would include clickable reference to EXIF dialog +- Core: Breadcrumbs are now using :: as divider instead of image +- CSS: Column/Colorpack classes (ex: g-column-3, g-wall) moved one level up from ul#g-album-grid to div.g-album-grid-container +- CSS: Fixed issue with meta data alignment in Simple frame pack +- CSS: Fixed issue with permission dialog's breadcrumbs alignment +- CSS: removed left padding for navigator thumbs which was causing image "jumps" +- CSS: Some images were changed +- JS: Shadowbox settings moved out of the theme into module itself. + +version 3.0.8 +- Fixed issue with allowed sidebar position not properly recognized when used as Default +- Fix issue with missing quotes in Admin module +- Fixed issue with uninitialized variable in admin page +- Fixed background for view-calendar.png for some color packs +- CSS: Center content of ThumbNav module. If non default thumb size is used for module, setting may need to be adjusted. +- CSS: Added new style sheet for iPad support + +version 3.0.7 +- ADMIN: Added support for View Mode - Full/Mini (ex: ?viewmode=mini | ?viewmode=full | ?viewmode=default ) +- ADMIN: Paginator position now can be set independently for Album and Photo pages +- ADMIN: Added Colorbox slideshow detection +- Theme.info adjusted to match new guidelines +- CSS: GreyDragon Color Pack - fixed thumb background color issue with GreyDragon Frame Pack +- CSS: changes to improve Basket Module integration +- CSS: #g-album-grid element now references framepack used for better interaction between frame and color packs (ex: class="g-slateblue") +- Fix issue with sidebar not properly displayed in Root Page +- Fix issue with missing thumb image not being aligned properly in "Actual Aspect Ratio" mode + +version 3.0.6 +- Fix: Using Top aligned sidebar causes problem + +version 3.0.5 +- ADMIN: Allow hiding sidebar for root pages -> Advanced Options\Root Page\Hide Sidebar +- ADMIN: Allow breadcrumbs in root page/root album -> Advanced Options\General\Show Breadcrumbs in top album/root page +- Fixed issue with Calendar not displayed properly when no items are returned +- CSS: Increased padding for in-page description block + +version 3.0.4 +- FP: New framepack - book + Please note that if bottom aligned description is used, it need to be the same for both album and photo thumbs. +- CSS: #g-album-grid-container renamed to .g-album-grid-container +- CSS: Fixed slight misalignment of 3 level main menu items +- ADMIN: New position for main menu - Top Bar - top aligned/fixed positioned menu. Useful for admin mode menu +- ADMIN: Added support for separate option for description position in album thumbs + +version 3.0.3 +- ADMIN: Added option for Root Page slideshow delay +- ADMIN: Added option for Alternative Description for Root Page which overwrites Description from Root album +- CSS: Fix issue with context menu hotspot z-index in thumbs +- CSS: Fixed margin in Uploadify dialog to prevent overlap +- ADMIN: Page cache option has been deprecated. It can be achieved via .htaccess instead + +version 3.0.2 +- Wind Color Pack: Fixed issue with missing background image for dialog header +- CSS: Wind Color Pack: Set dialog background to white +- ADMIN: Fixed issue of Maintenance group label not being translated +- Fixed issue with float division for photo page +- Fixed issue with BBCode in info block not being converted (regression error) +- Fixed small misalignment of the image with the "Actual" Aspect Ratio Thumb +- Added CSS class marker for portrait thumb images +- IE9: Added support for Pinned Site mode and Jump List menu + +version 3.0.1 +- ADMIN: Page Header and Footer Text allows BBCode +- ADMIN: Added support for apple-touch-icon - icon similar to favicon to be used on iPad/iPhone/iPod devices +- ADMIN: New option - Album Description Display Mode - allowing placement of the description in the album pages +- ADMIN: Main menu could be now positioned as Top-Left/Bottom-Left aligned +- ADMIN: Bradcrumbs could be now positioned as Top-Left/Bottom-Left/Bottom-Right or Hidden +- Added wrappers for Header and Footer texts allowing further CSS manipulation +- Added support for custom header/footer inclusion - simply drop header.html.php and/or footer.html.php in the views folder and content would be added in the header/footer section +- Info sidebar block logic synchronized to match default but still allow BBCode + +version 3.0.0 +- Due to extensive changes to CSS it is now a major release +- Rules from screen.css moved into base.css. Screen.css used as loader file only. +- Introduced better support for RTL +- Some of the icons moved into ui-icons.png for optimization. Color adjustments for visibility. +- Added support for frame packs. Included: greydragon (default), simple, android, iphone, iphoto, darkglass +- Fixed issue with regular wide thumb format not being set/displayed properly +- Breadcrumb logic extended to take in consideration [visible_title_length] variable value introduced in G3 +- Reordered JS registration to comply with default G3 3.0.1 logic +- Added some missing translation hooks in Admin area +- Some Page load optimization +- Added logic to take in consideration date display format for info module +- Performed validation and necessary adjustments for IE 9/IE 9 compatibility mode +- IE Fix CSS is only applied for IE 6. Older versions are no longer supported + +version 2.7.9 +- Optimized session handling for colorpack cmd param +- Removed validation for colorpack presence + +version 2.7.8 +- Fixed issue with colorpack detection. Reenabled +- Fixed issue with sidebar position could be "stuck" when switching from Grey Dragon Wind Theme +- Fixed introduced error with missing forms.css reference +- Theme's CSS/JS is combined into session based G3 files + +version 2.7.7 +- Adjusted for 3.0.1 release of G3 +- New color pack: blackhawk +- ADMIN: New sidebar position supported - top (new rules added to colorpacks) +- CSS: Some clean up for included colorpacks - CSS/image resources, sprite image optimization for sidebar position buttons +- Added session persistence for colorpack url parameter for demo purposes +- ADMIN: Prerequisites module check extended to make it more relevant when Root Page is allowed +- CSS: Sync positions of main menu and breadcrumbs when in alternative header layout format +- colorpack location validation has been disabled for now until issue is resolved + +version 2.7.6 +- ADMIN: "Large" Thumb sizes are removed from Aspect dropdown and managed via "Expanded Aspect Ratio (300px wide)" option +- ADMIN: New Thumb aspect ratio - Wide/HDTV (16:9), "Actual" aspect is supported in Expanded mode +- ADMIN: Root Page - new option "Show Gallery Description" +- Added check if Shadowbox is loaded so that theme's initialization JS does not produce hidden exception +- Added pointer cursor for clickable overlay area in Root Page until Minislideshow is loaded + +version 2.7.5 +- ADMIN: Full Slideshow RSS feed url now being used. This solves some issues with Flash loader and allows creation of custom playlists to be used in the root page +- Root Page: Fixed issue with Flash Slideshow not being loaded properly + +version 2.7.4 +- Root Page: Added "Click to Enter" to indicate clickable state +- Root Page: Quote is now taken from root album description field. If description is empty, slideshow content is centered. +- Added branding icons for "gallery 3" and theme/color packs. +- Fixed issue with page layout for calendar module. +- Fixed issue with URL parameters not being recognized in some server configurations +- CSS: Fixed aspect ratio for thumbs. Some css alignments optimization +- CSS: Turned back on borders for blocks in bottom aligned sidebar +- ADMIN: New option for Photo Description Display Mode - Overlay Bottom. !!!! Color pack's CSS rules affected. +- ADMIN: Maintenance section: Added "Reset IPIC Info" (if module is active) and "Purge cache data", some tweaks for "Reset EXIF Info" + +version 2.7.3 +- ADMIN: New option - Randomize Thumb Image +- Missing markup in rootpage.html.php +- Root Page - set size of the slideshow to auto so it can be managed via CSS +- Sync page.html.php structure with latest git changes +- CSS: Fixed styles for progress dialog when invoked from non-admin area + +version 2.7.2 +- CSS: Restored visible state of rotation operations for photos +- JS: To resolve issue with Opera OS, background image need to be set for #g-rootpage-link instead of roller object. Finalization JS for root page slideshow extended to clear background for overlay. +- Reenabled support for site status messages + +version 2.7.1 +- Root Page layout/css extended to allow click on the image while slideshow is still loading +- ADMIN: Some changes in setting's titles and help +- Fixed issue with meta data overlay not being shown for some title/meta combinations + +version 2.7.0 +- DEV: new url parameter support added - colorpack. Ex: ?colorpack= +- ADMIN: 2 to 5 columns layout is now supported. Flex column option moved into column selector. +- ADMIN: Added new mode for Description overlay in Album - Overlay Bottom (Static) - places description on the bottom of the thumb as static overlay. Metadata would not be shown. +- ADMIN: Metadata Display Mode for Thumbs introduced. [Hide metadata] merged into it. Metadata can now be merged with description. +- W3C: resolved some validation errors in album page +- CSS: !!! Colorpack !!! - adjusted to reflect changes to thumb description structure +- CSS: Changes for columns CSS (.g-column-3/.g-column-4) - moved to list level - several php files also affected +- CSS: Fixed issue with re-authenticate dialog layout +- CSS: Fixed issue search button in IE7 Compatibility mode for wind color pack +- ShadowBox module config settings changed to prevent flickering - enabled dialog animation. Slideshow timeout increased to 7 sec. Updated version of ShadowBox module is available. +- CSS: Deprecated styles for ShadowBox Ajax dialogs as they are not supported by the library in Core and color pack references + +version 2.6.3 +- ADMIN: New "Title Display Mode" added - Overlay (Static) +- CSS: syncronization between colorpacks. Some simplification + +version 2.6.2 +- Added support for initial background in the Root Page to be removed as soon as slideshow starts (requires imageblockex 2.1) +- ADMIN: Added option allowing feed selection for Root Page, Quote text +- Small changes in color pack and layout for Upload dialog +- Fixed logic in roopage.html.php to properly construct the link for navigation + +version 2.6.0 +- Support for root page added +- Added borders for main wrapper in Slate Blue color pack to accommodate centered layout +- Added JS to preload next/prior images in photo pages +- Added content wrapper for album grid to allow external CSS application - ex: center grid content +- ALERT! Improved rendering of admin panel. This would break admin panels for any modules which uses the same file by inheritance. Please download updated module distros. +- Fixed wrong reference to layout_non_ie.css file - not used +- Removed restrictions for displaying sidebar in satellite pages +- Fixed status message alignment in Upload dialog +- Fixed W3C validation error in Photo page markup +- "controllers" folder deprecated + +version 2.5.1 +- Fixed issue with relative path not being used when changing sidebar display mode +- ADMIN: Added support for Blend effect for page transitions +- ADMIN: Added check to identify module collision between FancyBox and ShadowBox +- ADMIN: New option "Keep Thumb Nav Block on the side" for Photo Pages +- CSS: small css changes for bottom aligned sidebar positioning +- CSS: Fix for dialog overlay div to properly position itself and prevent scrollbars to appear without reason +- CSS: slateblue color pack - make regular text grey +- CSS: set min height for bottom aligned sidebar +- CSS: Fixed issue with font size for dialogs in IE8 Compatability mode +- Custom layout for tag_block.html.php is depricated +- Some W3C Validation clean-up + +version 2.5.0 +- New colorpack - SlateBlue +- Added support for bottom aligned Sidebar +- CSS: opacity in .ui-widget-overlay (forms.css) set to 70 +- CSS: Fixed issue with misallignment of sidebar toolbar area and page header info +- CSS: Removed left pagging for g-photo element to properly align in the div +- CSS: Added thumb size restrictions for Image Block module +- Removed logic to use Shadowbox when showing Exif data + +version 2.4.9 +- ADMIN: Top Align Thumb Image option added - do not center thumb image in the view window. Useful for portrait oriented photos. +- ADMIN: Added a new Advanced option - Relative path to custom.css, if used - allowing inclusion of custom css override +- Ignore albums when building item list for Fancybox/Shadowbox Slideshow in Photo page. Fix issue with extra item added when start with first item. +- Fixed issue with not properly sanitized titles for links for Fancybox/Shadowbox Slideshow in Photo page +- Small adjustment to FancyBox slideshow navigation arrows +- Force min height requirement for H1/H2 elements +- Fixed spelling for g-thumlink -> g-thumblink +- Force size of the thumb link to fill crop area - situation when thumb image is smaller then view area +- Removed custom layout for User Profile page + +version 2.4.8 +- Fixed inverted state of "Disallow Search Engine Indexing (No Bots) +- Fixed JS syntax incompatibility in IE7/IE8 compatibility mode +- Fixed display of thumb title and photo description on hover in IE7/IE8 compatibility mode +- Fixed issue with Dialogs not skinned properly in Carbon/Wind themes +- Fixed issue with metadata for photo thumbs when Aspect Ratio: Actual Size and Title Display Mode: Bottom + +version 2.4.7 +- Fixed issue with some .g-block structures. + Fixed issue with avatar not properly aligned in comment section. + +version 2.4.6 +- Fixed some issues when strict error reporting is enabled for PHP +- Fixed background color for description for bottom Display Title Mode (greydragon colorpack) +- Added support for two new Thumb Sizes - Digital Ex and Film Ex - 300px wide thumbs +- Fixed issue with buttons in the block "jumping" out +- Added check in block view to verify that theme is defined + +version 2.4.5 +- Min G3 core requirement is set to v.41 +- Fixed issue with Exif dialog data integration +- Fixed issue with permission dialog +- CSS: Changes form style management. Fixed issue with breadcrumbs display in dialogs. +- CSS: Important! Colorpack files are affected +- Removed no longer required custom Login dialog logic +- JS cleanup + +version 2.4.4 + +Please drop GD themes folder before uploading a new version + +- CSS: screen.css - fixed layout naming change preventing proper display of authentification form when accessing protected areas +- CSS: Removed some temp files not required by the theme. +- Support for Fancybox added as alternative to Shadowbox +- Added support for CalendarView module + +version 2.4.3 +- Fixed issue with sidebar mode switch link being incorrect +- CSS: small style adjustment to neutralize default style effect for the search entry box + +version 2.4.2 +- Fixed issue some modules requiring scrollTo() function. +- Shadowbox is now optional. Special logic added to allow/disallow SB slideshow mode. If disabled, theme would not support full view for images to be in the popup window, new window will be used instead. +- CSS: Minor improvements for thumb layout in Overlay and Bottom Title Display mode +- ADMIN: Support for flex column layout added +- ADMIN Help: Small improvements + +version 2.4.1 +- Organize module support reenabled +- Register module support reenabled +- Partial support for Shopping Basket module +- CSS clean-up after dialog engine conversion - round #1 +- Fixed issue with Exif dialog not properly rendered + +version 2.4.0 +- Apply g-button style only to forms +- Fix to properly display videos +- Fix to account for changes in Comments module +- Favicon removed from theme's package +- Fixed uninitialized state warnings of the variables in PHP protected mode +- Album thumbs now have "lighter" background +- First draft to change how dialogs are handled - switched to standard code +- ADMIN: G3 Core version requirement is set to 32 +- ADMIN: Added missing settings initializations +- ADMIN: Fixed issue with Navigator position setting not being persisted +- ADMIN: Abstract admin form styles for reuse from regular module admin panels +- ADMIN: Added option to specify favicon location. If not specified default G3 icon is used. + +version 2.3.1 +- Hide Rotate operations for pictures since they are not supported by the theme +- Added use of common gallery.ajax.js. Fix issue with some Ajax based links. +- Layout fixes for Translation form overlay +- Changed CSS styling for buttons to provide unified coverage for buttons and links exposed as buttons. +- ADMIN: Fixed options group styles in Theme's Admin panel +- ADMIN: Advanced Settings for Thumbs and Individual Photo are moved into separate sections. +- ADMIN: New option - display meta data in Photo description section +- ADMIN: New option/fix - SEO indexing is now allowed by default. In order to prevent your site from being indexed, you can now use "Disallow Search Engine Indexing" option + +version 2.3.0 +- Adopted for Gallery 3.0RC2 changes (minor template adjustments, css class name changes, etc.) + +version 2.2.1 +- Redesigned Ready event handler for the theme to ensure proper ShadowBox initialization +- Added support for gallery_dialog() function call used by some 3rd party modules - some sync issues are solved by imposed delay of 1 second +- GPS module - better action list alignment in the sidebar + +version 2.2.0 +- Added support for slideshow mode in Photo Preview +- Fixed issue with Info side block - missing markup +- Fixed issue with Upload dialog layout with some resolutions/fonts +- ADMIN: Added option to hide breadcrumbs +- ADMIN: Added prerequisite check for Info module - required for Thumb meta data display + +version 2.1.7 +- Added support for missing images in the thumbs to allow proper operations with empty albums or albums with broken thumbs +- Some color optimizations +- Color improvements for "Add Image" dialog +- Better support for Basket module + +version 2.1.6 +- Wind colorpack adjusted to closer match default Wind theme + +version 2.1.5 +- Minor changes in ADMIN infrastructure +- ADMIN: added check for Kbd Navigation module +- ADMIN: New color pack - carbon + +version 2.1.4 +- Minor refactoring in paginator +- Added support for keyboard navigation module (http://codex.gallery2.org/Gallery3:Modules:kbd_nav) + +version 2.1.3 +- Sidebar restricted to item related pages (album, photo, movie, etc) +- Fixed issue with bottom border not applied to all instances of H1 tag +- Min footer size set to 4em +- ADMIN: "Photo: Description Display Mode" option added +- ADMIN: Added new maintenance operation - "Reset Exif Info" + +version 2.1.2 +- Fixed issue with Album thumbs - empty space under +- Thumb Item's Title Display Mode expanded to be applied to Item's description in Photo page +- More documentations in CSS files, some movements +- Some cleanup for Wind color pack +- Fixed font name typo in screen.css +- Fixed "Waiting" roller for Wind theme to match background +- Added "up" button in navigation + +version 2.1.1 +- Increased size of Add photo dialog for better display on some lower resolutions. +- ADMIN: New option: "Thumb: Item's Title Display Mode" - specifies how to display item's title in thumbs : Overlay Bottom Hide + +version 2.1.0 +- Custom Info Block to include item's description +- Image is centered when "Actual Size" aspect is used for thumbs +- Added support for color packs - included: greydragon, wind +- ADMIN: Improved error handling +- ADMIN: Disable submit button on click to prevent Dbl-click +- ADMIN: New option: Enable page cache - adds header marker for page to be cached for 60 seconds + +version 2.0.1 +- Enable BBCode/HTML support in individual photo descriptions +- Fixed main menu overlay issue when in top position +- Theme's credits moved into dedicated method +- CSS clean up +- Comments module layout enhancements + +version 2.0.0 +- Major redesign of the gallery flow. + - Added caption and metadata (Admin/optional) overlay for thumbs. + - Added description overlay in individual Photo view (look for "Learn More" marker). + - Based on Admin setting, thumbs are adjusted to fit Digital/Film/Actual size. +- Attempt to fix issue with JS load latency to prevent unhandled AJAX calls +- Added code protection for theme initialization procedure +- ADMIN: Thumb Aspect Ratio option. See help section for more info. + +version 1.8.2 +- Increased based font size +- Layout adjusted to match new settings +- ADMIN: New option - Place Login Link in the Header + +version 1.8.1 +- ADMIN: small adjustments in layout and help info +- 3rd party module's related CSS moved into contrib.css +- Adjust user profile screen to match new layout +- initial design for calendar module + +version 1.8.0 +- ADMIN: Major redesign of the layout. Help section added. +- ADMIN: New option - Show main menu for guest user +- Minimum required Gallery version set to 30 +- When configured not to use sidebar, theme is switched into 4 columns layout + +version 1.7.6 +- Organize module: CSS improvements +- Fixed issue with Chrome browser + +version 1.7.5 +- ADMIN: Added option to reset theme to default state +- CSS: some size adjustments for dialogs. Added minimum height for overlay to keep dialogs from shrinking. + +version 1.7.4 +- ADMIN: Theme Gallery 3 core requirement changed to v.26 +- ADMIN: Most of theme's settings are documented using element's title attribute - hover over to see a description +- Edit Permissions form redesigned and enlarged to fit more information + +version 1.7.3 +- ADMIN: Default states for the theme options are no longer being stored. Please save theme settings at least once to take advantage of a new functionality. +- Photo Navigator default position is set to Top Only + +version 1.7.2 +- Fix in Uploader dialog to keep items inside respected boxes +- Organize module support has been abandoned. Please use GWT Organize module instead. Added item in Prerequisites Checklist. + +version 1.7.1 +- CSS: Fixed visibility of the "Select Photo" button in "Add photo" dialog +- CSS: Fixed "ghost" line for navigation buttons when zoomed-in in IE +- Admin: fixed issue with prerequisite check not detecting deleted modules +- /views/support folder deprecated. Logic moved into Theme_View extension class for Theme_View_Core +- Theme Options Page management, generic Page code and BBCode processor moved into Theme_View class +- HACK: Info block is not displayed if there is no description for the item + +version 1.6.4 +- Admin: Added "Show Sidebar for Albums only" option +- Admin: added error visibility to the requirements validation list +- Small CSS adjustments: Fixed footer min size issue when no site credit info is displayed; added space between Credits in the footer and Footer text area. +- Few missing parts from last git sync + +version 1.6.3 +- Kohana 2.4 support +- Support for Movie files view +- Admin: Allow hide Sidebar Block header + +version 1.6.2 +- Admin: Page navigator option changed to use combobox +- Admin: Added option to hide item description in albums + +version 1.6.2 +- Small CSS adjustments. +- All operation dialogs should be visible now +- Context menu: "Rotate 90..." items are removed due to an issue with image quality affected by the operation +- Context menu: "Choose as the album cover" is now properly handled + +version 1.6.1 +- Admin: When allowed sidebar position is "Default Only", don't disregard selected Default position +- Adjust item's toolbar buttons to align properly when side bar position is fixed +- BBCode parser improved to support stripping of BBCode for Page title and breadcrumbs +- Fixed issue with main menu missing class declaration not allowing open dialogs +- Adjust context dialogs to properly show caption info +- Caption added to Full size Preview +- "New Comment" form styled +- Admin: Option to align main menu to the top and Breadcrumbs to the left + +version 1.6.0 +- Admin: Fixed issue with "Rebuild thumbs" option in theme admin +- Admin: Fixed issue with Item's toolbar not properly aligned in Quirks Mode +- Exif data dialog Layout changes +- Item context menu improvements: + - Fixed issue with submit logic + - Layout fixes for context menu dialogs + +version 1.5.8 +- Admin: First release of the Theme admin option. After theme installation, visit Appearance/Theme + Options to configure the theme. If you had older version of the theme, initial setup is also required. + The following settings are available: + - Rows per album page - theme uses 3 columns layout for pictures, therefore default page_size is computed in x3 increments + - Thumb size is restricted to 200 and therefore not available for administration + - Mark to build resizes/thumbs - allows force rebuilding of images + - Show/Hide top/bottom photo navigators + - Specify allowed and default sidebar position + - Administrator can now specify Copyright message to display in the footer + - Site logo is now default to Gallery 3 logo, but admin can provide a path to custom logo. + - Admin module validates Theme's requirements (Shadowbox module need to be installed/active) +- Sidebar session cookie is set to expire in 365 days + +version 1.5.7 +- Status message has been moved into header as popup to prevent obstruction of the main view. + jQuery is used to fade it out in 10 sec. +- Improved logic for dialogs on submit +- Theme related JS has been moved out of the page.html.php + +version 1.5.6 +- Fixed issue with tollbar buttons not properly aligned/shown when page is resized. +- Copyright info moved into DB. To change default settings add [th_greydragon/copyright] into VARS table. + +version 1.5.5 +- CSS fixes. +- Theme adjusted to be compatible with latest Git. +- Login links are moved into footer. +- Pagination module redesigned to support new structure of paging data. + +version 1.5.4 +- CSS fixes. +- Added support for Comments block. +- Improved support for Modal dialogs. + +version 1.5.3 +- Updated to match latest git. +- Exif menu customization is now part of the theme. +- Sidebar management button is disabled for current mode. + +version 1.5.2 +- Code, layout, css cleanup. +- New thumbs for buttons. +- First set of Ajax dialogs is ready and now operational: Login, user info, edit album, exit info. +- Fixed some browser related issues. \ No newline at end of file diff --git a/themes/greydragon/controllers/greydragon.php b/themes/greydragon/controllers/greydragon.php new file mode 100755 index 0000000..0ecfc4f --- /dev/null +++ b/themes/greydragon/controllers/greydragon.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/themes/greydragon/css/base.css b/themes/greydragon/css/base.css new file mode 100755 index 0000000..735a999 --- /dev/null +++ b/themes/greydragon/css/base.css @@ -0,0 +1,322 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2011 Serguei Dosyukov + * + * CSS rules - Main CSS ruleset + * + * Color rules for font/background/lines can be found in dedicated colorpack files + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* base.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +body { font-family: Arial, verdana, sans-serif; font-size: 0.9em; } + +a { text-decoration: none; outline: none; -moz-outline-style: none; } +a:focus, a:active, a:hover { text-decoration: none; outline: none; } +img { border: none; } +p { text-indent: 0; } +ul { list-style: none none; padding-left: 0; } + +h1 { font-weight: bold; font-size: 1.1em; padding-bottom: 1px; min-height: 1.1em; } +h2 { font-weight: bold; font-size: 1.1em; min-height: 1.1em; } +h3 { font-weight: bold; } +h4 { font-weight: bold; } +h5 { font-weight: bold; } + +.txtright { text-align: right; } +.g-metadata { overflow: hidden; } +.g-avatar { float: right; } +.g-hide { display: none; } + +.ui-icon { display: inline-block; zoom: 1; width: 16px; height: 15px; } +.ui-icon-first { background-position: -162px -178px; } +.ui-icon-first-d { background-position: -162px -162px; } +.ui-icon-prev { background-position: -178px -178px; } +.ui-icon-prev-d { background-position: -178px -162px; } +.ui-icon-parent { background-position: -226px -178px; } +.ui-icon-parent-d { background-position: -226px -162px; } +.ui-icon-next { background-position: -194px -178px; } +.ui-icon-next-d { background-position: -194px -162px; } +.ui-icon-last { background-position: -210px -178px; } +.ui-icon-last-d { background-position: -210px -162px; } +.ui-icon-signal-diag { background-position: -16px -178px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-plus { background-position: -14px -129px; } +.ui-icon-minus { background-position: -46px -129px; } +.ui-icon-note { background-position: -66px -98px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-left .ui-icon { float: left; margin-right: .2em; } +.ui-icon-right .ui-icon { float: right; margin-left: .2em; } + +/* base.css - Inline layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-inline li { float: left; } + +/* base.css - Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-header { height: 90px; padding: 0; font-size: 0.9em; } +#g-logo { position: absolute; top: 8px; left: 16px; } + +.g-breadcrumbs { position: absolute; background-color: transparent; } +.g-breadcrumbs.g-default { bottom: 4px; right: 14px; } +.g-breadcrumbs.g-bottom-left { bottom: 4px; left: 21.4em; } +.g-breadcrumbs.g-top-right { top: 4px; right: 14px; } +.g-breadcrumbs.g-top-left { top: 4px; left: 21.4em; } + +.g-breadcrumbs li { display: inline; } +.g-breadcrumbs li.g-first { background-image: none; padding-left: 0; } +.rtl .g-breadcrumbs .g-first { background-image: none; padding-left: 0; } +.g-breadcrumbs li.g-active { padding-right: 0; } + +#g-header .g-message-block { position: absolute; z-index: 10; min-width: 30em; padding: 0; right: 20em; top: 34px; overflow: hidden; font: bold 9pt Arial, verdana, sans-serif; text-align: center; } +#g-header #g-login-menu { position: absolute; top: 0.2em; right: 1em; background-color: transparent; display: none; } +#g-site-status li { padding: .3em .3em .3em 30px; } + +/* base.css - Main ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-main { display: block; margin: 0; } +#g-main-in { display: block; position: relative; } + +#g-column-center, #g-column-centerleft { padding: 6px 6px 6px 10px; } +#g-column-centerfull { padding: 6px 12px 6px 10px; } +#g-column-centerright { padding: 6px 10px 6px 6px; } +#g-column-left { padding: 6px 4px 6px 10px; } +#g-column-right { padding: 6px 10px 6px 4px; } + +/* base.css - Footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-footer { padding: 6px 0 6px 0; zoom: 1; font-size: 0.9em; } +#g-footer ul { float: left; padding: 0; text-align: left; } +#g-footer li { padding: 0 0 2px 0; } + +#g-footer #g-login-menu { position: absolute; bottom: 0.5em; right: 1em; background-color: transparent; display: none; } + +#g-login-menu li { display: inline; padding-left: 1.2em; } +#g-logout-link { float: none; margin-right: 0; } + +#g-copyright { font-size: x-small; } +#g-footer #g-footer-rightside { float: right; text-align: right; margin-right: 1em; } +#g-credits { margin-left: 14px; margin-right: 14px; } +#g-credits li.g-branding a { float: left; } +#g-credits .g-first { display: none; } +#g-gallery-logo { display: block; width: 70px; height: 18px; background: transparent url('../images/gallery.png') no-repeat; } +#g-theme-logo { display: block; width: 70px; height: 18px; } + +/* base.css - Mini Mode ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.viewmode-mini #g-header { height: 2.3em; } +.viewmode-mini #g-footer { display: none; } + +/* base.css - Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-paginator { display: inline-block; width: 100%; padding: 4px 0 0 0; zoom: 1; } +.g-paginator li { display: inline; float: left; margin-left: 0; zoom: 1; } +.g-paginator a { padding: 0; } + +.g-paginator .g-pagination { width: 80%; font-size: 0.8em; } +.g-paginator .g-navigation { text-align: right; width: 20%; } + +/* base.css - Album grid ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-album-grid { padding: 6px 0 0 0; width: 100%; display: inline-block; margin: 0px auto; } +#g-album-grid .g-item { position: relative; float: left; margin: 4px 2px 4px 0; min-width: 212px; zoom: 1; } +.g-extended #g-album-grid .g-item { min-width: 314px; } +.g-column-2 #g-album-grid .g-item { width: 48%; margin-right: 0; } +.g-column-3 #g-album-grid .g-item { width: 30%; margin-right: 0; } +.g-column-4 #g-album-grid .g-item { width: 23%; margin-right: 0; } +.g-column-5 #g-album-grid .g-item { width: 18%; margin-right: 0; } +#g-album-grid .g-item p { text-align: center; } +#g-album-grid h2 { position: absolute; top: 164px; left: 12px; width: 150px; font: 100%/100% Arial, Helvetica, sans-serif; } +#g-album-grid h2 a { display: block; margin-top: 4px; font: bold 0.8em Arial, Helvetica, Verdana, Sans-Serif; letter-spacing: 0.1em; text-transform: uppercase; min-height: 2em; } + +/* base.css - Thumbs : Common ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-thumbslide { font-size: 0.9em; width: 208px; min-height: 139px; padding-top: 6px; padding-left: 6px; overflow: hidden; text-align: left; } +.g-thumbtype-sqr .g-thumbslide { height: 208px; } +.g-thumbtype-flm .g-thumbslide { height: 141px; } +.g-thumbtype-dgt .g-thumbslide { height: 158px; } +.g-thumbtype-wd .g-thumbslide { height: 120px; } + +.g-extended .g-thumbslide { width: 308px; } +.g-extended .g-thumbtype-sqr .g-thumbslide { height: 308px; } +.g-extended .g-thumbtype-flm .g-thumbslide { height: 207px; } +.g-extended .g-thumbtype-dgt .g-thumbslide { height: 233px; } +.g-extended .g-thumbtype-wd .g-thumbslide { height: 176px; } + +.g-thumbcrop { overflow: hidden; position: relative; width: 200px; min-height: 112px; } +.g-thumbtype-sqr .g-thumbcrop { height: 200px; } +.g-thumbtype-flm .g-thumbcrop { height: 133px; } +.g-thumbtype-dgt .g-thumbcrop { height: 150px; } +.g-thumbtype-wd .g-thumbcrop { height: 112px; } + +.g-extended .g-thumbcrop { width: 300px; } +.g-extended .g-thumbtype-sqr .g-thumbcrop { height: 300px; } +.g-extended .g-thumbtype-flm .g-thumbcrop { height: 199px; } +.g-extended .g-thumbtype-dgt .g-thumbcrop { height: 225px; } +.g-extended .g-thumbtype-wd .g-thumbcrop { height: 168px; } + +.g-album .g-description strong { padding-left: 16px; } + +/* Force size of the link to fill thumbcrop */ + +.g-thumbcrop a.g-thumblink { display: block; position: relative; min-width: 200px; } +.g-thumbtype-sqr a.g-thumblink { min-height: 200px; } +.g-thumbtype-flm a.g-thumblink { min-height: 133px; } +.g-thumbtype-dgt a.g-thumblink { min-height: 150px; } +.g-thumbtype-wd a.g-thumblink { min-height: 112px; } + +.g-extended .g-thumbcrop a.g-thumblink { min-width: 300px; } +.g-extended .g-thumbtype-sqr a.g-thumblink { min-height: 300px; } +.g-extended .g-thumbtype-flm a.g-thumblink { min-height: 200px; } +.g-extended .g-thumbtype-dgt a.g-thumblink { min-height: 225px; } +.g-extended .g-thumbtype-wd a.g-thumblink { min-height: 168px; } + +/* base.css - Thumbs : Overlay ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-thumbslide .g-description { display: none; position: absolute; left: 6px; top: 6px; min-height: 24px; width: 184px; overflow: hidden; z-index: 3; text-align: left; padding: 2px 8px; font-size: 0.85em; margin: 10px 0 1px 11px; } +.g-extended .g-thumbslide .g-description { width: 284px; } +.g-thumbslide:hover .g-description { display: block; } +.g-thumbslide .g-description li { display: inline; padding-right: 0.8em; } +.g-thumbslide .g-description .g-title { display: block; font-weight: bold; font-size: 1.1em; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 3px; } +.g-album .g-thumbslide .g-description .g-title { padding-left: 24px; } + +.g-thumbslide .g-description.g-overlay-top { display: block; } +.g-thumbslide .g-description.g-overlay-bottom { display: block; top: auto; bottom: 6px; margin-bottom: 10px; } + +.g-thumbslide .g-metadata { display: none; position: absolute; left: 6px; bottom: 6px; padding: 2px 4px 2px 10px; width: 186px; margin: 10px 0 11px 11px; } +.g-thumbslide .g-metadata li { padding: 0; margin: 0; font-size: 0.9em; } +.g-extended .g-thumbslide .g-metadata { width: 286px; } +.g-thumbslide:hover .g-metadata { display: block; } + +/* base.css - Thumbs : Expanded View mode ~~~~~~~~~~~~~~*/ + +.g-expanded .g-thumbslide { font-size: 0.9em; width: 208px; min-height: 139px; padding-top: 6px; padding-left: 6px; line-height: 1.2em; overflow: hidden; } +.g-thumbtype-sqr.g-expanded .g-thumbslide { height: 238px; } +.g-thumbtype-flm.g-expanded .g-thumbslide { height: 171px; } +.g-thumbtype-dgt.g-expanded .g-thumbslide { height: 188px; } +.g-thumbtype-wd.g-expanded .g-thumbslide { height: 150px; } + +.g-extended .g-expanded .g-thumbslide { width: 308px; } +.g-extended .g-thumbtype-sqr.g-expanded .g-thumbslide { height: 346px; } +.g-extended .g-thumbtype-flm.g-expanded .g-thumbslide { height: 244px; } +.g-extended .g-thumbtype-dgt.g-expanded .g-thumbslide { height: 270px; } +.g-extended .g-thumbtype-wd.g-expanded .g-thumbslide { height: 214px; } + +.g-expanded .g-thumbslide .g-description { position: static; display: block; } +.g-expanded .g-thumbslide .g-description li { display: inline; padding-right: 0.8em; } +.g-expanded .g-thumbslide .g-description .g-title { display: block; font-weight: bold; font-size: 1.1em; letter-spacing: 0.1em; text-transform: uppercase; } +.g-album.g-expanded .g-thumbslide .g-description .g-title { padding-left: 24px; } + +.g-expanded .g-thumbslide .g-description.g-overlay-bottom { width: 192px; } +.g-expanded .g-thumbslide .g-metadata { bottom: 10px; } +.g-expanded .g-thumbslide .g-metadata li { padding: 0; margin: 0; font-size: 0.9em; } +.g-expanded .g-thumbslide:hover .g-metadata { display: block; bottom: 40px; } + +/* base.css - Photo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-item { float: left; height: 100%; width: 100%; } +#g-photo { padding: 6px 0 6px 0; text-align: center; float: left; height: 100%; width: 100%; } +div.g-resize { position: relative; left: 50%; float: left; padding: 5px; font-size: 0.9em; } +div.g-resize>a { float: left; overflow: hidden; } +div.g-resize>a img { float: left; } + +div.g-resize .g-description { display: none; position: absolute; left: 5px; text-align: left; padding: 10px; } +div.g-resize .g-description strong { display: block; margin-bottom: 5px; text-transform: uppercase; } +div.g-resize .g-description.g-align-top { top: 0px; margin-top: 5px; } +div.g-resize .g-description.g-align-bottom { bottom: 4px; } +div.g-resize .g-description.g-align-static { display: block; } +div.g-resize:hover .g-description { display: block; } + +div.g-resize .g-more { display: block; position: absolute; right: 16px; padding: 4px 8px; } +div.g-resize:hover .g-more { display: none; visibility: hidden; } +div.g-resize .g-more.g-align-top { top: 16px; } +div.g-resize .g-more.g-align-bottom { bottom: 20px; } + +.ul-table { text-align: center; margin: 0px auto; padding: 0; list-style-type: none; clear: both; } +.ul-table li { float: left; text-align: center; } + +#g-info { display: inline-block; width: 100%; } +#g-info .g-description { margin-top: .4em; margin-bottom: .4em; padding: .5em 1em; } +#g-movie { padding: 6px 0 6px 6px; position: relative; } + +#g-item a.g-movie { display: block; margin: 0 auto; } + +.g-description .g-metadata { padding: 0.4em 0 0 0; font-size: 0.8em; } +.g-description .g-metadata li { display: inline; padding-right: 1em; } + +/* base.css - Sidebar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* base.css - Sidebar : Common ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-block { margin-bottom: 4px; padding-bottom: 4px; position: relative; clear: both; } +.g-block h2 { padding: 6px 4px 6px 8px; font-size: 1em; } +.g-block-content { margin: 6px 6px 0 6px; display: block; zoom: 1; } + +#g-column-top .g-block, #g-column-bottom .g-block { float: left; clear: none; width: 240px; margin-left: 10px; } +#g-column-top .g-toolbar, #g-column-bottom .g-toolbar { margin-bottom: 0.5em; } +#g-column-top .g-toolbar h1, #g-column-bottom .g-toolbar h1 { display: none; } + +/* base.css - Sidebar : Buttons ~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-viewformat { z-index: 5; position: absolute; padding: 0; top: 6px; right: 10px; } +#g-viewformat li { float: left; margin-right: 2px; } +#g-viewformat span { display: block; width: 17px; height: 15px; line-height: 1px; text-indent: -900em; background-repeat: no-repeat; } +#g-viewformat .g-sidebar-left { background-position: -128px -210px; } +#g-viewformat .g-sidebar-top { background-position: -148px -210px; } +#g-viewformat .g-sidebar-full { background-position: -168px -210px; } +#g-viewformat .g-sidebar-right { background-position: -188px -210px; } +#g-viewformat .g-sidebar-bottom { background-position: -208px -210px; } +#g-viewformat .g-sidebar-left:hover, #g-viewformat .g-sidebar-left.g-current { background-position: -128px -225px; } +#g-viewformat .g-sidebar-top:hover, #g-viewformat .g-sidebar-top.g-current { background-position: -148px -225px; } +#g-viewformat .g-sidebar-full:hover, #g-viewformat .g-sidebar-full.g-current { background-position: -168px -225px; } +#g-viewformat .g-sidebar-right:hover, #g-viewformat .g-sidebar-right.g-current { background-position: -188px -225px; } +#g-viewformat .g-sidebar-bottom:hover,#g-viewformat .g-sidebar-bottom.g-current{ background-position: -208px -225px; } + +#g-view-menu { position: absolute; top: 6px; right: 106px; height: 16px; z-index: 5; zoom: 1; margin: 0 0 6px 0; padding: 0 0 4px 0; } +#g-view-menu.g-buttonset-shift { right: 6px; } +.g-toolbar { margin: 0 0 4px 0; } +.g-menu { margin: 0; padding: 0; text-align: left; } +.g-menu li { display: inline; } + +.g-menu-element, +.g-menu-link { display: inline; float: left; margin-right: 4px; background-repeat: no-repeat; background-position: center top; } + +.g-buttonset .g-menu-link { text-indent: -99999px; width: 22px; height: 15px; overflow: hidden; } + +#g-slideshow-link { background-position: -103px -210px; } +#g-slideshow-link:hover { background-position: -103px -225px; } + +.g-fullsize-link:hover, #g-exifdata-link:hover { background-position: left bottom; } + +/* base.css - Root Page ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-rootpage-quote { float: left; width: 300px; padding-top: 6px; font-size: 110%; } +#g-rootpage-roll { float: right; text-align: center; z-index: 1; position: relative; width: 800px; height: 540px; overflow: hidden; } +#g-rootpage-link { z-index: 10; position: absolute; height: 540px; width: 800px; top: 0; left: 0; cursor: pointer; } +#g-rootpage-roll span { z-index: 50; display: block; position: absolute; right: 16px; padding: 4px 8px; top: 20px; cursor: pointer; font-size: 0.9em; } +#g-rootpage-roll.g-full { margin-left: auto; margin-right: auto; float: none; } +#g-rootpage-slideshow div img { border: 0; } + +/* base.css - Large toolbar icons support ~~~~~~~~~~~~~~*/ + +.g-toolbar-large .g-buttonset .g-menu-link { width: 26px; height: 22px; } +.g-toolbar-large h1 { line-height: 24px; height: 24px; } +.g-toolbar-large #g-calendarview-link:hover { background-position: top center; } +.g-toolbar-large #g-viewformat { top: 9px; } + +.g-toolbar-large .g-navigation .ui-icon { width: 23px; height: 22px; } +.g-toolbar-large .ui-icon-first { background-position: 0px -240px; } +.g-toolbar-large .ui-icon-first-d { background-position: 0px -263px; } +.g-toolbar-large .ui-icon-prev { background-position: -23px -240px; } +.g-toolbar-large .ui-icon-prev-d { background-position: -23px -263px; } +.g-toolbar-large .ui-icon-parent { background-position: -47px -240px; } +.g-toolbar-large .ui-icon-parent-d { background-position: -47px -263px; } +.g-toolbar-large .ui-icon-next { background-position: -70px -240px; } +.g-toolbar-large .ui-icon-next-d { background-position: -70px -263px; } +.g-toolbar-large .ui-icon-last { background-position: -93px -240px; } +.g-toolbar-large .ui-icon-last-d { background-position: -93px -263px; } + +/* base.css - Upload dialog ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-add-photos-status li.g-success { background: url('../images/ico-success.png') transparent no-repeat .4em 50%; } +#g-add-photos-status li.g-error { background: url('../images/ico-error.png') transparent no-repeat .4em 50%; color: #f00; } diff --git a/themes/greydragon/css/colorpacks/blackhawk/css/colors.css b/themes/greydragon/css/colorpacks/blackhawk/css/colors.css new file mode 100755 index 0000000..5ab71d0 --- /dev/null +++ b/themes/greydragon/css/colorpacks/blackhawk/css/colors.css @@ -0,0 +1,169 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * ColorPack: SlateBlue + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* styles.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +html { background-color: #101010; } +body { color: #8C8C8C; background: #101010; } + +h1 { border-bottom: #424242 1px solid; } +a { color: #6392CF !important; } +.ui-icon, #g-slideshow-link { background-image: url(../images/ui-icons.png); } + +#g-site-status li { border-bottom: 1px solid #ccc; color: #333; } +#g-site-status .g-error { background: #f6cbca url('../images/ico-error.png') no-repeat .4em 50%; } +#g-site-status .g-info { background: #e8e8e8 url('../images/ico-info.png') no-repeat .4em 50%; } +#g-site-status .g-success { background: #d9efc2 url('../../../../images/ico-success.png') no-repeat .4em 50%; } +#g-site-status .g-warning { background: #fcf9ce url('../images/ico-warning.png') no-repeat .4em 50%; } + +/* styles.css - Layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +#g-header { border: #424242 1px solid; } +#g-header .g-message-block { border: 1px #888 solid; background-color: #AAA; color: #000; } +#g-main { border-left: #424242 1px solid; border-right: #424242 1px solid; } +.viewmode-mini #g-main { border-bottom: #424242 1px solid; } + +#g-footer { font-size: 10px; border: #424242 1px solid; } +#g-theme-logo { background: transparent url('../images/colorpack.png') no-repeat; } + +/* styles.css - Album Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-column-top, #g-column-bottom { border-left: #424242 1px solid; border-right: #424242 1px solid; } +#g-column-top .g-toolbar h1, #g-column-bottom .g-toolbar h1 { border: none; } +#g-info .g-description { border: #424242 1px solid; } + +.g-thumbcrop { border-color: #424142; } +.g-thumbslide, .g-album .g-thumbslide { background: #212021; border-color: #424142 #000 #000 #424142; } +.g-thumbslide .g-description { color: #fff; border-top: 1px solid #424142; border-bottom: 1px solid #424142; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +.g-album.g-expanded .g-thumbslide .g-description { background: transparent url(../images/ico-album.png) no-repeat 8px 4px; } +.g-album .g-thumbslide .g-description { background: #1E1E1E url(../images/ico-album.png) no-repeat 8px 4px; } +.g-thumbslide .g-metadata { border-top: 1px solid #424142; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +.g-expanded .g-thumbslide .g-metadata { border-top: 1px solid #424142; background: #1E1E1E; } + +/* styles.css - Photo Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +div.g-resize { background: #212021; border-top: 1px solid #424142; border-left: 1px solid #424142; border-right: 1px solid #000; border-bottom: 1px solid #000; } +div.g-resize .g-description { color: #fff; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div.g-resize .g-description.g-align-top { border-bottom: 1px solid #999; } +div.g-resize .g-description.g-align-bottom { border-top: 1px solid #999; } +div.g-resize .g-more { border: 1px solid #999; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div#g-movie .g-movie { border: 1px solid #888; padding: 5px; background: #555; } + +/* styles.css - Sidebar Blocks : Common ~~~~~~~~~~~~~~*/ + +.g-block h2 { border-top: 1px solid #424142; border-left: 1px solid #424142; border-right: 1px solid #000; border-bottom: 1px solid #000; } + +/* styles.css - Sidebar Blocks : Buttons ~~~~~~~~~~~~~*/ + +.g-fullsize-link { background: url("../images/view-fullsize.png") top left no-repeat; } +#g-exifdata-link { background: url("../images/view-info.png") top left no-repeat; } + +/* styles.css - Root Page ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-rootpage-roll span { border: 1px solid #424142; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +/* styles.css - Photo Slideshow ~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-body { background-color: #101415; } +#sb-title { border-left: #303030 1px solid; border-right: #303030 1px solid; background: #101415 url('../images/section.png') repeat-x; } +#sb-counter a { color: #fff !important; font-weight: bold; font-size: 11px; } + +/* forms.css - Add item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-add-photos-canvas { background-color: #101010; border: #303030 1px solid; } +#g-add-photos-status { background-color: #101010; border: #303030 1px solid; } + +.uploadifyQueueItem { color: #000; } + +/* forms.css - Reauthentificate ~~~~~~~~~~~~~~~~~~~~~*/ + +#g-column-centerfull #g-login { border: #888 1px solid; } + +/* forms.css - User Profile ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-user-profile .g-avatar { border: 1px solid #888; background: #555; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* menus.css ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-site-menu ul { border: #000000 0 solid; } +#g-site-menu li a:hover { color: #000000; background-color: #303030; } +#g-site-menu li:hover, +#g-site-menu li.iemhover { border: #303030 1px solid; background-color: #303030; border-bottom: #000000 1px solid; } +#g-site-menu li ul { border: #000000 1px solid; } +#g-site-menu li ul li { border: #C0C0C0 0px solid; background-color: #212121; } +#g-site-menu li ul li:hover, +#g-site-menu li ul li.iemhover { border: #C0C0C0 0 solid; background-color: #303030; } + +#g-site-menu.g-bar { border: #000000 1px solid; background-color: #212121; } +#g-site-menu.g-bar li:hover, +#g-site-menu.g-bar li.iemhover { border-bottom-color: transparent; } + +.g-item .g-context-menu { background-image: url(../images/ui-icons.png); } +.g-item .g-context-menu:hover { background: #181818 none; border: 1px #888 solid; } +.g-item .g-context-menu li li a:hover { background-color: #303030; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* modules.css - Exif ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-exif-data table { border: #303030 1px solid; } +#g-exif-data .g-even { background-color: #404040; } +#g-exif-data .g-odd { background-color: #303030; } + +/* modules.css - Info module ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-metadata .g-description { border-top: 1px solid #424242; } + +/* modules.css - Image block ~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-image-block img { border: 1px solid #888; background: #555; } + +/* modules.css - Comments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-comments .g-author { border-bottom: 1px solid #424242; color: #8C8C8C; } +#g-comments-link { background-image: url(../images/view-comments.png); } +#g-comment-detail>ul>li { border: 1px dotted #424242; } +#g-comment-form { border: 1px dotted #424242; } + +/* modules.css - Calendar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-view-menu #g-calendarview-link { background-image: url(../images/view-calendar.png); } +#g-view-calendar-form ul { border: 1px #888 solid; } +table.calendar { border: #a2adbc 1px solid; color: #616b76; } +table.calendar th { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; background: #d9e2e1; color: #8C8C8C; } +table.calendar td { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; } +table.calendar td.title { background-color: #a2adbc; color: #fff; } +table.calendar td.title a { color: #fff !important; } +table.calendar td a { color: red !important; } + +/* modules.css - Search ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-quick-search-form input[type="text"] { background-color: transparent; border: 1px solid #424242; color: #8C8C8C; } +#g-quick-search-form input[type="submit"] { background: transparent url(../images/search.png) no-repeat center top; border: none; } + +/* modules.css - Basket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#checkout legend { background: url(../images/section.png) repeat-x; } + +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.ui-dialog .ui-dialog-titlebar { background: #424242; } +.ui-widget-content { border: 1px solid #303030; background-color: #101010; color: #8C8C8C; } +.ui-progressbar .ui-progressbar-value { background: #424242; } + +/* Large toolbar icons support ~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-toolbar-large #g-view-menu #g-calendarview-link { background-image: url(../images/view-calendar-b.png); } +.g-toolbar-large #g-slideshow-link { background: url(../images/view-slideshow-b.png) no-repeat top center; } +.g-toolbar-large .g-fullsize-link { background: url(../images/view-fullsize-b.png) no-repeat top center; } +.g-toolbar-large #g-exifdata-link { background: url(../images/view-info-b.png) no-repeat top center; } +.g-toolbar-large #g-comments-link { background: url(../images/view-comments-b.png) no-repeat top center; } + +.g-thumbcrop a.g-meta-exif-link { background-image: url(../images/view-info-o.png); } \ No newline at end of file diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/ajax-loading.gif b/themes/greydragon/css/colorpacks/blackhawk/images/ajax-loading.gif new file mode 100755 index 0000000..0996045 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/ajax-loading.gif differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/colorpack.png b/themes/greydragon/css/colorpacks/blackhawk/images/colorpack.png new file mode 100755 index 0000000..96f5372 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/colorpack.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/ico-album.png b/themes/greydragon/css/colorpacks/blackhawk/images/ico-album.png new file mode 100755 index 0000000..ac87ec4 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/ico-album.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/ico-error.png b/themes/greydragon/css/colorpacks/blackhawk/images/ico-error.png new file mode 100755 index 0000000..c37bd06 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/ico-error.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/ico-help.png b/themes/greydragon/css/colorpacks/blackhawk/images/ico-help.png new file mode 100755 index 0000000..5c87017 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/ico-help.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/ico-info.png b/themes/greydragon/css/colorpacks/blackhawk/images/ico-info.png new file mode 100755 index 0000000..12cd1ae Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/ico-info.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/ico-warning.png b/themes/greydragon/css/colorpacks/blackhawk/images/ico-warning.png new file mode 100755 index 0000000..628cf2d Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/ico-warning.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/loading-large.gif b/themes/greydragon/css/colorpacks/blackhawk/images/loading-large.gif new file mode 100755 index 0000000..cc70a7a Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/loading-large.gif differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/loading-small.gif b/themes/greydragon/css/colorpacks/blackhawk/images/loading-small.gif new file mode 100755 index 0000000..d0bce15 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/loading-small.gif differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/search.png b/themes/greydragon/css/colorpacks/blackhawk/images/search.png new file mode 100755 index 0000000..1bfa411 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/search.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/ui-icons.png b/themes/greydragon/css/colorpacks/blackhawk/images/ui-icons.png new file mode 100755 index 0000000..a71d438 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/ui-icons.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/view-calendar-b.png b/themes/greydragon/css/colorpacks/blackhawk/images/view-calendar-b.png new file mode 100755 index 0000000..c5a1248 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/view-calendar-b.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/view-calendar.png b/themes/greydragon/css/colorpacks/blackhawk/images/view-calendar.png new file mode 100755 index 0000000..bd1d03c Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/view-calendar.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/view-comments-b.png b/themes/greydragon/css/colorpacks/blackhawk/images/view-comments-b.png new file mode 100755 index 0000000..aa91298 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/view-comments-b.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/view-comments.png b/themes/greydragon/css/colorpacks/blackhawk/images/view-comments.png new file mode 100755 index 0000000..293c587 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/view-comments.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/view-fullsize-b.png b/themes/greydragon/css/colorpacks/blackhawk/images/view-fullsize-b.png new file mode 100755 index 0000000..f659d79 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/view-fullsize-b.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/view-fullsize.png b/themes/greydragon/css/colorpacks/blackhawk/images/view-fullsize.png new file mode 100755 index 0000000..ed76257 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/view-fullsize.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/view-info-b.png b/themes/greydragon/css/colorpacks/blackhawk/images/view-info-b.png new file mode 100755 index 0000000..880d3e8 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/view-info-b.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/view-info-o.png b/themes/greydragon/css/colorpacks/blackhawk/images/view-info-o.png new file mode 100755 index 0000000..612ba96 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/view-info-o.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/view-info.png b/themes/greydragon/css/colorpacks/blackhawk/images/view-info.png new file mode 100755 index 0000000..521439c Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/view-info.png differ diff --git a/themes/greydragon/css/colorpacks/blackhawk/images/view-slideshow-b.png b/themes/greydragon/css/colorpacks/blackhawk/images/view-slideshow-b.png new file mode 100755 index 0000000..ad13671 Binary files /dev/null and b/themes/greydragon/css/colorpacks/blackhawk/images/view-slideshow-b.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/css/colors.css b/themes/greydragon/css/colorpacks/carbon/css/colors.css new file mode 100755 index 0000000..618a105 --- /dev/null +++ b/themes/greydragon/css/colorpacks/carbon/css/colors.css @@ -0,0 +1,188 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * ColorPack: Carbon + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* styles.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +html { background-color: #333; } +body { color: #999; background-color: #333; } + +h1 { border-bottom: #6f6f6f 1px solid; } +a { color: #999 !important; font-weight: bold; } +.ui-icon, #g-slideshow-link { background-image: url(../images/ui-icons.png); } + +#g-site-status li { border-bottom: 1px solid #ccc; color: #333; } +#g-site-status .g-error { background: #f6cbca url('../images/ico-error.png') no-repeat .4em 50%; } +#g-site-status .g-info { background: #e8e8e8 url('../images/ico-info.png') no-repeat .4em 50%; } +#g-site-status .g-success { background: #d9efc2 url('../../../../images/ico-success.png') no-repeat .4em 50%; } +#g-site-status .g-warning { background: #fcf9ce url('../images/ico-warning.png') no-repeat .4em 50%; } + +/* styles.css - Layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-header .g-message-block { border: 1px #888 solid; background-color: #AAA; color: #000; } +#g-main { background-color: #3f3f3f; margin-left: 10px; margin-right: 10px; } +#g-theme-logo { background: transparent url('../images/colorpack.png') no-repeat; } + +/* styles.css - Album Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-column-top { border-top: #737373 1px solid; } +#g-column-top .g-toolbar h1, #g-column-bottom .g-toolbar h1 { border: none; } +#g-info .g-description { border: #6f6f6f 1px solid; } + +.g-thumbslide { background: #555; border-color: #303E43; } +.g-album .g-thumbslide { border-color: #6f6f6f; } +.g-thumbcrop { border-color: #303E43; } + +.g-thumbslide .g-description { color: #fff; border-top: 1px solid #303e43; border-bottom: 1px solid #303e43; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +.g-album.g-expanded .g-thumbslide .g-description { background: transparent url(../images/ico-album.png) no-repeat 8px 4px; } +.g-album .g-thumbslide .g-description { background: #3f3f3f url(../images/ico-album.png) no-repeat 8px 4px; } +.g-thumbslide .g-metadata { border-top: 1px solid #303e43; background: #3f3f3f; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; color: #FFF; } +.g-expanded .g-thumbslide .g-metadata { border-top: 1px solid #303e43; background: #3f3f3f; } + +/* styles.css - Photo Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +div.g-resize { border: 1px solid #888; background: #555; } +div.g-resize .g-description { color: #fff; background: #3f3f3f; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div.g-resize .g-description.g-align-top { border-bottom: 1px solid #999; } +div.g-resize .g-description.g-align-bottom { border-top: 1px solid #999; } +div.g-resize .g-more { border: 1px solid #999; background: #3f3f3f; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div#g-movie .g-movie { border: 1px solid #888; padding: 5px; background: #555; } + +/* styles.css - Sidebar Blocks : Common ~~~~~~~~~~~~~~*/ + +.g-block { border: 1px solid #6f6f6f; } + +.g-block h2 { background-color: rgb(51, 51, 51); } +#g-column-bottom .g-block h2 { background-color: rgb(41, 41, 41); } + +/* styles.css - Sidebar Blocks : Buttons ~~~~~~~~~~~~~*/ + +.g-fullsize-link { background: url("../images/view-fullsize.png") top left no-repeat; } +#g-exifdata-link { background: url("../images/view-info.png") top left no-repeat; } + +/* styles.css - Root Page ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-rootpage-roll span { border: 1px solid #999; background: #3f3f3f; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* menus.css ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-site-menu ul { border: #000000 0 solid; } +#g-site-menu li a:hover { color: #000000; background-color: #333; } +#g-site-menu li:hover, +#g-site-menu li.iemhover { border: #303030 1px solid; background-color: #333; border-bottom: #000000 1px solid; } +#g-site-menu li ul { border: #000000 1px solid; } +#g-site-menu li ul li { border: #C0C0C0 0px solid; background-color: #333; } +#g-site-menu li ul li:hover, +#g-site-menu li ul li.iemhover { border: #C0C0C0 0 solid; background-color: #ddf2ff; } + +#g-site-menu.g-bar { border: #000000 1px solid; background-color: #333; } +#g-site-menu.g-bar li:hover, +#g-site-menu.g-bar li.iemhover { border-bottom-color: transparent; } + +.g-item .g-context-menu { background-image: url(../images/ui-icons.png); } +.g-item .g-context-menu:hover { background: #333 none; border: 1px #888 solid; } +.g-item .g-context-menu li li a:hover { background-color: #ddf2ff; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +/* styles.css - Photo Slideshow ~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-body { background-color: #101415; } +#sb-title { border-left: #303030 1px solid; border-right: #303030 1px solid; background-color: #333; } +#sb-counter a { color: #fff !important; font-weight: bold; font-size: 11px; } + +/* forms.css - Add item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-add-photos-canvas { background-color: #101010; border: #303030 1px solid; } +#g-add-photos-button { border: #303030 1px solid; color: #bbb; } +#g-add-photos-status { background-color: #101010; border: #303030 1px solid; } + +.uploadifyQueueItem { color: #000; } + +/* forms.css - User Profile ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-user-profile .g-avatar { border: 1px solid #888; background: #555; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* menus.css ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-site-menu ul { border: #000000 0 solid; } +#g-site-menu li a:hover { color: #000000; background-color: #303030; } +#g-site-menu li:hover, +#g-site-menu li.iemhover { border: #303030 1px solid; background-color: #303030; border-bottom: #000000 1px solid; } +#g-site-menu li ul { border: #000000 1px solid; } +#g-site-menu li ul li { border: #C0C0C0 0px solid; background-color: #212121; } +#g-site-menu li ul li:hover, +#g-site-menu li ul li.iemhover { border: #C0C0C0 0 solid; background-color: #303030; } + +.g-item .g-context-menu { background-image: url(../images/ui-icons.png); } +.g-item .g-context-menu:hover { background: #181818 none; border: 1px #888 solid; } +.g-item .g-context-menu li li a:hover { background-color: #303030; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* modules.css - Exif ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-exif-data table { border: #303030 1px solid; } +#g-exif-data .g-even { background-color: #404040; } +#g-exif-data .g-odd { background-color: #303030; } + +/* modules.css - Info module ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-metadata .g-description { border-top: 1px solid #737373; } + +/* modules.css - Image block ~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-image-block img { border: 1px solid #888; background: #555; } + +/* modules.css - Comments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-comments .g-author { border-bottom: 1px solid #202628; color: #999; } +#g-comments-link { background-image: url(../images/view-comments.png); } +#g-comment-detail>ul>li { border: 1px dotted #737373; } +#g-comment-form { border: 1px dotted #737373; } + +/* modules.css - Calendar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-view-menu #g-calendarview-link { background-image: url(../images/view-calendar.png); } +#g-view-calendar-form ul { border: 1px #888 solid; } +table.calendar { border: #a2adbc 1px solid; color: #616b76; } +table.calendar th { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; background: #d9e2e1; color: #616b76; } +table.calendar td { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; } +table.calendar td.title { background-color: #a2adbc; color: #fff; } +table.calendar td.title a { color: #fff !important; } +table.calendar td a { color: red !important; } + +/* modules.css - Search ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-quick-search-form input[type="text"] { background-color: transparent; border: 1px solid #737373; color: #BBB; } +#g-quick-search-form input[type="submit"] { background: transparent url(../images/search.png) no-repeat center top; border: none; } + +/* modules.css - Basket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#checkout legend { background: url(../images/section.png) repeat-x; } + +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.ui-dialog .ui-dialog-titlebar { background: #333 url('../images/section.png') repeat-x; } +.ui-widget-content { border: 1px solid #303030; background-color: #333; color: #bbb; } +.ui-progressbar .ui-progressbar-value { background: #737373; } + +/* forms.css - Reauthentificate ~~~~~~~~~~~~~~~~~~~~~*/ + +#g-column-centerfull #g-login { border: #737373 1px solid; } + +/* Large toolbar icons support ~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-toolbar-large #g-view-menu #g-calendarview-link { background-image: url(../images/view-calendar-b.png); } +.g-toolbar-large #g-slideshow-link { background: url(../images/view-slideshow-b.png) no-repeat top center; } +.g-toolbar-large .g-fullsize-link { background: url(../images/view-fullsize-b.png) no-repeat top center; } +.g-toolbar-large #g-exifdata-link { background: url(../images/view-info-b.png) no-repeat top center; } +.g-toolbar-large #g-comments-link { background: url(../images/view-comments-b.png) no-repeat top center; } + +.g-thumbcrop a.g-meta-exif-link { background-image: url(../images/view-info-o.png); } \ No newline at end of file diff --git a/themes/greydragon/css/colorpacks/carbon/images/ajax-loading.gif b/themes/greydragon/css/colorpacks/carbon/images/ajax-loading.gif new file mode 100755 index 0000000..0996045 Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/ajax-loading.gif differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/colorpack.png b/themes/greydragon/css/colorpacks/carbon/images/colorpack.png new file mode 100755 index 0000000..bc51d4f Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/colorpack.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/ico-album.png b/themes/greydragon/css/colorpacks/carbon/images/ico-album.png new file mode 100755 index 0000000..ac87ec4 Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/ico-album.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/ico-error.png b/themes/greydragon/css/colorpacks/carbon/images/ico-error.png new file mode 100755 index 0000000..c37bd06 Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/ico-error.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/ico-help.png b/themes/greydragon/css/colorpacks/carbon/images/ico-help.png new file mode 100755 index 0000000..5c87017 Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/ico-help.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/ico-info.png b/themes/greydragon/css/colorpacks/carbon/images/ico-info.png new file mode 100755 index 0000000..12cd1ae Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/ico-info.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/ico-warning.png b/themes/greydragon/css/colorpacks/carbon/images/ico-warning.png new file mode 100755 index 0000000..628cf2d Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/ico-warning.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/loading-large.gif b/themes/greydragon/css/colorpacks/carbon/images/loading-large.gif new file mode 100755 index 0000000..cc70a7a Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/loading-large.gif differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/loading-small.gif b/themes/greydragon/css/colorpacks/carbon/images/loading-small.gif new file mode 100755 index 0000000..d0bce15 Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/loading-small.gif differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/search.png b/themes/greydragon/css/colorpacks/carbon/images/search.png new file mode 100755 index 0000000..1bfa411 Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/search.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/section.png b/themes/greydragon/css/colorpacks/carbon/images/section.png new file mode 100755 index 0000000..8180ecb Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/section.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/ui-icons.png b/themes/greydragon/css/colorpacks/carbon/images/ui-icons.png new file mode 100755 index 0000000..ef92612 Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/ui-icons.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-calendar-b.png b/themes/greydragon/css/colorpacks/carbon/images/view-calendar-b.png new file mode 100755 index 0000000..c5a1248 Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/view-calendar-b.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-calendar.png b/themes/greydragon/css/colorpacks/carbon/images/view-calendar.png new file mode 100755 index 0000000..bd1d03c Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/view-calendar.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-comments-b.png b/themes/greydragon/css/colorpacks/carbon/images/view-comments-b.png new file mode 100755 index 0000000..aa91298 Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/view-comments-b.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-comments.png b/themes/greydragon/css/colorpacks/carbon/images/view-comments.png new file mode 100755 index 0000000..293c587 Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/view-comments.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-fullsize-b.png b/themes/greydragon/css/colorpacks/carbon/images/view-fullsize-b.png new file mode 100755 index 0000000..f659d79 Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/view-fullsize-b.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-fullsize.png b/themes/greydragon/css/colorpacks/carbon/images/view-fullsize.png new file mode 100755 index 0000000..ed76257 Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/view-fullsize.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-info-b.png b/themes/greydragon/css/colorpacks/carbon/images/view-info-b.png new file mode 100755 index 0000000..880d3e8 Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/view-info-b.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-info-o.png b/themes/greydragon/css/colorpacks/carbon/images/view-info-o.png new file mode 100755 index 0000000..612ba96 Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/view-info-o.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-info.png b/themes/greydragon/css/colorpacks/carbon/images/view-info.png new file mode 100755 index 0000000..521439c Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/view-info.png differ diff --git a/themes/greydragon/css/colorpacks/carbon/images/view-slideshow-b.png b/themes/greydragon/css/colorpacks/carbon/images/view-slideshow-b.png new file mode 100755 index 0000000..ad13671 Binary files /dev/null and b/themes/greydragon/css/colorpacks/carbon/images/view-slideshow-b.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/css/colors.css b/themes/greydragon/css/colorpacks/greydragon/css/colors.css new file mode 100755 index 0000000..23fb5eb --- /dev/null +++ b/themes/greydragon/css/colorpacks/greydragon/css/colors.css @@ -0,0 +1,173 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * ColorPack: GreyDragon - Default color pack + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* styles.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +html { background-color: #1A2022; } +body { color: #BBB; background: #1A2022; } + +h1 { border-bottom: #737373 1px solid; } +a { color: #6392CF !important; } +.ui-icon, #g-slideshow-link { background-image: url(../images/ui-icons.png); } + +#g-site-status li { border-bottom: 1px solid #ccc; color: #333; } +#g-site-status .g-error { background: #f6cbca url('../images/ico-error.png') no-repeat .4em 50%; } +#g-site-status .g-info { background: #e8e8e8 url('../images/ico-info.png') no-repeat .4em 50%; } +#g-site-status .g-success { background: #d9efc2 url('../../../../images/ico-success.png') no-repeat .4em 50%; } +#g-site-status .g-warning { background: #fcf9ce url('../images/ico-warning.png') no-repeat .4em 50%; } + +/* styles.css - Layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +#g-header { border-left: #10151c 1px solid; border-right: #10151c 1px solid; background: url(../images/background-top.gif) #1A2022 repeat-x; } +#g-header .g-message-block { border: 1px #888 solid; background-color: #AAA; color: #000; } +#g-main { border-left: #10151c 1px solid; border-right: #10151c 1px solid; background: url(../images/background-bottom.gif) #1A2022 repeat-x; } +.viewmode-mini #g-main { border-bottom: #10151c 1px solid; } +#g-footer { background: url(../images/footer.png) #1A2022 repeat-x top !important; } +#g-theme-logo { background: transparent url('../images/colorpack.png') no-repeat; } + +/* styles.css - Album Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-column-top { background: url(../images/background-bottom.gif) #1A2022 repeat-x; border: #10151C 1px solid; } +#g-column-bottom { background-color: #1a2022; border: #10151C 1px solid; } +#g-column-top .g-toolbar h1, #g-column-bottom .g-toolbar h1 { border: none; } +#g-info .g-description { border: #737373 1px solid; } + +.g-thumbslide { background: #1E1E1E url('../images/image-thumb.gif') repeat-x; border-color: #303E43; } +.g-album .g-thumbslide { border-color: #43565B; } +.g-thumbcrop { border-color: #303E43; } +.g-thumbslide .g-description { color: #fff; border-top: 1px solid #303e43; border-bottom: 1px solid #303e43; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +.g-album.g-expanded .g-thumbslide .g-description { background: transparent url(../images/ico-album.png) no-repeat 8px 4px; } +.g-album .g-thumbslide .g-description { background: #1E1E1E url(../images/ico-album.png) no-repeat 8px 4px; } +.g-thumbslide .g-metadata { border-top: 1px solid #303e43; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +.g-expanded .g-thumbslide .g-metadata { border-top: 1px solid #303e43; background: #1E1E1E; } +.g-album .g-thumbslide, .g-photo .g-thumbslide { background-color: #1E1E1E; } + +/* styles.css - Photo Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +div.g-resize { border: 1px solid #888; background: #555; } +div.g-resize .g-description { color: #fff; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div.g-resize .g-description.g-align-top { border-bottom: 1px solid #999; } +div.g-resize .g-description.g-align-bottom { border-top: 1px solid #999; } +div.g-resize .g-more { border: 1px solid #999; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div#g-movie .g-movie { border: 1px solid #888; padding: 5px; background: #555; } + +/* styles.css - Sidebar Blocks : Common ~~~~~~~~~~~~~~*/ + +.g-block { border: 1px solid #737373; background-color: #101415; } +.g-block h2 { background: url(../images/section.png) repeat-x; } + +/* styles.css - Sidebar Blocks : Buttons ~~~~~~~~~~~~~*/ + +.g-fullsize-link { background: url("../images/view-fullsize.png") top left no-repeat; } +#g-exifdata-link { background: url("../images/view-info.png") top left no-repeat; } + +/* styles.css - Root Page ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-rootpage-roll span { border: 1px solid #999; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +/* styles.css - Photo Slideshow ~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-body { background: #101415 url('../images/ajax-loading.gif') no-repeat center center; } +#sb-title { border-left: #303030 1px solid; border-right: #303030 1px solid; background: #101415 url('../images/section.png') repeat-x; } +#sb-counter a { color: #fff !important; font-weight: bold; font-size: 11px; } + +/* forms.css - Add item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-add-photos-canvas { background-color: #101010; border: #303030 1px solid; } +#ag-add-photos-button { border: #303030 1px solid; color: #bbb; } +#g-add-photos-status { background-color: #101010; border: #303030 1px solid; } +.uploadifyQueueItem { color: #000; } + +/* forms.css - User Profile ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-user-profile .g-avatar { border: 1px solid #888; background: #555; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* menus.css ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-site-menu ul { border: #000000 0 solid; } +#g-site-menu li a:hover { color: #000000; background-color: #303030; } +#g-site-menu li:hover, +#g-site-menu li.iemhover { border: #303030 1px solid; background-color: #303030; border-bottom: #000000 1px solid; } +#g-site-menu li ul { border: #000000 1px solid; } +#g-site-menu li ul li { border: #C0C0C0 0px solid; background-color: #212121; } +#g-site-menu li ul li:hover, +#g-site-menu li ul li.iemhover { border: #C0C0C0 0 solid; background-color: #303030; } + +#g-site-menu.g-bar { border: #000000 1px solid; background-color: #212121; } +#g-site-menu.g-bar li:hover, +#g-site-menu.g-bar li.iemhover { border-bottom-color: transparent; } + + +.g-item .g-context-menu { background-image: url(../images/ui-icons.png); } +.g-item .g-context-menu:hover { background: #181818 none; border: 1px #888 solid; } +.g-item .g-context-menu li li a:hover { background-color: #303030; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* modules.css - Exif ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-exif-data table { border: #303030 1px solid; } +#g-exif-data .g-even { background-color: #404040; } +#g-exif-data .g-odd { background-color: #303030; } + +/* modules.css - Info module ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-metadata .g-description { border-top: 1px solid #737373; } + +/* modules.css - Image block ~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-image-block img { border: 1px solid #888; background: #555; } + +/* modules.css - Comments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-comments .g-author { border-bottom: 1px solid #202628; color: #999; } +#g-comments-link { background-image: url(../images/view-comments.png); } +#g-comment-detail>ul>li { border: 1px dotted #737373; } +#g-comment-form { border: 1px dotted #737373; } + +/* modules.css - Calendar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-view-menu #g-calendarview-link { background-image: url(../images/view-calendar.png); } +#g-view-calendar-form ul { border: 1px #888 solid; } +table.calendar { border: #a2adbc 1px solid; color: #616b76; } +table.calendar th { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; background: #d9e2e1; color: #616b76; } +table.calendar td { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; } +table.calendar td.title { background-color: #a2adbc; color: #fff; } +table.calendar td.title a { color: #fff !important; } +table.calendar td a { color: red !important; } + +/* modules.css - Search ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-quick-search-form input[type="text"] { background-color: transparent; border: 1px solid #737373; color: #BBB; } +#g-quick-search-form input[type="submit"] { background: transparent url(../images/search.png) no-repeat center top; border: none; } + +/* modules.css - Basket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#checkout legend { background: url(../images/section.png) repeat-x; } + +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.ui-dialog .ui-dialog-titlebar { background: #101415 url('../images/section.png') repeat-x; } +.ui-widget-content { border: 1px solid #303030; background-color: #1a2022; color: #bbb; } +.ui-progressbar .ui-progressbar-value { background: #737373; } + +/* forms.css - Reauthentificate ~~~~~~~~~~~~~~~~~~~~~*/ + +#g-column-centerfull #g-login { border: #888 1px solid; } + +/* Large toolbar icons support ~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-toolbar-large #g-view-menu #g-calendarview-link { background-image: url(../images/view-calendar-b.png); } +.g-toolbar-large #g-slideshow-link { background: url(../images/view-slideshow-b.png) no-repeat top center; } +.g-toolbar-large .g-fullsize-link { background: url(../images/view-fullsize-b.png) no-repeat top center; } +.g-toolbar-large #g-exifdata-link { background: url(../images/view-info-b.png) no-repeat top center; } +.g-toolbar-large #g-comments-link { background: url(../images/view-comments-b.png) no-repeat top center; } + +.g-thumbcrop a.g-meta-exif-link { background-image: url(../images/view-info-o.png); } \ No newline at end of file diff --git a/themes/greydragon/css/colorpacks/greydragon/images/ajax-loading.gif b/themes/greydragon/css/colorpacks/greydragon/images/ajax-loading.gif new file mode 100755 index 0000000..0996045 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/ajax-loading.gif differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/background-bottom.gif b/themes/greydragon/css/colorpacks/greydragon/images/background-bottom.gif new file mode 100755 index 0000000..1f675f3 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/background-bottom.gif differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/background-top.gif b/themes/greydragon/css/colorpacks/greydragon/images/background-top.gif new file mode 100755 index 0000000..ec70a64 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/background-top.gif differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/background.gif b/themes/greydragon/css/colorpacks/greydragon/images/background.gif new file mode 100755 index 0000000..b808356 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/background.gif differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/colorpack.png b/themes/greydragon/css/colorpacks/greydragon/images/colorpack.png new file mode 100755 index 0000000..b4bd4ca Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/colorpack.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/footer.png b/themes/greydragon/css/colorpacks/greydragon/images/footer.png new file mode 100755 index 0000000..04d5ee5 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/footer.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/ico-album.png b/themes/greydragon/css/colorpacks/greydragon/images/ico-album.png new file mode 100755 index 0000000..ac87ec4 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/ico-album.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/ico-error.png b/themes/greydragon/css/colorpacks/greydragon/images/ico-error.png new file mode 100755 index 0000000..c37bd06 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/ico-error.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/ico-help.png b/themes/greydragon/css/colorpacks/greydragon/images/ico-help.png new file mode 100755 index 0000000..5c87017 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/ico-help.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/ico-info.png b/themes/greydragon/css/colorpacks/greydragon/images/ico-info.png new file mode 100755 index 0000000..12cd1ae Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/ico-info.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/ico-warning.png b/themes/greydragon/css/colorpacks/greydragon/images/ico-warning.png new file mode 100755 index 0000000..628cf2d Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/ico-warning.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/image-thumb.gif b/themes/greydragon/css/colorpacks/greydragon/images/image-thumb.gif new file mode 100755 index 0000000..bc3a192 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/image-thumb.gif differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/loading-large.gif b/themes/greydragon/css/colorpacks/greydragon/images/loading-large.gif new file mode 100755 index 0000000..cc70a7a Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/loading-large.gif differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/loading-small.gif b/themes/greydragon/css/colorpacks/greydragon/images/loading-small.gif new file mode 100755 index 0000000..d0bce15 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/loading-small.gif differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/search.png b/themes/greydragon/css/colorpacks/greydragon/images/search.png new file mode 100755 index 0000000..1bfa411 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/search.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/section.png b/themes/greydragon/css/colorpacks/greydragon/images/section.png new file mode 100755 index 0000000..8180ecb Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/section.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/ui-icons.png b/themes/greydragon/css/colorpacks/greydragon/images/ui-icons.png new file mode 100755 index 0000000..41ce8ff Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/ui-icons.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/view-calendar-b.png b/themes/greydragon/css/colorpacks/greydragon/images/view-calendar-b.png new file mode 100755 index 0000000..c5a1248 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/view-calendar-b.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/view-calendar.png b/themes/greydragon/css/colorpacks/greydragon/images/view-calendar.png new file mode 100755 index 0000000..bd1d03c Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/view-calendar.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/view-comments-b.png b/themes/greydragon/css/colorpacks/greydragon/images/view-comments-b.png new file mode 100755 index 0000000..aa91298 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/view-comments-b.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/view-comments.png b/themes/greydragon/css/colorpacks/greydragon/images/view-comments.png new file mode 100755 index 0000000..293c587 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/view-comments.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/view-fullsize-b.png b/themes/greydragon/css/colorpacks/greydragon/images/view-fullsize-b.png new file mode 100755 index 0000000..f659d79 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/view-fullsize-b.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/view-fullsize.png b/themes/greydragon/css/colorpacks/greydragon/images/view-fullsize.png new file mode 100755 index 0000000..ed76257 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/view-fullsize.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/view-info-b.png b/themes/greydragon/css/colorpacks/greydragon/images/view-info-b.png new file mode 100755 index 0000000..880d3e8 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/view-info-b.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/view-info-o.png b/themes/greydragon/css/colorpacks/greydragon/images/view-info-o.png new file mode 100755 index 0000000..612ba96 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/view-info-o.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/view-info.png b/themes/greydragon/css/colorpacks/greydragon/images/view-info.png new file mode 100755 index 0000000..521439c Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/view-info.png differ diff --git a/themes/greydragon/css/colorpacks/greydragon/images/view-slideshow-b.png b/themes/greydragon/css/colorpacks/greydragon/images/view-slideshow-b.png new file mode 100755 index 0000000..ad13671 Binary files /dev/null and b/themes/greydragon/css/colorpacks/greydragon/images/view-slideshow-b.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/css/colors.css b/themes/greydragon/css/colorpacks/roundrobin/css/colors.css new file mode 100755 index 0000000..6878554 --- /dev/null +++ b/themes/greydragon/css/colorpacks/roundrobin/css/colors.css @@ -0,0 +1,192 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * ColorPack: Wind - White Hawk color pack + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* styles.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +html { background-color: #FFFFFF; } +body { color: #555; margin-top: 1em; padding-left: 0px; padding-right: 0px; background: transparent url(../images/bg-body.jpg) top left; border-radius: 10px; box-shadow: 4px 4px 12px #333; } + +a { color: #555 !important } +a:hover { text-decoration: underline; } +.ui-icon, #g-slideshow-link { background-image: url(../images/ui-icons.png); } + +#g-site-status li { border-bottom: 1px solid #ccc; color: #333; } +#g-site-status .g-error { background: #f6cbca url('../images/ico-error.png') no-repeat .4em 50%; } +#g-site-status .g-info { background: #e8e8e8 url('../images/ico-info.png') no-repeat .4em 50%; } +#g-site-status .g-success { background: #d9efc2 url('../../../../images/ico-success.png') no-repeat .4em 50%; } +#g-site-status .g-warning { background: #fcf9ce url('../images/ico-warning.png') no-repeat .4em 50%; } + +/* styles.css - Layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +#g-main-in { overflow: visible; } +#g-header { border-bottom: #050505 1px solid; background: transparent url(../images/bg-header.jpg) repeat-x top left; border-top-left-radius: 10px; border-top-right-radius: 10px; } +#g-header .g-message-block { border: 1px #ccc solid; color: #000; } +#g-footer { border-top: #050505 1px solid; background: transparent url(../images/bg-header.jpg) repeat-x top left; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; } + +#g-column-left { position: relative; float: left; right: 40px; top: 16px; background: transparent url(../images/bg-header.jpg) top left; border-radius: 6px; padding-top: 4px; box-shadow: 4px 4px 12px #333; } +#g-column-right { position: relative; float: right; left: 40px; top: 16px; background: transparent url(../images/bg-header.jpg) top left; border-radius: 6px; padding-top: 4px; box-shadow: 4px 4px 12px #333; } + +.g-sidebar-left #g-column-centerright { position: relative; left: -16px; } +.g-sidebar-left #g-view-menu { right: 120px; } +.g-sidebar-left #g-viewformat { right: 24px; } + +.g-sidebar-right #g-column-centerleft { position: relative; left: 16px; } +.g-sidebar-right #g-view-menu { top: 22px; } +.g-sidebar-right #g-viewformat { top: 22px; } +.g-toolbar-large.g-sidebar-right #g-viewformat { top: 26px; } + +#g-gallery-logo { background-image: url('../images/gallery.png'); } +#g-theme-logo { background: transparent url('../images/colorpack.png') no-repeat; } + +#g-rootpage.g-sidebar-left #g-column-centerright, +#g-rootpage.g-sidebar-right #g-column-centerleft { left: 0px; padding-left: 26px; } +#g-header #g-login-menu { top: 0.6em; } + +/* styles.css - Album Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-column-top .g-toolbar h1, #g-column-bottom .g-toolbar h1 { border: none; } +#g-info h1, #g-album-header h1 { border-bottom: #ccc 1px solid; } +#g-info .g-description { border: #ccc 1px solid; } + +.g-thumbslide { border-color: #ccc; } +.g-album .g-thumbslide { border-color: #ccc; } +.g-thumbcrop { border-color: #ccc; } + +.g-default .g-thumbslide .g-description { color: #000; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; background: #FFFFFF; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +.g-expanded .g-thumbslide .g-description { color: #fff; background: transparent; border: none; } +.g-album .g-thumbslide .g-description { background-image: url(../images/ico-album.png); background-repeat: no-repeat; background-position: 8px 4px; } +.g-thumbslide .g-metadata { border-top: 1px solid #ccc; background: #FFFFFF; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } + +/* styles.css - Photo Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +div.g-resize { border: 1px solid #ccc; } +div.g-resize .g-description { color: #000; background: #FFFFFF; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div.g-resize .g-description.g-align-top { border-bottom: 1px solid #ccc; } +div.g-resize .g-description.g-align-bottom { border-top: 1px solid #ccc; } +div.g-resize .g-more { border: 1px solid #ccc; background: #FFFFFF; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div#g-movie .g-movie { border: 1px solid #ccc; padding: 5px; } + +/* styles.css - Sidebar Blocks : Common ~~~~~~~~~~~~~~*/ + +.g-block { } +.g-block h2 { border-bottom: 1px solid #ccc; background: rgba(255, 255, 255, 0.5); border-radius: 5px; } + +/* styles.css - Sidebar Blocks : Buttons ~~~~~~~~~~~~~*/ + +.g-fullsize-link { background: url("../images/view-fullsize.png") top left no-repeat; } +#g-exifdata-link { background: url("../images/view-info.png") top left no-repeat; } + +/* styles.css - Root Page ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-rootpage-roll span { border: 1px solid #ccc; background: #FFFFFF; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +/* styles.css - Photo Slideshow ~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-body { background-color: #fff; } +#sb-title { border-left: #303030 1px solid; border-right: #303030 1px solid; background: #e8e8e8; color: #000; } +#sb-title-inner { color: #000; } +#sb-counter a { font-weight: bold; font-size: 11px; } + +/* forms.css - Add item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-add-photos-canvas { background-color: #fff; border: #303030 1px solid; } +#g-add-photos-button { border: #303030 1px solid; } +#g-add-photos-status { background-color: #fff; border: #303030 1px solid; } + +.uploadifyQueueItem { color: #000; } + +/* forms.css - User Profile ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-user-profile h1 { border-bottom: #ccc 1px solid; } +#g-user-profile .g-avatar { border: 1px solid #ccc; background: #fff; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* menus.css ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-site-menu ul { border: #000000 0 solid; color: #000; } +#g-site-menu li { background-color: #ccc; } +#g-site-menu li ul { border: #ccc 1px solid; } +#g-site-menu li ul li { border: #ccc 0px solid; background-color: #ccc; } + +#g-site-menu>ul>li { background-color: transparent; } + +#g-site-menu.g-bar { border: #ccc 1px solid; background-color: #ccc; } +#g-site-menu.g-bar li:hover, +#g-site-menu.g-bar li.iemhover { border-bottom-color: transparent; } + +.g-item .g-context-menu { background-image: url(../images/ui-icons.png); } +.g-item .g-context-menu:hover { background: #e8e8e8 none; border: 1px #ccc solid; } +.g-item .g-context-menu li li a:hover { background-color: #e8e8e8; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* modules.css - Exif ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-exif-data table { border: #ccc 1px solid; } +#g-exif-data .g-even { background-color: #e8e8e8; } +#g-exif-data .g-odd { background-color: #FFFFFF; } + +/* modules.css - Info module ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-metadata .g-description { border-top: 1px solid #ccc; } + +/* modules.css - Image block ~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-image-block img { border: 1px solid #ccc; } + +/* modules.css - Comments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-comments .g-author { border-bottom: 1px solid #202628; color: #999; } +#g-comments-link { background-image: url(../images/view-comments.png); } +#g-comment-detail>ul>li { border: 1px dotted #ccc; } +#g-comment-form { border: 1px dotted #ccc; } + +/* modules.css - Calendar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-view-menu #g-calendarview-link { background-image: url(../images/view-calendar.png); } +#g-view-calendar-form ul { border: 1px #888 solid; } +table.calendar { border: #a2adbc 1px solid; color: #616b76; } +table.calendar th { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; background: #d9e2e1; color: #616b76; } +table.calendar td { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; } +table.calendar td.title { background-color: #a2adbc; color: #fff; } +table.calendar td.title a { color: #fff !important; } +table.calendar td a { color: red !important; } + +/* modules.css - Search ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-quick-search-form.g-short-form li { margin-left: -2px !important; } +#g-quick-search-form input[type="text"] { background-color: #FFF; border: 1px solid #ccc; color: #666; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } +#ag-quick-search-form input[type="submit"] { border: #c5dbec 1px solid; text-indent: 0; width: auto; height: auto; font: 80% arial, helvetica, clean, sans-serif; font-weight: bold; padding-top: 3px; padding-bottom: 3px; } +#g-quick-search-form input[type="submit"] { background: transparent url(../images/search.png) no-repeat center top; border: none; } + +#g-search-results h1 { border-bottom: #ccc 1px solid; } + +/* modules.css - Basket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#checkout legend { background-color: #e8e8e8; } + +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.ui-dialog .ui-dialog-titlebar { background: #e8e8e8; color: #666666; } +.ui-widget-content { border: 1px solid #303030; background-color: #fff; color: #000; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; background: #303030; } + +/* forms.css - Reauthentificate ~~~~~~~~~~~~~~~~~~~~~*/ + +#g-column-centerfull #g-login { border: #ccc 1px solid; } + +/* Large toolbar icons support ~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-toolbar-large #g-view-menu #g-calendarview-link { background-image: url(../images/view-calendar-b.png); } +.g-toolbar-large #g-slideshow-link { background: url(../images/view-slideshow-b.png) no-repeat top center; } +.g-toolbar-large .g-fullsize-link { background: url(../images/view-fullsize-b.png) no-repeat top center; } +.g-toolbar-large #g-exifdata-link { background: url(../images/view-info-b.png) no-repeat top center; } +.g-toolbar-large #g-comments-link { background: url(../images/view-comments-b.png) no-repeat top center; } + +.g-thumbcrop a.g-meta-exif-link { background-image: url(../images/view-info-o.png); } \ No newline at end of file diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/ajax-loading.gif b/themes/greydragon/css/colorpacks/roundrobin/images/ajax-loading.gif new file mode 100755 index 0000000..53dd589 Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/ajax-loading.gif differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/bg-body.jpg b/themes/greydragon/css/colorpacks/roundrobin/images/bg-body.jpg new file mode 100755 index 0000000..08f519b Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/bg-body.jpg differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/bg-header.jpg b/themes/greydragon/css/colorpacks/roundrobin/images/bg-header.jpg new file mode 100755 index 0000000..f33f0c6 Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/bg-header.jpg differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/colorpack.png b/themes/greydragon/css/colorpacks/roundrobin/images/colorpack.png new file mode 100755 index 0000000..12fea30 Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/colorpack.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/gallery.png b/themes/greydragon/css/colorpacks/roundrobin/images/gallery.png new file mode 100755 index 0000000..9ee765c Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/gallery.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/ico-album.png b/themes/greydragon/css/colorpacks/roundrobin/images/ico-album.png new file mode 100755 index 0000000..ac87ec4 Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/ico-album.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/ico-error.png b/themes/greydragon/css/colorpacks/roundrobin/images/ico-error.png new file mode 100755 index 0000000..c37bd06 Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/ico-error.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/ico-help.png b/themes/greydragon/css/colorpacks/roundrobin/images/ico-help.png new file mode 100755 index 0000000..5c87017 Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/ico-help.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/ico-info.png b/themes/greydragon/css/colorpacks/roundrobin/images/ico-info.png new file mode 100755 index 0000000..12cd1ae Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/ico-info.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/ico-warning.png b/themes/greydragon/css/colorpacks/roundrobin/images/ico-warning.png new file mode 100755 index 0000000..628cf2d Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/ico-warning.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/loading-large.gif b/themes/greydragon/css/colorpacks/roundrobin/images/loading-large.gif new file mode 100755 index 0000000..cc70a7a Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/loading-large.gif differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/loading-small.gif b/themes/greydragon/css/colorpacks/roundrobin/images/loading-small.gif new file mode 100755 index 0000000..d0bce15 Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/loading-small.gif differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/search.png b/themes/greydragon/css/colorpacks/roundrobin/images/search.png new file mode 100755 index 0000000..d9592d8 Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/search.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/ui-icons.png b/themes/greydragon/css/colorpacks/roundrobin/images/ui-icons.png new file mode 100755 index 0000000..4082a0e Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/ui-icons.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/view-calendar-b.png b/themes/greydragon/css/colorpacks/roundrobin/images/view-calendar-b.png new file mode 100755 index 0000000..f3ab6aa Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/view-calendar-b.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/view-calendar.png b/themes/greydragon/css/colorpacks/roundrobin/images/view-calendar.png new file mode 100755 index 0000000..a4d038a Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/view-calendar.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/view-comments-b.png b/themes/greydragon/css/colorpacks/roundrobin/images/view-comments-b.png new file mode 100755 index 0000000..aa91298 Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/view-comments-b.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/view-comments.png b/themes/greydragon/css/colorpacks/roundrobin/images/view-comments.png new file mode 100755 index 0000000..5aca071 Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/view-comments.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/view-fullsize-b.png b/themes/greydragon/css/colorpacks/roundrobin/images/view-fullsize-b.png new file mode 100755 index 0000000..fad5e53 Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/view-fullsize-b.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/view-fullsize.png b/themes/greydragon/css/colorpacks/roundrobin/images/view-fullsize.png new file mode 100755 index 0000000..cc4fbba Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/view-fullsize.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/view-info-b.png b/themes/greydragon/css/colorpacks/roundrobin/images/view-info-b.png new file mode 100755 index 0000000..90f1bb4 Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/view-info-b.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/view-info-o.png b/themes/greydragon/css/colorpacks/roundrobin/images/view-info-o.png new file mode 100755 index 0000000..612ba96 Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/view-info-o.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/view-info.png b/themes/greydragon/css/colorpacks/roundrobin/images/view-info.png new file mode 100755 index 0000000..4bdb724 Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/view-info.png differ diff --git a/themes/greydragon/css/colorpacks/roundrobin/images/view-slideshow-b.png b/themes/greydragon/css/colorpacks/roundrobin/images/view-slideshow-b.png new file mode 100755 index 0000000..ad13671 Binary files /dev/null and b/themes/greydragon/css/colorpacks/roundrobin/images/view-slideshow-b.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/css/colors.css b/themes/greydragon/css/colorpacks/slateblue/css/colors.css new file mode 100755 index 0000000..c684319 --- /dev/null +++ b/themes/greydragon/css/colorpacks/slateblue/css/colors.css @@ -0,0 +1,176 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * ColorPack: SlateBlue + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* styles.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +html { background-color: #1c242e; } +body { color: #BBB; background: #1c242e; } + +h1 { border-bottom: #737373 1px solid; } +a { color: #6392CF !important; } +.ui-icon, #g-slideshow-link { background-image: url(../images/ui-icons.png); } + +#g-site-status li { border-bottom: 1px solid #ccc; color: #333; } +#g-site-status .g-error { background: #f6cbca url('../images/ico-error.png') no-repeat .4em 50%; } +#g-site-status .g-info { background: #e8e8e8 url('../images/ico-info.png') no-repeat .4em 50%; } +#g-site-status .g-success { background: #d9efc2 url('../../../../images/ico-success.png') no-repeat .4em 50%; } +#g-site-status .g-warning { background: #fcf9ce url('../images/ico-warning.png') no-repeat .4em 50%; } + +/* styles.css - Layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +#g-header { border-left: #10151c 1px solid; border-right: #10151c 1px solid; background: url(../images/background.jpg) #1c242e repeat-x; } +.viewmode-mini #g-header { border-bottom: #10151c 1px solid; } +#g-header .g-message-block { border: 1px #888 solid; background-color: #AAA; color: #000; } +#g-main { border-left: #10151c 1px solid; border-right: #10151c 1px solid; } +.viewmode-mini #g-main { border-bottom: #10151c 1px solid; } +#g-footer { background: #000; font-size: 10px; } +#g-theme-logo { background: transparent url('../images/colorpack.png') no-repeat; } + +/* styles.css - Album Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-column-top, #g-column-bottom { background-color: #1a1e27; border: #10151C 1px solid; border-top: none;} +#g-column-top .g-toolbar h1, #g-column-bottom .g-toolbar h1 { border: none; } +#g-info .g-description { border: #10151c 1px solid; background-color: #1a1e27; } + +.g-thumbslide { border-color: #303E43; } +.g-album .g-thumbslide { border-color: #43565B; } +.g-thumbcrop { border-color: #303E43; } + +.g-default .g-thumbslide .g-description { color: #fff; background: #1E1E1E; border-top: 1px solid #303e43; border-bottom: 1px solid #303e43; opacity:.85; -ms-filter: "alpha (opacity=85)"; filter: alpha (opacity=85); } +.g-expanded .g-thumbslide .g-description { color: #fff; background: transparent; border: none; } +.g-album .g-thumbslide .g-description { background-image: url(../images/ico-album.png); background-repeat: no-repeat; background-position: 8px 4px; } + +.g-thumbslide .g-metadata { border-top: 1px solid #303e43; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } + +#g-album-grid.g-panel .g-album .g-thumbslide, #g-album-grid.g-panel .g-thumbslide { border-width: 1px; border-style: solid; border-left-color: #666; border-top-color: #666; border-right-color: #10151C; border-bottom-color: #10151C; } +// #g-album-grid.g-panel .g-album .g-thumbslide, #g-album-grid.g-panel .g-thumbslide { border-width: 1px; border-style: solid; border-left-color: #666; border-top-color: #666; border-right-color: #202020; border-bottom-color: #202020; } + + +/* styles.css - Photo Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +div.g-resize { border: #10151c 1px solid; background: #4a4e67; } +div.g-resize .g-description { color: #fff; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div.g-resize .g-description.g-align-top { border-bottom: 1px solid #999; } +div.g-resize .g-description.g-align-bottom { border-top: 1px solid #999; } +div.g-resize .g-more { border: 1px solid #999; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div#g-movie .g-movie { border: 1px solid #888; padding: 5px; background: #555; } + +/* styles.css - Sidebar Blocks : Common ~~~~~~~~~~~~~~*/ + +.g-block { border-width: 1px; border-style: solid; border-left-color: #303e43; border-top-color: #303e43; border-right-color: #10151C; border-bottom-color: #10151C; background-color: #1a1e27; } +.g-block h2 { background: #1c242e; border-bottom: #273444 1px solid; border-top: #273444 1px solid; } + +/* styles.css - Sidebar Blocks : Buttons ~~~~~~~~~~~~~*/ + +.g-fullsize-link { background: url("../images/view-fullsize.png") top left no-repeat; } +#g-exifdata-link { background: url("../images/view-info.png") top left no-repeat; } + +/* styles.css - Root Page ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-rootpage-roll span { border: 1px solid #999; background: #1E1E1E; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +/* styles.css - Photo Slideshow ~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-body { background-color: #101415; } +#sb-title { border-left: #303030 1px solid; border-right: #303030 1px solid; background: #101415 url('../images/section.png') repeat-x; } +#sb-counter a { color: #fff !important; font-weight: bold; font-size: 11px; } + +/* forms.css - Add item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-add-photos-canvas { background-color: #101010; border: #303030 1px solid; } +#g-add-photos-status { background-color: #101010; border: #303030 1px solid; } + +.uploadifyQueueItem { color: #000; } + +/* forms.css - Reauthentificate ~~~~~~~~~~~~~~~~~~~~~*/ + +#g-column-centerfull #g-login { border: #888 1px solid; } + +/* forms.css - User Profile ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-user-profile .g-avatar { border: 1px solid #888; background: #555; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* menus.css ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-site-menu ul { border: #000000 0 solid; } +#g-site-menu li a:hover { color: #000000; background-color: #303030; } +#g-site-menu li:hover, +#g-site-menu li.iemhover { border: #303030 1px solid; background-color: #303030; border-bottom: #000000 1px solid; } +#g-site-menu li ul { border: #000000 1px solid; } +#g-site-menu li ul li { border: #C0C0C0 0px solid; background-color: #212121; } +#g-site-menu li ul li:hover, +#g-site-menu li ul li.iemhover { border: #C0C0C0 0 solid; background-color: #303030; } + +#g-site-menu.g-bar { border: #000000 1px solid; background-color: #212121; } +#g-site-menu.g-bar li:hover, +#g-site-menu.g-bar li.iemhover { border-bottom-color: transparent; } + +.g-item .g-context-menu { background-image: url(../images/ui-icons.png); } +.g-item .g-context-menu:hover { background: #181818 none; border: 1px #888 solid; } +.g-item .g-context-menu li li a:hover { background-color: #303030; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* modules.css - Exif ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-exif-data table { border: #303030 1px solid; } +#g-exif-data .g-even { background-color: #404040; } +#g-exif-data .g-odd { background-color: #303030; } + +/* modules.css - Info module ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-metadata .g-description { border-top: 1px solid #737373; } + +/* modules.css - Image block ~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-image-block img { border: 1px solid #888; background: #555; } + +/* modules.css - Comments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-comments .g-author { border-bottom: 1px solid #202628; color: #999; } +#g-comments-link { background-image: url(../images/view-comments.png); } +#g-comment-detail>ul>li { border: 1px dotted #737373; } +#g-comment-form { border: 1px dotted #737373; } + +/* modules.css - Calendar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-view-menu #g-calendarview-link { background-image: url(../images/view-calendar.png); } +#g-view-calendar-form ul { border: 1px #888 solid; } +table.calendar { border: #a2adbc 1px solid; color: #616b76; } +table.calendar th { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; background: #d9e2e1; color: #616b76; } +table.calendar td { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; } +table.calendar td.title { background-color: #a2adbc; color: #fff; } +table.calendar td.title a { color: #fff !important; } +table.calendar td a { color: red !important; } + +/* modules.css - Search ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-quick-search-form input[type="text"] { background-color: transparent; border: 1px solid #737373; color: #BBB; } +#g-quick-search-form input[type="submit"] { background: transparent url(../images/search.png) no-repeat center top; border: none; } + +/* modules.css - Basket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#checkout legend { background: url(../images/section.png) repeat-x; } + +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.ui-dialog .ui-dialog-titlebar { background: #101415 url('../images/section.png') repeat-x; } +.ui-widget-content { border: 1px solid #303030; background-color: #1a2022; color: #bbb; } +.ui-progressbar .ui-progressbar-value { background: #737373; } + +/* Large toolbar icons support ~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-toolbar-large #g-view-menu #g-calendarview-link { background-image: url(../images/view-calendar-b.png); } +.g-toolbar-large #g-slideshow-link { background: url(../images/view-slideshow-b.png) no-repeat top center; } +.g-toolbar-large .g-fullsize-link { background: url(../images/view-fullsize-b.png) no-repeat top center; } +.g-toolbar-large #g-exifdata-link { background: url(../images/view-info-b.png) no-repeat top center; } +.g-toolbar-large #g-comments-link { background: url(../images/view-comments-b.png) no-repeat top center; } + +.g-thumbcrop a.g-meta-exif-link { background-image: url(../images/view-info-o.png); } \ No newline at end of file diff --git a/themes/greydragon/css/colorpacks/slateblue/images/ajax-loading.gif b/themes/greydragon/css/colorpacks/slateblue/images/ajax-loading.gif new file mode 100755 index 0000000..0996045 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/ajax-loading.gif differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/background.jpg b/themes/greydragon/css/colorpacks/slateblue/images/background.jpg new file mode 100755 index 0000000..7ec958a Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/background.jpg differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/colorpack.png b/themes/greydragon/css/colorpacks/slateblue/images/colorpack.png new file mode 100755 index 0000000..d3fd993 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/colorpack.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/footer.png b/themes/greydragon/css/colorpacks/slateblue/images/footer.png new file mode 100755 index 0000000..04d5ee5 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/footer.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/ico-album.png b/themes/greydragon/css/colorpacks/slateblue/images/ico-album.png new file mode 100755 index 0000000..ac87ec4 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/ico-album.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/ico-error.png b/themes/greydragon/css/colorpacks/slateblue/images/ico-error.png new file mode 100755 index 0000000..c37bd06 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/ico-error.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/ico-help.png b/themes/greydragon/css/colorpacks/slateblue/images/ico-help.png new file mode 100755 index 0000000..5c87017 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/ico-help.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/ico-info.png b/themes/greydragon/css/colorpacks/slateblue/images/ico-info.png new file mode 100755 index 0000000..12cd1ae Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/ico-info.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/ico-warning.png b/themes/greydragon/css/colorpacks/slateblue/images/ico-warning.png new file mode 100755 index 0000000..628cf2d Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/ico-warning.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/loading-large.gif b/themes/greydragon/css/colorpacks/slateblue/images/loading-large.gif new file mode 100755 index 0000000..cc70a7a Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/loading-large.gif differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/loading-small.gif b/themes/greydragon/css/colorpacks/slateblue/images/loading-small.gif new file mode 100755 index 0000000..d0bce15 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/loading-small.gif differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/search.png b/themes/greydragon/css/colorpacks/slateblue/images/search.png new file mode 100755 index 0000000..1bfa411 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/search.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/section.png b/themes/greydragon/css/colorpacks/slateblue/images/section.png new file mode 100755 index 0000000..8180ecb Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/section.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/ui-icons.png b/themes/greydragon/css/colorpacks/slateblue/images/ui-icons.png new file mode 100755 index 0000000..41ce8ff Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/ui-icons.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/view-calendar-b.png b/themes/greydragon/css/colorpacks/slateblue/images/view-calendar-b.png new file mode 100755 index 0000000..c5a1248 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/view-calendar-b.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/view-calendar.png b/themes/greydragon/css/colorpacks/slateblue/images/view-calendar.png new file mode 100755 index 0000000..bd1d03c Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/view-calendar.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/view-comments-b.png b/themes/greydragon/css/colorpacks/slateblue/images/view-comments-b.png new file mode 100755 index 0000000..aa91298 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/view-comments-b.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/view-comments.png b/themes/greydragon/css/colorpacks/slateblue/images/view-comments.png new file mode 100755 index 0000000..293c587 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/view-comments.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/view-fullsize-b.png b/themes/greydragon/css/colorpacks/slateblue/images/view-fullsize-b.png new file mode 100755 index 0000000..f659d79 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/view-fullsize-b.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/view-fullsize.png b/themes/greydragon/css/colorpacks/slateblue/images/view-fullsize.png new file mode 100755 index 0000000..ed76257 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/view-fullsize.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/view-info-b.png b/themes/greydragon/css/colorpacks/slateblue/images/view-info-b.png new file mode 100755 index 0000000..880d3e8 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/view-info-b.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/view-info-o.png b/themes/greydragon/css/colorpacks/slateblue/images/view-info-o.png new file mode 100755 index 0000000..612ba96 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/view-info-o.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/view-info.png b/themes/greydragon/css/colorpacks/slateblue/images/view-info.png new file mode 100755 index 0000000..521439c Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/view-info.png differ diff --git a/themes/greydragon/css/colorpacks/slateblue/images/view-slideshow-b.png b/themes/greydragon/css/colorpacks/slateblue/images/view-slideshow-b.png new file mode 100755 index 0000000..ad13671 Binary files /dev/null and b/themes/greydragon/css/colorpacks/slateblue/images/view-slideshow-b.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/css/colors.css b/themes/greydragon/css/colorpacks/whitehawk/css/colors.css new file mode 100755 index 0000000..cd02f40 --- /dev/null +++ b/themes/greydragon/css/colorpacks/whitehawk/css/colors.css @@ -0,0 +1,172 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * ColorPack: Wind - White Hawk color pack + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* styles.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +html { background-color: #FFFFFF; } +body { color: #666666; padding-left: 10px; padding-right: 10px; } + +a { color: #666666 !important } +a:hover { text-decoration: underline; } +.ui-icon, #g-slideshow-link { background-image: url(../images/ui-icons.png); } + +#g-site-status li { border-bottom: 1px solid #ccc; color: #333; } +#g-site-status .g-error { background: #f6cbca url('../images/ico-error.png') no-repeat .4em 50%; } +#g-site-status .g-info { background: #e8e8e8 url('../images/ico-info.png') no-repeat .4em 50%; } +#g-site-status .g-success { background: #d9efc2 url('../../../../images/ico-success.png') no-repeat .4em 50%; } +#g-site-status .g-warning { background: #fcf9ce url('../images/ico-warning.png') no-repeat .4em 50%; } + +/* styles.css - Layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +#g-header { border-bottom: #ccc 1px solid; } +#g-header .g-message-block { border: 1px #ccc solid; color: #000; } +#g-footer { border-top: #ccc 1px solid; } + +#g-gallery-logo { background-image: url('../images/gallery.png'); } +#g-theme-logo { background: transparent url('../images/colorpack.png') no-repeat; } + +/* styles.css - Album Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-column-top .g-toolbar h1, #g-column-bottom .g-toolbar h1 { border: none; } +#g-info h1, #g-album-header h1 { border-bottom: #ccc 1px solid; } +#g-info .g-description { border: #ccc 1px solid; } + +.g-thumbslide { border-color: #ccc; } +.g-album .g-thumbslide { border-color: #ccc; } +.g-thumbcrop { border-color: #ccc; } + +.g-default .g-thumbslide .g-description { color: #000; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; background: #FFFFFF; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +.g-expanded .g-thumbslide .g-description { color: #fff; background: transparent; border: none; } +.g-album .g-thumbslide .g-description { background-image: url(../images/ico-album.png); background-repeat: no-repeat; background-position: 8px 4px; } +.g-thumbslide .g-metadata { border-top: 1px solid #ccc; background: #FFFFFF; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } + +/* styles.css - Photo Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +div.g-resize { border: 1px solid #ccc; } +div.g-resize .g-description { color: #000; background: #FFFFFF; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div.g-resize .g-description.g-align-top { border-bottom: 1px solid #ccc; } +div.g-resize .g-description.g-align-bottom { border-top: 1px solid #ccc; } +div.g-resize .g-more { border: 1px solid #ccc; background: #FFFFFF; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div#g-movie .g-movie { border: 1px solid #ccc; padding: 5px; } + +/* styles.css - Sidebar Blocks : Common ~~~~~~~~~~~~~~*/ + +.g-block { border: 1px solid #ccc; } +.g-block h2 { border-bottom: 1px solid #ccc; } + +/* styles.css - Sidebar Blocks : Buttons ~~~~~~~~~~~~~*/ + +.g-fullsize-link { background: url("../images/view-fullsize.png") top left no-repeat; } +#g-exifdata-link { background: url("../images/view-info.png") top left no-repeat; } + +/* styles.css - Root Page ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-rootpage-roll span { border: 1px solid #ccc; background: #FFFFFF; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +/* styles.css - Photo Slideshow ~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-body { background-color: #fff; } +#sb-title { border-left: #303030 1px solid; border-right: #303030 1px solid; background: #e8e8e8; color: #000; } +#sb-title-inner { color: #000; } +#sb-counter a { font-weight: bold; font-size: 11px; } + +/* forms.css - Add item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-add-photos-canvas { background-color: #fff; border: #303030 1px solid; } +#g-add-photos-button { border: #303030 1px solid; } +#g-add-photos-status { background-color: #fff; border: #303030 1px solid; } + +.uploadifyQueueItem { color: #000; } + +/* forms.css - User Profile ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-user-profile h1 { border-bottom: #ccc 1px solid; } +#g-user-profile .g-avatar { border: 1px solid #ccc; background: #fff; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* menus.css ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-site-menu ul { border: #000000 0 solid; } +#g-site-menu li { background-color: #FFFFFF; } +#g-site-menu li ul { border: #ccc 1px solid; } +#g-site-menu li ul li { border: #ccc 0px solid; background-color: #FFFFFF; } + +#g-site-menu.g-bar { border: #ccc 1px solid; background-color: #FFFFFF; } +#g-site-menu.g-bar li:hover, +#g-site-menu.g-bar li.iemhover { border-bottom-color: transparent; } + +.g-item .g-context-menu { background-image: url(../images/ui-icons.png); } +.g-item .g-context-menu:hover { background: #e8e8e8 none; border: 1px #ccc solid; } +.g-item .g-context-menu li li a:hover { background-color: #e8e8e8; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* modules.css - Exif ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-exif-data table { border: #ccc 1px solid; } +#g-exif-data .g-even { background-color: #e8e8e8; } +#g-exif-data .g-odd { background-color: #FFFFFF; } + +/* modules.css - Info module ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-metadata .g-description { border-top: 1px solid #ccc; } + +/* modules.css - Image block ~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-image-block img { border: 1px solid #ccc; } + +/* modules.css - Comments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-comments .g-author { border-bottom: 1px solid #202628; color: #999; } +#g-comments-link { background-image: url(../images/view-comments.png); } +#g-comment-detail>ul>li { border: 1px dotted #ccc; } +#g-comment-form { border: 1px dotted #ccc; } + +/* modules.css - Calendar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-view-menu #g-calendarview-link { background-image: url(../images/view-calendar.png); } +#g-view-calendar-form ul { border: 1px #888 solid; } +table.calendar { border: #a2adbc 1px solid; color: #616b76; } +table.calendar th { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; background: #d9e2e1; color: #616b76; } +table.calendar td { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; } +table.calendar td.title { background-color: #a2adbc; color: #fff; } +table.calendar td.title a { color: #fff !important; } +table.calendar td a { color: red !important; } + +/* modules.css - Search ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-quick-search-form input[type="text"] { background-color: transparent; border: 1px solid #ccc; color: #666; } +#ag-quick-search-form input[type="submit"] { border: #c5dbec 1px solid; text-indent: 0; width: auto; height: auto; font: 80% arial, helvetica, clean, sans-serif; font-weight: bold; padding-top: 3px; padding-bottom: 3px; } +#g-quick-search-form input[type="submit"] { background: transparent url(../images/search.png) no-repeat center top; border: none; } + +#g-search-results h1 { border-bottom: #ccc 1px solid; } + +/* modules.css - Basket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#checkout legend { background-color: #e8e8e8; } + +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.ui-dialog .ui-dialog-titlebar { background: #e8e8e8; color: #666666; } +.ui-widget-content { border: 1px solid #303030; background-color: #fff; color: #000; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; background: #303030; } + +/* forms.css - Reauthentificate ~~~~~~~~~~~~~~~~~~~~~*/ + +#g-column-centerfull #g-login { border: #ccc 1px solid; } + +/* Large toolbar icons support ~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-toolbar-large #g-view-menu #g-calendarview-link { background-image: url(../images/view-calendar-b.png); } +.g-toolbar-large #g-slideshow-link { background: url(../images/view-slideshow-b.png) no-repeat top center; } +.g-toolbar-large .g-fullsize-link { background: url(../images/view-fullsize-b.png) no-repeat top center; } +.g-toolbar-large #g-exifdata-link { background: url(../images/view-info-b.png) no-repeat top center; } +.g-toolbar-large #g-comments-link { background: url(../images/view-comments-b.png) no-repeat top center; } + +.g-thumbcrop a.g-meta-exif-link { background-image: url(../images/view-info-o.png); } \ No newline at end of file diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/ajax-loading.gif b/themes/greydragon/css/colorpacks/whitehawk/images/ajax-loading.gif new file mode 100755 index 0000000..53dd589 Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/ajax-loading.gif differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/colorpack.png b/themes/greydragon/css/colorpacks/whitehawk/images/colorpack.png new file mode 100755 index 0000000..3b7afef Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/colorpack.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/gallery.png b/themes/greydragon/css/colorpacks/whitehawk/images/gallery.png new file mode 100755 index 0000000..3ba425d Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/gallery.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/ico-album.png b/themes/greydragon/css/colorpacks/whitehawk/images/ico-album.png new file mode 100755 index 0000000..ac87ec4 Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/ico-album.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/ico-error.png b/themes/greydragon/css/colorpacks/whitehawk/images/ico-error.png new file mode 100755 index 0000000..c37bd06 Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/ico-error.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/ico-help.png b/themes/greydragon/css/colorpacks/whitehawk/images/ico-help.png new file mode 100755 index 0000000..5c87017 Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/ico-help.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/ico-info.png b/themes/greydragon/css/colorpacks/whitehawk/images/ico-info.png new file mode 100755 index 0000000..12cd1ae Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/ico-info.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/ico-warning.png b/themes/greydragon/css/colorpacks/whitehawk/images/ico-warning.png new file mode 100755 index 0000000..628cf2d Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/ico-warning.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/loading-large.gif b/themes/greydragon/css/colorpacks/whitehawk/images/loading-large.gif new file mode 100755 index 0000000..cc70a7a Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/loading-large.gif differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/loading-small.gif b/themes/greydragon/css/colorpacks/whitehawk/images/loading-small.gif new file mode 100755 index 0000000..d0bce15 Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/loading-small.gif differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/search.png b/themes/greydragon/css/colorpacks/whitehawk/images/search.png new file mode 100755 index 0000000..bb323e5 Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/search.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/ui-icons.png b/themes/greydragon/css/colorpacks/whitehawk/images/ui-icons.png new file mode 100755 index 0000000..db1ec71 Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/ui-icons.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/view-calendar-b.png b/themes/greydragon/css/colorpacks/whitehawk/images/view-calendar-b.png new file mode 100755 index 0000000..f3ab6aa Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/view-calendar-b.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/view-calendar.png b/themes/greydragon/css/colorpacks/whitehawk/images/view-calendar.png new file mode 100755 index 0000000..a4d038a Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/view-calendar.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/view-comments-b.png b/themes/greydragon/css/colorpacks/whitehawk/images/view-comments-b.png new file mode 100755 index 0000000..aa91298 Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/view-comments-b.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/view-comments.png b/themes/greydragon/css/colorpacks/whitehawk/images/view-comments.png new file mode 100755 index 0000000..5aca071 Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/view-comments.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/view-fullsize-b.png b/themes/greydragon/css/colorpacks/whitehawk/images/view-fullsize-b.png new file mode 100755 index 0000000..fad5e53 Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/view-fullsize-b.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/view-fullsize.png b/themes/greydragon/css/colorpacks/whitehawk/images/view-fullsize.png new file mode 100755 index 0000000..cc4fbba Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/view-fullsize.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/view-info-b.png b/themes/greydragon/css/colorpacks/whitehawk/images/view-info-b.png new file mode 100755 index 0000000..90f1bb4 Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/view-info-b.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/view-info-o.png b/themes/greydragon/css/colorpacks/whitehawk/images/view-info-o.png new file mode 100755 index 0000000..612ba96 Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/view-info-o.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/view-info.png b/themes/greydragon/css/colorpacks/whitehawk/images/view-info.png new file mode 100755 index 0000000..4bdb724 Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/view-info.png differ diff --git a/themes/greydragon/css/colorpacks/whitehawk/images/view-slideshow-b.png b/themes/greydragon/css/colorpacks/whitehawk/images/view-slideshow-b.png new file mode 100755 index 0000000..ad13671 Binary files /dev/null and b/themes/greydragon/css/colorpacks/whitehawk/images/view-slideshow-b.png differ diff --git a/themes/greydragon/css/colorpacks/wind/css/colors.css b/themes/greydragon/css/colorpacks/wind/css/colors.css new file mode 100755 index 0000000..2e53eb1 --- /dev/null +++ b/themes/greydragon/css/colorpacks/wind/css/colors.css @@ -0,0 +1,175 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * ColorPack: Wind - Wind theme-like color pack + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* styles.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +html { background-color: #ccc; } +body { color: #000; background-color: #ccc; padding-left: 10px; padding-right: 10px; } + +a { color: #33629f !important } +.ui-icon, #g-slideshow-link { background-image: url(../images/ui-icons.png); } + +#g-site-status li { border-bottom: 1px solid #ccc; color: #333; } +#g-site-status .g-error { background: #f6cbca url('../images/ico-error.png') no-repeat .4em 50%; } +#g-site-status .g-info { background: #e8e8e8 url('../images/ico-info.png') no-repeat .4em 50%; } +#g-site-status .g-success { background: #d9efc2 url('../../../../images/ico-success.png') no-repeat .4em 50%; } +#g-site-status .g-warning { background: #fcf9ce url('../images/ico-warning.png') no-repeat .4em 50%; } + +/* styles.css - Layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +#g-header { background-color: #e8e8e8; border-bottom: #ccc 1px solid; } +#g-header .g-message-block { border: 1px #888 solid; background-color: #aaa; color: #000; } +#g-main { background-color: #fff; } +#g-footer { background-color: #e8e8e8; border-top: #ccc 1px solid; } +#g-theme-logo { background: transparent url('../images/colorpack.png') no-repeat; } + +/* styles.css - Album Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-column-top, #g-column-bottom { background-color: #e8e8e8; } +#g-column-top .g-toolbar h1, #g-column-bottom .g-toolbar h1 { border: none; } +#g-info h1, #g-album-header h1 { border-bottom: #ccc 1px solid; } +#g-info .g-description { border: #888 1px solid; } + +.g-thumbslide { background: #e8e8e8; border-color: #707E83; } +.g-album .g-thumbslide { border-color: #707E83; } +.g-thumbcrop { border-color: #707E83; } + +.g-default .g-thumbslide .g-description { color: #000; border-top: 1px solid #707E83; border-bottom: 1px solid #707E83; background: #e8e8e8; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +.g-expanded .g-thumbslide .g-description { color: #fff; background: transparent; border: none; } +.g-album .g-thumbslide .g-description { background-image: url(../images/ico-album.png); background-repeat: no-repeat; background-position: 8px 4px; } + +.g-thumbslide .g-metadata { border-top: 1px solid #707E83; background: #e8e8e8; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } + +/* styles.css - Photo Layout ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +div.g-resize { border: 1px solid #888; background: #e8e8e8; } +div.g-resize .g-description { color: #000; background: #e8e8e8; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div.g-resize .g-description.g-align-top { border-bottom: 1px solid #999; } +div.g-resize .g-description.g-align-bottom { border-top: 1px solid #999; } +div.g-resize .g-more { border: 1px solid #999; background: #e8e8e8; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } +div#g-movie .g-movie { border: 1px solid #888; padding: 5px; background: #e8e8e8; } + +/* styles.css - Sidebar Blocks : Common ~~~~~~~~~~~~~~*/ + +.g-block { border: 1px solid #ccc; } +.g-block h2 { background-color: #e8e8e8; } + +/* styles.css - Sidebar Blocks : Buttons ~~~~~~~~~~~~~*/ + +.g-fullsize-link { background: url("../images/view-fullsize.png") top left no-repeat; } +#g-exifdata-link { background: url("../images/view-info.png") top left no-repeat; } + +/* styles.css - Root Page ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-rootpage-roll span { border: 1px solid #999; background: #e8e8e8; filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +/* styles.css - Photo Slideshow ~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-body { background-color: #fff; } +#sb-title { border-left: #303030 1px solid; border-right: #303030 1px solid; background: #e8e8e8; color: #000; } +#sb-title-inner { color: #000; } +#sb-counter a { font-weight: bold; font-size: 11px; } + +/* forms.css - Add item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-add-photos-canvas { background-color: #fff; border: #303030 1px solid; } +#g-add-photos-button { border: #303030 1px solid; } +#g-add-photos-status { background-color: #fff; border: #303030 1px solid; } + +.uploadifyQueueItem { color: #000; } + +/* forms.css - User Profile ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-user-profile h1 { border-bottom: #ccc 1px solid; } +#g-user-profile .g-avatar { border: 1px solid #888; background: #fff; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* menus.css ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-site-menu ul { border: #000000 0 solid; } +#g-site-menu li { background-color: #bdd2ff; } +#g-site-menu li a:hover { color: #000000; background-color: #cfdeff; } +#g-site-menu li:hover, +#g-site-menu li.iemhover { border: #303030 1px solid; background-color: #cfdeff; border-bottom: #cfdeff 1px solid; } +#g-site-menu li ul { border: #cfdeff 1px solid; } +#g-site-menu li ul li { border: #C0C0C0 0px solid; background-color: #bdd2ff; } +#g-site-menu li ul li:hover, +#g-site-menu li ul li.iemhover { border: #C0C0C0 0 solid; background-color: #ddf2ff; } + +#g-site-menu.g-bar { border: #cfdeff 1px solid; background-color: #bdd2ff; } +#g-site-menu.g-bar li:hover, +#g-site-menu.g-bar li.iemhover { border-bottom-color: transparent; } + +.g-item .g-context-menu { background-image: url(../images/ui-icons.png); } +.g-item .g-context-menu:hover { background: #bdd2ff none; border: 1px #888 solid; } +.g-item .g-context-menu li li a:hover { background-color: #ddf2ff; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* modules.css - Exif ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-exif-data table { border: #303030 1px solid; } +#g-exif-data .g-even { background-color: #A0A0A0; } +#g-exif-data .g-odd { background-color: #C0C0C0; } + +/* modules.css - Info module ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-metadata .g-description { border-top: 1px solid #ccc; } + +/* modules.css - Image block ~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-image-block img { border: 1px solid #888; background: #555; } + +/* modules.css - Comments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-comments .g-author { border-bottom: 1px solid #202628; color: #999; } +#g-comments-link { background-image: url(../images/view-comments.png); } +#g-comment-detail>ul>li { border: 1px dotted #ccc; } +#g-comment-form { border: 1px dotted #ccc; } + +/* modules.css - Calendar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-view-menu #g-calendarview-link { background-image: url(../images/view-calendar.png); } +#g-view-calendar-form ul { border: 1px #888 solid; } +table.calendar { border: #a2adbc 1px solid; color: #616b76; } +table.calendar th { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; background: #d9e2e1; color: #616b76; } +table.calendar td { border-bottom: #a2adbc 1px solid; border-right: #a2adbc 1px solid; } +table.calendar td.title { background-color: #a2adbc; color: #fff; } +table.calendar td.title a { color: #fff !important; } +table.calendar td a { color: red !important; } + +/* modules.css - Search ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-quick-search-form input[type="text"] { background-color: transparent; border: 1px solid #ccc; color: #666; } +#g-quick-search-form input[type="submit"] { border: #c5dbec 1px solid; text-indent: 0; width: auto; height: auto; font: 80% arial, helvetica, clean, sans-serif; font-weight: bold; padding-top: 3px; padding-bottom: 3px; } +#g-search-results h1 { border-bottom: #ccc 1px solid; } + +/* modules.css - Basket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#checkout legend { background-color: #e8e8e8; } + +/* forms.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.ui-dialog .ui-dialog-titlebar { background: #ccc url('../images/section.png') repeat-x; } +.ui-widget-content { border: 1px solid #303030; background-color: #fff; color: #000; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; background: #303030; } + +/* forms.css - Reauthentificate ~~~~~~~~~~~~~~~~~~~~~*/ + +#g-column-centerfull #g-login { border: #888 1px solid; } + +/* Large toolbar icons support ~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-toolbar-large #g-view-menu #g-calendarview-link { background-image: url(../../../../../../modules/calendarview/images/ico-view-calendarview.png); } +.g-toolbar-large #g-slideshow-link { background: url(../images/view-slideshow-b.png) no-repeat top center; } +.g-toolbar-large .g-fullsize-link { background: url(../images/ico-view-fullsize.png) no-repeat top center; } +.g-toolbar-large #g-exifdata-link { background: url(../images/view-info-b.png) no-repeat top center; } +.g-toolbar-large #g-comments-link { background: url(../images/view-comments-b.png) no-repeat top center; } + +.g-thumbcrop a.g-meta-exif-link { background-image: url(../images/view-info-o.png); } \ No newline at end of file diff --git a/themes/greydragon/css/colorpacks/wind/images/ajax-loading.gif b/themes/greydragon/css/colorpacks/wind/images/ajax-loading.gif new file mode 100755 index 0000000..53dd589 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/ajax-loading.gif differ diff --git a/themes/greydragon/css/colorpacks/wind/images/colorpack.png b/themes/greydragon/css/colorpacks/wind/images/colorpack.png new file mode 100755 index 0000000..d217920 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/colorpack.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/ico-album.png b/themes/greydragon/css/colorpacks/wind/images/ico-album.png new file mode 100755 index 0000000..ac87ec4 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/ico-album.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/ico-error.png b/themes/greydragon/css/colorpacks/wind/images/ico-error.png new file mode 100755 index 0000000..c37bd06 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/ico-error.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/ico-help.png b/themes/greydragon/css/colorpacks/wind/images/ico-help.png new file mode 100755 index 0000000..5c87017 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/ico-help.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/ico-info.png b/themes/greydragon/css/colorpacks/wind/images/ico-info.png new file mode 100755 index 0000000..12cd1ae Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/ico-info.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/ico-view-fullsize.png b/themes/greydragon/css/colorpacks/wind/images/ico-view-fullsize.png new file mode 100755 index 0000000..740183a Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/ico-view-fullsize.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/ico-view-slideshow-rtl.png b/themes/greydragon/css/colorpacks/wind/images/ico-view-slideshow-rtl.png new file mode 100755 index 0000000..9552d30 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/ico-view-slideshow-rtl.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/ico-view-slideshow.png b/themes/greydragon/css/colorpacks/wind/images/ico-view-slideshow.png new file mode 100755 index 0000000..d43a560 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/ico-view-slideshow.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/ico-warning.png b/themes/greydragon/css/colorpacks/wind/images/ico-warning.png new file mode 100755 index 0000000..628cf2d Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/ico-warning.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/loading-large.gif b/themes/greydragon/css/colorpacks/wind/images/loading-large.gif new file mode 100755 index 0000000..cc70a7a Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/loading-large.gif differ diff --git a/themes/greydragon/css/colorpacks/wind/images/loading-small.gif b/themes/greydragon/css/colorpacks/wind/images/loading-small.gif new file mode 100755 index 0000000..d0bce15 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/loading-small.gif differ diff --git a/themes/greydragon/css/colorpacks/wind/images/section.png b/themes/greydragon/css/colorpacks/wind/images/section.png new file mode 100755 index 0000000..33fc350 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/section.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/ui-icons.png b/themes/greydragon/css/colorpacks/wind/images/ui-icons.png new file mode 100755 index 0000000..7dc8ab9 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/ui-icons.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/view-calendar.png b/themes/greydragon/css/colorpacks/wind/images/view-calendar.png new file mode 100755 index 0000000..13e0e8f Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/view-calendar.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/view-comments-b.png b/themes/greydragon/css/colorpacks/wind/images/view-comments-b.png new file mode 100755 index 0000000..64f8c50 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/view-comments-b.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/view-comments.png b/themes/greydragon/css/colorpacks/wind/images/view-comments.png new file mode 100755 index 0000000..f33bdf1 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/view-comments.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/view-fullsize.png b/themes/greydragon/css/colorpacks/wind/images/view-fullsize.png new file mode 100755 index 0000000..58b3e0b Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/view-fullsize.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/view-info-b.png b/themes/greydragon/css/colorpacks/wind/images/view-info-b.png new file mode 100755 index 0000000..90f1bb4 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/view-info-b.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/view-info-o.png b/themes/greydragon/css/colorpacks/wind/images/view-info-o.png new file mode 100755 index 0000000..612ba96 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/view-info-o.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/view-info.png b/themes/greydragon/css/colorpacks/wind/images/view-info.png new file mode 100755 index 0000000..2cc7a68 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/view-info.png differ diff --git a/themes/greydragon/css/colorpacks/wind/images/view-slideshow-b.png b/themes/greydragon/css/colorpacks/wind/images/view-slideshow-b.png new file mode 100755 index 0000000..ad13671 Binary files /dev/null and b/themes/greydragon/css/colorpacks/wind/images/view-slideshow-b.png differ diff --git a/themes/greydragon/css/forms.css b/themes/greydragon/css/forms.css new file mode 100755 index 0000000..8375de2 --- /dev/null +++ b/themes/greydragon/css/forms.css @@ -0,0 +1,120 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2011 Serguei Dosyukov + * + * CSS rules related to forms/dialogs + */ + +.ui-widget-overlay { position: absolute; top:0; left:0; bottom: 0; right: 0; position: fixed; width:100%; filter: alpha(opacity=70); -moz-opacity: 0.7; -khtml-opacity: 0.7; opacity: 0.7; background-color: #111; zoom: 1; } +.ui-widget-overlay { height: expression(document.documentElement.clientHeight + 'px'); } +.ui-widget-overlay { height: 100%; } + +/* Dialog ----------------------------------*/ + +.ui-dialog { position: relative; width: 300px; display: inline-block; z-index: 100; } +.ui-dialog .ui-dialog-titlebar { height: 1em; padding: .5em .3em .3em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; text-indent: -900em; } +.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; display: block; clear:both; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-dialog ul { padding: 0; } +.ui-dialog .ui-dialog-content .g-right { margin-right: 20px; } + +/* forms.css - Component containers ~~~~~~~~~~~~~~~~~~*/ +.ui-widget-header { color: #ffffff; font-weight: bold; } +.ui-widget-header a { color: #ffffff; } +.ui-widget-content a { color: #222222; } + +/* forms.css - Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +form { margin: 0; } +form p.g-error { color: red; } +fieldset { border: 1px solid #ccc; margin-left: 0; margin-right: 0; padding: 0 1em .8em 1em; } +legend { display: none; } +input.textbox, input[type="text"], input[type="password"], textarea { border: 1px solid #e8e8e8; border-top-color: #ccc; border-left-color: #ccc; clear: both; color: #333; width: 50%; } +textarea { height: 12em; width: 97%; } +input:focus, input.textbox:focus, input[type=text]:focus, textarea:focus, option:focus { background-color: #ffc; color: #000; } +input.checkbox, input[type=checkbox], input.radio, input[type=radio] { float: left; margin-right: .4em; } + +/* forms.css - Layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +form li { margin: 0; padding: 0 0 .2em 0; } +form ul { margin-top: 0; } +form ul ul { clear: both; } +form ul ul li { float: left; margin-right: 0.6em; } +input, select, textarea { display: block; clear: both; } +input[type="submit"], input[type="reset"] { display: inline; } +input[type="submit"], .g-button, button { display: inline-block; padding: 2px 10px 2px; font-size: 0.8em; color: #333 !important; font-weight: normal; line-height: 1.4em; text-align: center; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); background-color: #fafafa; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6)); background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6); background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6); background-repeat: no-repeat; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0); border: 1px solid #ccc; border-bottom-color: #bbb; cursor: pointer; cursor: hand; *margin-left: .3em; } + +.ui-dialog .g-cancel { display: none; } + +.g-button { margin: 0 0.4em 0.4em 0; } +.g-right { float: right; } + +/* forms.css - Forms in dialogs and panels ~~~~~~~~~~~*/ + +#g-dialog ul li { padding-bottom: 0.4em; } +#g-dialog fieldset, #g-panel fieldset { border: none; padding: 0; } +#g-panel legend { display: none; } +input[readonly] { background-color: #F4F4FC; } +#g-dialog input.textbox, #g-dialog input[type=text], #g-dialog input[type=password], #g-dialog textarea { width: 97%; } + +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } +.g-progress-bar { height: 1em; width: 100%; margin-top: .5em; display: inline-block; } +#g-progress #g-status { padding: 0.5em 0; } + +/* forms.css - Short forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-short-form legend, .g-short-form label { display: none; } +.g-short-form fieldset { border: none; padding: 0; } +.g-short-form li { float: left; margin: 0 !important; padding: .4em 0; } +.g-short-form .textbox, .g-short-form input[type=text] { color: #666; padding: .3em .6em; width: 100%; } +.g-short-form .textbox.g-error { border: 1px solid #f00; color: #f00; padding-left: 24px; } +.g-short-form .g-cancel { display: block; margin: .3em .8em; } +#g-sidebar .g-short-form li { padding-left: 0; padding-right: 0; } + +#g-quick-search-form input[type="submit"] { filter: none; margin-top: 0; } + +/* forms.css - Reauthentificate ~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-login fieldset { border: none; } +#g-login legend { display: none; } +#g-login label { display: block; } + +#g-column-centerfull #g-error h2 { padding-top: 10px; } +#g-column-centerfull #g-login { width: 270px; margin-top: 10px; padding-top: 10px; } +#g-column-centerfull #g-login input[type='text'], #g-column-centerfull #g-login input[type='password'] { width: 100%; } +#g-column-centerfull #g-login #g-password-reset { position: relative; bottom: 20px; right: 14px; } + +/* forms.css - User Profile ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-user-profile { display: block; } +#g-user-profile h1 { margin: 0 0 1em 0; } +#g-user-profile .g-avatar { float: left; margin: .4em; } +#g-user-profile .g-block { position: static; min-height: 5em; clear: none; margin-left: 4em; } +#g-user-profile .g-block ul { padding: 0.6em 0; } +#g-user-profile th { text-align: left; } + +#g-user-profile-operations { height: 1.5em; } +#g-user-profile #g-rest-key .g-button { margin-left: 1em; } + +/* forms.css - Uploadify ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-add-album-form, +#g-edit-album-form, #g-edit-photo-form { width: 500px; } + +#g-add-photos-form { width: 476px; } +#g-add-photos-canvas { margin-top: 1.1em; } +#g-add-photos-status #g-action-status li { padding-top: 0.3em; padding-bottom: 0.3em; padding-left: 2em; } +.uploadifyQueueItem { padding-top: 6px; padding-bottom: 4ps; } + +/* forms.css - Permission ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-permissions { width: 480px; } +#g-permissions .g-breadcrumbs { position: static; } +#g-permissions th { padding-top: 4px; padding-right: 0.5em; } + +#g-confirm-delete { width: 340px; margin-top: 1em; } diff --git a/themes/greydragon/css/framepacks/android/css/frame.css b/themes/greydragon/css/framepacks/android/css/frame.css new file mode 100755 index 0000000..548b152 --- /dev/null +++ b/themes/greydragon/css/framepacks/android/css/frame.css @@ -0,0 +1,32 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules - Frames - Android + */ + +#g-album-grid>li { padding: 10px 6px 10px 10px; } +.g-thumbslide { background: transparent; } + +.g-default .g-thumbslide .g-description, .g-expanded .g-thumbslide .g-description, .g-thumbslide .g-metadata { border-color: #ADAEAD; } +.g-thumbcrop { border-width: 1px; border-style: solid; border-color: #ADAEAD; } + +.g-thumbtype-sqr { background: url('../images/thumb-sqr.png') no-repeat top left; } +.g-thumbtype-flm { background: url('../images/thumb-flm.png') no-repeat top left; } +.g-thumbtype-dgt { background: url('../images/thumb-dgt.png') no-repeat top left; } +.g-thumbtype-wd { background: url('../images/thumb-wd.png') no-repeat top left; } + +.g-extended .g-thumbtype-sqr { background-image: url('../images/thumb-sqr-ext.png'); } +.g-extended .g-thumbtype-flm { background-image: url('../images/thumb-flm-ext.png'); } +.g-extended .g-thumbtype-dgt { background-image: url('../images/thumb-dgt-ext.png'); } +.g-extended .g-thumbtype-wd { background-image: url('../images/thumb-wd-ext.png'); } + +.g-thumbtype-sqr.g-expanded { background-image: url('../images/thumb-sqr-e.png'); } +.g-thumbtype-flm.g-expanded { background-image: url('../images/thumb-flm-e.png'); } +.g-thumbtype-dgt.g-expanded { background-image: url('../images/thumb-dgt-e.png'); } +.g-thumbtype-wd.g-expanded { background-image: url('../images/thumb-wd-e.png'); } + +.g-extended .g-thumbtype-sqr.g-expanded { background-image: url('../images/thumb-sqr-eext.png'); } +.g-extended .g-thumbtype-flm.g-expanded { background-image: url('../images/thumb-flm-eext.png'); } +.g-extended .g-thumbtype-dgt.g-expanded { background-image: url('../images/thumb-dgt-eext.png'); } +.g-extended .g-thumbtype-wd.g-expanded { background-image: url('../images/thumb-wd-eext.png'); } diff --git a/themes/greydragon/css/framepacks/android/images/thumb-dgt-e.png b/themes/greydragon/css/framepacks/android/images/thumb-dgt-e.png new file mode 100755 index 0000000..39a793a Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-dgt-e.png differ diff --git a/themes/greydragon/css/framepacks/android/images/thumb-dgt-eext.png b/themes/greydragon/css/framepacks/android/images/thumb-dgt-eext.png new file mode 100755 index 0000000..df4aa49 Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-dgt-eext.png differ diff --git a/themes/greydragon/css/framepacks/android/images/thumb-dgt-ext.png b/themes/greydragon/css/framepacks/android/images/thumb-dgt-ext.png new file mode 100755 index 0000000..297a456 Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-dgt-ext.png differ diff --git a/themes/greydragon/css/framepacks/android/images/thumb-dgt.png b/themes/greydragon/css/framepacks/android/images/thumb-dgt.png new file mode 100755 index 0000000..b9cc40e Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-dgt.png differ diff --git a/themes/greydragon/css/framepacks/android/images/thumb-flm-e.png b/themes/greydragon/css/framepacks/android/images/thumb-flm-e.png new file mode 100755 index 0000000..b97c8c1 Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-flm-e.png differ diff --git a/themes/greydragon/css/framepacks/android/images/thumb-flm-eext.png b/themes/greydragon/css/framepacks/android/images/thumb-flm-eext.png new file mode 100755 index 0000000..45c38dc Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-flm-eext.png differ diff --git a/themes/greydragon/css/framepacks/android/images/thumb-flm-ext.png b/themes/greydragon/css/framepacks/android/images/thumb-flm-ext.png new file mode 100755 index 0000000..7361f20 Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-flm-ext.png differ diff --git a/themes/greydragon/css/framepacks/android/images/thumb-flm.png b/themes/greydragon/css/framepacks/android/images/thumb-flm.png new file mode 100755 index 0000000..a407409 Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-flm.png differ diff --git a/themes/greydragon/css/framepacks/android/images/thumb-sqr-e.png b/themes/greydragon/css/framepacks/android/images/thumb-sqr-e.png new file mode 100755 index 0000000..33bcd99 Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-sqr-e.png differ diff --git a/themes/greydragon/css/framepacks/android/images/thumb-sqr-eext.png b/themes/greydragon/css/framepacks/android/images/thumb-sqr-eext.png new file mode 100755 index 0000000..c924637 Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-sqr-eext.png differ diff --git a/themes/greydragon/css/framepacks/android/images/thumb-sqr-ext.png b/themes/greydragon/css/framepacks/android/images/thumb-sqr-ext.png new file mode 100755 index 0000000..3fdc3a3 Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-sqr-ext.png differ diff --git a/themes/greydragon/css/framepacks/android/images/thumb-sqr.png b/themes/greydragon/css/framepacks/android/images/thumb-sqr.png new file mode 100755 index 0000000..3a038b0 Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-sqr.png differ diff --git a/themes/greydragon/css/framepacks/android/images/thumb-wd-e.png b/themes/greydragon/css/framepacks/android/images/thumb-wd-e.png new file mode 100755 index 0000000..3e78ce8 Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-wd-e.png differ diff --git a/themes/greydragon/css/framepacks/android/images/thumb-wd-eext.png b/themes/greydragon/css/framepacks/android/images/thumb-wd-eext.png new file mode 100755 index 0000000..c51abf3 Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-wd-eext.png differ diff --git a/themes/greydragon/css/framepacks/android/images/thumb-wd-ext.png b/themes/greydragon/css/framepacks/android/images/thumb-wd-ext.png new file mode 100755 index 0000000..a5aa4b2 Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-wd-ext.png differ diff --git a/themes/greydragon/css/framepacks/android/images/thumb-wd.png b/themes/greydragon/css/framepacks/android/images/thumb-wd.png new file mode 100755 index 0000000..36a6a4f Binary files /dev/null and b/themes/greydragon/css/framepacks/android/images/thumb-wd.png differ diff --git a/themes/greydragon/css/framepacks/book/css/frame.css b/themes/greydragon/css/framepacks/book/css/frame.css new file mode 100755 index 0000000..73a0bbb --- /dev/null +++ b/themes/greydragon/css/framepacks/book/css/frame.css @@ -0,0 +1,64 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules - Frames - Book + */ + +#g-album-grid>li { padding: 10px 10px 10px 14px; } +.g-thumbslide { background: transparent; } +.g-default .g-thumbslide .g-description, .g-expanded .g-thumbslide .g-description, .g-thumbslide .g-metadata { background-color: #FFF; border-color: #ADAEAD; color: #111; margin-left: 15px; } +.g-thumbcrop { border: #ADAEAD 1px solid; } +.g-album .g-thumbslide .g-description { background-image: none; } +.g-album .g-thumbslide .g-description .g-title { padding-left: 0; } +.g-expanded.g-album .g-thumbslide .g-description .g-title { padding-left: 0; } + +.g-item .g-context-menu { left: 200px; } +.g-item .g-context-menu:hover { left: 20px; } +.g-extended .g-item .g-context-menu { left: 304px; } +.g-extended .g-item .g-context-menu:hover { left: 20px; } + +.g-album.g-thumbtype-sqr { background: url('../images/a-thumb-sqr.png') no-repeat top left; } +.g-album.g-thumbtype-flm { background: url('../images/a-thumb-flm.png') no-repeat top left; } +.g-album.g-thumbtype-dgt { background: url('../images/a-thumb-dgt.png') no-repeat top left; } +.g-album.g-thumbtype-wd { background: url('../images/a-thumb-wd.png') no-repeat top left; } + +.g-extended .g-album.g-thumbtype-sqr { background-image: url('../images/a-thumb-sqr-ext.png'); } +.g-extended .g-album.g-thumbtype-flm { background-image: url('../images/a-thumb-flm-ext.png'); } +.g-extended .g-album.g-thumbtype-dgt { background-image: url('../images/a-thumb-dgt-ext.png'); } +.g-extended .g-album.g-thumbtype-wd { background-image: url('../images/a-thumb-wd-ext.png'); } + +.g-album.g-thumbtype-sqr.g-expanded { background-image: url('../images/a-thumb-sqr-e.png'); } +.g-album.g-thumbtype-flm.g-expanded { background-image: url('../images/a-thumb-flm-e.png'); } +.g-album.g-thumbtype-dgt.g-expanded { background-image: url('../images/a-thumb-dgt-e.png'); } +.g-album.g-thumbtype-wd.g-expanded { background-image: url('../images/a-thumb-wd-e.png'); } + +.g-extended .g-album.g-thumbtype-sqr.g-expanded { background-image: url('../images/a-thumb-sqr-eext.png'); } +.g-extended .g-album.g-thumbtype-flm.g-expanded { background-image: url('../images/a-thumb-flm-eext.png'); } +.g-extended .g-album.g-thumbtype-dgt.g-expanded { background-image: url('../images/a-thumb-dgt-eext.png'); } +.g-extended .g-album.g-thumbtype-wd.g-expanded { background-image: url('../images/a-thumb-wd-eext.png'); } + +.g-photo.g-thumbtype-sqr { background: url('../images/thumb-sqr.png') no-repeat top left; } +.g-photo.g-thumbtype-flm { background: url('../images/thumb-flm.png') no-repeat top left; } +.g-photo.g-thumbtype-dgt { background: url('../images/thumb-dgt.png') no-repeat top left; } +.g-photo.g-thumbtype-wd { background: url('../images/thumb-wd.png') no-repeat top left; } + +.g-extended .g-photo.g-thumbtype-sqr { background-image: url('../images/thumb-sqr-ext.png'); } +.g-extended .g-photo.g-thumbtype-flm { background-image: url('../images/thumb-flm-ext.png'); } +.g-extended .g-photo.g-thumbtype-dgt { background-image: url('../images/thumb-dgt-ext.png'); } +.g-extended .g-photo.g-thumbtype-wd { background-image: url('../images/thumb-wd-ext.png'); } + +.g-photo.g-thumbtype-sqr.g-expanded { background-image: url('../images/thumb-sqr-e.png'); } +.g-photo.g-thumbtype-flm.g-expanded { background-image: url('../images/thumb-flm-e.png'); } +.g-photo.g-thumbtype-dgt.g-expanded { background-image: url('../images/thumb-dgt-e.png'); } +.g-photo.g-thumbtype-wd.g-expanded { background-image: url('../images/thumb-wd-e.png'); } + +.g-extended .g-photo.g-thumbtype-sqr.g-expanded { background-image: url('../images/thumb-sqr-eext.png'); } +.g-extended .g-photo.g-thumbtype-flm.g-expanded { background-image: url('../images/thumb-flm-eext.png'); } +.g-extended .g-photo.g-thumbtype-dgt.g-expanded { background-image: url('../images/thumb-dgt-eext.png'); } +.g-extended .g-photo.g-thumbtype-wd.g-expanded { background-image: url('../images/thumb-wd-eext.png'); } + +.g-movie.g-thumbtype-sqr { background: url('../images/thumb-sqr.png') no-repeat top left; } +.g-movie.g-thumbtype-flm { background: url('../images/thumb-flm.png') no-repeat top left; } +.g-movie.g-thumbtype-dgt { background: url('../images/thumb-dgt.png') no-repeat top left; } +.g-movie.g-thumbtype-wd { background: url('../images/thumb-wd.png') no-repeat top left; } \ No newline at end of file diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-dgt-e.png b/themes/greydragon/css/framepacks/book/images/a-thumb-dgt-e.png new file mode 100755 index 0000000..486f50b Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-dgt-e.png differ diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-dgt-eext.png b/themes/greydragon/css/framepacks/book/images/a-thumb-dgt-eext.png new file mode 100755 index 0000000..64bd017 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-dgt-eext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-dgt-ext.png b/themes/greydragon/css/framepacks/book/images/a-thumb-dgt-ext.png new file mode 100755 index 0000000..bb5089d Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-dgt-ext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-dgt.png b/themes/greydragon/css/framepacks/book/images/a-thumb-dgt.png new file mode 100755 index 0000000..458cc15 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-dgt.png differ diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-flm-e.png b/themes/greydragon/css/framepacks/book/images/a-thumb-flm-e.png new file mode 100755 index 0000000..7be7ffe Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-flm-e.png differ diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-flm-eext.png b/themes/greydragon/css/framepacks/book/images/a-thumb-flm-eext.png new file mode 100755 index 0000000..0ec4d3c Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-flm-eext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-flm-ext.png b/themes/greydragon/css/framepacks/book/images/a-thumb-flm-ext.png new file mode 100755 index 0000000..a06d963 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-flm-ext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-flm.png b/themes/greydragon/css/framepacks/book/images/a-thumb-flm.png new file mode 100755 index 0000000..b1ec950 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-flm.png differ diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-sqr-e.png b/themes/greydragon/css/framepacks/book/images/a-thumb-sqr-e.png new file mode 100755 index 0000000..bf972a3 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-sqr-e.png differ diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-sqr-eext.png b/themes/greydragon/css/framepacks/book/images/a-thumb-sqr-eext.png new file mode 100755 index 0000000..c13dd02 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-sqr-eext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-sqr-ext.png b/themes/greydragon/css/framepacks/book/images/a-thumb-sqr-ext.png new file mode 100755 index 0000000..f197016 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-sqr-ext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-sqr.png b/themes/greydragon/css/framepacks/book/images/a-thumb-sqr.png new file mode 100755 index 0000000..6eb7f26 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-sqr.png differ diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-wd-e.png b/themes/greydragon/css/framepacks/book/images/a-thumb-wd-e.png new file mode 100755 index 0000000..2699b36 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-wd-e.png differ diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-wd-eext.png b/themes/greydragon/css/framepacks/book/images/a-thumb-wd-eext.png new file mode 100755 index 0000000..ff78ba5 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-wd-eext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-wd-ext.png b/themes/greydragon/css/framepacks/book/images/a-thumb-wd-ext.png new file mode 100755 index 0000000..7501df7 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-wd-ext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/a-thumb-wd.png b/themes/greydragon/css/framepacks/book/images/a-thumb-wd.png new file mode 100755 index 0000000..df1164b Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/a-thumb-wd.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-dgt-e.png b/themes/greydragon/css/framepacks/book/images/thumb-dgt-e.png new file mode 100755 index 0000000..2b9dc15 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-dgt-e.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-dgt-eext.png b/themes/greydragon/css/framepacks/book/images/thumb-dgt-eext.png new file mode 100755 index 0000000..9d5cbe1 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-dgt-eext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-dgt-ext.png b/themes/greydragon/css/framepacks/book/images/thumb-dgt-ext.png new file mode 100755 index 0000000..a1afba6 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-dgt-ext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-dgt.png b/themes/greydragon/css/framepacks/book/images/thumb-dgt.png new file mode 100755 index 0000000..020ed3b Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-dgt.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-flm-e.png b/themes/greydragon/css/framepacks/book/images/thumb-flm-e.png new file mode 100755 index 0000000..89724e8 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-flm-e.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-flm-eext.png b/themes/greydragon/css/framepacks/book/images/thumb-flm-eext.png new file mode 100755 index 0000000..1c84d91 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-flm-eext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-flm-ext.png b/themes/greydragon/css/framepacks/book/images/thumb-flm-ext.png new file mode 100755 index 0000000..04bc46a Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-flm-ext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-flm.png b/themes/greydragon/css/framepacks/book/images/thumb-flm.png new file mode 100755 index 0000000..1709bbe Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-flm.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-sqr-e.png b/themes/greydragon/css/framepacks/book/images/thumb-sqr-e.png new file mode 100755 index 0000000..ede2e1b Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-sqr-e.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-sqr-eext.png b/themes/greydragon/css/framepacks/book/images/thumb-sqr-eext.png new file mode 100755 index 0000000..48416c6 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-sqr-eext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-sqr-ext.png b/themes/greydragon/css/framepacks/book/images/thumb-sqr-ext.png new file mode 100755 index 0000000..d7e2e53 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-sqr-ext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-sqr.png b/themes/greydragon/css/framepacks/book/images/thumb-sqr.png new file mode 100755 index 0000000..95e5890 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-sqr.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-wd-e.png b/themes/greydragon/css/framepacks/book/images/thumb-wd-e.png new file mode 100755 index 0000000..eae6d66 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-wd-e.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-wd-eext.png b/themes/greydragon/css/framepacks/book/images/thumb-wd-eext.png new file mode 100755 index 0000000..ee89913 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-wd-eext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-wd-ext.png b/themes/greydragon/css/framepacks/book/images/thumb-wd-ext.png new file mode 100755 index 0000000..d303a1d Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-wd-ext.png differ diff --git a/themes/greydragon/css/framepacks/book/images/thumb-wd.png b/themes/greydragon/css/framepacks/book/images/thumb-wd.png new file mode 100755 index 0000000..6d344c5 Binary files /dev/null and b/themes/greydragon/css/framepacks/book/images/thumb-wd.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/css/frame.css b/themes/greydragon/css/framepacks/darkglass/css/frame.css new file mode 100755 index 0000000..30d5c9a --- /dev/null +++ b/themes/greydragon/css/framepacks/darkglass/css/frame.css @@ -0,0 +1,32 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules - Frames - DarkGlass + */ + +#g-album-grid>li { padding: 10px 6px 10px 10px; } +.g-thumbslide { background: transparent; } + +.g-default .g-thumbslide .g-description, .g-expanded .g-thumbslide .g-description, .g-thumbslide .g-metadata { border-color: #ADAEAD; } +.g-thumbcrop { border-width: 1px; border-style: solid; border-color: #7F7F7F; } + +.g-thumbtype-sqr { background: url('../images/thumb-sqr.png') no-repeat top left; } +.g-thumbtype-flm { background: url('../images/thumb-flm.png') no-repeat top left; } +.g-thumbtype-dgt { background: url('../images/thumb-dgt.png') no-repeat top left; } +.g-thumbtype-wd { background: url('../images/thumb-wd.png') no-repeat top left; } + +.g-extended .g-thumbtype-sqr { background-image: url('../images/thumb-sqr-ext.png'); } +.g-extended .g-thumbtype-flm { background-image: url('../images/thumb-flm-ext.png'); } +.g-extended .g-thumbtype-dgt { background-image: url('../images/thumb-dgt-ext.png'); } +.g-extended .g-thumbtype-wd { background-image: url('../images/thumb-wd-ext.png'); } + +.g-thumbtype-sqr.g-expanded { background-image: url('../images/thumb-sqr-e.png'); } +.g-thumbtype-flm.g-expanded { background-image: url('../images/thumb-flm-e.png'); } +.g-thumbtype-dgt.g-expanded { background-image: url('../images/thumb-dgt-e.png'); } +.g-thumbtype-wd.g-expanded { background-image: url('../images/thumb-wd-e.png'); } + +.g-extended .g-thumbtype-sqr.g-expanded { background-image: url('../images/thumb-sqr-eext.png'); } +.g-extended .g-thumbtype-flm.g-expanded { background-image: url('../images/thumb-flm-eext.png'); } +.g-extended .g-thumbtype-dgt.g-expanded { background-image: url('../images/thumb-dgt-eext.png'); } +.g-extended .g-thumbtype-wd.g-expanded { background-image: url('../images/thumb-wd-eext.png'); } diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-dgt-e.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-dgt-e.png new file mode 100755 index 0000000..c96c40c Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-dgt-e.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-dgt-eext.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-dgt-eext.png new file mode 100755 index 0000000..0f87149 Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-dgt-eext.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-dgt-ext.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-dgt-ext.png new file mode 100755 index 0000000..ed89c39 Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-dgt-ext.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-dgt.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-dgt.png new file mode 100755 index 0000000..ace3e98 Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-dgt.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-flm-e.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-flm-e.png new file mode 100755 index 0000000..f8e8841 Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-flm-e.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-flm-eext.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-flm-eext.png new file mode 100755 index 0000000..4e735c8 Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-flm-eext.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-flm-ext.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-flm-ext.png new file mode 100755 index 0000000..9c0bff5 Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-flm-ext.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-flm.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-flm.png new file mode 100755 index 0000000..460ee7c Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-flm.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-sqr-e.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-sqr-e.png new file mode 100755 index 0000000..eb28835 Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-sqr-e.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-sqr-eext.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-sqr-eext.png new file mode 100755 index 0000000..3af47df Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-sqr-eext.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-sqr-ext.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-sqr-ext.png new file mode 100755 index 0000000..d2e268e Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-sqr-ext.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-sqr.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-sqr.png new file mode 100755 index 0000000..da45039 Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-sqr.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-wd-e.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-wd-e.png new file mode 100755 index 0000000..62f5f1e Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-wd-e.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-wd-eext.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-wd-eext.png new file mode 100755 index 0000000..bf8b2e7 Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-wd-eext.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-wd-ext.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-wd-ext.png new file mode 100755 index 0000000..bc994bc Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-wd-ext.png differ diff --git a/themes/greydragon/css/framepacks/darkglass/images/thumb-wd.png b/themes/greydragon/css/framepacks/darkglass/images/thumb-wd.png new file mode 100755 index 0000000..62e7881 Binary files /dev/null and b/themes/greydragon/css/framepacks/darkglass/images/thumb-wd.png differ diff --git a/themes/greydragon/css/framepacks/greydragon/css/frame.css b/themes/greydragon/css/framepacks/greydragon/css/frame.css new file mode 100755 index 0000000..bee1a1b --- /dev/null +++ b/themes/greydragon/css/framepacks/greydragon/css/frame.css @@ -0,0 +1,43 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules - Frames - GreyDragon + */ + +/* layous.css - Extended Layout - 4 columns ~~~~~~~~~~*/ + +body.g-extended.g-column-4 #g-header, +body.g-extended.g-column-4 #g-footer, +body.g-extended.g-column-4 #g-main, +body.g-extended.g-column-4 #g-main-in, +body.g-extended.g-column-4 #g-column-top, +body.g-extended.g-column-4 #g-column-bottom { min-width: 1302px; } + +/* layous.css - Extended Layout - 4 columns+sidebar ~~*/ +body.g-extended.g-column-4.g-sidebar-right #g-header, +body.g-extended.g-column-4.g-sidebar-right #g-footer, +body.g-extended.g-column-4.g-sidebar-right #g-main, +body.g-extended.g-column-4.g-sidebar-right #g-main-in, +body.g-extended.g-column-4.g-sidebar-left #g-header, +body.g-extended.g-column-4.g-sidebar-left #g-footer, +body.g-extended.g-column-4.g-sidebar-left #g-main, +body.g-extended.g-column-4.g-sidebar-left #g-main-in { min-width: 1546px; } + +.g-thumbslide { margin-right: 6px; } +.g-thumbslide .g-description { margin: 1px 0 0 2px; } +.g-thumbslide .g-metadata { margin-bottom: 4px; margin-left: 2px; } + +.g-extended #g-album-grid .g-item { min-width: 320px; } + +.g-item .g-context-menu { left: 190px; top: 12px; } +.g-item .g-context-menu:hover { left: 6px; top: 6px; } + +.g-extended .g-item .g-context-menu { left: 290px; top: 12px; } +.g-extended .g-item .g-context-menu:hover { left: 8px; top: 8px; } + +.g-thumbslide, .g-thumbslide-ext, .g-thumbcrop { border-width: 1px; border-style: solid; background-color: inherit; } +.g-album .g-thumbslide, .g-album .g-thumbslide-ext { border-right-width: 4px; border-right-style: double; border-bottom-width: 4px; border-bottom-style: double; } +.g-photo .g-thumbslide, .g-photo .g-thumbslide-ext { margin-bottom: 4px; } /* Need to compensate for double border in album's thumbs */ +.g-movie .g-thumbslide, .g-movie .g-thumbslide-ext { margin-bottom: 4px; } /* Need to compensate for double border in album's thumbs */ + diff --git a/themes/greydragon/css/framepacks/iphone/css/frame.css b/themes/greydragon/css/framepacks/iphone/css/frame.css new file mode 100755 index 0000000..0d24188 --- /dev/null +++ b/themes/greydragon/css/framepacks/iphone/css/frame.css @@ -0,0 +1,31 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules - Frames - iPhone + */ + +#g-album-grid>li { padding: 10px 6px 10px 10px; } +.g-thumbslide { background: transparent; } +.g-default .g-thumbslide .g-description, .g-expanded .g-thumbslide .g-description, .g-thumbslide .g-metadata { border-color: #7D7E7D; } +.g-thumbcrop { border-width: 1px; border-style: solid; border-color: #7D7E7D; } + +.g-thumbtype-sqr { background: url('../images/thumb-sqr.png') no-repeat top left; } +.g-thumbtype-flm { background: url('../images/thumb-flm.png') no-repeat top left; } +.g-thumbtype-dgt { background: url('../images/thumb-dgt.png') no-repeat top left; } +.g-thumbtype-wd { background: url('../images/thumb-wd.png') no-repeat top left; } + +.g-extended .g-thumbtype-sqr { background-image: url('../images/thumb-sqr-ext.png'); } +.g-extended .g-thumbtype-flm { background-image: url('../images/thumb-flm-ext.png'); } +.g-extended .g-thumbtype-dgt { background-image: url('../images/thumb-dgt-ext.png'); } +.g-extended .g-thumbtype-wd { background-image: url('../images/thumb-wd-ext.png'); } + +.g-thumbtype-sqr.g-expanded { background-image: url('../images/thumb-sqr-e.png'); } +.g-thumbtype-flm.g-expanded { background-image: url('../images/thumb-flm-e.png'); } +.g-thumbtype-dgt.g-expanded { background-image: url('../images/thumb-dgt-e.png'); } +.g-thumbtype-wd.g-expanded { background-image: url('../images/thumb-wd-e.png'); } + +.g-extended .g-thumbtype-sqr.g-expanded { background-image: url('../images/thumb-sqr-eext.png'); } +.g-extended .g-thumbtype-flm.g-expanded { background-image: url('../images/thumb-flm-eext.png'); } +.g-extended .g-thumbtype-dgt.g-expanded { background-image: url('../images/thumb-dgt-eext.png'); } +.g-extended .g-thumbtype-wd.g-expanded { background-image: url('../images/thumb-wd-eext.png'); } diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-dgt-e.png b/themes/greydragon/css/framepacks/iphone/images/thumb-dgt-e.png new file mode 100755 index 0000000..daa2002 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-dgt-e.png differ diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-dgt-eext.png b/themes/greydragon/css/framepacks/iphone/images/thumb-dgt-eext.png new file mode 100755 index 0000000..9362e8b Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-dgt-eext.png differ diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-dgt-ext.png b/themes/greydragon/css/framepacks/iphone/images/thumb-dgt-ext.png new file mode 100755 index 0000000..e477616 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-dgt-ext.png differ diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-dgt.png b/themes/greydragon/css/framepacks/iphone/images/thumb-dgt.png new file mode 100755 index 0000000..c514620 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-dgt.png differ diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-flm-e.png b/themes/greydragon/css/framepacks/iphone/images/thumb-flm-e.png new file mode 100755 index 0000000..3d3ddaa Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-flm-e.png differ diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-flm-eext.png b/themes/greydragon/css/framepacks/iphone/images/thumb-flm-eext.png new file mode 100755 index 0000000..aedd558 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-flm-eext.png differ diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-flm-ext.png b/themes/greydragon/css/framepacks/iphone/images/thumb-flm-ext.png new file mode 100755 index 0000000..62e62a2 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-flm-ext.png differ diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-flm.png b/themes/greydragon/css/framepacks/iphone/images/thumb-flm.png new file mode 100755 index 0000000..0094def Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-flm.png differ diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-sqr-e.png b/themes/greydragon/css/framepacks/iphone/images/thumb-sqr-e.png new file mode 100755 index 0000000..1dc590c Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-sqr-e.png differ diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-sqr-eext.png b/themes/greydragon/css/framepacks/iphone/images/thumb-sqr-eext.png new file mode 100755 index 0000000..9f6024b Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-sqr-eext.png differ diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-sqr-ext.png b/themes/greydragon/css/framepacks/iphone/images/thumb-sqr-ext.png new file mode 100755 index 0000000..4233c84 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-sqr-ext.png differ diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-sqr.png b/themes/greydragon/css/framepacks/iphone/images/thumb-sqr.png new file mode 100755 index 0000000..c9e5714 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-sqr.png differ diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-wd-e.png b/themes/greydragon/css/framepacks/iphone/images/thumb-wd-e.png new file mode 100755 index 0000000..15a0c4c Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-wd-e.png differ diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-wd-eext.png b/themes/greydragon/css/framepacks/iphone/images/thumb-wd-eext.png new file mode 100755 index 0000000..0867baa Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-wd-eext.png differ diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-wd-ext.png b/themes/greydragon/css/framepacks/iphone/images/thumb-wd-ext.png new file mode 100755 index 0000000..213d494 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-wd-ext.png differ diff --git a/themes/greydragon/css/framepacks/iphone/images/thumb-wd.png b/themes/greydragon/css/framepacks/iphone/images/thumb-wd.png new file mode 100755 index 0000000..a25d477 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphone/images/thumb-wd.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/css/frame.css b/themes/greydragon/css/framepacks/iphoto/css/frame.css new file mode 100755 index 0000000..0dba3e9 --- /dev/null +++ b/themes/greydragon/css/framepacks/iphoto/css/frame.css @@ -0,0 +1,31 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules - Frames - iPhoto + */ + +#g-album-grid>li { padding: 10px 6px 10px 10px; } +.g-thumbslide { background: transparent; } +.g-default .g-thumbslide .g-description, .g-expanded .g-thumbslide .g-description, .g-thumbslide .g-metadata { background-color: #FFF; border-color: #ADAEAD; color: #111; } +.g-thumbcrop { border: #ADAEAD 1px solid; } + +.g-thumbtype-sqr { background: url('../images/thumb-sqr.png') no-repeat top left; } +.g-thumbtype-flm { background: url('../images/thumb-flm.png') no-repeat top left; } +.g-thumbtype-dgt { background: url('../images/thumb-dgt.png') no-repeat top left; } +.g-thumbtype-wd { background: url('../images/thumb-wd.png') no-repeat top left; } + +.g-extended .g-thumbtype-sqr { background-image: url('../images/thumb-sqr-ext.png'); } +.g-extended .g-thumbtype-flm { background-image: url('../images/thumb-flm-ext.png'); } +.g-extended .g-thumbtype-dgt { background-image: url('../images/thumb-dgt-ext.png'); } +.g-extended .g-thumbtype-wd { background-image: url('../images/thumb-wd-ext.png'); } + +.g-thumbtype-sqr.g-expanded { background-image: url('../images/thumb-sqr-e.png'); } +.g-thumbtype-flm.g-expanded { background-image: url('../images/thumb-flm-e.png'); } +.g-thumbtype-dgt.g-expanded { background-image: url('../images/thumb-dgt-e.png'); } +.g-thumbtype-wd.g-expanded { background-image: url('../images/thumb-wd-e.png'); } + +.g-extended .g-thumbtype-sqr.g-expanded { background-image: url('../images/thumb-sqr-eext.png'); } +.g-extended .g-thumbtype-flm.g-expanded { background-image: url('../images/thumb-flm-eext.png'); } +.g-extended .g-thumbtype-dgt.g-expanded { background-image: url('../images/thumb-dgt-eext.png'); } +.g-extended .g-thumbtype-wd.g-expanded { background-image: url('../images/thumb-wd-eext.png'); } diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-dgt-e.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-dgt-e.png new file mode 100755 index 0000000..616d1d5 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-dgt-e.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-dgt-eext.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-dgt-eext.png new file mode 100755 index 0000000..828528a Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-dgt-eext.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-dgt-ext.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-dgt-ext.png new file mode 100755 index 0000000..c090406 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-dgt-ext.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-dgt.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-dgt.png new file mode 100755 index 0000000..5190758 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-dgt.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-flm-e.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-flm-e.png new file mode 100755 index 0000000..251216b Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-flm-e.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-flm-eext.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-flm-eext.png new file mode 100755 index 0000000..c60ba42 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-flm-eext.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-flm-ext.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-flm-ext.png new file mode 100755 index 0000000..b1f8675 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-flm-ext.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-flm.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-flm.png new file mode 100755 index 0000000..44c67c3 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-flm.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-sqr-e.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-sqr-e.png new file mode 100755 index 0000000..02ddcd2 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-sqr-e.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-sqr-eext.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-sqr-eext.png new file mode 100755 index 0000000..a6f6946 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-sqr-eext.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-sqr-ext.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-sqr-ext.png new file mode 100755 index 0000000..de2fae4 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-sqr-ext.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-sqr.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-sqr.png new file mode 100755 index 0000000..57c192f Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-sqr.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-wd-e.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-wd-e.png new file mode 100755 index 0000000..492432e Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-wd-e.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-wd-eext.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-wd-eext.png new file mode 100755 index 0000000..901a13a Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-wd-eext.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-wd-ext.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-wd-ext.png new file mode 100755 index 0000000..0efa766 Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-wd-ext.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/images/thumb-wd.png b/themes/greydragon/css/framepacks/iphoto/images/thumb-wd.png new file mode 100755 index 0000000..f6bb30f Binary files /dev/null and b/themes/greydragon/css/framepacks/iphoto/images/thumb-wd.png differ diff --git a/themes/greydragon/css/framepacks/iphoto/views/frame.html.php b/themes/greydragon/css/framepacks/iphoto/views/frame.html.php new file mode 100755 index 0000000..87ed99b --- /dev/null +++ b/themes/greydragon/css/framepacks/iphoto/views/frame.html.php @@ -0,0 +1,5 @@ +
    + +
    +
    +
    diff --git a/themes/greydragon/css/framepacks/panel/css/frame.css b/themes/greydragon/css/framepacks/panel/css/frame.css new file mode 100755 index 0000000..07a3048 --- /dev/null +++ b/themes/greydragon/css/framepacks/panel/css/frame.css @@ -0,0 +1,37 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules - Frames - Panel + */ + +/* layous.css - Extended Layout - 4 columns ~~~~~~~~~~*/ +body.g-extended.g-column-4 #g-header, +body.g-extended.g-column-4 #g-footer, +body.g-extended.g-column-4 #g-main, +body.g-extended.g-column-4 #g-main-in, +body.g-extended.g-column-4 #g-column-top, +body.g-extended.g-column-4 #g-column-bottom { min-width: 1302px; } + +/* layous.css - Extended Layout - 4 columns+sidebar ~~*/ +body.g-extended.g-column-4.g-sidebar-right #g-header, +body.g-extended.g-column-4.g-sidebar-right #g-footer, +body.g-extended.g-column-4.g-sidebar-right #g-main, +body.g-extended.g-column-4.g-sidebar-right #g-main-in, +body.g-extended.g-column-4.g-sidebar-left #g-header, +body.g-extended.g-column-4.g-sidebar-left #g-footer, +body.g-extended.g-column-4.g-sidebar-left #g-main, +body.g-extended.g-column-4.g-sidebar-left #g-main-in { min-width: 1546px; } + +.g-album .g-thumbslide, .g-thumbslide { border-width: 1px; border-style: solid; } +.g-thumbslide .g-description { margin: 0 0 0 1px; } +.g-thumbslide .g-metadata { margin-bottom: 3px; margin-left: 1px; } + +.g-extended #g-album-grid .g-item { min-width: 320px; } + +.g-item .g-context-menu { left: 188px; top: 12px; } +.g-item .g-context-menu:hover { left: 6px; top: 6px; } +.g-extended .g-item .g-context-menu { left: 288px; top: 12px; } +.g-extended .g-item .g-context-menu:hover { left: 6px; top: 6px; } + +.g-default .g-thumbslide .g-description, .g-expanded .g-thumbslide .g-description, .g-thumbslide .g-metadata { border-color: #ADAEAD; } diff --git a/themes/greydragon/css/framepacks/roundcorners/css/frame.css b/themes/greydragon/css/framepacks/roundcorners/css/frame.css new file mode 100755 index 0000000..ffe7c13 --- /dev/null +++ b/themes/greydragon/css/framepacks/roundcorners/css/frame.css @@ -0,0 +1,44 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules - Frames - Round Corners + */ + +/* layous.css - Extended Layout - 4 columns ~~~~~~~~~~*/ +body.g-extended.g-column-4 #g-header, +body.g-extended.g-column-4 #g-footer, +body.g-extended.g-column-4 #g-main, +body.g-extended.g-column-4 #g-main-in, +body.g-extended.g-column-4 #g-header, +body.g-extended.g-column-4 #g-column-top, +body.g-extended.g-column-4 #g-column-bottom { min-width: 1278px; } + +/* layous.css - Extended Layout - 4 columns+sidebar ~~*/ +body.g-extended.g-column-4.g-sidebar-right #g-header, +body.g-extended.g-column-4.g-sidebar-right #g-footer, +body.g-extended.g-column-4.g-sidebar-right #g-main, +body.g-extended.g-column-4.g-sidebar-right #g-main-in, +body.g-extended.g-column-4.g-sidebar-left #g-header, +body.g-extended.g-column-4.g-sidebar-left #g-footer, +body.g-extended.g-column-4.g-sidebar-left #g-main, +body.g-extended.g-column-4.g-sidebar-left #g-main-in { min-width: 1520px; } + +.g-thumbslide .g-description { margin: 0 0 0 0px; border-top-left-radius: 10px; border-top-right-radius: 10px; } +.g-thumbslide .g-description.g-overlay-bottom { border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; bottom: -3px; } +.g-thumbslide .g-metadata { margin: 0 0 1px 0px; } + +.g-item .g-context-menu { left: 188px; top: 12px; } +.g-item .g-context-menu:hover { left: 6px; top: 6px; } +.g-extended .g-item .g-context-menu { left: 288px; top: 12px; } +.g-extended .g-item .g-context-menu:hover { left: 6px; top: 6px; } + +.g-default .g-thumbslide .g-description, +.g-expanded .g-thumbslide .g-description { border-color: #ADAEAD; color: #3c5580; } +.g-thumbslide .g-metadata { border-color: #ADAEAD; color: #3c5580; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; } +.g-thumbcrop { border-radius: 10px; box-shadow: 3px 3px 8px #333; } +.g-thumbslide { background-image: none; } +.g-thumbslide:hover .g-thumbcrop { box-shadow: 4px 4px 8px #333; } + +#g-photo .g-resize { border: none; background: transparent; } +#g-photo .g-resize a { border-radius: 10px; box-shadow: 3px 3px 8px #333; } \ No newline at end of file diff --git a/themes/greydragon/css/framepacks/simple/css/frame.css b/themes/greydragon/css/framepacks/simple/css/frame.css new file mode 100755 index 0000000..3a0539c --- /dev/null +++ b/themes/greydragon/css/framepacks/simple/css/frame.css @@ -0,0 +1,39 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules - Frames - Simple + */ + +/* layous.css - Extended Layout - 4 columns ~~~~~~~~~~*/ +body.g-extended.g-column-4 #g-header, +body.g-extended.g-column-4 #g-footer, +body.g-extended.g-column-4 #g-main, +body.g-extended.g-column-4 #g-main-in, +body.g-extended.g-column-4 #g-column-top, +body.g-extended.g-column-4 #g-column-bottom { min-width: 1278px; } + +/* layous.css - Extended Layout - 4 columns+sidebar ~~*/ +body.g-extended.g-column-4.g-sidebar-right #g-header, +body.g-extended.g-column-4.g-sidebar-right #g-footer, +body.g-extended.g-column-4.g-sidebar-right #g-main, +body.g-extended.g-column-4.g-sidebar-right #g-main-in, +body.g-extended.g-column-4.g-sidebar-right #g-column-top, +body.g-extended.g-column-4.g-sidebar-right #g-column-bottom, +body.g-extended.g-column-4.g-sidebar-left #g-header, +body.g-extended.g-column-4.g-sidebar-left #g-footer, +body.g-extended.g-column-4.g-sidebar-left #g-main, +body.g-extended.g-column-4.g-sidebar-left #g-main-in, +body.g-extended.g-column-4.g-sidebar-left #g-column-top, +body.g-extended.g-column-4.g-sidebar-left #g-column-bottom { min-width: 1520px; } + +.g-thumbslide .g-description { margin: 0 0 0 1px; } +.g-thumbslide .g-metadata { margin: 0 0 1px 1px; } + +.g-item .g-context-menu { left: 188px; top: 12px; } +.g-item .g-context-menu:hover { left: 6px; top: 6px; } +.g-extended .g-item .g-context-menu { left: 288px; top: 12px; } +.g-extended .g-item .g-context-menu:hover { left: 6px; top: 6px; } + +.g-default .g-thumbslide .g-description, .g-expanded .g-thumbslide .g-description, .g-thumbslide .g-metadata { border-color: #ADAEAD; } +.g-thumbcrop { border-width: 1px; border-style: solid; border-color: #ADAEAD; } diff --git a/themes/greydragon/css/framepacks/wall/css/frame.css b/themes/greydragon/css/framepacks/wall/css/frame.css new file mode 100755 index 0000000..1a74654 --- /dev/null +++ b/themes/greydragon/css/framepacks/wall/css/frame.css @@ -0,0 +1,48 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2010 Serguei Dosyukov + * + * CSS rules - Frames - Simple + */ + +/* layous.css - Extended Layout - 4 columns ~~~~~~~~~~*/ +body.g-extended.g-column-4 #g-header, +body.g-extended.g-column-4 #g-footer, +body.g-extended.g-column-4 #g-main, +body.g-extended.g-column-4 #g-main-in, +body.g-extended.g-column-4 #g-column-top, +body.g-extended.g-column-4 #g-column-bottom { min-width: 1224px; } + +/* layous.css - Extended Layout - 4 columns+sidebar ~~*/ +body.g-extended.g-column-4.g-sidebar-right #g-header, +body.g-extended.g-column-4.g-sidebar-right #g-footer, +body.g-extended.g-column-4.g-sidebar-right #g-main, +body.g-extended.g-column-4.g-sidebar-right #g-main-in, +body.g-extended.g-column-4.g-sidebar-left #g-header, +body.g-extended.g-column-4.g-sidebar-left #g-footer, +body.g-extended.g-column-4.g-sidebar-left #g-main, +body.g-extended.g-column-4.g-sidebar-left #g-main-in { min-width: 1470px; } + + +.g-thumbslide { padding-top: 0; padding-left: 0; width: 200px; min-height: auto; } +.g-extended .g-thumbslide { width: 300px; } + +.g-thumbtype-flm .g-thumbslide, .g-extended .g-thumbtype-flm .g-thumbslide, +.g-thumbtype-dgt .g-thumbslide, .g-extended .g-thumbtype-dgt .g-thumbslide, +.g-thumbtype-wd .g-thumbslide, .g-extended .g-thumbtype-wd .g-thumbslide, +.g-thumbtype-sqr .g-thumbslide, .g-extended .g-thumbtype-sqr .g-thumbslide { height: auto; } + +.g-item .g-context-menu { left: 184px; top: 2px; } +.g-extended .g-item .g-context-menu { left: 282px; top: 4px; } +.g-item .g-context-menu:hover, .g-extended .g-item .g-context-menu:hover { left: 0px; top: 0; } + +#g-album-grid .g-item { margin: 0; min-width: 200px; } +.g-extended #g-album-grid .g-item { min-width: 300px; } + +.g-album-grid-container .g-wall > li { width: auto; } + +.g-thumbslide .g-description { margin: 0 0 0 0; left: 0; top: 0; min-height: 2.4em; } +.g-thumbslide .g-metadata { margin: 0 0 0 0; left: 0; bottom: 0; min-height: 2.4em; } + +.g-default .g-thumbslide .g-description, .g-expanded .g-thumbslide .g-description { border-color: #ADAEAD; border-top: none; } +.g-thumbcrop { border: none; } diff --git a/themes/greydragon/css/ipad.css b/themes/greydragon/css/ipad.css new file mode 100755 index 0000000..801356f --- /dev/null +++ b/themes/greydragon/css/ipad.css @@ -0,0 +1,20 @@ +/* Start Apple Styles */ +/* These styles support Apple products display of CSS. NOTES (orientation:landscape), (orientation:portrait) can also be used to be more specific */ +/* iPad [portrait + landscape] */ +@media only screen and (min-device-width:768px) and (max-device-width:1024px) +{ + #cboxOverlay { height: 200%; width: 200%; } + .g-bar#g-site-menu { width: 200%; } +} + +/* iPhone 4 [portrait + landscape] */ +@media only screen and (resolution:326dpi) { } + +/* screen and (resolution: 163dpi) */ +/* iPhone 3 [portrait + landscape] */ +@media only screen and (max-device-width:480px) { } + +/* iPod Touch and older [portrait + landscape] */ +@media only screen and (resolution:326dpi) { } + +/* End Apple Styles */ diff --git a/themes/greydragon/css/layout.css b/themes/greydragon/css/layout.css new file mode 100755 index 0000000..97fe65c --- /dev/null +++ b/themes/greydragon/css/layout.css @@ -0,0 +1,77 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2011 Serguei Dosyukov + * + * CSS rules related to general layout + * Defined as 70em wide + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* layout.css - Common ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +html { overflow: auto; overflow: -moz-scrollbars-vertical; overflow-y: scroll; } +* { margin: 0px; } +body { min-width: 1020px; padding: 0; } +.g-hideitem { display: none; } + +/* layout.css - Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-header { position: relative; min-width: 1020px; z-index: 5; } + +/* layout.css - Main ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-main { min-width: 1020px; height: auto; bottom: auto; } +#g-main-in { min-width: 1020px; height: 100%; aoverflow: auto; bottom: auto; } + +#g-column-left { float: left; width: 230px; min-height: 32em; overflow: hidden; height: 100%; } +#g-column-right { float: right; width: 230px; min-height: 32em; overflow: hidden; height: 100%; } +#g-column-center { margin: 0 17em 0 17em; min-height: 32em; overflow: hidden; height: 100%; } +#g-column-centerleft { min-height: 32em; overflow: hidden; height: 100%; } +#g-column-centerright { min-height: 32em; overflow: hidden; height: 100%; } +#g-column-centerfull { position: relative; min-height: 31em; overflow: hidden; height: 100%; } +#g-column-top { display: block; overflow: hidden; } +#g-column-bottom { display: block; overflow: hidden; } + +/* layout.css - Footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-footer { position: relative; height: auto; min-width: 1020px; min-height: 2.8em; clear: both; display: block; overflow: auto; } +#g-footer-leftside { float: left; display: inline; } +#g-footer-rightside { float: right; display: inline; } + +/* layout.css - Extended Layout ~~~~~~~~~~~~~~~~~~~~~~*/ + +/* layous.css - Extended Layout - 3 columns+sidebar ~~*/ +body.g-extended.g-column-3.g-sidebar-right #g-header, +body.g-extended.g-column-3.g-sidebar-right #g-footer, +body.g-extended.g-column-3.g-sidebar-right #g-main, +body.g-extended.g-column-3.g-sidebar-right #g-main-in, +body.g-extended.g-column-3.g-sidebar-right #g-column-top, +body.g-extended.g-column-3.g-sidebar-right #g-column-bottom, +body.g-extended.g-column-3.g-sidebar-left #g-header, +body.g-extended.g-column-3.g-sidebar-left #g-footer, +body.g-extended.g-column-3.g-sidebar-left #g-main, +body.g-extended.g-column-3.g-sidebar-left #g-main-in, +body.g-extended.g-column-3.g-sidebar-left #g-column-top, +body.g-extended.g-column-3.g-sidebar-left #g-column-bottom { min-width: 1250px; } + +/* layous.css - Extended Layout - 4 columns ~~~~~~~~~~*/ +body.g-extended.g-column-4 #g-header, +body.g-extended.g-column-4 #g-footer, +body.g-extended.g-column-4 #g-main, +body.g-extended.g-column-4 #g-main-in, +body.g-extended.g-column-4 #g-column-top, +body.g-extended.g-column-4 #g-column-bottom { min-width: 1342px; } + +/* layous.css - Extended Layout - 4 columns+sidebar ~~*/ +body.g-extended.g-column-4.g-sidebar-right #g-header, +body.g-extended.g-column-4.g-sidebar-right #g-footer, +body.g-extended.g-column-4.g-sidebar-right #g-main, +body.g-extended.g-column-4.g-sidebar-right #g-main-in, +body.g-extended.g-column-4.g-sidebar-right #g-column-top, +body.g-extended.g-column-4.g-sidebar-right #g-column-bottom, +body.g-extended.g-column-4.g-sidebar-left #g-header, +body.g-extended.g-column-4.g-sidebar-left #g-footer, +body.g-extended.g-column-4.g-sidebar-left #g-main, +body.g-extended.g-column-4.g-sidebar-left #g-main-in, +body.g-extended.g-column-4.g-sidebar-left #g-column-top, +body.g-extended.g-column-4.g-sidebar-left #g-column-bottom { min-width: 1580px; } diff --git a/themes/greydragon/css/menus.css b/themes/greydragon/css/menus.css new file mode 100755 index 0000000..194e93c --- /dev/null +++ b/themes/greydragon/css/menus.css @@ -0,0 +1,58 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2011 Serguei Dosyukov + * + * CSS rules related to menus + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* menus.css - Main menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-site-menu { position: absolute; } +#g-site-menu.g-default { left: 21em; bottom: 0; } +#g-site-menu.g-top { left: 21em; top: 2px; } +#g-site-menu.g-bottom-right { bottom: 0; right: 2em; } +#g-site-menu.g-bar { left: 0; top: 0; width: 100%; padding-left: .5em; position: fixed !important; z-index: 9999; font-size: 0.9em; } + +#g-site-menu ul { float: left; width: 100%; white-space: nowrap; z-index: 102; } +#g-site-menu>ul>li>ul { margin-top: 1px; } + +#g-site-menu ul ul ul { padding-top: 0; } +#g-site-menu a { display: block; padding: 0.2em 0.4em; text-align: center; width: auto; letter-spacing: 0; cursor: pointer; z-index: 102; } +#g-site-menu li { float: left; padding: 0; background-color: transparent; border: transparent 1px solid; z-index: 102; } +#g-site-menu li ul a { text-align: left; padding: 0.3em 0; text-indent: 0.8em; letter-spacing: 0; } +#g-site-menu li ul a:hover { background-image: none; } +#g-site-menu li ul { position: absolute; margin: 0 0 0 -1px; width: 14em; height: auto; left: -999em; } + +#g-site-menu li li { width: 14em; padding-right: 0; } +#g-site-menu li ul a { width: 14em; } +#g-site-menu li ul ul { margin: -1.8em 0 0 14em; } +#g-site-menu li:hover ul ul, +#g-site-menu li:hover ul ul ul, +#g-site-menu li.iemhover ul ul, +#g-site-menu li.iemhover ul ul ul { left: -999em; } +#g-site-menu li:hover ul, +#g-site-menu li li:hover ul, +#g-site-menu li li li:hover ul, +#g-site-menu li.iemhover ul, +#g-site-menu li li.iemhover ul, +#g-site-menu li li li.iemhover ul { left: auto; } + +#g-site-menu>ul>li>ul { display: none; } + +/* menus.css - Context menu ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.g-item .g-context-menu { position: absolute; margin: 0; padding: 0; top: 20px; left: 198px; width: 14px; height: 14px; background-position: -178px -144px; z-index: 4; } +.g-item .g-context-menu li { width: 100%; padding: 0; margin: 0; text-indent: -9999px; } +.g-item .g-context-menu>li>a { font-size: 0em; display: none; } +.g-item .g-context-menu:hover { top: 4px; left: 16px; top: 16px; width: 200px; height: auto; z-index: 102; } + +.g-extended .g-item .g-context-menu { left: 300px; } +.g-extended .g-item .g-context-menu:hover { width: 300px; left: 16px; } +.g-item .g-context-menu ul { padding: 0; margin: 0; } +.g-item .g-context-menu li li { display: none; } +.g-item .g-context-menu li li a { display: block; padding: 4px 6px; } +.g-item .g-context-menu:hover li li { display: block; text-indent: 0px; } + +.g-item.g-detail .g-context-menu { left: auto; right: 6px; } +.g-item.g-detail .g-context-menu:hover { left: auto; right: 6px; } \ No newline at end of file diff --git a/themes/greydragon/css/modules.css b/themes/greydragon/css/modules.css new file mode 100755 index 0000000..ff155d2 --- /dev/null +++ b/themes/greydragon/css/modules.css @@ -0,0 +1,165 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2011 Serguei Dosyukov + * + * CSS rules related to modules + */ + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/* modules.css - ShadowBox Skin ~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#sb-title { overflow: hidden; } +#sb-title-inner { font-size: 10pt; font-weight: bold; padding-left: 10px; } +#sb-nav #sb-nav-close { background-image: url('../images/close.png'); width: 60px; } +#sb-container > #sb-overlay { min-height: 530px; overflow: auto; } + +/* modules.css - FancyBox Skin ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#fancybox-outer { background: #555; } +#fancybox-content { border-color: #555; } +#fancybox-title-over { font-weight: bold; } +.fancybox-title-inside { background: transparent; font-weight: bold; color: #FFF; text-align: left; } +#fancybox-close { background: url(../images/close.png) 0 0 no-repeat; width: 60px; height: 16px; right: -6px; } +#fancybox-left-ico { background: url(../images/arrows_left.png) no-repeat left center; width: 35px; height: 107px; top: 40%; } +#fancybox-left:hover span { left: 10px; } +#fancybox-right-ico { background: url(../images/arrows_right.png) no-repeat left center; width: 35px; height: 107px; top: 40%; } +#fancybox-right:hover span { right: 10px; } + +/* modules.css - Exif Data ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-exif-data td { padding: 0.2em; } +.g-thumbcrop a.g-meta-exif-link { position: absolute; left: 278px; bottom: 4px; z-index: 100; display: block; background: none center bottom no-repeat; width: 17px; height: 16px; } + +/* modules.css - Image Block ~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-image-block>div { margin-left: 1px; margin-right: 1px; } +.g-image-block { text-align: center; } +.g-image-block img { padding: 5px; max-width: 200px; height: auto; } + +/* modules.css - Image Block Ex ~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-rootpage #g-column-bottom #g-image-block-ex { display: none; } + +/* modules.css - RSS Feeds ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +ul#g-feeds { padding: 0; margin: 0; } + +/* modules.css - Tags ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-tag-cloud ul { padding: 0; font-size: 100%; } +#g-tag-cloud ul li { line-height: 1.2em; } +#g-tag-cloud ul li span { display: none; } + +#g-add-tag-form fieldset ul { float: left; display: inline-block; padding: 0; } +#g-add-tag-form li { float: left; margin: 0; padding: 0; } + +/* modules.css - Comments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-comments { margin-top: 2em; float: left; width: 100%; min-height: 2em; } +#g-comments ul li { margin: 0.4em 0; } + +#g-comments .g-button { right: 0.4em; cursor: pointer; /* hand-shaped cursor */ cursor: hand; /* for IE 5.x */ font-size: 0.8em; color: #333 !important; padding: 2px 10px; margin-top: 0.4em; border: 1px solid; border-color: #999 #666 #666 #999; background-color: #ddd; font-weight: normal; } +.ui-icon-comment { background-position: -210px -144px; } + +#g-comment-detail ul { padding: 0; } +#g-comment-detail>ul>li { margin: 4px 0; padding: 6px; min-height: 40px; } +#g-comment-detail div { margin-top: 6px; padding-bottom: 8px; } +#g-comment-detail li.g-no-comments { display: none; } +#g-comment-detail p.g-no-comments { padding-bottom: 4px; } + +#g-comment-form fieldset { border: none; } +#g-comment-form legend { display: none; width: 100%; } +#g-comment-form ul { padding: 0; } +#g-comment-form>fieldset>ul { margin: 0px 10px; } +#g-comment-form label { display: block; } +#g-comment-form textarea { width: 99%; height: 140px; } +#g-comment-form input[type="text"], +#g-comment-form input[type="password"] { width: 99%; } + +#g-comments .g-author { height: 32px; line-height: 32px; } +#g-comments .g-avatar { height: 32px; margin-right: .4em; width: 32px; } + +/* modules.css - Gallery Stats ~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-gallerystats ul { padding: 0; font-size: x-small; } + +/* modules.css - Info ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-metadata ul { padding: 0; } +#g-metadata .g-description { margin-top: 0.4em; padding: 0.4em 0; } +#g-metadata strong.caption { display: none; } + +/* modules.css - Calendar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-calendarview-link:hover { background-position: left bottom; } + +#g-view-calendar-form fieldset { border: none; } +#g-view-calendar-form ul { padding: 8px; } +#g-view-calendar-form li { padding-top: 8px; display: inline; padding-left: 10px; } +#g-view-calendar-form label { margin: 4px 0; } +#g-view-calendar-form select { margin: 4px 10px; } + +table.calendar { border-spacing: 1px; } +table.calendar td.title a { font-weight: bold; } + +/* modules.css - ClustrMaps ~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-clustrmaps .g-block-content { text-align: center; } + +/* modules.css - GPS Info ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-exif-gps-maps ul { padding-left: 0; } + +/* modules.css - Search ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-quick-search-form { position: absolute; top: 3em; right: 1em; background: none transparent; } +.viewmode-mini #g-quick-search-form { top: auto; right: auto; left: 1em; bottom: 2px; } +#g-quick-search-form label { display: none; } +#g-quick-search-form li { display: inline; float: left; padding: 0px; } + +#g-quick-search-form input[type="text"] { width: 150px; padding-top: 0.1em; padding-bottom: 0.1em; } +#g-quick-search-form input[type="submit"] { display: block; width: 23px; height: 23px; text-indent: -9999px; overflow: hidden; } + +/* modules.css - Basket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-header #basket, #g-header a[href="/basket/view_Orders"] { display: none; } +#g-view-basket span.ui-icon { float: none; } + +#g-view-basket .ui-icon-plusthick { background-position: -32px -128px; } +#g-view-basket .ui-icon-clipboard { background-position: -160px -128px; } +#g-view-basket .ui-icon-trash { background-position: -176px -96px; } +#g-view-basket .ui-icon-cart { background-position: -48px -112px; } +#g-view-basket a.g-button { line-height: 2.2em; } +#g-column-centerfull>.g-block { margin-top: 3em; } +#g-column-centerfull>div>.basketbuttons>a.g-button>span { display: none; } + +/* modules.css - Register ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-welcome-message p { padding-bottom: 6px; } +#g-change-password-user-form { height: 100%; } + +/* modules.css - Localization ~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#l10n-client .labels { border-top: white 1px solid; height: 1.7em; } +#l10n-client h2 { padding-top: 0.4em; padding-bottom: 0.3em; } +#l10n-client .label.translation { margin-top: -0.4em; height: 1.7em; } +#l10n-client #l10n-client-toggler { line-height: 1.7em; height: 1.7em; } +#l10n-client .string-list li { font-size: 0.8em; line-height: 1.1em; } +#l10n-client #l10n-client-string-select { width: 24%; } +#l10n-client #l10n-client-string-select .string-list { border: 1px #ccc solid; } +#l10n-client #g-l10n-search-form ul { padding: 0; } +#l10n-client #l10n-client-string-editor { margin-left: 1em; } +#l10n-client-string-editor .source .source-text { margin: 0 0.4em 0 0; border: 1px #ccc solid; padding: 0.4em; line-height: 1em; } +#l10n-client-string-editor .translation { height: 19em; } +#l10n-client #l10n-edit-translation { width: 97%; height: 17em; border: 1px #ccc solid; font-family: monospace; padding: 0.4em; } + +/* modules.css - jcarousel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +.jcarousel-skin-tango .jcarousel-container { padding-top: 0.5em; } + +/* modules.css - ThumbNav ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +#g-thumbnav-block-inline { margin-top: 26px; } +#g-thumbnav-block-inline h2 { display: none; } +#g-thumbnav-block .g-block-content, +#g-thumbnav-block-inline .g-block-content { width: 210px; margin-left: auto; margin-right: auto; } diff --git a/themes/greydragon/css/normalize.css b/themes/greydragon/css/normalize.css new file mode 100755 index 0000000..9776813 --- /dev/null +++ b/themes/greydragon/css/normalize.css @@ -0,0 +1,431 @@ +/*! normalize.css 2011-11-04T15:38 UTC - http://github.com/necolas/normalize.css */ + +/* ============================================================================= + HTML5 display definitions + ========================================================================== */ + +/* + * Corrects block display not defined in IE6/7/8/9 & FF3 + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} + +/* + * Corrects inline-block display not defined in IE6/7/8/9 & FF3 + */ + +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +/* + * Prevents modern browsers from displaying 'audio' without controls + */ + +audio:not([controls]) { + display: none; +} + +/* + * Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4 + * Known issue: no IE6 support + */ + +[hidden] { + display: none; +} + + +/* ============================================================================= + Base + ========================================================================== */ + +/* + * 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units + * http://clagnut.com/blog/348/#c790 + * 2. Keeps page centred in all browsers regardless of content height + * 3. Prevents iOS text size adjust after orientation change, without disabling user zoom + * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ + */ + +html { + font-size: 100%; /* 1 */ + overflow-y: scroll; /* 2 */ + -webkit-text-size-adjust: 100%; /* 3 */ + -ms-text-size-adjust: 100%; /* 3 */ +} + +/* + * Addresses margins handled incorrectly in IE6/7 + */ + +body { + margin: 0; +} + +/* + * Addresses font-family inconsistency between 'textarea' and other form elements. + */ + +body, +button, +input, +select, +textarea { + font-family: sans-serif; +} + + +/* ============================================================================= + Links + ========================================================================== */ + +/* + * Addresses outline displayed oddly in Chrome + */ + +a:focus { + outline: thin dotted; +} + +/* + * Improves readability when focused and also mouse hovered in all browsers + * people.opera.com/patrickl/experiments/keyboard/test + */ + +a:hover, +a:active { + outline: 0; +} + + +/* ============================================================================= + Typography + ========================================================================== */ + +/* + * Neutralise smaller font-size in 'section' and 'article' in FF4+, Chrome, S5 + */ + +h1 { + font-size: 2em; +} + +/* + * Addresses styling not present in IE7/8/9, S5, Chrome + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/* + * Addresses style set to 'bolder' in FF3+, S4/5, Chrome +*/ + +b, +strong { + font-weight: bold; +} + +blockquote { + margin: 1em 40px; +} + +/* + * Addresses styling not present in S5, Chrome + */ + +dfn { + font-style: italic; +} + +/* + * Addresses styling not present in IE6/7/8/9 + */ + +mark { + background: #ff0; + color: #000; +} + +/* + * Corrects font family set oddly in IE6, S4/5, Chrome + * en.wikipedia.org/wiki/User:Davidgothberg/Test59 + */ + +pre, +code, +kbd, +samp { + font-family: monospace, serif; + _font-family: 'courier new', monospace; + font-size: 1em; +} + +/* + * Improves readability of pre-formatted text in all browsers + */ + +pre { + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; +} + +/* + * 1. Addresses CSS quotes not supported in IE6/7 + * 2. Addresses quote property not supported in S4 + */ + +/* 1 */ + +q { + quotes: none; +} + +/* 2 */ + +q:before, +q:after { + content: ''; + content: none; +} + +small { + font-size: 75%; +} + +/* + * Prevents sub and sup affecting line-height in all browsers + * gist.github.com/413930 + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + + +/* ============================================================================= + Lists + ========================================================================== */ + +ul, +ol { + margin-left: 0; + padding: 0 0 0 40px; +} + +dd { + margin: 0 0 0 40px; +} + +nav ul, +nav ol { + list-style: none; + list-style-image: none; +} + + +/* ============================================================================= + Embedded content + ========================================================================== */ + +/* + * 1. Removes border when inside 'a' element in IE6/7/8/9, FF3 + * 2. Improves image quality when scaled in IE7 + * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ + */ + +img { + border: 0; /* 1 */ + -ms-interpolation-mode: bicubic; /* 2 */ +} + +/* + * Corrects overflow displayed oddly in IE9 + */ + +svg:not(:root) { + overflow: hidden; +} + + +/* ============================================================================= + Figures + ========================================================================== */ + +/* + * Addresses margin not present in IE6/7/8/9, S5, O11 + */ + +figure { + margin: 0; +} + + +/* ============================================================================= + Forms + ========================================================================== */ + +/* + * Corrects margin displayed oddly in IE6/7 + */ + +form { + margin: 0; +} + +/* + * Define consistent border, margin, and padding + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/* + * 1. Corrects color not being inherited in IE6/7/8/9 + * 2. Corrects alignment displayed oddly in IE6/7 + */ + +legend { + border: 0; /* 1 */ + *margin-left: -7px; /* 2 */ +} + +/* + * 1. Corrects font size not being inherited in all browsers + * 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome + * 3. Improves appearance and consistency in all browsers + */ + +button, +input, +select, +textarea { + font-size: 100%; /* 1 */ + margin: 0; /* 2 */ + vertical-align: baseline; /* 3 */ + *vertical-align: middle; /* 3 */ +} + +/* + * Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet + */ + +button, +input { + line-height: normal; /* 1 */ +} + +/* + * 1. Improves usability and consistency of cursor style between image-type 'input' and others + * 2. Corrects inability to style clickable 'input' types in iOS + * 3. Removes inner spacing in IE7 without affecting normal text inputs + * Known issue: inner spacing remains in IE6 + */ + +button, +input[type="button"], +input[type="reset"], +input[type="submit"] { + cursor: pointer; /* 1 */ + -webkit-appearance: button; /* 2 */ + *overflow: visible; /* 3 */ +} + +/* + * 1. Addresses box sizing set to content-box in IE8/9 + * 2. Removes excess padding in IE8/9 + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/* + * 1. Addresses appearance set to searchfield in S5, Chrome + * 2. Addresses box-sizing set to border-box in S5, Chrome (include -moz to future-proof) + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/* + * Removes inner padding that is displayed in S5, Chrome on OS X + */ + +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* + * Removes inner padding and border in FF3+ + * www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/ + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/* + * 1. Removes default vertical scrollbar in IE6/7/8/9 + * 2. Improves readability and alignment in all browsers + */ + +textarea { + overflow: auto; /* 1 */ + vertical-align: top; /* 2 */ +} + + +/* ============================================================================= + Tables + ========================================================================== */ + +/* + * Remove most spacing between table cells + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/themes/greydragon/css/rtl.css b/themes/greydragon/css/rtl.css new file mode 100755 index 0000000..1d74d90 --- /dev/null +++ b/themes/greydragon/css/rtl.css @@ -0,0 +1,47 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2011 Serguei Dosyukov + * + * CSS rules related to general layout + * Defined as 70em wide + */ + +.rtl { direction: rtl; } + +.rtl #g-header, .rtl #g-main, .rtl #g-sidebar, .rtl #g-footer, +.rtl caption, .rtl th, .rtl #g-dialog, +.rtl .g-context-menu li a, .rtl #g-site-menu a, +.rtl .g-metadata li, .rtl DIV.g-resize .g-description, +.rtl .g-message-box li, .rtl #g-site-status li { text-align: right; } + +.rtl .g-text-right { text-align: left; } + +.rtl #g-site-menu li:hover ul ul, +.rtl #g-site-menu li:hover ul ul ul, +.rtl #g-site-menu li.iemhover ul ul, +.rtl #g-site-menu li.iemhover ul ul ul { left: 999em; } + +.rtl .g-left, .rtl .g-inline li, .rtl .g-breadcrumbs li, .rtl .g-paginator li, +.rtl .g-navigation li .rtl .g-buttonset li, .rtl .ui-icon-left .ui-icon, +.rtl .g-metadata li, +.rtl #g-column-bottom .g-block, +.rtl .g-short-form li, .rtl form ul ul li, .rtl input[type="submit"], +.rtl input[type="reset"], .rtl input.checkbox, .rtl input[type=checkbox], +.rtl input.radio, .rtl input[type=radio] { float: right; } + +.rtl .g-paginator .g-navigation { text-align: left; } + +.rtl #g-column-centerfull #g-album-header h1 { padding-right: 12em; } +.rtl .g-buttonset .g-menu-link { text-indent: 9999px; } + +.rtl .g-thumbslide { padding-left: 0; padding-right: 6px; } +.rtl .g-thumbslide .g-description { padding-left: 10px; } + +.rtl .ui-icon-first { background-position: -210px -178px; } +.rtl .ui-icon-first-d { background-position: -210px -162px; } +.rtl .ui-icon-prev { background-position: -194px -178px; } +.rtl .ui-icon-prev-d { background-position: -194px -162px; } +.rtl .ui-icon-next { background-position: -178px -178px; } +.rtl .ui-icon-next-d { background-position: -178px -162px; } +.rtl .ui-icon-last { background-position: -162px -178px; } +.rtl .ui-icon-last-d { background-position: -162px -162px; } diff --git a/themes/greydragon/css/screen.css b/themes/greydragon/css/screen.css new file mode 100755 index 0000000..d820ad5 --- /dev/null +++ b/themes/greydragon/css/screen.css @@ -0,0 +1,17 @@ +/** + * Gallery 3 Grey Dragon Theme + * Copyright (C) 2006-2011 Serguei Dosyukov + * + * CSS rules - Kitchen sync + * + * Color rules for font/background/lines can be found in dedicated colorpack files + */ + +@import "normalize.css"; +@import "layout.css"; +@import "menus.css"; +@import "modules.css"; +@import "forms.css"; +@import "base.css"; +@import "ipad.css"; +@import "rtl.css"; diff --git a/themes/greydragon/helpers/exif_event.php b/themes/greydragon/helpers/exif_event.php new file mode 100755 index 0000000..02536ff --- /dev/null +++ b/themes/greydragon/helpers/exif_event.php @@ -0,0 +1,45 @@ + +is_album()) { + exif::extract($item); + } + } + + static function item_deleted($item) { + db::build() + ->delete("exif_records") + ->where("item_id", "=", $item->id) + ->execute(); + } + + static function photo_menu($menu, $theme) { + $item = $theme->item(); + $menu->append( + Menu::factory("link") + ->id("exifdata-link") + ->label(t("Photo Details")) + ->url(url::site("exif/show/$item->id")) + ->css_id("g-exifdata-link") + ->css_class("g-dialog-link")); + } +} +?> diff --git a/themes/greydragon/helpers/greydragon_event.php b/themes/greydragon/helpers/greydragon_event.php new file mode 100755 index 0000000..8761b1a --- /dev/null +++ b/themes/greydragon/helpers/greydragon_event.php @@ -0,0 +1,92 @@ + +get("add_menu"); + if (!empty($submenu)) { + $item = $submenu->get("add_photos_item"); + if (!empty($item)) { $item->css_class("ui-icon-plus"); } + + $item = $submenu->get("add_album_item"); + if (!empty($item)) { $item->css_class("ui-icon-note"); } + } + + $submenu = $menu->get("options_menu"); + if (!empty($submenu)) { + $item = $submenu->get("edit_item"); + if (!empty($item)) { $item->css_class("ui-icon-pencil"); } + + $item = $submenu->get("edit_permissions"); + if (!empty($item)) { $item->css_class("ui-icon-key"); } + } + } + + static function read_session_cmdparam($cmd, $cookie, $default) { + try { + $_cmd = $_GET[$cmd]; + } catch (Exception $e) { + }; + + if (isset($_cmd)): + $_var = strtolower($_cmd); + $_from_cmd = TRUE; + if ($_var == "default"): + $_var = $default; + endif; + else: + $_from_cmd = FALSE; + if ($cookie): + try { + $_var = $_COOKIE[$cookie]; + } catch (Exception $e) { + }; + endif; + endif; + + if (!isset($_var)): + $_var = $default; + endif; + + return $_var; + } + + static function add_path($path) { + $config = Kohana_Config::instance(); + $kohana_modules = $config->get("core.modules"); + array_unshift($kohana_modules, THEMEPATH . $path); + $config->set("core.modules", $kohana_modules); + Kohana::include_paths(true); + } + + static function add_path_ex($setting, $cmd, $cookie, $path, $default) { + $value = module::get_var("th_greydragon", $setting, $default); + $value = self::read_session_cmdparam($cmd, $cookie, $value); + + self::add_path("greydragon/css/" . $path . "/" . $value); + } + + static function gallery_ready() { + self::add_path_ex("frame_pack", "framepack", "gd_framepack", "framepacks", "greydragon"); + self::add_path_ex("color_pack", "colorpack", "gd_colorpack", "colorpacks", "greydragon"); + self::add_path("custom"); + } +} +?> \ No newline at end of file diff --git a/themes/greydragon/helpers/greydragon_installer.php b/themes/greydragon/helpers/greydragon_installer.php new file mode 100755 index 0000000..4f19787 --- /dev/null +++ b/themes/greydragon/helpers/greydragon_installer.php @@ -0,0 +1,30 @@ + + \ No newline at end of file diff --git a/themes/greydragon/images/apple-touch-icon.png b/themes/greydragon/images/apple-touch-icon.png new file mode 100755 index 0000000..5017ea4 Binary files /dev/null and b/themes/greydragon/images/apple-touch-icon.png differ diff --git a/themes/greydragon/images/arrows_left.png b/themes/greydragon/images/arrows_left.png new file mode 100755 index 0000000..dc9dcdf Binary files /dev/null and b/themes/greydragon/images/arrows_left.png differ diff --git a/themes/greydragon/images/arrows_right.png b/themes/greydragon/images/arrows_right.png new file mode 100755 index 0000000..80188c1 Binary files /dev/null and b/themes/greydragon/images/arrows_right.png differ diff --git a/themes/greydragon/images/avatar.jpg b/themes/greydragon/images/avatar.jpg new file mode 100755 index 0000000..71166cc Binary files /dev/null and b/themes/greydragon/images/avatar.jpg differ diff --git a/themes/greydragon/images/blue-grad.png b/themes/greydragon/images/blue-grad.png new file mode 100755 index 0000000..868a657 Binary files /dev/null and b/themes/greydragon/images/blue-grad.png differ diff --git a/themes/greydragon/images/button-grad-active-vs.png b/themes/greydragon/images/button-grad-active-vs.png new file mode 100755 index 0000000..dc64172 Binary files /dev/null and b/themes/greydragon/images/button-grad-active-vs.png differ diff --git a/themes/greydragon/images/button-grad-vs.png b/themes/greydragon/images/button-grad-vs.png new file mode 100755 index 0000000..51c55a3 Binary files /dev/null and b/themes/greydragon/images/button-grad-vs.png differ diff --git a/themes/greydragon/images/close.png b/themes/greydragon/images/close.png new file mode 100755 index 0000000..d874f9a Binary files /dev/null and b/themes/greydragon/images/close.png differ diff --git a/themes/greydragon/images/donate.png b/themes/greydragon/images/donate.png new file mode 100755 index 0000000..f36bb57 Binary files /dev/null and b/themes/greydragon/images/donate.png differ diff --git a/themes/greydragon/images/gallery.png b/themes/greydragon/images/gallery.png new file mode 100755 index 0000000..038b18a Binary files /dev/null and b/themes/greydragon/images/gallery.png differ diff --git a/themes/greydragon/images/ico-allowed.png b/themes/greydragon/images/ico-allowed.png new file mode 100755 index 0000000..08f2493 Binary files /dev/null and b/themes/greydragon/images/ico-allowed.png differ diff --git a/themes/greydragon/images/ico-denied-inactive.png b/themes/greydragon/images/ico-denied-inactive.png new file mode 100755 index 0000000..56db3ff Binary files /dev/null and b/themes/greydragon/images/ico-denied-inactive.png differ diff --git a/themes/greydragon/images/ico-denied-passive.png b/themes/greydragon/images/ico-denied-passive.png new file mode 100755 index 0000000..1e99223 Binary files /dev/null and b/themes/greydragon/images/ico-denied-passive.png differ diff --git a/themes/greydragon/images/ico-denied.png b/themes/greydragon/images/ico-denied.png new file mode 100755 index 0000000..08f2493 Binary files /dev/null and b/themes/greydragon/images/ico-denied.png differ diff --git a/themes/greydragon/images/ico-error.png b/themes/greydragon/images/ico-error.png new file mode 100755 index 0000000..c37bd06 Binary files /dev/null and b/themes/greydragon/images/ico-error.png differ diff --git a/themes/greydragon/images/ico-help.png b/themes/greydragon/images/ico-help.png new file mode 100755 index 0000000..5c87017 Binary files /dev/null and b/themes/greydragon/images/ico-help.png differ diff --git a/themes/greydragon/images/ico-info.png b/themes/greydragon/images/ico-info.png new file mode 100755 index 0000000..12cd1ae Binary files /dev/null and b/themes/greydragon/images/ico-info.png differ diff --git a/themes/greydragon/images/ico-lock.png b/themes/greydragon/images/ico-lock.png new file mode 100755 index 0000000..2ebc4f6 Binary files /dev/null and b/themes/greydragon/images/ico-lock.png differ diff --git a/themes/greydragon/images/ico-success-inactive.png b/themes/greydragon/images/ico-success-inactive.png new file mode 100755 index 0000000..a209fb6 Binary files /dev/null and b/themes/greydragon/images/ico-success-inactive.png differ diff --git a/themes/greydragon/images/ico-success-passive.png b/themes/greydragon/images/ico-success-passive.png new file mode 100755 index 0000000..c8460d1 Binary files /dev/null and b/themes/greydragon/images/ico-success-passive.png differ diff --git a/themes/greydragon/images/ico-success.png b/themes/greydragon/images/ico-success.png new file mode 100755 index 0000000..a9925a0 Binary files /dev/null and b/themes/greydragon/images/ico-success.png differ diff --git a/themes/greydragon/images/ico-warning.png b/themes/greydragon/images/ico-warning.png new file mode 100755 index 0000000..628cf2d Binary files /dev/null and b/themes/greydragon/images/ico-warning.png differ diff --git a/themes/greydragon/images/missing-img.png b/themes/greydragon/images/missing-img.png new file mode 100755 index 0000000..12b7394 Binary files /dev/null and b/themes/greydragon/images/missing-img.png differ diff --git a/themes/greydragon/js/gallery.ajax.custom.js b/themes/greydragon/js/gallery.ajax.custom.js new file mode 100755 index 0000000..5be029f --- /dev/null +++ b/themes/greydragon/js/gallery.ajax.custom.js @@ -0,0 +1,14 @@ +(function($) { + $.widget("ui.gallery_ajax", { + _init: function() { + this.element.click(function(event) { + eval("var ajax_handler = " + $(event.currentTarget).attr("ajax_handler")); + $.get($(event.currentTarget).attr("href"), function(data) { + ajax_handler(data); + }); + event.preventDefault(); + return false; + }); + } + }); +})(jQuery); diff --git a/themes/greydragon/js/gallery.dialog.custom.js b/themes/greydragon/js/gallery.dialog.custom.js new file mode 100755 index 0000000..2e3b8a1 --- /dev/null +++ b/themes/greydragon/js/gallery.dialog.custom.js @@ -0,0 +1,232 @@ +(function($) { + var fixDialogAutoWidth = $.noop; + + jQuery.browser = {}; + jQuery.browser.mozilla = /mozilla/.test(navigator.userAgent.toLowerCase()) && !/webkit/.test(navigator.userAgent.toLowerCase()); + jQuery.browser.webkit = /webkit/.test(navigator.userAgent.toLowerCase()); + jQuery.browser.opera = /opera/.test(navigator.userAgent.toLowerCase()); + jQuery.browser.msie = /msie/.test(navigator.userAgent.toLowerCase()); + + if ( $.browser.msie ) { + fixDialogAutoWidth = function(content) { + var dialog = $(content).parent('.ui-dialog'); + var width = dialog.innerWidth(); + if ( width ) dialog.css('width', width); + } + } + + var _init = $.ui.dialog.prototype._init; + $.ui.dialog.prototype._init = function() { + // IE magick: (width: 'auto' not working correctly) : + // http://dev.jqueryui.com/ticket/4437 + if ( this.options.width == 'auto' ) { + var open = this.options.open; + this.options.open = function() { + fixDialogAutoWidth(this); + if ( open ) open.apply(this); + } + } + // yet another bug options.hide: 'drop' does not work + // in IE http://dev.jqueryui.com/ticket/5615 + if ( $.browser.msie && this.options.hide == 'drop' ) { + this.options.hide = 'fold'; + } + return _init.apply(this); // calls open() if autoOpen + }; + + $.widget("ui.gallery_dialog", { + _init: function() { + var self = this; + if (!self.options.immediate) { + this.element.click(function(event) { + event.preventDefault(); + self._show($(event.currentTarget).attr("href")); + return false; + }); + } else { + self._show(this.element.attr("href")); + } + }, + + _show: function(sHref) { + var self = this; + var eDialog = '
    '; + + if ($("#g-dialog").length) { + $("#g-dialog").dialog("close"); + } + $("body").append(eDialog); + + if (!self.options.close) { + self.options.close = self.close_dialog; + } + $("#g-dialog").dialog(self.options); + $("#g-dialog").dialog('option', 'resizable', false); + + $("#g-dialog").gallery_show_loading(); + + $.ajax({ + url: sHref, + type: "GET", + success: function(data, textStatus, xhr) { + var mimeType = /^(\w+\/\w+)\;?/.exec(xhr.getResponseHeader("Content-Type")); + + var content = ""; + if (mimeType[1] == "application/json") { + data = JSON.parse(data); + content = data.html; + } else { + content = data; + } + + $("#g-dialog").html(content).gallery_show_loading(); + + if ($("#g-dialog form").length) { + self.form_loaded(null, $("#g-dialog form")); + } + self._layout(); + + $("#g-dialog").dialog("open"); + self._set_title(); + + if ($("#g-dialog form").length) { + self._ajaxify_dialog(); + } + } + }); + $("#g-dialog").dialog("option", "self", self); + }, + + error: function(xhr, textStatus, errorThrown) { + $("#g-dialog").html(xhr.responseText); + self._set_title(); + self._layout(); + }, + + _layout: function() { + var dialogWidth; + var dialogHeight = $("#g-dialog").height(); + var cssWidth = new String($("#g-dialog form").css("width")); + var childWidth = cssWidth.replace(/[^0-9]/g,""); + var size = $.gallery_get_viewport_size(); + if ($("#g-dialog iframe").length) { + dialogWidth = size.width() - 100; + // Set the iframe width and height + $("#g-dialog iframe").width("100%").height(size.height() - 100); + } else if ($("#g-dialog .g-dialog-panel").length) { + dialogWidth = size.width() - 100; + $("#g-dialog").dialog("option", "height", size.height() - 100); + } else if (childWidth == "" ) { + dialogWidth = 500; + } else { + dialogWidth = parseInt(childWidth) + 28; + } + + var leftPos = (size.width() - dialogWidth) / 2; + var rightPos = (size.height() - dialogHeight) / 2; + + $("#g-dialog").dialog('option', 'width', dialogWidth); + $("#g-dialog").dialog('option', 'position', [leftPos, rightPos]); + }, + + form_loaded: function(event, ui) { + // Should be defined (and localized) in the theme + MSG_CANCEL = MSG_CANCEL || 'Cancel'; + var eCancel = '' + MSG_CANCEL + ''; + if ($("#g-dialog .submit").length) { + $("#g-dialog .submit").addClass("ui-state-default ui-corner-all"); + $.fn.gallery_hover_init(); + $("#g-dialog .submit").parent().append(eCancel); + $("#g-dialog .g-cancel").click(function(event) { + $("#g-dialog").dialog("close"); + event.preventDefault(); + }); + } + $("#g-dialog .ui-state-default").hover( + function() { + $(this).addClass("ui-state-hover"); + }, + function() { + $(this).removeClass("ui-state-hover"); + } + ); + }, + + close_dialog: function(event, ui) { + var self = $("#g-dialog").dialog("option", "self"); + if ($("#g-dialog form").length) { + self._trigger("form_closing", null, $("#g-dialog form")); + } + self._trigger("dialog_closing", null, $("#g-dialog")); + $("#g-dialog").dialog("destroy").remove(); + }, + + _ajaxify_dialog: function() { + var self = this; + $("#g-dialog form").ajaxForm({ + dataType: 'json', + beforeSubmit: function(formData, form, options) { + form.find(":submit") + .addClass("ui-state-disabled") + .attr("disabled", "disabled"); + return true; + }, + success: function(data) { + if (data.html) { + $("#g-dialog").html(data.html); + $("#g-dialog").dialog("option", "position", "center"); + $("#g-dialog form :submit").removeClass("ui-state-disabled") + .attr("disabled", null); + self._set_title(); + self._ajaxify_dialog(); + self.form_loaded(null, $("#g-dialog form")); + if (typeof data.reset == 'function') { + eval(data.reset + '()'); + } + } + if (data.result == "success") { + if (data.location) { + window.location = data.location; + } else { + window.location.reload(); + } + } + }, + error: function(xhr, textStatus, errorThrown) { + $("#g-dialog").html(xhr.responseText); + self._set_title(); + self._layout(); + } + }); + }, + + _set_title: function() { + // Remove titlebar for progress dialogs or set title + if ($("#g-dialog #g-progress").length) { + $(".ui-dialog-titlebar").remove(); + } else if ($("#g-dialog h1").length) { + $("#g-dialog").dialog('option', 'title', $("#g-dialog h1:eq(0)").html()); + $("#g-dialog h1:eq(0)").hide(); + } else if ($("#g-dialog fieldset legend").length) { + $("#g-dialog").dialog('option', 'title', $("#g-dialog fieldset legend:eq(0)").html()); + } + }, + + form_closing: function(event, ui) {}, + dialog_closing: function(event, ui) {} + }); + + $.extend($.ui.gallery_dialog, { + defaults: { + autoResize: false + ,show: 'clip' + ,hide: 'clip' + ,height: 'auto' + ,width: 'auto' + ,autoOpen: false + ,modal: true + ,position: 'center' + ,draggable: false + } + }); +})(jQuery); diff --git a/themes/greydragon/js/jquery-ui.min.js b/themes/greydragon/js/jquery-ui.min.js new file mode 100755 index 0000000..efbd3e5 --- /dev/null +++ b/themes/greydragon/js/jquery-ui.min.js @@ -0,0 +1,7 @@ +/*! jQuery UI - v1.10.4 - 2014-03-16 +* http://jqueryui.com +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +(function(e,t){function i(t,i){var s,a,o,r=t.nodeName.toLowerCase();return"area"===r?(s=t.parentNode,a=s.name,t.href&&a&&"map"===s.nodeName.toLowerCase()?(o=e("img[usemap=#"+a+"]")[0],!!o&&n(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,a=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,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,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,s,a=e(this[0]);a.length&&a[0]!==document;){if(n=a.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(a.css("zIndex"),10),!isNaN(s)&&0!==s))return s;a=a.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(a,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var a="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?r["inner"+n].call(this):this.each(function(){e(this).css(o,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(o,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,a=e.ui[t].prototype;for(s in n)a.plugins[s]=a.plugins[s]||[],a.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;s.length>n;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)}})})(jQuery);(function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix||i:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
    ",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),1===arguments.length)return o[i]===e?null:o[i];o[i]=s}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})})(jQuery);(function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,l=Math.round,h=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("
    "),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widths?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(l.horizontal="center"),d>g&&g>r(n+a)&&(l.vertical="middle"),l.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,l)}),c.offset(t.extend(M,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-o-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-o-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-o-a,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);(function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("
    ").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}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,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=e.pageX,h=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.lefti[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,l=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,a=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,a))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY=0;u--)r=p.snapElements[u].left,l=r+p.snapElements[u].width,h=p.snapElements[u].top,c=h+p.snapElements[u].height,r-f>_||m>l+f||h-f>b||v>c+f||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==g.snapMode&&(s=f>=Math.abs(h-b),n=f>=Math.abs(c-v),a=f>=Math.abs(r-_),o=f>=Math.abs(l-m),s&&(i.position.top=p._convertPositionTo("relative",{top:h-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),d=s||n||a||o,"outer"!==g.snapMode&&(s=f>=Math.abs(h-v),n=f>=Math.abs(c-b),a=f>=Math.abs(r-m),o=f>=Math.abs(l-_),s&&(i.position.top=p._convertPositionTo("relative",{top:h,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||a||o||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],undefined):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},t.ui.ddmanager.droppables[i.scope]=t.ui.ddmanager.droppables[i.scope]||[],t.ui.ddmanager.droppables[i.scope].push(this),i.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,a,o=(t.positionAbs||t.position.absolute).left,r=(t.positionAbs||t.position.absolute).top,l=o+t.helperProportions.width,h=r+t.helperProportions.height,c=i.offset.left,u=i.offset.top,d=c+i.proportions().width,p=u+i.proportions().height;switch(s){case"fit":return o>=c&&d>=l&&r>=u&&p>=h;case"intersect":return o+t.helperProportions.width/2>c&&d>l-t.helperProportions.width/2&&r+t.helperProportions.height/2>u&&p>h-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,a=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(a,u,i.proportions().height)&&e(n,c,i.proportions().width);case"touch":return(r>=u&&p>=r||h>=u&&p>=h||u>r&&h>p)&&(o>=c&&d>=o||l>=c&&d>=l||c>o&&l>d);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,a=t.ui.ddmanager.droppables[e.options.scope]||[],o=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||e&&!a[s].accept.call(a[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue t}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=t.ui.intersect(e,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),a.length&&(s=t.data(a[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}})(jQuery);(function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("
    ").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),a="ui-resizable-"+s,n=t("
    "),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,a;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,a),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(t(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),o.containment&&(s+=t(o.containment).scrollLeft()||0,n+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===a?this.axis+"-resize":a),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-a.left||0,d=e.pageY-a.top||0,p=this._change[o];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,a=s?0:c.sizeDiff.width,o={width:c.helper.width()-a,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(o,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidtht.width,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return o&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),a&&(t.height=e.maxHeight),o&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),a&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,a=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
    "),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,a,o,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,a=l.containerSize.height,o=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:o,h=t.ui.hasScroll(p)?p.scrollHeight:a,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,a,o=t(this).data("ui-resizable"),r=o.options,h=o.containerOffset,l=o.position,c=o._aspectRatio||e.shiftKey,u={top:0,left:0},d=o.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-u.left),c&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),c&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper?o.offset.left-u.left:o.offset.left-u.left)+o.sizeDiff.width),s=Math.abs((o._helper?o.offset.top-u.top:o.offset.top-h.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a&&(i-=Math.abs(o.parentData.left)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,c&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,c&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,a=e.containerElement,o=t(e.helper),r=o.offset(),h=o.outerWidth()-e.sizeDiff.width,l=o.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(a[e]=i||null)}),e.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,a=e.originalPosition,o=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(o)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.top=a.top-u):/^(sw)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.left=a.left-c):(p-l>0?(e.size.height=p,e.position.top=a.top-u):(e.size.height=l,e.position.top=a.top+n.height-l),d-h>0?(e.size.width=d,e.position.left=a.left-c):(e.size.width=h,e.position.left=a.left+n.width-h))}})})(jQuery);(function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("
    ")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=e.pageX,l=e.pageY;return a>r&&(i=r,r=a,a=i),o>l&&(i=l,l=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:l-o}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?h=!(i.left>r||a>i.right||i.top>l||o>i.bottom):"fit"===n.tolerance&&(h=i.left>a&&r>i.right&&i.top>o&&l>i.bottom),h?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):undefined}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t(" ",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[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")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}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 e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.leftthis.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})(jQuery);(function(e){var t=0,i={},a={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",a.height=a.paddingTop=a.paddingBottom=a.borderTopWidth=a.borderBottomWidth="show",e.widget("ui.accordion",{version:"1.10.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e(),content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),undefined):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t),undefined)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,a=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:n=this.headers[(s+1)%a];break;case i.LEFT:case i.UP:n=this.headers[(s-1+a)%a];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:n=this.headers[0];break;case i.END:n=this.headers[a-1]}n&&(e(t.target).attr("tabIndex",-1),e(n).attr("tabIndex",0),n.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,a=this.options,s=a.heightStyle,n=this.element.parent(),r=this.accordionId="ui-accordion-"+(this.element.attr("id")||++t);this.active=this._findActive(a.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(t){var i=e(this),a=i.attr("id"),s=i.next(),n=s.attr("id");a||(a=r+"-header-"+t,i.attr("id",a)),n||(n=r+"-panel-"+t,s.attr("id",n)),i.attr("aria-controls",n),s.attr("aria-labelledby",a)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(a.event),"fill"===s?(i=n.height(),this.element.siblings(":visible").each(function(){var t=e(this),a=t.css("position");"absolute"!==a&&"fixed"!==a&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(i=0,this.headers.next().each(function(){i=Math.max(i,e(this).css("height","").height())}).height(i))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,a=this.active,s=e(t.currentTarget),n=s[0]===a[0],r=n&&i.collapsible,o=r?e():s.next(),h=a.next(),d={oldHeader:a,oldPanel:h,newHeader:r?e():s,newPanel:o};t.preventDefault(),n&&!i.collapsible||this._trigger("beforeActivate",t,d)===!1||(i.active=r?!1:this.headers.index(s),this.active=n?e():s,this._toggle(d),a.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&a.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),n||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,a=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=a,this.options.animate?this._animate(i,a,t):(a.hide(),i.show(),this._toggleComplete(t)),a.attr({"aria-hidden":"true"}),a.prev().attr("aria-selected","false"),i.length&&a.length?a.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(e,t,s){var n,r,o,h=this,d=0,c=e.length&&(!t.length||e.index()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,undefined;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),undefined):(this._searchTimeout(e),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(e),this._change(e),undefined)}}),this._initSource(),this.menu=e("
      ").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:s})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length").append(e("").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[e](t),undefined):(this.search(null,t),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})})(jQuery);(function(e){var t,i="ui-button ui-widget ui-state-default ui-corner-all",n="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",s=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},a=function(t){var i=t.name,n=t.form,s=e([]);return i&&(i=i.replace(/'/g,"\\'"),s=n?e(n).find("[name='"+i+"']"):e("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),s};e.widget("ui.button",{version:"1.10.4",defaultElement:"").addClass(this._triggerClass).html(n?e("").attr({src:n,alt:s,title:s}):s)),t[o?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,a,s,n=new Date(2009,11,20),r=this._get(e,"dateFormat");r.match(/[DM]/)&&(t=function(e){for(i=0,a=0,s=0;e.length>s;s++)e[s].length>i&&(i=e[s].length,a=s);return a},n.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),n.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-n.getDay())),e.input.attr("size",this._formatDate(e,n).length)}},_inlineDatepicker:function(t,i){var a=e(t);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(i.dpDiv),e.data(t,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,a,n,o){var u,c,h,l,d,p=this._dialogInst;return p||(this.uuid+=1,u="dp"+this.uuid,this._dialogInput=e(""),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},e.data(this._dialogInput[0],r,p)),s(p.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(c=document.documentElement.clientWidth,h=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[c/2-100+l,h/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(t){var i,a=e(t),s=e.data(t,r);a.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,r),"input"===i?(s.append.remove(),s.trigger.remove(),a.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&a.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,a,s=e(t),n=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,n.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(a=s.children("."+this._inlineClass),a.children().removeClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,a,s=e(t),n=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,n.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(a=s.children("."+this._inlineClass),a.children().addClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,a,n){var r,o,u,c,h=this._getInst(i);return 2===arguments.length&&"string"==typeof a?"defaults"===a?e.extend({},e.datepicker._defaults):h?"all"===a?e.extend({},h.settings):this._get(h,a):null:(r=a||{},"string"==typeof a&&(r={},r[a]=n),h&&(this._curInst===h&&this._hideDatepicker(),o=this._getDateDatepicker(i,!0),u=this._getMinMaxDate(h,"min"),c=this._getMinMaxDate(h,"max"),s(h.settings,r),null!==u&&r.dateFormat!==t&&r.minDate===t&&(h.settings.minDate=this._formatDate(h,u)),null!==c&&r.dateFormat!==t&&r.maxDate===t&&(h.settings.maxDate=this._formatDate(h,c)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(e(i),h),this._autoSize(h),this._setDate(h,o),this._updateAlternate(h),this._updateDatepicker(h)),t)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,a,s,n=e.datepicker._getInst(t.target),r=!0,o=n.dpDiv.is(".ui-datepicker-rtl");if(n._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),r=!1;break;case 13:return s=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",n.dpDiv),s[0]&&e.datepicker._selectDay(t.target,n.selectedMonth,n.selectedYear,s[0]),i=e.datepicker._get(n,"onSelect"),i?(a=e.datepicker._formatDate(n),i.apply(n.input?n.input[0]:null,[a,n])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(n,"stepBigMonths"):-e.datepicker._get(n,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(n,"stepBigMonths"):+e.datepicker._get(n,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?1:-1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(n,"stepBigMonths"):-e.datepicker._get(n,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?-1:1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(n,"stepBigMonths"):+e.datepicker._get(n,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(i){var a,s,n=e.datepicker._getInst(i.target);return e.datepicker._get(n,"constrainInput")?(a=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">s||!a||a.indexOf(s)>-1):t},_doKeyUp:function(t){var i,a=e.datepicker._getInst(t.target);if(a.input.val()!==a.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,e.datepicker._getFormatConfig(a)),i&&(e.datepicker._setDateFromField(a),e.datepicker._updateAlternate(a),e.datepicker._updateDatepicker(a))}catch(s){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,a,n,r,o,u,c;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),a=e.datepicker._get(i,"beforeShow"),n=a?a.apply(t,[t,i]):{},n!==!1&&(s(i.settings,n),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),r=!1,e(t).parents().each(function(){return r|="fixed"===e(this).css("position"),!r}),o={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),o=e.datepicker._checkOffset(i,o,r),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),i.inline||(u=e.datepicker._get(i,"showAnim"),c=e.datepicker._get(i,"duration"),i.dpDiv.zIndex(e(t).zIndex()+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[u]?i.dpDiv.show(u,e.datepicker._get(i,"showOptions"),c):i.dpDiv[u||"show"](u?c:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,n=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t),t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,a=this._getNumberOfMonths(t),s=a[1],r=17;t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",r*s+"em"),t.dpDiv[(1!==a[0]||1!==a[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,a){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,u=document.documentElement.clientWidth+(a?0:e(document).scrollLeft()),c=document.documentElement.clientHeight+(a?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?s-r:0,i.left-=a&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=a&&i.top===t.input.offset().top+o?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>u&&u>s?Math.abs(i.left+s-u):0),i.top-=Math.min(i.top,i.top+n>c&&c>n?Math.abs(n+o):0),i},_findPos:function(t){for(var i,a=this._getInst(t),s=this._get(a,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,a,s,n,o=this._curInst;!o||t&&o!==e.data(t,r)||this._datepickerShowing&&(i=this._get(o,"showAnim"),a=this._get(o,"duration"),s=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,"showOptions"),a,s):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?a:null,s),i||s(),this._datepickerShowing=!1,n=this._get(o,"onClose"),n&&n.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),a=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==a)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,a){var s=e(t),n=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(n,i+("M"===a?this._get(n,"showCurrentAtPos"):0),a),this._updateDatepicker(n))},_gotoToday:function(t){var i,a=e(t),s=this._getInst(a[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(a)},_selectMonthYear:function(t,i,a){var s=e(t),n=this._getInst(s[0]);n["selected"+("M"===a?"Month":"Year")]=n["draw"+("M"===a?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(n),this._adjustDate(s)},_selectDay:function(t,i,a,s){var n,r=e(t);e(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(n=this._getInst(r[0]),n.selectedDay=n.currentDay=e("a",s).html(),n.selectedMonth=n.currentMonth=i,n.selectedYear=n.currentYear=a,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var a,s=e(t),n=this._getInst(s[0]);i=null!=i?i:this._formatDate(n),n.input&&n.input.val(i),this._updateAlternate(n),a=this._get(n,"onSelect"),a?a.apply(n.input?n.input[0]:null,[i,n]):n.input&&n.input.trigger("change"),n.inline?this._updateDatepicker(n):(this._hideDatepicker(),this._lastInput=n.input[0],"object"!=typeof n.input[0]&&n.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,a,s,n=this._get(t,"altField");n&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),a=this._getDate(t),s=this.formatDate(i,a,this._getFormatConfig(t)),e(n).each(function(){e(this).val(s)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(i,a,s){if(null==i||null==a)throw"Invalid arguments";if(a="object"==typeof a?""+a:a+"",""===a)return null;var n,r,o,u,c=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,l="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,p=(s?s.dayNames:null)||this._defaults.dayNames,g=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,m=(s?s.monthNames:null)||this._defaults.monthNames,f=-1,_=-1,v=-1,k=-1,y=!1,b=function(e){var t=i.length>n+1&&i.charAt(n+1)===e;return t&&n++,t},D=function(e){var t=b(e),i="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,s=RegExp("^\\d{1,"+i+"}"),n=a.substring(c).match(s);if(!n)throw"Missing number at position "+c;return c+=n[0].length,parseInt(n[0],10)},w=function(i,s,n){var r=-1,o=e.map(b(i)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,i){var s=i[1];return a.substr(c,s.length).toLowerCase()===s.toLowerCase()?(r=i[0],c+=s.length,!1):t}),-1!==r)return r+1;throw"Unknown name at position "+c},M=function(){if(a.charAt(c)!==i.charAt(n))throw"Unexpected literal at position "+c;c++};for(n=0;i.length>n;n++)if(y)"'"!==i.charAt(n)||b("'")?M():y=!1;else switch(i.charAt(n)){case"d":v=D("d");break;case"D":w("D",d,p);break;case"o":k=D("o");break;case"m":_=D("m");break;case"M":_=w("M",g,m);break;case"y":f=D("y");break;case"@":u=new Date(D("@")),f=u.getFullYear(),_=u.getMonth()+1,v=u.getDate();break;case"!":u=new Date((D("!")-this._ticksTo1970)/1e4),f=u.getFullYear(),_=u.getMonth()+1,v=u.getDate();break;case"'":b("'")?M():y=!0;break;default:M()}if(a.length>c&&(o=a.substr(c),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===f?f=(new Date).getFullYear():100>f&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(l>=f?0:-100)),k>-1)for(_=1,v=k;;){if(r=this._getDaysInMonth(f,_-1),r>=v)break;_++,v-=r}if(u=this._daylightSavingAdjust(new Date(f,_-1,v)),u.getFullYear()!==f||u.getMonth()+1!==_||u.getDate()!==v)throw"Invalid date";return u},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var a,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,n=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,u=function(t){var i=e.length>a+1&&e.charAt(a+1)===t;return i&&a++,i},c=function(e,t,i){var a=""+t;if(u(e))for(;i>a.length;)a="0"+a;return a},h=function(e,t,i,a){return u(e)?a[t]:i[t]},l="",d=!1;if(t)for(a=0;e.length>a;a++)if(d)"'"!==e.charAt(a)||u("'")?l+=e.charAt(a):d=!1;else switch(e.charAt(a)){case"d":l+=c("d",t.getDate(),2);break;case"D":l+=h("D",t.getDay(),s,n);break;case"o":l+=c("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":l+=c("m",t.getMonth()+1,2);break;case"M":l+=h("M",t.getMonth(),r,o);break;case"y":l+=u("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":l+=t.getTime();break;case"!":l+=1e4*t.getTime()+this._ticksTo1970;break;case"'":u("'")?l+="'":d=!0;break;default:l+=e.charAt(a)}return l},_possibleChars:function(e){var t,i="",a=!1,s=function(i){var a=e.length>t+1&&e.charAt(t+1)===i;return a&&t++,a};for(t=0;e.length>t;t++)if(a)"'"!==e.charAt(t)||s("'")?i+=e.charAt(t):a=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":a=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,i){return e.settings[i]!==t?e.settings[i]:this._defaults[i]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),a=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),n=s,r=this._getFormatConfig(e);try{n=this.parseDate(i,a,r)||s}catch(o){a=t?"":a}e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),e.currentDay=a?n.getDate():0,e.currentMonth=a?n.getMonth():0,e.currentYear=a?n.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,a){var s=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},n=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(a){}for(var s=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,n=s.getFullYear(),r=s.getMonth(),o=s.getDate(),u=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,c=u.exec(i);c;){switch(c[2]||"d"){case"d":case"D":o+=parseInt(c[1],10);break;case"w":case"W":o+=7*parseInt(c[1],10);break;case"m":case"M":r+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(n,r));break;case"y":case"Y":n+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(n,r))}c=u.exec(i)}return new Date(n,r,o)},r=null==i||""===i?a:"string"==typeof i?n(i):"number"==typeof i?isNaN(i)?a:s(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?a:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var a=!t,s=e.selectedMonth,n=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),s===e.selectedMonth&&n===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(a?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),a="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(a,-i,"M")},next:function(){e.datepicker._adjustDate(a,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(a)},selectDay:function(){return e.datepicker._selectDay(a,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(a,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(a,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,a,s,n,r,o,u,c,h,l,d,p,g,m,f,_,v,k,y,b,D,w,M,C,x,I,N,T,A,E,S,Y,F,P,O,j,K,R,H=new Date,W=this._daylightSavingAdjust(new Date(H.getFullYear(),H.getMonth(),H.getDate())),L=this._get(e,"isRTL"),U=this._get(e,"showButtonPanel"),B=this._get(e,"hideIfNoPrevNext"),z=this._get(e,"navigationAsDateFormat"),q=this._getNumberOfMonths(e),G=this._get(e,"showCurrentAtPos"),J=this._get(e,"stepMonths"),Q=1!==q[0]||1!==q[1],V=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),$=this._getMinMaxDate(e,"min"),X=this._getMinMaxDate(e,"max"),Z=e.drawMonth-G,et=e.drawYear;if(0>Z&&(Z+=12,et--),X)for(t=this._daylightSavingAdjust(new Date(X.getFullYear(),X.getMonth()-q[0]*q[1]+1,X.getDate())),t=$&&$>t?$:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=z?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-J,1)),this._getFormatConfig(e)):i,a=this._canAdjustMonth(e,-1,et,Z)?""+i+"":B?"":""+i+"",s=this._get(e,"nextText"),s=z?this.formatDate(s,this._daylightSavingAdjust(new Date(et,Z+J,1)),this._getFormatConfig(e)):s,n=this._canAdjustMonth(e,1,et,Z)?""+s+"":B?"":""+s+"",r=this._get(e,"currentText"),o=this._get(e,"gotoCurrent")&&e.currentDay?V:W,r=z?this.formatDate(r,o,this._getFormatConfig(e)):r,u=e.inline?"":"",c=U?"
      "+(L?u:"")+(this._isInRange(e,o)?"":"")+(L?"":u)+"
      ":"",h=parseInt(this._get(e,"firstDay"),10),h=isNaN(h)?0:h,l=this._get(e,"showWeek"),d=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),g=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),f=this._get(e,"beforeShowDay"),_=this._get(e,"showOtherMonths"),v=this._get(e,"selectOtherMonths"),k=this._getDefaultDate(e),y="",D=0;q[0]>D;D++){for(w="",this.maxRows=4,M=0;q[1]>M;M++){if(C=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),x=" ui-corner-all",I="",Q){if(I+="
      "}for(I+="
      "+(/all|left/.test(x)&&0===D?L?n:a:"")+(/all|right/.test(x)&&0===D?L?a:n:"")+this._generateMonthYearHeader(e,Z,et,$,X,D>0||M>0,g,m)+"
      "+"",N=l?"":"",b=0;7>b;b++)T=(b+h)%7,N+="=5?" class='ui-datepicker-week-end'":"")+">"+""+p[T]+"";for(I+=N+"",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),E=(this._getFirstDayOfMonth(et,Z)-h+7)%7,S=Math.ceil((E+A)/7),Y=Q?this.maxRows>S?this.maxRows:S:S,this.maxRows=Y,F=this._daylightSavingAdjust(new Date(et,Z,1-E)),P=0;Y>P;P++){for(I+="",O=l?"":"",b=0;7>b;b++)j=f?f.apply(e.input?e.input[0]:null,[F]):[!0,""],K=F.getMonth()!==Z,R=K&&!v||!j[0]||$&&$>F||X&&F>X,O+="",F.setDate(F.getDate()+1),F=this._daylightSavingAdjust(F);I+=O+""}Z++,Z>11&&(Z=0,et++),I+="
      "+this._get(e,"weekHeader")+"
      "+this._get(e,"calculateWeek")(F)+""+(K&&!_?" ":R?""+F.getDate()+"":""+F.getDate()+"")+"
      "+(Q?"
      "+(q[0]>0&&M===q[1]-1?"
      ":""):""),w+=I}y+=w}return y+=c,e._keyEvent=!1,y},_generateMonthYearHeader:function(e,t,i,a,s,n,r,o){var u,c,h,l,d,p,g,m,f=this._get(e,"changeMonth"),_=this._get(e,"changeYear"),v=this._get(e,"showMonthAfterYear"),k="
      ",y="";if(n||!f)y+=""+r[t]+"";else{for(u=a&&a.getFullYear()===i,c=s&&s.getFullYear()===i,y+=""}if(v||(k+=y+(!n&&f&&_?"":" ")),!e.yearshtml)if(e.yearshtml="",n||!_)k+=""+i+"";else{for(l=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10); +return isNaN(t)?d:t},g=p(l[0]),m=Math.max(g,p(l[1]||"")),g=a?Math.max(g,a.getFullYear()):g,m=s?Math.min(m,s.getFullYear()):m,e.yearshtml+="",k+=e.yearshtml,e.yearshtml=null}return k+=this._get(e,"yearSuffix"),v&&(k+=(!n&&f&&_?"":" ")+y),k+="
      "},_adjustInstDate:function(e,t,i){var a=e.drawYear+("Y"===i?t:0),s=e.drawMonth+("M"===i?t:0),n=Math.min(e.selectedDay,this._getDaysInMonth(a,s))+("D"===i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(a,s,n)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),s=i&&i>t?i:t;return a&&s>a?a:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,a){var s=this._getNumberOfMonths(e),n=this._daylightSavingAdjust(new Date(i,a+(0>t?t:s[0]*s[1]),1));return 0>t&&n.setDate(this._getDaysInMonth(n.getFullYear(),n.getMonth())),this._isInRange(e,n)},_isInRange:function(e,t){var i,a,s=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),r=null,o=null,u=this._get(e,"yearRange");return u&&(i=u.split(":"),a=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=a),i[1].match(/[+\-].*/)&&(o+=a)),(!s||t.getTime()>=s.getTime())&&(!n||t.getTime()<=n.getTime())&&(!r||t.getFullYear()>=r)&&(!o||o>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,a){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(a,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.10.4"})(jQuery);(function(e){var t={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.10.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,a=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._destroyOverlay(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(s){}this._hide(this.uiDialog,this.options.hide,function(){a._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,t){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!t&&this._trigger("focus",e),i},open:function(){var t=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var e=this.element.find("[autofocus]");e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("
      ").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),undefined;if(t.keyCode===e.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),a=i.filter(":first"),s=i.filter(":last");t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==a[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(s.focus(1),t.preventDefault()):(a.focus(1),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("
      ").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html(" "),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("
      ").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(e.each(i,function(i,a){var s,n;a=e.isFunction(a)?{click:a,text:i}:a,a=e.extend({type:"button"},a),s=a.click,a.click=function(){s.apply(t.element[0],arguments)},n={icons:a.icons,text:a.showText},delete a.icons,delete a.showText,e("",a).button(n).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,a=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(a,s){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",a,t(s))},drag:function(e,a){i._trigger("drag",e,t(a))},stop:function(s,n){a.position=[n.position.left-i.document.scrollLeft(),n.position.top-i.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",s,t(n))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,a=this.options,s=a.resizable,n=this.uiDialog.css("position"),r="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:a.maxWidth,maxHeight:a.maxHeight,minWidth:a.minWidth,minHeight:this._minHeight(),handles:r,start:function(a,s){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",a,t(s))},resize:function(e,a){i._trigger("resize",e,t(a))},stop:function(s,n){a.height=e(this).height(),a.width=e(this).width(),e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",s,t(n))}}).css("position",n)},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(a){var s=this,n=!1,r={};e.each(a,function(e,a){s._setOption(e,a),e in t&&(n=!0),e in i&&(r[e]=a)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(e,t){var i,a,s=this.uiDialog;"dialogClass"===e&&s.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=s.is(":data(ui-draggable)"),i&&!t&&s.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(a=s.is(":data(ui-resizable)"),a&&!t&&s.resizable("destroy"),a&&"string"==typeof t&&s.resizable("option","handles",t),a||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,a=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),a.minWidth>a.width&&(a.width=a.minWidth),e=this.uiDialog.css({height:"auto",width:a.width}).outerHeight(),t=Math.max(0,a.minHeight-e),i="number"==typeof a.maxHeight?Math.max(0,a.maxHeight-e):"none","auto"===a.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,a.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("
      ").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=this,i=this.widgetFullName;e.ui.dialog.overlayInstances||this._delay(function(){e.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(a){t._allowInteraction(a)||(a.preventDefault(),e(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=e("
      ").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),e.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(e.ui.dialog.overlayInstances--,e.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),e.ui.dialog.overlayInstances=0,e.uiBackCompat!==!1&&e.widget("ui.dialog",e.ui.dialog,{_position:function(){var t,i=this.options.position,a=[],s=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(a=i.split?i.split(" "):[i[0],i[1]],1===a.length&&(a[1]=a[0]),e.each(["left","top"],function(e,t){+a[e]===a[e]&&(s[e]=a[e],a[e]=t)}),i={my:a[0]+(0>s[0]?s[0]:"+"+s[0])+" "+a[1]+(0>s[1]?s[1]:"+"+s[1]),at:a.join(" ")}),i=e.extend({},e.ui.dialog.prototype.options.position,i)):i=e.ui.dialog.prototype.options.position,t=this.uiDialog.is(":visible"),t||this.uiDialog.show(),this.uiDialog.position(i),t||this.uiDialog.hide()}})})(jQuery);(function(t){t.widget("ui.menu",{version:"1.10.4",defaultElement:"
        ",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,l=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:l=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()
      ").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("
      ").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})})(jQuery);(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("
      ").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),l=a.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-a.width()/2,top:e.pageY-l.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](u,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})})(jQuery);(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.4",defaultElement:"",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return""},_buttonHtml:function(){return""+""+""+""+""},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})})(jQuery);(function(t,e){function i(){return++n}function s(t){return t=t.cloneNode(!1),t.hash.length>1&&decodeURIComponent(t.href.replace(a,""))===decodeURIComponent(location.href.replace(a,""))}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.10.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,a){return t(a).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("
      ").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():a,newPanel:h};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,c))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})})(jQuery);(function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.4",options:{content:function(){var e=t(this).attr("title")||"";return t("").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var a,r,h,l=t.extend({},this.options.position);if(n){if(a=this._find(s),a.length)return a.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!0),this._hide(o,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("
      ").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("
      ").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})})(jQuery);(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=h(),n=s._rgba=[];return i=i.toLowerCase(),f(l,function(t,a){var o,r=a.re.exec(i),l=r&&a.parse(r),h=a.space||"rgba";return l?(o=s[h](l),s[c[h].cache]=o[c[h].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=h.support={},p=t("

      ")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,o,r,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,l],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inArray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),a=c[n],o=0===this.alpha()?h("transparent"):this,r=o[a.cache]||a.to(o._rgba),l=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],h=s[a],c=u[n.type]||{};null!==h&&(null===o?l[a]=h:(c.mod&&(h-o>c.mod/2?o+=c.mod:o-h>c.mod/2&&(o-=c.mod)),l[a]=i((h-o)*e+o,n)))}),this[n](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),l=Math.min(s,n,a),h=r-l,c=r+l,u=.5*c;return e=l===r?0:s===r?60*(n-a)/h+360:n===r?60*(a-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,e+1/3)),Math.round(255*n(r,o,e)),Math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,l=n.to,c=n.from;h.fn[s]=function(s){if(l&&!this[o]&&(this[o]=l(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=h(c(d)),n[o]=d,n):h(d)},f(a,function(e,i){h.fn[e]||(h.fn[e]=function(n){var a,o=t.type(n),l="alpha"===e?this._hsla?"hsla":"rgba":s,h=this[l](),c=h[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parseFloat(a[2])*("+"===a[1]?1:-1))),h[i.idx]=n,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=h(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(l){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(o),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},a=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,a,o,r){var l=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",h=l.children?o.find("*").addBack():o;h=h.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),h=h.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,a){return s?t.effects.animateClass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateClass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.4",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("

      ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jQuery);(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,l=t(this),h=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(l,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",g=i.test(u),m={},v="show"===c;l.parent().is(".ui-effects-wrapper")?t.effects.save(l.parent(),h):t.effects.save(l,h),l.show(),a=t.effects.createWrapper(l).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,m[p]=v?o:0,g||(l.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:o+r),v&&(a.css(p,0),g||a.css(f,r+o)),a.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&l.hide(),t.effects.restore(l,h),t.effects.removeWrapper(l),n()}})}})(jQuery);(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"effect"),h="hide"===l,c="show"===l,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||h?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=o.queue(),y=b.length;for((c||h)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),d||(d=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-d:2*d).animate(a,g,m)),h&&(d/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m).animate(a,g,m),d=h?2*d:d/2;h&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m)),o.queue(function(){h&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jQuery);(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"hide"),h="show"===l,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[d](),h&&(n.css(d,0),n.css(p,a/2)),f[d]=h?a:0,f[p]=h?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){h||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setMode(n,e.mode||"hide"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(h,"pos"===c?-s:s),u[h]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var a,o,r,l,h,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(a=0;u>a;a++)for(l=m.top+a*_,c=a-(u-1)/2,o=0;d>o;o++)r=m.left+o*v,h=o-(d-1)/2,p.clone().appendTo("body").wrap("
      ").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?h*v:0),top:l+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:h*v),top:l+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}})(jQuery);(function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}})(jQuery);(function(t){t.effects.effect.fold=function(e,i){var s,n,a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(a,e.mode||"hide"),l="show"===r,h="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=l!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(a,o),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[h?0:1]),l&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=l?n[0]:c,v[f[1]]=l?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){h&&a.hide(),t.effects.restore(a,o),t.effects.removeWrapper(a),i()})}})(jQuery);(function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}})(jQuery);(function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setMode(n,e.mode||"show"),o="show"===a,r="hide"===a,l=o||"hide"===a,h=2*(e.times||5)+(l?1:0),c=e.duration/h,u=0,d=n.queue(),p=d.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;h>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,h+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?l:{height:l.height*r,width:l.width*r,outerHeight:l.outerHeight*r,outerWidth:l.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",l=e.origin,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=l||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:h),n.to={height:h.height*c.y,width:h.width*c.x,outerHeight:h.outerHeight*c.y,outerWidth:h.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=o.css("position"),_=f?r:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===g||"both"===g)&&(a.from.y!==a.to.y&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.y,o.from),o.to=t.effects.setTransition(o,u,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.x,o.from),o.to=t.effects.setTransition(o,d,a.to.x,o.to))),("content"===g||"both"===g)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(h),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(n=t.effects.getBaseline(m,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===g||"both"===g)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),h=r.concat(u).concat(d),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,h),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,u,a.from.y,i.from),i.to=t.effects.setTransition(i,u,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,d,a.from.x,i.from),i.to=t.effects.setTransition(i,d,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,h)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",l=e.distance||20,h=e.times||3,c=2*h+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+l,g[d]=(p?"+=":"-=")+2*l,m[d]=(p?"-=":"+=")+2*l,n.animate(f,u,e.easing),s=1;h>s;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","width","height"],o=t.effects.setMode(n,e.mode||"show"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u={};t.effects.save(n,a),n.show(),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(h,c?isNaN(s)?"-"+s:-s:s),u[h]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrollTop():0,l=a?o.scrollLeft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("
      ").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-l,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}})(jQuery); \ No newline at end of file diff --git a/themes/greydragon/js/jquery.cycle.js b/themes/greydragon/js/jquery.cycle.js new file mode 100755 index 0000000..dc474ea --- /dev/null +++ b/themes/greydragon/js/jquery.cycle.js @@ -0,0 +1,1543 @@ +/*! + * jQuery Cycle Plugin (with Transition Definitions) + * Examples and documentation at: http://jquery.malsup.com/cycle/ + * Copyright (c) 2007-2013 M. Alsup + * Version: 3.0.3 (11-JUL-2013) + * Dual licensed under the MIT and GPL licenses. + * http://jquery.malsup.com/license.html + * Requires: jQuery v1.7.1 or later + */ +;(function($, undefined) { +"use strict"; + +var ver = '3.0.3'; + +function debug(s) { + if ($.fn.cycle.debug) + log(s); +} +function log() { + /*global console */ + if (window.console && console.log) + console.log('[cycle] ' + Array.prototype.join.call(arguments,' ')); +} +$.expr[':'].paused = function(el) { + return el.cyclePause; +}; + + +// the options arg can be... +// a number - indicates an immediate transition should occur to the given slide index +// a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc) +// an object - properties to control the slideshow +// +// the arg2 arg can be... +// the name of an fx (only used in conjunction with a numeric value for 'options') +// the value true (only used in first arg == 'resume') and indicates +// that the resume should occur immediately (not wait for next timeout) + +$.fn.cycle = function(options, arg2) { + var o = { s: this.selector, c: this.context }; + + // in 1.3+ we can fix mistakes with the ready state + if (this.length === 0 && options != 'stop') { + if (!$.isReady && o.s) { + log('DOM not ready, queuing slideshow'); + $(function() { + $(o.s,o.c).cycle(options,arg2); + }); + return this; + } + // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready() + log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)')); + return this; + } + + // iterate the matched nodeset + return this.each(function() { + var opts = handleArguments(this, options, arg2); + if (opts === false) + return; + + opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink; + + // stop existing slideshow for this container (if there is one) + if (this.cycleTimeout) + clearTimeout(this.cycleTimeout); + this.cycleTimeout = this.cyclePause = 0; + this.cycleStop = 0; // issue #108 + + var $cont = $(this); + var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children(); + var els = $slides.get(); + + if (els.length < 2) { + log('terminating; too few slides: ' + els.length); + return; + } + + var opts2 = buildOptions($cont, $slides, els, opts, o); + if (opts2 === false) + return; + + var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards); + + // if it's an auto slideshow, kick it off + if (startTime) { + startTime += (opts2.delay || 0); + if (startTime < 10) + startTime = 10; + debug('first timeout: ' + startTime); + this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts.backwards);}, startTime); + } + }); +}; + +function triggerPause(cont, byHover, onPager) { + var opts = $(cont).data('cycle.opts'); + if (!opts) + return; + var paused = !!cont.cyclePause; + if (paused && opts.paused) + opts.paused(cont, opts, byHover, onPager); + else if (!paused && opts.resumed) + opts.resumed(cont, opts, byHover, onPager); +} + +// process the args that were passed to the plugin fn +function handleArguments(cont, options, arg2) { + if (cont.cycleStop === undefined) + cont.cycleStop = 0; + if (options === undefined || options === null) + options = {}; + if (options.constructor == String) { + switch(options) { + case 'destroy': + case 'stop': + var opts = $(cont).data('cycle.opts'); + if (!opts) + return false; + cont.cycleStop++; // callbacks look for change + if (cont.cycleTimeout) + clearTimeout(cont.cycleTimeout); + cont.cycleTimeout = 0; + if (opts.elements) + $(opts.elements).stop(); + $(cont).removeData('cycle.opts'); + if (options == 'destroy') + destroy(cont, opts); + return false; + case 'toggle': + cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1; + checkInstantResume(cont.cyclePause, arg2, cont); + triggerPause(cont); + return false; + case 'pause': + cont.cyclePause = 1; + triggerPause(cont); + return false; + case 'resume': + cont.cyclePause = 0; + checkInstantResume(false, arg2, cont); + triggerPause(cont); + return false; + case 'prev': + case 'next': + opts = $(cont).data('cycle.opts'); + if (!opts) { + log('options not found, "prev/next" ignored'); + return false; + } + if (typeof arg2 == 'string') + opts.oneTimeFx = arg2; + $.fn.cycle[options](opts); + return false; + default: + options = { fx: options }; + } + return options; + } + else if (options.constructor == Number) { + // go to the requested slide + var num = options; + options = $(cont).data('cycle.opts'); + if (!options) { + log('options not found, can not advance slide'); + return false; + } + if (num < 0 || num >= options.elements.length) { + log('invalid slide index: ' + num); + return false; + } + options.nextSlide = num; + if (cont.cycleTimeout) { + clearTimeout(cont.cycleTimeout); + cont.cycleTimeout = 0; + } + if (typeof arg2 == 'string') + options.oneTimeFx = arg2; + go(options.elements, options, 1, num >= options.currSlide); + return false; + } + return options; + + function checkInstantResume(isPaused, arg2, cont) { + if (!isPaused && arg2 === true) { // resume now! + var options = $(cont).data('cycle.opts'); + if (!options) { + log('options not found, can not resume'); + return false; + } + if (cont.cycleTimeout) { + clearTimeout(cont.cycleTimeout); + cont.cycleTimeout = 0; + } + go(options.elements, options, 1, !options.backwards); + } + } +} + +function removeFilter(el, opts) { + if (!$.support.opacity && opts.cleartype && el.style.filter) { + try { el.style.removeAttribute('filter'); } + catch(smother) {} // handle old opera versions + } +} + +// unbind event handlers +function destroy(cont, opts) { + if (opts.next) + $(opts.next).unbind(opts.prevNextEvent); + if (opts.prev) + $(opts.prev).unbind(opts.prevNextEvent); + + if (opts.pager || opts.pagerAnchorBuilder) + $.each(opts.pagerAnchors || [], function() { + this.unbind().remove(); + }); + opts.pagerAnchors = null; + $(cont).unbind('mouseenter.cycle mouseleave.cycle'); + if (opts.destroy) // callback + opts.destroy(opts); +} + +// one-time initialization +function buildOptions($cont, $slides, els, options, o) { + var startingSlideSpecified; + // support metadata plugin (v1.0 and v2.0) + var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {}); + var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null; + if (meta) + opts = $.extend(opts, meta); + if (opts.autostop) + opts.countdown = opts.autostopCount || els.length; + + var cont = $cont[0]; + $cont.data('cycle.opts', opts); + opts.$cont = $cont; + opts.stopCount = cont.cycleStop; + opts.elements = els; + opts.before = opts.before ? [opts.before] : []; + opts.after = opts.after ? [opts.after] : []; + + // push some after callbacks + if (!$.support.opacity && opts.cleartype) + opts.after.push(function() { removeFilter(this, opts); }); + if (opts.continuous) + opts.after.push(function() { go(els,opts,0,!opts.backwards); }); + + saveOriginalOpts(opts); + + // clearType corrections + if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg) + clearTypeFix($slides); + + // container requires non-static position so that slides can be position within + if ($cont.css('position') == 'static') + $cont.css('position', 'relative'); + if (opts.width) + $cont.width(opts.width); + if (opts.height && opts.height != 'auto') + $cont.height(opts.height); + + if (opts.startingSlide !== undefined) { + opts.startingSlide = parseInt(opts.startingSlide,10); + if (opts.startingSlide >= els.length || opts.startSlide < 0) + opts.startingSlide = 0; // catch bogus input + else + startingSlideSpecified = true; + } + else if (opts.backwards) + opts.startingSlide = els.length - 1; + else + opts.startingSlide = 0; + + // if random, mix up the slide array + if (opts.random) { + opts.randomMap = []; + for (var i = 0; i < els.length; i++) + opts.randomMap.push(i); + opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;}); + if (startingSlideSpecified) { + // try to find the specified starting slide and if found set start slide index in the map accordingly + for ( var cnt = 0; cnt < els.length; cnt++ ) { + if ( opts.startingSlide == opts.randomMap[cnt] ) { + opts.randomIndex = cnt; + } + } + } + else { + opts.randomIndex = 1; + opts.startingSlide = opts.randomMap[1]; + } + } + else if (opts.startingSlide >= els.length) + opts.startingSlide = 0; // catch bogus input + opts.currSlide = opts.startingSlide || 0; + var first = opts.startingSlide; + + // set position and zIndex on all the slides + $slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) { + var z; + if (opts.backwards) + z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i; + else + z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i; + $(this).css('z-index', z); + }); + + // make sure first slide is visible + $(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case + removeFilter(els[first], opts); + + // stretch slides + if (opts.fit) { + if (!opts.aspect) { + if (opts.width) + $slides.width(opts.width); + if (opts.height && opts.height != 'auto') + $slides.height(opts.height); + } else { + $slides.each(function(){ + var $slide = $(this); + var ratio = (opts.aspect === true) ? $slide.width()/$slide.height() : opts.aspect; + if( opts.width && $slide.width() != opts.width ) { + $slide.width( opts.width ); + $slide.height( opts.width / ratio ); + } + + if( opts.height && $slide.height() < opts.height ) { + $slide.height( opts.height ); + $slide.width( opts.height * ratio ); + } + }); + } + } + + if (opts.center && ((!opts.fit) || opts.aspect)) { + $slides.each(function(){ + var $slide = $(this); + $slide.css({ + "margin-left": opts.width ? + ((opts.width - $slide.width()) / 2) + "px" : + 0, + "margin-top": opts.height ? + ((opts.height - $slide.height()) / 2) + "px" : + 0 + }); + }); + } + + if (opts.center && !opts.fit && !opts.slideResize) { + $slides.each(function(){ + var $slide = $(this); + $slide.css({ + "margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0, + "margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0 + }); + }); + } + + // stretch container + var reshape = (opts.containerResize || opts.containerResizeHeight) && $cont.innerHeight() < 1; + if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9 + var maxw = 0, maxh = 0; + for(var j=0; j < els.length; j++) { + var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight(); + if (!w) w = e.offsetWidth || e.width || $e.attr('width'); + if (!h) h = e.offsetHeight || e.height || $e.attr('height'); + maxw = w > maxw ? w : maxw; + maxh = h > maxh ? h : maxh; + } + if (opts.containerResize && maxw > 0 && maxh > 0) + $cont.css({width:maxw+'px',height:maxh+'px'}); + if (opts.containerResizeHeight && maxh > 0) + $cont.css({height:maxh+'px'}); + } + + var pauseFlag = false; // https://github.com/malsup/cycle/issues/44 + if (opts.pause) + $cont.bind('mouseenter.cycle', function(){ + pauseFlag = true; + this.cyclePause++; + triggerPause(cont, true); + }).bind('mouseleave.cycle', function(){ + if (pauseFlag) + this.cyclePause--; + triggerPause(cont, true); + }); + + if (supportMultiTransitions(opts) === false) + return false; + + // apparently a lot of people use image slideshows without height/width attributes on the images. + // Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that. + var requeue = false; + options.requeueAttempts = options.requeueAttempts || 0; + $slides.each(function() { + // try to get height/width of each slide + var $el = $(this); + this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0); + this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0); + + if ( $el.is('img') ) { + var loading = (this.cycleH === 0 && this.cycleW === 0 && !this.complete); + // don't requeue for images that are still loading but have a valid size + if (loading) { + if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever + log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH); + setTimeout(function() {$(o.s,o.c).cycle(options);}, opts.requeueTimeout); + requeue = true; + return false; // break each loop + } + else { + log('could not determine size of image: '+this.src, this.cycleW, this.cycleH); + } + } + } + return true; + }); + + if (requeue) + return false; + + opts.cssBefore = opts.cssBefore || {}; + opts.cssAfter = opts.cssAfter || {}; + opts.cssFirst = opts.cssFirst || {}; + opts.animIn = opts.animIn || {}; + opts.animOut = opts.animOut || {}; + + $slides.not(':eq('+first+')').css(opts.cssBefore); + $($slides[first]).css(opts.cssFirst); + + if (opts.timeout) { + opts.timeout = parseInt(opts.timeout,10); + // ensure that timeout and speed settings are sane + if (opts.speed.constructor == String) + opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed,10); + if (!opts.sync) + opts.speed = opts.speed / 2; + + var buffer = opts.fx == 'none' ? 0 : opts.fx == 'shuffle' ? 500 : 250; + while((opts.timeout - opts.speed) < buffer) // sanitize timeout + opts.timeout += opts.speed; + } + if (opts.easing) + opts.easeIn = opts.easeOut = opts.easing; + if (!opts.speedIn) + opts.speedIn = opts.speed; + if (!opts.speedOut) + opts.speedOut = opts.speed; + + opts.slideCount = els.length; + opts.currSlide = opts.lastSlide = first; + if (opts.random) { + if (++opts.randomIndex == els.length) + opts.randomIndex = 0; + opts.nextSlide = opts.randomMap[opts.randomIndex]; + } + else if (opts.backwards) + opts.nextSlide = opts.startingSlide === 0 ? (els.length-1) : opts.startingSlide-1; + else + opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1; + + // run transition init fn + if (!opts.multiFx) { + var init = $.fn.cycle.transitions[opts.fx]; + if ($.isFunction(init)) + init($cont, $slides, opts); + else if (opts.fx != 'custom' && !opts.multiFx) { + log('unknown transition: ' + opts.fx,'; slideshow terminating'); + return false; + } + } + + // fire artificial events + var e0 = $slides[first]; + if (!opts.skipInitializationCallbacks) { + if (opts.before.length) + opts.before[0].apply(e0, [e0, e0, opts, true]); + if (opts.after.length) + opts.after[0].apply(e0, [e0, e0, opts, true]); + } + if (opts.next) + $(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);}); + if (opts.prev) + $(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);}); + if (opts.pager || opts.pagerAnchorBuilder) + buildPager(els,opts); + + exposeAddSlide(opts, els); + + return opts; +} + +// save off original opts so we can restore after clearing state +function saveOriginalOpts(opts) { + opts.original = { before: [], after: [] }; + opts.original.cssBefore = $.extend({}, opts.cssBefore); + opts.original.cssAfter = $.extend({}, opts.cssAfter); + opts.original.animIn = $.extend({}, opts.animIn); + opts.original.animOut = $.extend({}, opts.animOut); + $.each(opts.before, function() { opts.original.before.push(this); }); + $.each(opts.after, function() { opts.original.after.push(this); }); +} + +function supportMultiTransitions(opts) { + var i, tx, txs = $.fn.cycle.transitions; + // look for multiple effects + if (opts.fx.indexOf(',') > 0) { + opts.multiFx = true; + opts.fxs = opts.fx.replace(/\s*/g,'').split(','); + // discard any bogus effect names + for (i=0; i < opts.fxs.length; i++) { + var fx = opts.fxs[i]; + tx = txs[fx]; + if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) { + log('discarding unknown transition: ',fx); + opts.fxs.splice(i,1); + i--; + } + } + // if we have an empty list then we threw everything away! + if (!opts.fxs.length) { + log('No valid transitions named; slideshow terminating.'); + return false; + } + } + else if (opts.fx == 'all') { // auto-gen the list of transitions + opts.multiFx = true; + opts.fxs = []; + for (var p in txs) { + if (txs.hasOwnProperty(p)) { + tx = txs[p]; + if (txs.hasOwnProperty(p) && $.isFunction(tx)) + opts.fxs.push(p); + } + } + } + if (opts.multiFx && opts.randomizeEffects) { + // munge the fxs array to make effect selection random + var r1 = Math.floor(Math.random() * 20) + 30; + for (i = 0; i < r1; i++) { + var r2 = Math.floor(Math.random() * opts.fxs.length); + opts.fxs.push(opts.fxs.splice(r2,1)[0]); + } + debug('randomized fx sequence: ',opts.fxs); + } + return true; +} + +// provide a mechanism for adding slides after the slideshow has started +function exposeAddSlide(opts, els) { + opts.addSlide = function(newSlide, prepend) { + var $s = $(newSlide), s = $s[0]; + if (!opts.autostopCount) + opts.countdown++; + els[prepend?'unshift':'push'](s); + if (opts.els) + opts.els[prepend?'unshift':'push'](s); // shuffle needs this + opts.slideCount = els.length; + + // add the slide to the random map and resort + if (opts.random) { + opts.randomMap.push(opts.slideCount-1); + opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;}); + } + + $s.css('position','absolute'); + $s[prepend?'prependTo':'appendTo'](opts.$cont); + + if (prepend) { + opts.currSlide++; + opts.nextSlide++; + } + + if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg) + clearTypeFix($s); + + if (opts.fit && opts.width) + $s.width(opts.width); + if (opts.fit && opts.height && opts.height != 'auto') + $s.height(opts.height); + s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height(); + s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width(); + + $s.css(opts.cssBefore); + + if (opts.pager || opts.pagerAnchorBuilder) + $.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts); + + if ($.isFunction(opts.onAddSlide)) + opts.onAddSlide($s); + else + $s.hide(); // default behavior + }; +} + +// reset internal state; we do this on every pass in order to support multiple effects +$.fn.cycle.resetState = function(opts, fx) { + fx = fx || opts.fx; + opts.before = []; opts.after = []; + opts.cssBefore = $.extend({}, opts.original.cssBefore); + opts.cssAfter = $.extend({}, opts.original.cssAfter); + opts.animIn = $.extend({}, opts.original.animIn); + opts.animOut = $.extend({}, opts.original.animOut); + opts.fxFn = null; + $.each(opts.original.before, function() { opts.before.push(this); }); + $.each(opts.original.after, function() { opts.after.push(this); }); + + // re-init + var init = $.fn.cycle.transitions[fx]; + if ($.isFunction(init)) + init(opts.$cont, $(opts.elements), opts); +}; + +// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt +function go(els, opts, manual, fwd) { + var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide]; + + // opts.busy is true if we're in the middle of an animation + if (manual && opts.busy && opts.manualTrump) { + // let manual transitions requests trump active ones + debug('manualTrump in go(), stopping active transition'); + $(els).stop(true,true); + opts.busy = 0; + clearTimeout(p.cycleTimeout); + } + + // don't begin another timeout-based transition if there is one active + if (opts.busy) { + debug('transition active, ignoring new tx request'); + return; + } + + + // stop cycling if we have an outstanding stop request + if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual) + return; + + // check to see if we should stop cycling based on autostop options + if (!manual && !p.cyclePause && !opts.bounce && + ((opts.autostop && (--opts.countdown <= 0)) || + (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) { + if (opts.end) + opts.end(opts); + return; + } + + // if slideshow is paused, only transition on a manual trigger + var changed = false; + if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) { + changed = true; + var fx = opts.fx; + // keep trying to get the slide size if we don't have it yet + curr.cycleH = curr.cycleH || $(curr).height(); + curr.cycleW = curr.cycleW || $(curr).width(); + next.cycleH = next.cycleH || $(next).height(); + next.cycleW = next.cycleW || $(next).width(); + + // support multiple transition types + if (opts.multiFx) { + if (fwd && (opts.lastFx === undefined || ++opts.lastFx >= opts.fxs.length)) + opts.lastFx = 0; + else if (!fwd && (opts.lastFx === undefined || --opts.lastFx < 0)) + opts.lastFx = opts.fxs.length - 1; + fx = opts.fxs[opts.lastFx]; + } + + // one-time fx overrides apply to: $('div').cycle(3,'zoom'); + if (opts.oneTimeFx) { + fx = opts.oneTimeFx; + opts.oneTimeFx = null; + } + + $.fn.cycle.resetState(opts, fx); + + // run the before callbacks + if (opts.before.length) + $.each(opts.before, function(i,o) { + if (p.cycleStop != opts.stopCount) return; + o.apply(next, [curr, next, opts, fwd]); + }); + + // stage the after callacks + var after = function() { + opts.busy = 0; + $.each(opts.after, function(i,o) { + if (p.cycleStop != opts.stopCount) return; + o.apply(next, [curr, next, opts, fwd]); + }); + if (!p.cycleStop) { + // queue next transition + queueNext(); + } + }; + + debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide); + + // get ready to perform the transition + opts.busy = 1; + if (opts.fxFn) // fx function provided? + opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent); + else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ? + $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent); + else + $.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent); + } + else { + queueNext(); + } + + if (changed || opts.nextSlide == opts.currSlide) { + // calculate the next slide + var roll; + opts.lastSlide = opts.currSlide; + if (opts.random) { + opts.currSlide = opts.nextSlide; + if (++opts.randomIndex == els.length) { + opts.randomIndex = 0; + opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;}); + } + opts.nextSlide = opts.randomMap[opts.randomIndex]; + if (opts.nextSlide == opts.currSlide) + opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1; + } + else if (opts.backwards) { + roll = (opts.nextSlide - 1) < 0; + if (roll && opts.bounce) { + opts.backwards = !opts.backwards; + opts.nextSlide = 1; + opts.currSlide = 0; + } + else { + opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1; + opts.currSlide = roll ? 0 : opts.nextSlide+1; + } + } + else { // sequence + roll = (opts.nextSlide + 1) == els.length; + if (roll && opts.bounce) { + opts.backwards = !opts.backwards; + opts.nextSlide = els.length-2; + opts.currSlide = els.length-1; + } + else { + opts.nextSlide = roll ? 0 : opts.nextSlide+1; + opts.currSlide = roll ? els.length-1 : opts.nextSlide-1; + } + } + } + if (changed && opts.pager) + opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass); + + function queueNext() { + // stage the next transition + var ms = 0, timeout = opts.timeout; + if (opts.timeout && !opts.continuous) { + ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd); + if (opts.fx == 'shuffle') + ms -= opts.speedOut; + } + else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic + ms = 10; + if (ms > 0) + p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards); }, ms); + } +} + +// invoked after transition +$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) { + $(pager).each(function() { + $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName); + }); +}; + +// calculate timeout value for current transition +function getTimeout(curr, next, opts, fwd) { + if (opts.timeoutFn) { + // call user provided calc fn + var t = opts.timeoutFn.call(curr,curr,next,opts,fwd); + while (opts.fx != 'none' && (t - opts.speed) < 250) // sanitize timeout + t += opts.speed; + debug('calculated timeout: ' + t + '; speed: ' + opts.speed); + if (t !== false) + return t; + } + return opts.timeout; +} + +// expose next/prev function, caller must pass in state +$.fn.cycle.next = function(opts) { advance(opts,1); }; +$.fn.cycle.prev = function(opts) { advance(opts,0);}; + +// advance slide forward or back +function advance(opts, moveForward) { + var val = moveForward ? 1 : -1; + var els = opts.elements; + var p = opts.$cont[0], timeout = p.cycleTimeout; + if (timeout) { + clearTimeout(timeout); + p.cycleTimeout = 0; + } + if (opts.random && val < 0) { + // move back to the previously display slide + opts.randomIndex--; + if (--opts.randomIndex == -2) + opts.randomIndex = els.length-2; + else if (opts.randomIndex == -1) + opts.randomIndex = els.length-1; + opts.nextSlide = opts.randomMap[opts.randomIndex]; + } + else if (opts.random) { + opts.nextSlide = opts.randomMap[opts.randomIndex]; + } + else { + opts.nextSlide = opts.currSlide + val; + if (opts.nextSlide < 0) { + if (opts.nowrap) return false; + opts.nextSlide = els.length - 1; + } + else if (opts.nextSlide >= els.length) { + if (opts.nowrap) return false; + opts.nextSlide = 0; + } + } + + var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated + if ($.isFunction(cb)) + cb(val > 0, opts.nextSlide, els[opts.nextSlide]); + go(els, opts, 1, moveForward); + return false; +} + +function buildPager(els, opts) { + var $p = $(opts.pager); + $.each(els, function(i,o) { + $.fn.cycle.createPagerAnchor(i,o,$p,els,opts); + }); + opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass); +} + +$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) { + var a; + if ($.isFunction(opts.pagerAnchorBuilder)) { + a = opts.pagerAnchorBuilder(i,el); + debug('pagerAnchorBuilder('+i+', el) returned: ' + a); + } + else + a = '
      '+(i+1)+''; + + if (!a) + return; + var $a = $(a); + // don't reparent if anchor is in the dom + if ($a.parents('body').length === 0) { + var arr = []; + if ($p.length > 1) { + $p.each(function() { + var $clone = $a.clone(true); + $(this).append($clone); + arr.push($clone[0]); + }); + $a = $(arr); + } + else { + $a.appendTo($p); + } + } + + opts.pagerAnchors = opts.pagerAnchors || []; + opts.pagerAnchors.push($a); + + var pagerFn = function(e) { + e.preventDefault(); + opts.nextSlide = i; + var p = opts.$cont[0], timeout = p.cycleTimeout; + if (timeout) { + clearTimeout(timeout); + p.cycleTimeout = 0; + } + var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated + if ($.isFunction(cb)) + cb(opts.nextSlide, els[opts.nextSlide]); + go(els,opts,1,opts.currSlide < i); // trigger the trans +// return false; // <== allow bubble + }; + + if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) { + $a.hover(pagerFn, function(){/* no-op */} ); + } + else { + $a.bind(opts.pagerEvent, pagerFn); + } + + if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble) + $a.bind('click.cycle', function(){return false;}); // suppress click + + var cont = opts.$cont[0]; + var pauseFlag = false; // https://github.com/malsup/cycle/issues/44 + if (opts.pauseOnPagerHover) { + $a.hover( + function() { + pauseFlag = true; + cont.cyclePause++; + triggerPause(cont,true,true); + }, function() { + if (pauseFlag) + cont.cyclePause--; + triggerPause(cont,true,true); + } + ); + } +}; + +// helper fn to calculate the number of slides between the current and the next +$.fn.cycle.hopsFromLast = function(opts, fwd) { + var hops, l = opts.lastSlide, c = opts.currSlide; + if (fwd) + hops = c > l ? c - l : opts.slideCount - l; + else + hops = c < l ? l - c : l + opts.slideCount - c; + return hops; +}; + +// fix clearType problems in ie6 by setting an explicit bg color +// (otherwise text slides look horrible during a fade transition) +function clearTypeFix($slides) { + debug('applying clearType background-color hack'); + function hex(s) { + s = parseInt(s,10).toString(16); + return s.length < 2 ? '0'+s : s; + } + function getBg(e) { + for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) { + var v = $.css(e,'background-color'); + if (v && v.indexOf('rgb') >= 0 ) { + var rgb = v.match(/\d+/g); + return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]); + } + if (v && v != 'transparent') + return v; + } + return '#ffffff'; + } + $slides.each(function() { $(this).css('background-color', getBg(this)); }); +} + +// reset common props before the next transition +$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) { + $(opts.elements).not(curr).hide(); + if (typeof opts.cssBefore.opacity == 'undefined') + opts.cssBefore.opacity = 1; + opts.cssBefore.display = 'block'; + if (opts.slideResize && w !== false && next.cycleW > 0) + opts.cssBefore.width = next.cycleW; + if (opts.slideResize && h !== false && next.cycleH > 0) + opts.cssBefore.height = next.cycleH; + opts.cssAfter = opts.cssAfter || {}; + opts.cssAfter.display = 'none'; + $(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0)); + $(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1)); +}; + +// the actual fn for effecting a transition +$.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) { + var $l = $(curr), $n = $(next); + var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut, animInDelay = opts.animInDelay, animOutDelay = opts.animOutDelay; + $n.css(opts.cssBefore); + if (speedOverride) { + if (typeof speedOverride == 'number') + speedIn = speedOut = speedOverride; + else + speedIn = speedOut = 1; + easeIn = easeOut = null; + } + var fn = function() { + $n.delay(animInDelay).animate(opts.animIn, speedIn, easeIn, function() { + cb(); + }); + }; + $l.delay(animOutDelay).animate(opts.animOut, speedOut, easeOut, function() { + $l.css(opts.cssAfter); + if (!opts.sync) + fn(); + }); + if (opts.sync) fn(); +}; + +// transition definitions - only fade is defined here, transition pack defines the rest +$.fn.cycle.transitions = { + fade: function($cont, $slides, opts) { + $slides.not(':eq('+opts.currSlide+')').css('opacity',0); + opts.before.push(function(curr,next,opts) { + $.fn.cycle.commonReset(curr,next,opts); + opts.cssBefore.opacity = 0; + }); + opts.animIn = { opacity: 1 }; + opts.animOut = { opacity: 0 }; + opts.cssBefore = { top: 0, left: 0 }; + } +}; + +$.fn.cycle.ver = function() { return ver; }; + +// override these globally if you like (they are all optional) +$.fn.cycle.defaults = { + activePagerClass: 'activeSlide', // class name used for the active pager link + after: null, // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag) + allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling + animIn: null, // properties that define how the slide animates in + animInDelay: 0, // allows delay before next slide transitions in + animOut: null, // properties that define how the slide animates out + animOutDelay: 0, // allows delay before current slide transitions out + aspect: false, // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option) + autostop: 0, // true to end slideshow after X transitions (where X == slide count) + autostopCount: 0, // number of transitions (optionally used with autostop to define X) + backwards: false, // true to start slideshow at last slide and move backwards through the stack + before: null, // transition callback (scope set to element to be shown): function(currSlideElement, nextSlideElement, options, forwardFlag) + center: null, // set to true to have cycle add top/left margin to each slide (use with width and height options) + cleartype: !$.support.opacity, // true if clearType corrections should be applied (for IE) + cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides) + containerResize: 1, // resize container to fit largest slide + containerResizeHeight: 0, // resize containers height to fit the largest slide but leave the width dynamic + continuous: 0, // true to start next transition immediately after current one completes + cssAfter: null, // properties that defined the state of the slide after transitioning out + cssBefore: null, // properties that define the initial state of the slide before transitioning in + delay: 0, // additional delay (in ms) for first transition (hint: can be negative) + easeIn: null, // easing for "in" transition + easeOut: null, // easing for "out" transition + easing: null, // easing method for both in and out transitions + end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options) + fastOnEvent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms + fit: 0, // force slides to fit container + fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle') + fxFn: null, // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag) + height: 'auto', // container height (if the 'fit' option is true, the slides will be set to this height as well) + manualTrump: true, // causes manual transition to stop an active transition instead of being ignored + metaAttr: 'cycle', // data- attribute that holds the option data for the slideshow + next: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for next slide + nowrap: 0, // true to prevent slideshow from wrapping + onPagerEvent: null, // callback fn for pager events: function(zeroBasedSlideIndex, slideElement) + onPrevNextEvent: null, // callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement) + pager: null, // element, jQuery object, or jQuery selector string for the element to use as pager container + pagerAnchorBuilder: null, // callback fn for building anchor links: function(index, DOMelement) + pagerEvent: 'click.cycle', // name of event which drives the pager navigation + pause: 0, // true to enable "pause on hover" + pauseOnPagerHover: 0, // true to pause when hovering over pager link + prev: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for previous slide + prevNextEvent: 'click.cycle',// event which drives the manual transition to the previous or next slide + random: 0, // true for random, false for sequence (not applicable to shuffle fx) + randomizeEffects: 1, // valid when multiple effects are used; true to make the effect sequence random + requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded + requeueTimeout: 250, // ms delay for requeue + rev: 0, // causes animations to transition in reverse (for effects that support it such as scrollHorz/scrollVert/shuffle) + shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 } + skipInitializationCallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition + slideExpr: null, // expression for selecting slides (if something other than all children is required) + slideResize: 1, // force slide width/height to fixed size before every transition + speed: 1000, // speed of the transition (any valid fx speed value) + speedIn: null, // speed of the 'in' transition + speedOut: null, // speed of the 'out' transition + startingSlide: undefined,// zero-based index of the first slide to be displayed + sync: 1, // true if in/out transitions should occur simultaneously + timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance) + timeoutFn: null, // callback for determining per-slide timeout value: function(currSlideElement, nextSlideElement, options, forwardFlag) + updateActivePagerLink: null,// callback fn invoked to update the active pager link (adds/removes activePagerClass style) + width: null // container width (if the 'fit' option is true, the slides will be set to this width as well) +}; + +})(jQuery); + + +/*! + * jQuery Cycle Plugin Transition Definitions + * This script is a plugin for the jQuery Cycle Plugin + * Examples and documentation at: http://malsup.com/jquery/cycle/ + * Copyright (c) 2007-2010 M. Alsup + * Version: 2.73 + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ +(function($) { +"use strict"; + +// +// These functions define slide initialization and properties for the named +// transitions. To save file size feel free to remove any of these that you +// don't need. +// +$.fn.cycle.transitions.none = function($cont, $slides, opts) { + opts.fxFn = function(curr,next,opts,after){ + $(next).show(); + $(curr).hide(); + after(); + }; +}; + +// not a cross-fade, fadeout only fades out the top slide +$.fn.cycle.transitions.fadeout = function($cont, $slides, opts) { + $slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 }); + opts.before.push(function(curr,next,opts,w,h,rev) { + $(curr).css('zIndex',opts.slideCount + (rev !== true ? 1 : 0)); + $(next).css('zIndex',opts.slideCount + (rev !== true ? 0 : 1)); + }); + opts.animIn.opacity = 1; + opts.animOut.opacity = 0; + opts.cssBefore.opacity = 1; + opts.cssBefore.display = 'block'; + opts.cssAfter.zIndex = 0; +}; + +// scrollUp/Down/Left/Right +$.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) { + $cont.css('overflow','hidden'); + opts.before.push($.fn.cycle.commonReset); + var h = $cont.height(); + opts.cssBefore.top = h; + opts.cssBefore.left = 0; + opts.cssFirst.top = 0; + opts.animIn.top = 0; + opts.animOut.top = -h; +}; +$.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) { + $cont.css('overflow','hidden'); + opts.before.push($.fn.cycle.commonReset); + var h = $cont.height(); + opts.cssFirst.top = 0; + opts.cssBefore.top = -h; + opts.cssBefore.left = 0; + opts.animIn.top = 0; + opts.animOut.top = h; +}; +$.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) { + $cont.css('overflow','hidden'); + opts.before.push($.fn.cycle.commonReset); + var w = $cont.width(); + opts.cssFirst.left = 0; + opts.cssBefore.left = w; + opts.cssBefore.top = 0; + opts.animIn.left = 0; + opts.animOut.left = 0-w; +}; +$.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) { + $cont.css('overflow','hidden'); + opts.before.push($.fn.cycle.commonReset); + var w = $cont.width(); + opts.cssFirst.left = 0; + opts.cssBefore.left = -w; + opts.cssBefore.top = 0; + opts.animIn.left = 0; + opts.animOut.left = w; +}; +$.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) { + $cont.css('overflow','hidden').width(); + opts.before.push(function(curr, next, opts, fwd) { + if (opts.rev) + fwd = !fwd; + $.fn.cycle.commonReset(curr,next,opts); + opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW); + opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW; + }); + opts.cssFirst.left = 0; + opts.cssBefore.top = 0; + opts.animIn.left = 0; + opts.animOut.top = 0; +}; +$.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) { + $cont.css('overflow','hidden'); + opts.before.push(function(curr, next, opts, fwd) { + if (opts.rev) + fwd = !fwd; + $.fn.cycle.commonReset(curr,next,opts); + opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1); + opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH; + }); + opts.cssFirst.top = 0; + opts.cssBefore.left = 0; + opts.animIn.top = 0; + opts.animOut.left = 0; +}; + +// slideX/slideY +$.fn.cycle.transitions.slideX = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $(opts.elements).not(curr).hide(); + $.fn.cycle.commonReset(curr,next,opts,false,true); + opts.animIn.width = next.cycleW; + }); + opts.cssBefore.left = 0; + opts.cssBefore.top = 0; + opts.cssBefore.width = 0; + opts.animIn.width = 'show'; + opts.animOut.width = 0; +}; +$.fn.cycle.transitions.slideY = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $(opts.elements).not(curr).hide(); + $.fn.cycle.commonReset(curr,next,opts,true,false); + opts.animIn.height = next.cycleH; + }); + opts.cssBefore.left = 0; + opts.cssBefore.top = 0; + opts.cssBefore.height = 0; + opts.animIn.height = 'show'; + opts.animOut.height = 0; +}; + +// shuffle +$.fn.cycle.transitions.shuffle = function($cont, $slides, opts) { + var i, w = $cont.css('overflow', 'visible').width(); + $slides.css({left: 0, top: 0}); + opts.before.push(function(curr,next,opts) { + $.fn.cycle.commonReset(curr,next,opts,true,true,true); + }); + // only adjust speed once! + if (!opts.speedAdjusted) { + opts.speed = opts.speed / 2; // shuffle has 2 transitions + opts.speedAdjusted = true; + } + opts.random = 0; + opts.shuffle = opts.shuffle || {left:-w, top:15}; + opts.els = []; + for (i=0; i < $slides.length; i++) + opts.els.push($slides[i]); + + for (i=0; i < opts.currSlide; i++) + opts.els.push(opts.els.shift()); + + // custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!) + opts.fxFn = function(curr, next, opts, cb, fwd) { + if (opts.rev) + fwd = !fwd; + var $el = fwd ? $(curr) : $(next); + $(next).css(opts.cssBefore); + var count = opts.slideCount; + $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() { + var hops = $.fn.cycle.hopsFromLast(opts, fwd); + for (var k=0; k < hops; k++) { + if (fwd) + opts.els.push(opts.els.shift()); + else + opts.els.unshift(opts.els.pop()); + } + if (fwd) { + for (var i=0, len=opts.els.length; i < len; i++) + $(opts.els[i]).css('z-index', len-i+count); + } + else { + var z = $(curr).css('z-index'); + $el.css('z-index', parseInt(z,10)+1+count); + } + $el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() { + $(fwd ? this : curr).hide(); + if (cb) cb(); + }); + }); + }; + $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 }); +}; + +// turnUp/Down/Left/Right +$.fn.cycle.transitions.turnUp = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,false); + opts.cssBefore.top = next.cycleH; + opts.animIn.height = next.cycleH; + opts.animOut.width = next.cycleW; + }); + opts.cssFirst.top = 0; + opts.cssBefore.left = 0; + opts.cssBefore.height = 0; + opts.animIn.top = 0; + opts.animOut.height = 0; +}; +$.fn.cycle.transitions.turnDown = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,false); + opts.animIn.height = next.cycleH; + opts.animOut.top = curr.cycleH; + }); + opts.cssFirst.top = 0; + opts.cssBefore.left = 0; + opts.cssBefore.top = 0; + opts.cssBefore.height = 0; + opts.animOut.height = 0; +}; +$.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,true); + opts.cssBefore.left = next.cycleW; + opts.animIn.width = next.cycleW; + }); + opts.cssBefore.top = 0; + opts.cssBefore.width = 0; + opts.animIn.left = 0; + opts.animOut.width = 0; +}; +$.fn.cycle.transitions.turnRight = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,true); + opts.animIn.width = next.cycleW; + opts.animOut.left = curr.cycleW; + }); + $.extend(opts.cssBefore, { top: 0, left: 0, width: 0 }); + opts.animIn.left = 0; + opts.animOut.width = 0; +}; + +// zoom +$.fn.cycle.transitions.zoom = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,false,true); + opts.cssBefore.top = next.cycleH/2; + opts.cssBefore.left = next.cycleW/2; + $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH }); + $.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 }); + }); + opts.cssFirst.top = 0; + opts.cssFirst.left = 0; + opts.cssBefore.width = 0; + opts.cssBefore.height = 0; +}; + +// fadeZoom +$.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,false); + opts.cssBefore.left = next.cycleW/2; + opts.cssBefore.top = next.cycleH/2; + $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH }); + }); + opts.cssBefore.width = 0; + opts.cssBefore.height = 0; + opts.animOut.opacity = 0; +}; + +// blindX +$.fn.cycle.transitions.blindX = function($cont, $slides, opts) { + var w = $cont.css('overflow','hidden').width(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts); + opts.animIn.width = next.cycleW; + opts.animOut.left = curr.cycleW; + }); + opts.cssBefore.left = w; + opts.cssBefore.top = 0; + opts.animIn.left = 0; + opts.animOut.left = w; +}; +// blindY +$.fn.cycle.transitions.blindY = function($cont, $slides, opts) { + var h = $cont.css('overflow','hidden').height(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts); + opts.animIn.height = next.cycleH; + opts.animOut.top = curr.cycleH; + }); + opts.cssBefore.top = h; + opts.cssBefore.left = 0; + opts.animIn.top = 0; + opts.animOut.top = h; +}; +// blindZ +$.fn.cycle.transitions.blindZ = function($cont, $slides, opts) { + var h = $cont.css('overflow','hidden').height(); + var w = $cont.width(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts); + opts.animIn.height = next.cycleH; + opts.animOut.top = curr.cycleH; + }); + opts.cssBefore.top = h; + opts.cssBefore.left = w; + opts.animIn.top = 0; + opts.animIn.left = 0; + opts.animOut.top = h; + opts.animOut.left = w; +}; + +// growX - grow horizontally from centered 0 width +$.fn.cycle.transitions.growX = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,true); + opts.cssBefore.left = this.cycleW/2; + opts.animIn.left = 0; + opts.animIn.width = this.cycleW; + opts.animOut.left = 0; + }); + opts.cssBefore.top = 0; + opts.cssBefore.width = 0; +}; +// growY - grow vertically from centered 0 height +$.fn.cycle.transitions.growY = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,false); + opts.cssBefore.top = this.cycleH/2; + opts.animIn.top = 0; + opts.animIn.height = this.cycleH; + opts.animOut.top = 0; + }); + opts.cssBefore.height = 0; + opts.cssBefore.left = 0; +}; + +// curtainX - squeeze in both edges horizontally +$.fn.cycle.transitions.curtainX = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,true,true); + opts.cssBefore.left = next.cycleW/2; + opts.animIn.left = 0; + opts.animIn.width = this.cycleW; + opts.animOut.left = curr.cycleW/2; + opts.animOut.width = 0; + }); + opts.cssBefore.top = 0; + opts.cssBefore.width = 0; +}; +// curtainY - squeeze in both edges vertically +$.fn.cycle.transitions.curtainY = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,false,true); + opts.cssBefore.top = next.cycleH/2; + opts.animIn.top = 0; + opts.animIn.height = next.cycleH; + opts.animOut.top = curr.cycleH/2; + opts.animOut.height = 0; + }); + opts.cssBefore.height = 0; + opts.cssBefore.left = 0; +}; + +// cover - curr slide covered by next slide +$.fn.cycle.transitions.cover = function($cont, $slides, opts) { + var d = opts.direction || 'left'; + var w = $cont.css('overflow','hidden').width(); + var h = $cont.height(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts); + opts.cssAfter.display = ''; + if (d == 'right') + opts.cssBefore.left = -w; + else if (d == 'up') + opts.cssBefore.top = h; + else if (d == 'down') + opts.cssBefore.top = -h; + else + opts.cssBefore.left = w; + }); + opts.animIn.left = 0; + opts.animIn.top = 0; + opts.cssBefore.top = 0; + opts.cssBefore.left = 0; +}; + +// uncover - curr slide moves off next slide +$.fn.cycle.transitions.uncover = function($cont, $slides, opts) { + var d = opts.direction || 'left'; + var w = $cont.css('overflow','hidden').width(); + var h = $cont.height(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,true,true); + if (d == 'right') + opts.animOut.left = w; + else if (d == 'up') + opts.animOut.top = -h; + else if (d == 'down') + opts.animOut.top = h; + else + opts.animOut.left = -w; + }); + opts.animIn.left = 0; + opts.animIn.top = 0; + opts.cssBefore.top = 0; + opts.cssBefore.left = 0; +}; + +// toss - move top slide and fade away +$.fn.cycle.transitions.toss = function($cont, $slides, opts) { + var w = $cont.css('overflow','visible').width(); + var h = $cont.height(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,true,true); + // provide default toss settings if animOut not provided + if (!opts.animOut.left && !opts.animOut.top) + $.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 }); + else + opts.animOut.opacity = 0; + }); + opts.cssBefore.left = 0; + opts.cssBefore.top = 0; + opts.animIn.left = 0; +}; + +// wipe - clip animation +$.fn.cycle.transitions.wipe = function($cont, $slides, opts) { + var w = $cont.css('overflow','hidden').width(); + var h = $cont.height(); + opts.cssBefore = opts.cssBefore || {}; + var clip; + if (opts.clip) { + if (/l2r/.test(opts.clip)) + clip = 'rect(0px 0px '+h+'px 0px)'; + else if (/r2l/.test(opts.clip)) + clip = 'rect(0px '+w+'px '+h+'px '+w+'px)'; + else if (/t2b/.test(opts.clip)) + clip = 'rect(0px '+w+'px 0px 0px)'; + else if (/b2t/.test(opts.clip)) + clip = 'rect('+h+'px '+w+'px '+h+'px 0px)'; + else if (/zoom/.test(opts.clip)) { + var top = parseInt(h/2,10); + var left = parseInt(w/2,10); + clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)'; + } + } + + opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)'; + + var d = opts.cssBefore.clip.match(/(\d+)/g); + var t = parseInt(d[0],10), r = parseInt(d[1],10), b = parseInt(d[2],10), l = parseInt(d[3],10); + + opts.before.push(function(curr, next, opts) { + if (curr == next) return; + var $curr = $(curr), $next = $(next); + $.fn.cycle.commonReset(curr,next,opts,true,true,false); + opts.cssAfter.display = 'block'; + + var step = 1, count = parseInt((opts.speedIn / 13),10) - 1; + (function f() { + var tt = t ? t - parseInt(step * (t/count),10) : 0; + var ll = l ? l - parseInt(step * (l/count),10) : 0; + var bb = b < h ? b + parseInt(step * ((h-b)/count || 1),10) : h; + var rr = r < w ? r + parseInt(step * ((w-r)/count || 1),10) : w; + $next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' }); + (step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none'); + })(); + }); + $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 }); + opts.animIn = { left: 0 }; + opts.animOut = { left: 0 }; +}; + +})(jQuery); diff --git a/themes/greydragon/js/jquery.form.custom.js b/themes/greydragon/js/jquery.form.custom.js new file mode 100755 index 0000000..796db12 --- /dev/null +++ b/themes/greydragon/js/jquery.form.custom.js @@ -0,0 +1,1076 @@ +/*! + * jQuery Form Plugin + * version: 3.09 (16-APR-2012) + * @requires jQuery v1.3.2 or later + * + * Examples and documentation at: http://malsup.com/jquery/form/ + * Project repository: https://github.com/malsup/form + * Dual licensed under the MIT and GPL licenses: + * http://malsup.github.com/mit-license.txt + * http://malsup.github.com/gpl-license-v2.txt + */ +/*global ActiveXObject alert */ +;(function($) { +"use strict"; + +/* + Usage Note: + ----------- + Do not use both ajaxSubmit and ajaxForm on the same form. These + functions are mutually exclusive. Use ajaxSubmit if you want + to bind your own submit handler to the form. For example, + + $(document).ready(function() { + $('#myForm').on('submit', function(e) { + e.preventDefault(); // <-- important + $(this).ajaxSubmit({ + target: '#output' + }); + }); + }); + + Use ajaxForm when you want the plugin to manage all the event binding + for you. For example, + + $(document).ready(function() { + $('#myForm').ajaxForm({ + target: '#output' + }); + }); + + You can also use ajaxForm with delegation (requires jQuery v1.7+), so the + form does not have to exist when you invoke ajaxForm: + + $('#myForm').ajaxForm({ + delegation: true, + target: '#output' + }); + + When using ajaxForm, the ajaxSubmit function will be invoked for you + at the appropriate time. +*/ + +/** + * Feature detection + */ +var feature = {}; +feature.fileapi = $("").get(0).files !== undefined; +feature.formdata = window.FormData !== undefined; + +/** + * ajaxSubmit() provides a mechanism for immediately submitting + * an HTML form using AJAX. + */ +$.fn.ajaxSubmit = function(options) { + /*jshint scripturl:true */ + + // fast fail if nothing selected (http://dev.jquery.com/ticket/2752) + if (!this.length) { + log('ajaxSubmit: skipping submit process - no element selected'); + return this; + } + + var method, action, url, $form = this; + + if (typeof options == 'function') { + options = { success: options }; + } + + method = this.attr('method'); + action = this.attr('action'); + url = (typeof action === 'string') ? $.trim(action) : ''; + url = url || window.location.href || ''; + if (url) { + // clean url (don't include hash vaue) + url = (url.match(/^([^#]+)/)||[])[1]; + } + + options = $.extend(true, { + url: url, + success: $.ajaxSettings.success, + type: method || 'GET', + iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank' + }, options); + + // hook for manipulating the form data before it is extracted; + // convenient for use with rich editors like tinyMCE or FCKEditor + var veto = {}; + this.trigger('form-pre-serialize', [this, options, veto]); + if (veto.veto) { + log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); + return this; + } + + // provide opportunity to alter form data before it is serialized + if (options.beforeSerialize && options.beforeSerialize(this, options) === false) { + log('ajaxSubmit: submit aborted via beforeSerialize callback'); + return this; + } + + var traditional = options.traditional; + if ( traditional === undefined ) { + traditional = $.ajaxSettings.traditional; + } + + var elements = []; + var qx, a = this.formToArray(options.semantic, elements); + if (options.data) { + options.extraData = options.data; + qx = $.param(options.data, traditional); + } + + // give pre-submit callback an opportunity to abort the submit + if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { + log('ajaxSubmit: submit aborted via beforeSubmit callback'); + return this; + } + + // fire vetoable 'validate' event + this.trigger('form-submit-validate', [a, this, options, veto]); + if (veto.veto) { + log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); + return this; + } + + var q = $.param(a, traditional); + if (qx) { + q = ( q ? (q + '&' + qx) : qx ); + } + if (options.type.toUpperCase() == 'GET') { + options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; + options.data = null; // data is null for 'get' + } + else { + options.data = q; // data is the query string for 'post' + } + + var callbacks = []; + if (options.resetForm) { + callbacks.push(function() { $form.resetForm(); }); + } + if (options.clearForm) { + callbacks.push(function() { $form.clearForm(options.includeHidden); }); + } + + // perform a load on the target only if dataType is not provided + if (!options.dataType && options.target) { + var oldSuccess = options.success || function(){}; + callbacks.push(function(data) { + var fn = options.replaceTarget ? 'replaceWith' : 'html'; + $(options.target)[fn](data).each(oldSuccess, arguments); + }); + } + else if (options.success) { + callbacks.push(options.success); + } + + options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg + var context = options.context || options; // jQuery 1.4+ supports scope context + for (var i=0, max=callbacks.length; i < max; i++) { + callbacks[i].apply(context, [data, status, xhr || $form, $form]); + } + }; + + // are there files to upload? + var fileInputs = $('input:file:enabled[value]', this); // [value] (issue #113) + var hasFileInputs = fileInputs.length > 0; + var mp = 'multipart/form-data'; + var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp); + + var fileAPI = feature.fileapi && feature.formdata; + log("fileAPI :" + fileAPI); + var shouldUseFrame = (hasFileInputs || multipart) && !fileAPI; + + // options.iframe allows user to force iframe mode + // 06-NOV-09: now defaulting to iframe mode if file input is detected + if (options.iframe !== false && (options.iframe || shouldUseFrame)) { + // hack to fix Safari hang (thanks to Tim Molendijk for this) + // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d + if (options.closeKeepAlive) { + $.get(options.closeKeepAlive, function() { + fileUploadIframe(a); + }); + } + else { + fileUploadIframe(a); + } + } + else if ((hasFileInputs || multipart) && fileAPI) { + fileUploadXhr(a); + } + else { + $.ajax(options); + } + + // clear element array + for (var k=0; k < elements.length; k++) + elements[k] = null; + + // fire 'notify' event + this.trigger('form-submit-notify', [this, options]); + return this; + + // XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz) + function fileUploadXhr(a) { + var formdata = new FormData(); + + for (var i=0; i < a.length; i++) { + formdata.append(a[i].name, a[i].value); + } + + if (options.extraData) { + for (var p in options.extraData) + if (options.extraData.hasOwnProperty(p)) + formdata.append(p, options.extraData[p]); + } + + options.data = null; + + var s = $.extend(true, {}, $.ajaxSettings, options, { + contentType: false, + processData: false, + cache: false, + type: 'POST' + }); + + if (options.uploadProgress) { + // workaround because jqXHR does not expose upload property + s.xhr = function() { + var xhr = jQuery.ajaxSettings.xhr(); + if (xhr.upload) { + xhr.upload.onprogress = function(event) { + var percent = 0; + var position = event.loaded || event.position; /*event.position is deprecated*/ + var total = event.total; + if (event.lengthComputable) { + percent = Math.ceil(position / total * 100); + } + options.uploadProgress(event, position, total, percent); + }; + } + return xhr; + }; + } + + s.data = null; + var beforeSend = s.beforeSend; + s.beforeSend = function(xhr, o) { + o.data = formdata; + if(beforeSend) + beforeSend.call(o, xhr, options); + }; + $.ajax(s); + } + + // private function for handling file uploads (hat tip to YAHOO!) + function fileUploadIframe(a) { + var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle; + var useProp = !!$.fn.prop; + + if ($(':input[name=submit],:input[id=submit]', form).length) { + // if there is an input with a name or id of 'submit' then we won't be + // able to invoke the submit fn on the form (at least not x-browser) + alert('Error: Form elements must not have name or id of "submit".'); + return; + } + + if (a) { + // ensure that every serialized input is still enabled + for (i=0; i < elements.length; i++) { + el = $(elements[i]); + if ( useProp ) + el.prop('disabled', false); + else + el.removeAttr('disabled'); + } + } + + s = $.extend(true, {}, $.ajaxSettings, options); + s.context = s.context || s; + id = 'jqFormIO' + (new Date().getTime()); + if (s.iframeTarget) { + $io = $(s.iframeTarget); + n = $io.attr('name'); + if (!n) + $io.attr('name', id); + else + id = n; + } + else { + $io = $('
      '; +return __p +}; +$(function () { + $('.' + _fotoramaClass + ':not([data-auto="false"])').fotorama(); +}); +})(window, document, location, window.jQuery); diff --git a/themes/imobile/js/fotorama.min.js b/themes/imobile/js/fotorama.min.js new file mode 100755 index 0000000..769958d --- /dev/null +++ b/themes/imobile/js/fotorama.min.js @@ -0,0 +1,2 @@ +(function(window,document,location,$,undefined){"use strict";var _fotoramaClass="fotorama",_fullscreenClass="fullscreen",wrapClass=_fotoramaClass+"__wrap",wrapCss2Class=wrapClass+"--css2",wrapCss3Class=wrapClass+"--css3",wrapVideoClass=wrapClass+"--video",wrapFadeClass=wrapClass+"--fade",wrapSlideClass=wrapClass+"--slide",wrapNoControlsClass=wrapClass+"--no-controls",wrapNoShadowsClass=wrapClass+"--no-shadows",wrapPanYClass=wrapClass+"--pan-y",wrapRtlClass=wrapClass+"--rtl",wrapOnlyActiveClass=wrapClass+"--only-active",stageClass=_fotoramaClass+"__stage",stageFrameClass=stageClass+"__frame",stageFrameVideoClass=stageFrameClass+"--video",stageShaftClass=stageClass+"__shaft",grabClass=_fotoramaClass+"__grab",pointerClass=_fotoramaClass+"__pointer",arrClass=_fotoramaClass+"__arr",arrDisabledClass=arrClass+"--disabled",arrPrevClass=arrClass+"--prev",arrNextClass=arrClass+"--next",arrArrClass=arrClass+"__arr",navClass=_fotoramaClass+"__nav",navWrapClass=navClass+"-wrap",navShaftClass=navClass+"__shaft",navDotsClass=navClass+"--dots",navThumbsClass=navClass+"--thumbs",navFrameClass=navClass+"__frame",navFrameDotClass=navFrameClass+"--dot",navFrameThumbClass=navFrameClass+"--thumb",fadeClass=_fotoramaClass+"__fade",fadeFrontClass=fadeClass+"-front",fadeRearClass=fadeClass+"-rear",shadowClass=_fotoramaClass+"__shadow",shadowsClass=shadowClass+"s",shadowsLeftClass=shadowsClass+"--left",shadowsRightClass=shadowsClass+"--right",activeClass=_fotoramaClass+"__active",selectClass=_fotoramaClass+"__select",hiddenClass=_fotoramaClass+"--hidden",fullscreenClass=_fotoramaClass+"--fullscreen",fullscreenIconClass=_fotoramaClass+"__fullscreen-icon",errorClass=_fotoramaClass+"__error",loadingClass=_fotoramaClass+"__loading",loadedClass=_fotoramaClass+"__loaded",loadedFullClass=loadedClass+"--full",loadedImgClass=loadedClass+"--img",grabbingClass=_fotoramaClass+"__grabbing",imgClass=_fotoramaClass+"__img",imgFullClass=imgClass+"--full",dotClass=_fotoramaClass+"__dot",thumbClass=_fotoramaClass+"__thumb",thumbBorderClass=thumbClass+"-border",htmlClass=_fotoramaClass+"__html",videoClass=_fotoramaClass+"__video",videoPlayClass=videoClass+"-play",videoCloseClass=videoClass+"-close",captionClass=_fotoramaClass+"__caption",captionWrapClass=_fotoramaClass+"__caption__wrap",spinnerClass=_fotoramaClass+"__spinner";var JQUERY_VERSION=$&&$.fn.jquery.split(".");if(!JQUERY_VERSION||JQUERY_VERSION[0]<1||JQUERY_VERSION[0]==1&&JQUERY_VERSION[1]<8){throw"Fotorama requires jQuery 1.8 or later and will not run without it.";return}var _={};var Modernizr=function(window,document,undefined){var version="2.6.2",Modernizr={},docElement=document.documentElement,mod="modernizr",modElem=document.createElement(mod),mStyle=modElem.style,inputElem,toString={}.toString,prefixes=" -webkit- -moz- -o- -ms- ".split(" "),omPrefixes="Webkit Moz O ms",cssomPrefixes=omPrefixes.split(" "),domPrefixes=omPrefixes.toLowerCase().split(" "),tests={},inputs={},attrs={},classes=[],slice=classes.slice,featureName,injectElementWithStyles=function(rule,callback,nodes,testnames){var style,ret,node,docOverflow,div=document.createElement("div"),body=document.body,fakeBody=body||document.createElement("body");if(parseInt(nodes,10)){while(nodes--){node=document.createElement("div");node.id=testnames?testnames[nodes]:mod+(nodes+1);div.appendChild(node)}}style=["­",'"].join("");div.id=mod;(body?div:fakeBody).innerHTML+=style;fakeBody.appendChild(div);if(!body){fakeBody.style.background="";fakeBody.style.overflow="hidden";docOverflow=docElement.style.overflow;docElement.style.overflow="hidden";docElement.appendChild(fakeBody)}ret=callback(div,rule);if(!body){fakeBody.parentNode.removeChild(fakeBody);docElement.style.overflow=docOverflow}else{div.parentNode.removeChild(div)}return!!ret},_hasOwnProperty={}.hasOwnProperty,hasOwnProp;if(!is(_hasOwnProperty,"undefined")&&!is(_hasOwnProperty.call,"undefined")){hasOwnProp=function(object,property){return _hasOwnProperty.call(object,property)}}else{hasOwnProp=function(object,property){return property in object&&is(object.constructor.prototype[property],"undefined")}}if(!Function.prototype.bind){Function.prototype.bind=function bind(that){var target=this;if(typeof target!="function"){throw new TypeError}var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var F=function(){};F.prototype=target.prototype;var self=new F;var result=target.apply(self,args.concat(slice.call(arguments)));if(Object(result)===result){return result}return self}else{return target.apply(that,args.concat(slice.call(arguments)))}};return bound}}function setCss(str){mStyle.cssText=str}function setCssAll(str1,str2){return setCss(prefixes.join(str1+";")+(str2||""))}function is(obj,type){return typeof obj===type}function contains(str,substr){return!!~(""+str).indexOf(substr)}function testProps(props,prefixed){for(var i in props){var prop=props[i];if(!contains(prop,"-")&&mStyle[prop]!==undefined){return prefixed=="pfx"?prop:true}}return false}function testDOMProps(props,obj,elem){for(var i in props){var item=obj[props[i]];if(item!==undefined){if(elem===false)return props[i];if(is(item,"function")){return item.bind(elem||obj)}return item}}return false}function testPropsAll(prop,prefixed,elem){var ucProp=prop.charAt(0).toUpperCase()+prop.slice(1),props=(prop+" "+cssomPrefixes.join(ucProp+" ")+ucProp).split(" ");if(is(prefixed,"string")||is(prefixed,"undefined")){return testProps(props,prefixed)}else{props=(prop+" "+domPrefixes.join(ucProp+" ")+ucProp).split(" ");return testDOMProps(props,prefixed,elem)}}tests["csstransforms3d"]=function(){var ret=!!testPropsAll("perspective");return ret};for(var feature in tests){if(hasOwnProp(tests,feature)){featureName=feature.toLowerCase();Modernizr[featureName]=tests[feature]();classes.push((Modernizr[featureName]?"":"no-")+featureName)}}Modernizr.addTest=function(feature,test){if(typeof feature=="object"){for(var key in feature){if(hasOwnProp(feature,key)){Modernizr.addTest(key,feature[key])}}}else{feature=feature.toLowerCase();if(Modernizr[feature]!==undefined){return Modernizr}test=typeof test=="function"?test():test;if(typeof enableClasses!=="undefined"&&enableClasses){docElement.className+=" "+(test?"":"no-")+feature}Modernizr[feature]=test}return Modernizr};setCss("");modElem=inputElem=null;Modernizr._version=version;Modernizr._prefixes=prefixes;Modernizr._domPrefixes=domPrefixes;Modernizr._cssomPrefixes=cssomPrefixes;Modernizr.testProp=function(prop){return testProps([prop])};Modernizr.testAllProps=testPropsAll;Modernizr.testStyles=injectElementWithStyles;Modernizr.prefixed=function(prop,obj,elem){if(!obj){return testPropsAll(prop,"pfx")}else{return testPropsAll(prop,obj,elem)}};return Modernizr}(window,document);var fullScreenApi={ok:false,is:function(){return false},request:function(){},cancel:function(){},event:"",prefix:""},browserPrefixes="webkit moz o ms khtml".split(" ");if(typeof document.cancelFullScreen!="undefined"){fullScreenApi.ok=true}else{for(var i=0,il=browserPrefixes.length;i>1):parseInt(o.left,10)+mid)+"px",top:(o.top=="auto"?tp.y-ep.y+(target.offsetHeight>>1):parseInt(o.top,10)+mid)+"px"})}el.setAttribute("role","progressbar");self.lines(el,self.opts);if(!useCssAnimations){var i=0,start=(o.lines-1)*(1-o.direction)/2,alpha,fps=o.fps,f=fps/o.speed,ostep=(1-o.opacity)/(f*o.trail/100),astep=f/o.lines;(function anim(){i++;for(var j=0;j>1)+"px"})}for(;i',attr)}sheet.addRule(".spin-vml","behavior:url(#default#VML)");Spinner.prototype.lines=function(el,o){var r=o.length+o.width,s=2*r;function grp(){return css(vml("group",{coordsize:s+" "+s,coordorigin:-r+" "+-r}),{width:s,height:s})}var margin=-(o.width+o.length)*2+"px",g=css(grp(),{position:"absolute",top:margin,left:margin}),i;function seg(i,dx,filter){ins(g,ins(css(grp(),{rotation:360/o.lines*i+"deg",left:~~dx}),ins(css(vml("roundrect",{arcsize:o.corners}),{width:r,height:o.width,left:o.radius,top:-o.width>>1,filter:filter}),vml("fill",{color:getColor(o.color,i),opacity:o.opacity}),vml("stroke",{opacity:0}))))}if(o.shadow)for(i=1;i<=o.lines;i++)seg(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=o.lines;i++)seg(i);return ins(el,g)};Spinner.prototype.opacity=function(el,i,val,o){var c=el.firstChild;o=o.shadow&&o.lines||0;if(c&&i+o=ratio,fitFLAG=method==="scaledown",containFLAG=method==="contain",coverFLAG=method==="cover";if(biggerRatioFLAG&&(fitFLAG||containFLAG)||!biggerRatioFLAG&&coverFLAG){width=minMaxLimit(measuresToFit.w,0,fitFLAG?width:Infinity);height=width/measures.ratio}else if(biggerRatioFLAG&&coverFLAG||!biggerRatioFLAG&&(fitFLAG||containFLAG)){height=minMaxLimit(measuresToFit.h,0,fitFLAG?height:Infinity);width=height*measures.ratio}$el.css({width:Math.ceil(width),height:Math.ceil(height),marginLeft:Math.floor(-width/2),marginTop:Math.floor(-height/2)});elData.l={W:measures.width,H:measures.height,r:measures.ratio,w:measuresToFit.w,h:measuresToFit.h,m:method}}return true}function setStyle($el,style){var el=$el[0];if(el.styleSheet){el.styleSheet.cssText=style}else{$el.html(style)}}function findShadowEdge(pos,min,max){return min===max?false:pos<=min?"left":pos>=max?"right":"left right"}function getIndexFromHash(hash,data,ok,startindex){if(!ok)return false;if(!isNaN(hash))return hash-(startindex?0:1);var index;for(var _i=0,_l=data.length;_i<_l;_i++){var dataFrame=data[_i];if(dataFrame.id===hash){index=_i;break}}return index}function smartClick($el,fn,_options){_options=_options||{};$el.each(function(){var $this=$(this),thisData=$this.data(),startEvent;if(thisData.clickOn)return;thisData.clickOn=true;$.extend(touch($this,{onStart:function(e){startEvent=e;(_options.onStart||noop).call(this,e)},onMove:_options.onMove||noop,onTouchEnd:_options.onTouchEnd||noop,onEnd:function(result){if(result.moved)return;fn.call(this,startEvent)}}),{noMove:true})})}function div(classes,child){return'
      '+(child||"")+"
      "}function shuffle(array){var l=array.length;while(l){var i=Math.floor(Math.random()*l--);var t=array[l];array[l]=array[i];array[i]=t}return array}function clone(array){return Object.prototype.toString.call(array)=="[object Array]"&&$.map(array,function(frame){return $.extend({},frame)})}function lockScroll(left,top){$WINDOW.scrollLeft(left).scrollTop(top)}function optionsToLowerCase(options){if(options){var opts={};$.each(options,function(key,value){opts[key.toLowerCase()]=value});return opts}}function getRatio(_ratio){if(!_ratio)return;var ratio=+_ratio;if(!isNaN(ratio)){return ratio}else{ratio=_ratio.split("/");return+ratio[0]/+ratio[1]||undefined}}function stopEvent(e,stopPropagation){e.preventDefault();stopPropagation&&e.stopPropagation()}function getDirectionSign(forward){return forward?">":"<"}function slide($el,options){var elData=$el.data(),elPos=Math.round(options.pos),onEndFn=function(){elData.sliding=false;(options.onEnd||noop)()};if(typeof options.overPos!=="undefined"&&options.overPos!==options.pos){elPos=options.overPos;onEndFn=function(){slide($el,$.extend({},options,{overPos:options.pos,time:Math.max(TRANSITION_DURATION,options.time/2)}))}}var translate=$.extend(getTranslate(elPos,options._001),options.width&&{width:options.width});elData.sliding=true;if(CSS3){$el.css($.extend(getDuration(options.time),translate));if(options.time>10){afterTransition($el,"transform",onEndFn,options.time)}else{onEndFn()}}else{$el.stop().animate(translate,options.time,BEZIER,onEndFn)}}function fade($el1,$el2,$frames,options,fadeStack,chain){var chainedFLAG=typeof chain!=="undefined";if(!chainedFLAG){fadeStack.push(arguments);Array.prototype.push.call(arguments,fadeStack.length);if(fadeStack.length>1)return}$el1=$el1||$($el1);$el2=$el2||$($el2);var _$el1=$el1[0],_$el2=$el2[0],crossfadeFLAG=options.method==="crossfade",onEndFn=function(){if(!onEndFn.done){onEndFn.done=true;var args=(chainedFLAG||fadeStack.shift())&&fadeStack.shift();args&&fade.apply(this,args);(options.onEnd||noop)(!!args)}},time=options.time/(chain||1);$frames.not($el1.addClass(fadeRearClass).removeClass(fadeFrontClass)).not($el2.addClass(fadeFrontClass).removeClass(fadeRearClass)).removeClass(fadeRearClass+" "+fadeFrontClass);$el1.stop();$el2.stop();crossfadeFLAG&&_$el2&&$el1.fadeTo(0,0);$el1.fadeTo(crossfadeFLAG?time:1,1,crossfadeFLAG&&onEndFn);$el2.fadeTo(time,0,onEndFn);_$el1&&crossfadeFLAG||_$el2||onEndFn()}var lastEvent,moveEventType,preventEvent,preventEventTimeout;function extendEvent(e){var touch=(e.touches||[])[0]||e;e._x=touch.pageX;e._y=touch.clientY;e._now=$.now()}function touch($el,options){var el=$el[0],tail={},touchEnabledFLAG,startEvent,$target,controlTouch,touchFLAG,targetIsSelectFLAG,targetIsLinkFlag,tolerance,moved;function onStart(e){$target=$(e.target);tail.checked=targetIsSelectFLAG=targetIsLinkFlag=moved=false;if(touchEnabledFLAG||tail.flow||e.touches&&e.touches.length>1||e.which>1||lastEvent&&lastEvent.type!==e.type&&preventEvent||(targetIsSelectFLAG=options.select&&$target.is(options.select,el)))return targetIsSelectFLAG;touchFLAG=e.type==="touchstart";targetIsLinkFlag=$target.is("a, a *",el);tolerance=tail.noMove||tail.noSwipe?16:!tail.snap?4:0;extendEvent(e);startEvent=lastEvent=e;moveEventType=e.type.replace(/down|start/,"move").replace(/Down/,"Move");controlTouch=tail.control;(options.onStart||noop).call(el,e,{control:controlTouch,$target:$target});touchEnabledFLAG=tail.flow=true;if(!touchFLAG||tail.go)stopEvent(e)}function onMove(e){if(e.touches&&e.touches.length>1||MS_POINTER&&!e.isPrimary||moveEventType!==e.type||!touchEnabledFLAG){touchEnabledFLAG&&onEnd();(options.onTouchEnd||noop)();return}extendEvent(e);var xDiff=Math.abs(e._x-startEvent._x),yDiff=Math.abs(e._y-startEvent._y),xyDiff=xDiff-yDiff,xWin=(tail.go||tail.x||xyDiff>=0)&&!tail.noSwipe,yWin=xyDiff<0;if(touchFLAG&&!tail.checked){if(touchEnabledFLAG=xWin){stopEvent(e)}}else{stopEvent(e);(options.onMove||noop).call(el,e,{touch:touchFLAG})}if(!moved&&Math.sqrt(Math.pow(xDiff,2)+Math.pow(yDiff,2))>tolerance){moved=true}tail.checked=tail.checked||xWin||yWin}function onEnd(e){(options.onTouchEnd||noop)();var _touchEnabledFLAG=touchEnabledFLAG;tail.control=touchEnabledFLAG=false;if(_touchEnabledFLAG){tail.flow=false}if(!_touchEnabledFLAG||targetIsLinkFlag&&!tail.checked)return;e&&stopEvent(e);preventEvent=true;clearTimeout(preventEventTimeout);preventEventTimeout=setTimeout(function(){preventEvent=false},1e3);(options.onEnd||noop).call(el,{moved:moved,$target:$target,control:controlTouch,touch:touchFLAG,startEvent:startEvent,aborted:!e||e.type==="MSPointerCancel"})}function onOtherStart(){if(tail.flow)return;setTimeout(function(){tail.flow=true},10)}function onOtherEnd(){if(!tail.flow)return;setTimeout(function(){tail.flow=false},TOUCH_TIMEOUT)}if(MS_POINTER){el[ADD_EVENT_LISTENER]("MSPointerDown",onStart,false);document[ADD_EVENT_LISTENER]("MSPointerMove",onMove,false);document[ADD_EVENT_LISTENER]("MSPointerCancel",onEnd,false);document[ADD_EVENT_LISTENER]("MSPointerUp",onEnd,false)}else{if(el[ADD_EVENT_LISTENER]){el[ADD_EVENT_LISTENER]("touchstart",onStart,false);el[ADD_EVENT_LISTENER]("touchmove",onMove,false);el[ADD_EVENT_LISTENER]("touchend",onEnd,false);document[ADD_EVENT_LISTENER]("touchstart",onOtherStart,false);document[ADD_EVENT_LISTENER]("touchend",onOtherEnd,false);document[ADD_EVENT_LISTENER]("touchcancel",onOtherEnd,false);window[ADD_EVENT_LISTENER]("scroll",onOtherEnd,false)}$el.on("mousedown",onStart);$DOCUMENT.on("mousemove",onMove).on("mouseup",onEnd)}$el.on("click","a",function(e){tail.checked&&stopEvent(e)});return tail}function moveOnTouch($el,options){var el=$el[0],elData=$el.data(),tail={},startCoo,coo,startElPos,moveElPos,edge,moveTrack,startTime,endTime,min,max,snap,slowFLAG,controlFLAG,moved,tracked;function startTracking(e){tracked=true;startCoo=coo=e._x;startTime=e._now;moveTrack=[[startTime,startCoo]];startElPos=moveElPos=tail.noMove?0:stop($el,(options.getPos||noop)(),options._001);(options.onStart||noop).call(el,e)}function onStart(e,result){min=tail.min;max=tail.max;snap=tail.snap;slowFLAG=e.altKey;tracked=moved=false;controlFLAG=result.control;if(!controlFLAG&&!elData.sliding){startTracking(e)}}function onMove(e,result){if(!tracked){controlFLAG=false;startTracking(e)}if(!tail.noSwipe){coo=e._x;moveTrack.push([e._now,coo]);moveElPos=startElPos-(startCoo-coo);edge=findShadowEdge(moveElPos,min,max);if(moveElPos<=min){moveElPos=edgeResistance(moveElPos,min)}else if(moveElPos>=max){moveElPos=edgeResistance(moveElPos,max)}if(!tail.noMove){$el.css(getTranslate(moveElPos,options._001));if(!moved){moved=true;result.touch||MS_POINTER||$el.addClass(grabbingClass)}(options.onMove||noop).call(el,e,{pos:moveElPos,edge:edge})}}}function onEnd(result){if(controlFLAG)return;if(!tracked){startTracking(result.startEvent)}result.touch||MS_POINTER||$el.removeClass(grabbingClass);endTime=$.now();var _backTimeIdeal=endTime-TOUCH_TIMEOUT,_backTime,_timeDiff,_timeDiffLast,backTime=null,backCoo,virtualPos,limitPos,newPos,overPos,time=TRANSITION_DURATION,speed,friction=options.friction;for(var _i=moveTrack.length-1;_i>=0;_i--){_backTime=moveTrack[_i][0];_timeDiff=Math.abs(_backTime-_backTimeIdeal);if(backTime===null||_timeDiff<_timeDiffLast){backTime=_backTime;backCoo=moveTrack[_i][1]}else if(backTime===_backTimeIdeal||_timeDiff>_timeDiffLast){break}_timeDiffLast=_timeDiff}newPos=minMaxLimit(moveElPos,min,max);var cooDiff=backCoo-coo,forwardFLAG=cooDiff>=0,timeDiff=endTime-backTime,longTouchFLAG=timeDiff>TOUCH_TIMEOUT,swipeFLAG=!longTouchFLAG&&moveElPos!==startElPos&&newPos===moveElPos;if(snap){newPos=minMaxLimit(Math[swipeFLAG?forwardFLAG?"floor":"ceil":"round"](moveElPos/snap)*snap,min,max);min=max=newPos}if(swipeFLAG&&(snap||newPos===moveElPos)){speed=-(cooDiff/timeDiff);time*=minMaxLimit(Math.abs(speed),options.timeLow,options.timeHigh);virtualPos=Math.round(moveElPos+speed*time/friction);if(!snap){newPos=virtualPos}if(!forwardFLAG&&virtualPos>max||forwardFLAG&&virtualPosMath.abs(yDelta),direction=getDirectionSign(xDelta<0),sameDirection=lastDirection===direction,now=$.now(),tooFast=now-lastNow"),$anchor=$(div(hiddenClass)),$wrap=$(div(wrapClass)),$stage=$(div(stageClass)).appendTo($wrap),stage=$stage[0],$stageShaft=$(div(stageShaftClass)).appendTo($stage),$stageFrame=$(),$arrPrev=$(div(arrClass+" "+arrPrevClass)),$arrNext=$(div(arrClass+" "+arrNextClass)),$arrs=$arrPrev.add($arrNext).appendTo($stage),$navWrap=$(div(navWrapClass)),$nav=$(div(navClass)).appendTo($navWrap),$navShaft=$(div(navShaftClass)).appendTo($nav),$navFrame,$navDotFrame=$(),$navThumbFrame=$(),stageShaftData=$stageShaft.data(),navShaftData=$navShaft.data(),$thumbBorder=$(div(thumbBorderClass)).appendTo($navShaft),$fullscreenIcon=$(div(fullscreenIconClass)),fullscreenIcon=$fullscreenIcon[0],$videoPlay=$(div(videoPlayClass)),$videoClose=$(div(videoCloseClass)).appendTo($stage),videoClose=$videoClose[0],spinner,$spinner=$(div(spinnerClass)),$videoPlaying,activeIndex=false,activeFrame,activeIndexes,repositionIndex,dirtyIndex,lastActiveIndex,prevIndex,nextIndex,startIndex,o_loop,o_nav,o_navThumbs,o_navTop,o_allowFullScreen,o_nativeFullScreen,o_fade,o_thumbSide,o_thumbSide2,o_transitionDuration,o_shadows,o_rtl,lastOptions={},measures={},measuresSetFLAG,stageShaftTouchTail={},stageWheelTail={},navShaftTouchTail={},navWheelTail={},scrollTop,scrollLeft,showedFLAG,pausedAutoplayFLAG,stoppedAutoplayFLAG,toDeactivate={},toDetach={},measuresStash,touchedFLAG,hoverFLAG,navFrameKey,stageLeft=0,fadeStack=[];$wrap[STAGE_FRAME_KEY]=$(div(stageFrameClass));$wrap[NAV_THUMB_FRAME_KEY]=$(div(navFrameClass+" "+navFrameThumbClass,div(thumbClass)));$wrap[NAV_DOT_FRAME_KEY]=$(div(navFrameClass+" "+navFrameDotClass,div(dotClass)));toDeactivate[STAGE_FRAME_KEY]=[];toDeactivate[NAV_THUMB_FRAME_KEY]=[];toDeactivate[NAV_DOT_FRAME_KEY]=[];toDetach[STAGE_FRAME_KEY]={};$wrap.addClass(CSS3?wrapCss3Class:wrapCss2Class);fotoramaData.fotorama=this;function checkForVideo(){$.each(data,function(i,dataFrame){if(!dataFrame.i){dataFrame.i=dataFrameCount++;var video=findVideoId(dataFrame.video,true);if(video){var thumbs={};dataFrame.video=video;if(!dataFrame.img&&!dataFrame.thumb){thumbs=getVideoThumbs(dataFrame,data,that)}else{dataFrame.thumbsReady=true}updateData(data,{img:thumbs.img,thumb:thumbs.thumb},dataFrame.i,that)}}})}function bindGlobalEvents(FLAG){var keydownCommon="keydown."+_fotoramaClass,keydownLocal="keydown."+_fotoramaClass+stamp,resizeLocal="resize."+_fotoramaClass+stamp;if(FLAG){$DOCUMENT.on(keydownLocal,function(e){if($videoPlaying&&e.keyCode===27){stopEvent(e);unloadVideo($videoPlaying,true,true)}else if(that.fullScreen||opts.keyboard&&!that.index){if(e.keyCode===27){stopEvent(e);that.cancelFullScreen()}else if(e.keyCode===39||e.keyCode===40&&that.fullScreen){stopEvent(e);that.show({index:">",slow:e.altKey,user:true})}else if(e.keyCode===37||e.keyCode===38&&that.fullScreen){stopEvent(e);that.show({index:"<",slow:e.altKey,user:true})}}});if(!that.index){$DOCUMENT.off(keydownCommon).on(keydownCommon,"textarea, input, select",function(e){!$BODY.hasClass(_fullscreenClass)&&e.stopPropagation()})}$WINDOW.on(resizeLocal,that.resize)}else{$DOCUMENT.off(keydownLocal);$WINDOW.off(resizeLocal)}}function appendElements(FLAG){if(FLAG===appendElements.f)return;if(FLAG){$fotorama.html("").addClass(_fotoramaClass+" "+stampClass).append($wrap).before($style).before($anchor);addInstance(that)}else{$wrap.detach();$style.detach();$anchor.detach();$fotorama.html(fotoramaData.urtext).removeClass(stampClass);hideInstance(that)}bindGlobalEvents(FLAG);appendElements.f=FLAG}function setData(){data=that.data=data||clone(opts.data)||getDataFromHtml($fotorama);size=that.size=data.length;!ready.ok&&opts.shuffle&&shuffle(data);checkForVideo();activeIndex=limitIndex(activeIndex);size&&appendElements(true)}function stageNoMove(){var _noMove=size<2||$videoPlaying;stageShaftTouchTail.noMove=_noMove||o_fade;stageShaftTouchTail.noSwipe=_noMove||!opts.swipe;$stageShaft.toggleClass(grabClass,!stageShaftTouchTail.noMove&&!stageShaftTouchTail.noSwipe);MS_POINTER&&$wrap.toggleClass(wrapPanYClass,!stageShaftTouchTail.noSwipe)}function setAutoplayInterval(interval){if(interval===true)interval="";opts.autoplay=Math.max(+interval||AUTOPLAY_INTERVAL,o_transitionDuration*1.5)}function addOrRemove(FLAG){return FLAG?"add":"remove"}function setOptions(){that.options=opts=optionsToLowerCase(opts);o_fade=opts.transition==="crossfade"||opts.transition==="dissolve";o_loop=opts.loop&&(size>2||o_fade);o_transitionDuration=+opts.transitionduration||TRANSITION_DURATION;o_rtl=opts.direction==="rtl";var classes={add:[],remove:[]};if(size>1){o_nav=opts.nav;o_navTop=opts.navposition==="top";classes.remove.push(selectClass);$arrs.toggle(opts.arrows)}else{o_nav=false;$arrs.hide()}spinnerStop();spinner=new Spinner($.extend(spinnerDefaults,opts.spinner,spinnerOverride,{direction:o_rtl?-1:1}));arrsUpdate();stageWheelUpdate();if(opts.autoplay)setAutoplayInterval(opts.autoplay);o_thumbSide=numberFromMeasure(opts.thumbwidth)||THUMB_SIZE;o_thumbSide2=numberFromMeasure(opts.thumbheight)||THUMB_SIZE;stageWheelTail.ok=navWheelTail.ok=opts.trackpad&&!SLOW;stageNoMove();extendMeasures(opts,true);o_navThumbs=o_nav==="thumbs";if(o_navThumbs){frameDraw(size,"navThumb");$navFrame=$navThumbFrame;navFrameKey=NAV_THUMB_FRAME_KEY;setStyle($style,$.Fotorama.jst.style({w:o_thumbSide,h:o_thumbSide2,b:opts.thumbborderwidth,m:opts.thumbmargin,s:stamp,q:!COMPAT}));$nav.addClass(navThumbsClass).removeClass(navDotsClass)}else if(o_nav==="dots"){frameDraw(size,"navDot");$navFrame=$navDotFrame;navFrameKey=NAV_DOT_FRAME_KEY;$nav.addClass(navDotsClass).removeClass(navThumbsClass)}else{o_nav=false;$nav.removeClass(navThumbsClass+" "+navDotsClass)}if(o_nav){if(o_navTop){$navWrap.insertBefore($stage)}else{$navWrap.insertAfter($stage)}frameAppend.nav=false;frameAppend($navFrame,$navShaft,"nav")}o_allowFullScreen=opts.allowfullscreen;if(o_allowFullScreen){$fullscreenIcon.appendTo($stage);o_nativeFullScreen=FULLSCREEN&&o_allowFullScreen==="native"}else{$fullscreenIcon.detach();o_nativeFullScreen=false}classes[addOrRemove(o_fade)].push(wrapFadeClass);classes[addOrRemove(!o_fade)].push(wrapSlideClass);classes[addOrRemove(o_rtl)].push(wrapRtlClass);o_shadows=opts.shadows&&!SLOW;classes[addOrRemove(!o_shadows)].push(wrapNoShadowsClass);$wrap.addClass(classes.add.join(" ")).removeClass(classes.remove.join(" "));lastOptions=$.extend({},opts)}function normalizeIndex(index){return index<0?(size+index%size)%size:index>=size?index%size:index}function limitIndex(index){return minMaxLimit(index,0,size-1)}function edgeIndex(index){return o_loop?normalizeIndex(index):limitIndex(index)}function getPrevIndex(index){return index>0||o_loop?index-1:false}function getNextIndex(index){return index1&&data[index]===dataFrame&&!dataFrame.html&&!dataFrame.deleted&&!dataFrame.video&&!fullFLAG){dataFrame.deleted=true;that.splice(index,1)}}}function loaded(){$.Fotorama.measures[src]=imgData.measures=$.Fotorama.measures[src]||{width:img.width,height:img.height,ratio:img.width/img.height};setMeasures(imgData.measures.width,imgData.measures.height,imgData.measures.ratio,index);$img.off("load error").addClass(imgClass+(fullFLAG?" "+imgFullClass:"")).prependTo($frame);fit($img,specialMeasures||measures,specialFit||dataFrame.fit||opts.fit);$.Fotorama.cache[src]=frameData.state="loaded";setTimeout(function(){$frame.trigger("f:load").removeClass(loadingClass+" "+errorClass).addClass(loadedClass+" "+(fullFLAG?loadedFullClass:loadedImgClass));if(type==="stage"){triggerTriggerEvent("load")}},5)}if(!src){error();return}function waitAndLoad(){var _i=10;waitFor(function(){return!touchedFLAG||!_i--&&!SLOW},function(){loaded()})}if(!$.Fotorama.cache[src]){$.Fotorama.cache[src]="*";$img.on("load",waitAndLoad).on("error",error)}else{(function justWait(){if($.Fotorama.cache[src]==="error"){error()}else if($.Fotorama.cache[src]==="loaded"){setTimeout(waitAndLoad,0)}else{setTimeout(justWait,100)}})()}frameData.state="";img.src=src})}function spinnerSpin($el){$spinner.append(spinner.spin().el).appendTo($el)}function spinnerStop(){$spinner.detach();spinner&&spinner.stop()}function updateFotoramaState(){var $frame=that.activeFrame[STAGE_FRAME_KEY];if($frame&&!$frame.data().state){spinnerSpin($frame);$frame.on("f:load f:error",function(){$frame.off("f:load f:error");spinnerStop()})}}function frameDraw(indexes,type){eachIndex(indexes,type,function(i,index,dataFrame,$frame,key,frameData){if($frame)return;$frame=dataFrame[key]=$wrap[key].clone();frameData=$frame.data();frameData.data=dataFrame;if(type==="stage"){if(dataFrame.html){$('
      ').append(dataFrame._html?$(dataFrame.html).removeAttr("id").html(dataFrame._html):dataFrame.html).appendTo($frame)}if(opts.captions&&dataFrame.caption){$(div(captionClass,div(captionWrapClass,dataFrame.caption))).appendTo($frame)}dataFrame.video&&$frame.addClass(stageFrameVideoClass).append($videoPlay.clone());$stageFrame=$stageFrame.add($frame)}else if(type==="navDot"){$navDotFrame=$navDotFrame.add($frame)}else if(type==="navThumb"){frameData.$wrap=$frame.children(":first");$navThumbFrame=$navThumbFrame.add($frame);if(dataFrame.video){$frame.append($videoPlay.clone())}}})}function callFit($img,measuresToFit,method){return $img&&$img.length&&fit($img,measuresToFit,method)}function stageFramePosition(indexes){eachIndex(indexes,"stage",function(i,index,dataFrame,$frame,key,frameData){if(!$frame)return;toDetach[STAGE_FRAME_KEY][normalizeIndex(index)]=$frame.css($.extend({left:o_fade?0:getPosByIndex(index,measures.w,opts.margin,repositionIndex)},o_fade&&getDuration(0)));if(isDetached($frame[0])){$frame.appendTo($stageShaft);unloadVideo(dataFrame.$video)}var method=dataFrame.fit||opts.fit;callFit(frameData.$img,measures,method);callFit(frameData.$full,measures,method)})}function thumbsDraw(pos,loadFLAG){if(o_nav!=="thumbs"||isNaN(pos))return;var leftLimit=-pos,rightLimit=-pos+measures.w;$navThumbFrame.each(function(){var $this=$(this),thisData=$this.data(),eq=thisData.eq,specialMeasures={h:o_thumbSide2},specialFit="cover";specialMeasures.w=thisData.w;if(thisData.l+thisData.wrightLimit||callFit(thisData.$img,specialMeasures,specialFit))return;loadFLAG&&loadImg([eq],"navThumb",specialMeasures,specialFit)})}function frameAppend($frames,$shaft,type){if(!frameAppend[type]){var thumbsFLAG=type==="nav"&&o_navThumbs,left=0;$shaft.append($frames.filter(function(){var actual,$this=$(this),frameData=$this.data();for(var _i=0,_l=data.length;_i<_l;_i++){if(frameData.data===data[_i]){actual=true;frameData.eq=_i;break}}return actual||$this.remove()&&false}).sort(function(a,b){return $(a).data().eq-$(b).data().eq}).each(function(){if(!thumbsFLAG)return;var $this=$(this),frameData=$this.data(),thumbwidth=Math.round(o_thumbSide2*frameData.data.thumbratio)||o_thumbSide;frameData.l=left;frameData.w=thumbwidth;$this.css({width:thumbwidth});left+=thumbwidth+opts.thumbmargin}));frameAppend[type]=true}}function getDirection(x){return x-stageLeft>measures.w/3}function disableDirrection(i){return!o_loop&&(!(activeIndex+i)||!(activeIndex-size+i))&&!$videoPlaying}function arrsUpdate(){$arrPrev.toggleClass(arrDisabledClass,disableDirrection(0));$arrNext.toggleClass(arrDisabledClass,disableDirrection(1))}function stageWheelUpdate(){if(stageWheelTail.ok){stageWheelTail.prevent={"<":disableDirrection(0),">":disableDirrection(1)}}}function getNavFrameBounds($navFrame){var navFrameData=$navFrame.data(),left,width;if(o_navThumbs){left=navFrameData.l;width=navFrameData.w}else{left=$navFrame.position().left;width=$navFrame.width()}return{c:left+width/2,min:-left+opts.thumbmargin*10,max:-left+measures.w-width-opts.thumbmargin*10}}function slideThumbBorder(time){var navFrameData=that.activeFrame[navFrameKey].data();slide($thumbBorder,{time:time*.9,pos:navFrameData.l,width:navFrameData.w-opts.thumbborderwidth*2})}function slideNavShaft(options){var $guessNavFrame=data[options.guessIndex][navFrameKey];if($guessNavFrame){var overflowFLAG=navShaftTouchTail.min!==navShaftTouchTail.max,activeNavFrameBounds=overflowFLAG&&getNavFrameBounds(that.activeFrame[navFrameKey]),l=overflowFLAG&&(options.keep&&slideNavShaft.l?slideNavShaft.l:minMaxLimit((options.coo||measures.w/2)-getNavFrameBounds($guessNavFrame).c,activeNavFrameBounds.min,activeNavFrameBounds.max)),pos=overflowFLAG&&minMaxLimit(l,navShaftTouchTail.min,navShaftTouchTail.max),time=options.time*.9;slide($navShaft,{time:time,pos:pos||0,onEnd:function(){thumbsDraw(pos,true)}});setShadow($nav,findShadowEdge(pos,navShaftTouchTail.min,navShaftTouchTail.max));slideNavShaft.l=l}}function navUpdate(){deactivateFrames(navFrameKey);toDeactivate[navFrameKey].push(that.activeFrame[navFrameKey].addClass(activeClass))}function deactivateFrames(key){var _toDeactivate=toDeactivate[key];while(_toDeactivate.length){_toDeactivate.shift().removeClass(activeClass)}}function detachFrames(key){var _toDetach=toDetach[key];$.each(activeIndexes,function(i,index){delete _toDetach[normalizeIndex(index)]});$.each(_toDetach,function(index,$frame){delete _toDetach[index];$frame.detach()})}function stageShaftReposition(skipOnEnd){repositionIndex=dirtyIndex=activeIndex;var dataFrame=that.activeFrame,$frame=dataFrame[STAGE_FRAME_KEY];if($frame){deactivateFrames(STAGE_FRAME_KEY);toDeactivate[STAGE_FRAME_KEY].push($frame.addClass(activeClass));skipOnEnd||that.show.onEnd(true);stop($stageShaft,0,true);detachFrames(STAGE_FRAME_KEY);stageFramePosition(activeIndexes);setStageShaftMinmaxAndSnap();setNavShaftMinmax()}}function extendMeasures(options,optsLeave){options&&$.extend(measures,{width:options.width||measures.width,height:options.height,minwidth:options.minwidth,maxwidth:options.maxwidth,minheight:options.minheight,maxheight:options.maxheight,ratio:getRatio(options.ratio)})&&!optsLeave&&$.extend(opts,{width:measures.width,height:measures.height,minwidth:measures.minwidth,maxwidth:measures.maxwidth,minheight:measures.minheight,maxheight:measures.maxheight,ratio:measures.ratio})}function triggerEvent(event,extra){$fotorama.trigger(_fotoramaClass+":"+event,[that,extra])}function onTouchStart(){clearTimeout(onTouchEnd.t);touchedFLAG=1;if(opts.stopautoplayontouch){that.stopAutoplay()}else{pausedAutoplayFLAG=true}}function onTouchEnd(){onTouchEnd.t=setTimeout(function(){touchedFLAG=0},TRANSITION_DURATION+TOUCH_TIMEOUT)}function releaseAutoplay(){pausedAutoplayFLAG=!!($videoPlaying||stoppedAutoplayFLAG)}function changeAutoplay(){clearTimeout(changeAutoplay.t);if(!opts.autoplay||pausedAutoplayFLAG){if(that.autoplay){that.autoplay=false;triggerEvent("stopautoplay")}return}if(!that.autoplay){that.autoplay=true;triggerEvent("startautoplay")}var _activeIndex=activeIndex;var frameData=that.activeFrame[STAGE_FRAME_KEY].data();waitFor(function(){return frameData.state||_activeIndex!==activeIndex},function(){changeAutoplay.t=setTimeout(function(){if(pausedAutoplayFLAG||_activeIndex!==activeIndex)return;that.show(o_loop?getDirectionSign(!o_rtl):normalizeIndex(activeIndex+(o_rtl?-1:1)))},opts.autoplay)})}that.startAutoplay=function(interval){if(that.autoplay)return this;pausedAutoplayFLAG=stoppedAutoplayFLAG=false;setAutoplayInterval(interval||opts.autoplay);changeAutoplay();return this};that.stopAutoplay=function(){if(that.autoplay){pausedAutoplayFLAG=stoppedAutoplayFLAG=true;changeAutoplay()}return this};that.show=function(options){var index;if(typeof options!=="object"){index=options;options={}}else{index=options.index}index=index===">"?dirtyIndex+1:index==="<"?dirtyIndex-1:index==="<<"?0:index===">>"?size-1:index;index=isNaN(index)?getIndexFromHash(index,data,true):index;index=typeof index==="undefined"?activeIndex||0:index;that.activeIndex=activeIndex=edgeIndex(index);prevIndex=getPrevIndex(activeIndex);nextIndex=getNextIndex(activeIndex);activeIndexes=[activeIndex,prevIndex,nextIndex];dirtyIndex=o_loop?index:activeIndex;var diffIndex=Math.abs(lastActiveIndex-dirtyIndex),time=getNumber(options.time,function(){return Math.min(o_transitionDuration*(1+(diffIndex-1)/12),o_transitionDuration*2)}),overPos=options.overPos;if(options.slow)time*=10;that.activeFrame=activeFrame=data[activeIndex];unloadVideo($videoPlaying,activeFrame.i!==data[normalizeIndex(repositionIndex)].i);frameDraw(activeIndexes,"stage");stageFramePosition(SLOW?[dirtyIndex]:[dirtyIndex,getPrevIndex(dirtyIndex),getNextIndex(dirtyIndex)]);updateTouchTails("go",true);options.reset||triggerEvent("show",{user:options.user,time:time});var onEnd=that.show.onEnd=function(skipReposition){if(onEnd.ok)return;onEnd.ok=true;updateFotoramaState();loadImg(activeIndexes,"stage");skipReposition||stageShaftReposition(true);options.reset||triggerEvent("showend",{user:options.user});updateTouchTails("go",false);stageWheelUpdate();stageCursor();releaseAutoplay();changeAutoplay()};if(!o_fade){slide($stageShaft,{pos:-getPosByIndex(dirtyIndex,measures.w,opts.margin,repositionIndex),overPos:overPos,time:time,onEnd:onEnd,_001:true})}else{var $activeFrame=activeFrame[STAGE_FRAME_KEY],$prevActiveFrame=activeIndex!==lastActiveIndex?data[lastActiveIndex][STAGE_FRAME_KEY]:null;fade($activeFrame,$prevActiveFrame,$stageFrame,{time:time,method:opts.transition,onEnd:onEnd},fadeStack)}arrsUpdate();if(o_nav){navUpdate();var guessIndex=limitIndex(activeIndex+minMaxLimit(dirtyIndex-lastActiveIndex,-1,1));slideNavShaft({time:time,coo:guessIndex!==activeIndex&&options.coo,guessIndex:typeof options.coo!=="undefined"?guessIndex:activeIndex});if(o_navThumbs)slideThumbBorder(time)}showedFLAG=typeof lastActiveIndex!=="undefined"&&lastActiveIndex!==activeIndex;lastActiveIndex=activeIndex;opts.hash&&showedFLAG&&!that.eq&&setHash(activeFrame.id||activeIndex+1);return this};that.requestFullScreen=function(){if(o_allowFullScreen&&!that.fullScreen){scrollTop=$WINDOW.scrollTop();scrollLeft=$WINDOW.scrollLeft();lockScroll(0,0);updateTouchTails("x",true);measuresStash=$.extend({},measures);$fotorama.addClass(fullscreenClass).appendTo($BODY.addClass(_fullscreenClass));$HTML.addClass(_fullscreenClass);unloadVideo($videoPlaying,true,true);that.fullScreen=true;if(o_nativeFullScreen){fullScreenApi.request(fotorama)}that.resize();loadImg(activeIndexes,"stage");updateFotoramaState();triggerEvent("fullscreenenter")}return this};function cancelFullScreen(){if(that.fullScreen){that.fullScreen=false;if(FULLSCREEN){fullScreenApi.cancel(fotorama)}$BODY.removeClass(_fullscreenClass);$HTML.removeClass(_fullscreenClass);$fotorama.removeClass(fullscreenClass).insertAfter($anchor);measures=$.extend({},measuresStash);unloadVideo($videoPlaying,true,true);updateTouchTails("x",false);that.resize();loadImg(activeIndexes,"stage");lockScroll(scrollLeft,scrollTop);triggerEvent("fullscreenexit")}}that.cancelFullScreen=function(){if(o_nativeFullScreen&&fullScreenApi.is()){fullScreenApi.cancel(document)}else{cancelFullScreen()}return this};if(document.addEventListener){document.addEventListener(fullScreenApi.event,function(){if(data&&!fullScreenApi.is()&&!$videoPlaying){cancelFullScreen()}},false)}that.resize=function(options){if(!data)return this;extendMeasures(!that.fullScreen?optionsToLowerCase(options):{width:"100%",maxwidth:null,minwidth:null,height:"100%",maxheight:null,minheight:null},that.fullScreen);var time=arguments[1]||0,setFLAG=arguments[2],width=measures.width,height=measures.height,ratio=measures.ratio,windowHeight=$WINDOW.height();if(measureIsValid(width)){$wrap.addClass(wrapOnlyActiveClass).css({width:width,minWidth:measures.minwidth,maxWidth:measures.maxwidth});width=measures.W=measures.w=$wrap.width();if(opts.glimpse){measures.w-=Math.round((numberFromPercent(opts.glimpse)/100*width||numberFromMeasure(opts.glimpse)||0)*2)}$stageShaft.css({width:measures.w,marginLeft:(measures.W-measures.w)/2});height=numberFromPercent(height)/100*windowHeight||numberFromMeasure(height);height=height||ratio&&width/ratio;if(height){width=Math.round(width);height=measures.h=Math.round(minMaxLimit(height,numberFromPercent(measures.minheight)/100*windowHeight||numberFromMeasure(measures.minheight),numberFromPercent(measures.maxheight)/100*windowHeight||numberFromMeasure(measures.maxheight)));stageShaftReposition();$stage.stop().animate({width:width,height:height},time,function(){$wrap.removeClass(wrapOnlyActiveClass)});if(o_nav){$nav.stop().animate({width:width},time);slideNavShaft({guessIndex:activeIndex,time:time,keep:true});if(o_navThumbs&&frameAppend.nav)slideThumbBorder(time)}measuresSetFLAG=setFLAG||true;ready()}}stageLeft=$stage.offset().left;return this};that.setOptions=function(options){$.extend(opts,options);reset();return this};that.shuffle=function(){data&&shuffle(data)&&reset();return this};function setShadow($el,edge){if(o_shadows){$el.removeClass(shadowsLeftClass+" "+shadowsRightClass);edge&&!$videoPlaying&&$el.addClass(edge.replace(/^|\s/g," "+shadowsClass+"--"))}}that.destroy=function(){that.cancelFullScreen();that.stopAutoplay();data=that.data=null;appendElements();activeIndexes=[];detachFrames(STAGE_FRAME_KEY);return this};that.playVideo=function(){var dataFrame=that.activeFrame,video=dataFrame.video,_activeIndex=activeIndex;if(typeof video==="object"&&dataFrame.videoReady){o_nativeFullScreen&&that.fullScreen&&that.cancelFullScreen();waitFor(function(){return!fullScreenApi.is()||_activeIndex!==activeIndex},function(){if(_activeIndex===activeIndex){dataFrame.$video=dataFrame.$video||$($.Fotorama.jst.video(video));dataFrame.$video.appendTo(dataFrame[STAGE_FRAME_KEY]);$wrap.addClass(wrapVideoClass);$videoPlaying=dataFrame.$video;stageNoMove();triggerEvent("loadvideo")}})}return this};that.stopVideo=function(){unloadVideo($videoPlaying,true,true);return this};function unloadVideo($video,unloadActiveFLAG,releaseAutoplayFLAG){if(unloadActiveFLAG){$wrap.removeClass(wrapVideoClass);$videoPlaying=false;stageNoMove()}if($video&&$video!==$videoPlaying){$video.remove();triggerEvent("unloadvideo")}if(releaseAutoplayFLAG){releaseAutoplay();changeAutoplay()}}function toggleControlsClass(FLAG){$wrap.toggleClass(wrapNoControlsClass,FLAG)}function stageCursor(e){if(stageShaftTouchTail.flow)return;var x=e?e.pageX:stageCursor.x,pointerFLAG=x&&!disableDirrection(getDirection(x))&&opts.click;if(stageCursor.p!==pointerFLAG&&(o_fade||!opts.swipe)&&$stage.toggleClass(pointerClass,pointerFLAG)){stageCursor.p=pointerFLAG;stageCursor.x=x}}$stage.on("mousemove",stageCursor);function onStageTap(e,toggleControlsFLAG){var target=e.target,$target=$(target);if($target.hasClass(videoPlayClass)){that.playVideo()}else if(target===fullscreenIcon){that[(that.fullScreen?"cancel":"request")+"FullScreen"]()}else if($videoPlaying){target===videoClose&&unloadVideo($videoPlaying,true,true)}else{if(toggleControlsFLAG){toggleControlsClass()}else if(opts.click){that.show({index:e.shiftKey||getDirectionSign(getDirection(e._x)),slow:e.altKey,user:true})}}}function updateTouchTails(key,value){stageShaftTouchTail[key]=navShaftTouchTail[key]=value}stageShaftTouchTail=moveOnTouch($stageShaft,{onStart:onTouchStart,onMove:function(e,result){setShadow($stage,result.edge)},onTouchEnd:onTouchEnd,onEnd:function(result){setShadow($stage);var toggleControlsFLAG=(MS_POINTER&&!hoverFLAG||result.touch)&&opts.arrows;if(result.moved||toggleControlsFLAG&&result.pos!==result.newPos){var index=getIndexByPos(result.newPos,measures.w,opts.margin,repositionIndex);that.show({index:index,time:o_fade?o_transitionDuration:result.time,overPos:result.overPos,user:true})}else if(!result.aborted){onStageTap(result.startEvent,toggleControlsFLAG)}},_001:true,timeLow:1,timeHigh:1,friction:2,select:"."+selectClass+", ."+selectClass+" *",$wrap:$stage});navShaftTouchTail=moveOnTouch($navShaft,{onStart:onTouchStart,onMove:function(e,result){setShadow($nav,result.edge)},onTouchEnd:onTouchEnd,onEnd:function(result){function onEnd(){slideNavShaft.l=result.newPos;releaseAutoplay();changeAutoplay();thumbsDraw(result.newPos,true)}if(!result.moved){var target=result.$target.closest("."+navFrameClass,$navShaft)[0];target&&onNavFrameClick.call(target,result.startEvent)}else if(result.pos!==result.newPos){slide($navShaft,{time:result.time,pos:result.newPos,overPos:result.overPos,onEnd:onEnd});thumbsDraw(result.newPos);o_shadows&&setShadow($nav,findShadowEdge(result.newPos,navShaftTouchTail.min,navShaftTouchTail.max))}else{onEnd()}},timeLow:.5,timeHigh:2,friction:5,$wrap:$nav});stageWheelTail=wheel($stage,{shift:true,onEnd:function(e,direction){onTouchStart();onTouchEnd();that.show({index:direction,slow:e.altKey})}});navWheelTail=wheel($nav,{onEnd:function(e,direction){onTouchStart();onTouchEnd();var newPos=stop($navShaft)+direction*.25;$navShaft.css(getTranslate(minMaxLimit(newPos,navShaftTouchTail.min,navShaftTouchTail.max)));o_shadows&&setShadow($nav,findShadowEdge(newPos,navShaftTouchTail.min,navShaftTouchTail.max));navWheelTail.prevent={"<":newPos>=navShaftTouchTail.max,">":newPos<=navShaftTouchTail.min};clearTimeout(navWheelTail.t);navWheelTail.t=setTimeout(function(){thumbsDraw(newPos,true)},TOUCH_TIMEOUT);thumbsDraw(newPos)}});$wrap.hover(function(){setTimeout(function(){if(touchedFLAG)return;hoverFLAG=true;toggleControlsClass(!hoverFLAG)},0)},function(){if(!hoverFLAG)return;hoverFLAG=false;toggleControlsClass(!hoverFLAG)});function onNavFrameClick(e,time){var index=$(this).data().eq;that.show({index:index,slow:e.altKey,user:true,coo:e._x-$nav.offset().left,time:time})}smartClick($arrs,function(e){stopEvent(e);that.show({index:$arrs.index(this)?">":"<",slow:e.altKey,user:true})},{onStart:function(){onTouchStart();stageShaftTouchTail.control=true},onTouchEnd:onTouchEnd});function reset(){setData();setOptions();if(!reset.i){reset.i=true;var _startindex=opts.startindex;if(_startindex||opts.hash&&location.hash){startIndex=getIndexFromHash(_startindex||location.hash.replace(/^#/,""),data,that.index===0||_startindex,_startindex)}activeIndex=repositionIndex=dirtyIndex=lastActiveIndex=startIndex=edgeIndex(startIndex)||0}if(size){if(changeToRtl())return;if($videoPlaying){unloadVideo($videoPlaying,true)}activeIndexes=[];detachFrames(STAGE_FRAME_KEY);that.show({index:activeIndex,time:0,reset:reset.ok});that.resize()}else{that.destroy()}reset.ok=true}function changeToRtl(){if(!changeToRtl.f===o_rtl){changeToRtl.f=o_rtl;activeIndex=size-1-activeIndex;that.reverse();return true}}$.each("load push pop shift unshift reverse sort splice".split(" "),function(i,method){that[method]=function(){data=data||[];if(method!=="load"){Array.prototype[method].apply(data,arguments)}else if(arguments[0]&&typeof arguments[0]==="object"&&arguments[0].length){data=clone(arguments[0])}reset();return that}});function ready(){if(!ready.ok){ready.ok=true;triggerEvent("ready")}}reset()};$.fn.fotorama=function(opts){return this.each(function(){var that=this,$fotorama=$(this),fotoramaData=$fotorama.data(),fotorama=fotoramaData.fotorama;if(!fotorama){waitFor(function(){return!isHidden(that)},function(){fotoramaData.urtext=$fotorama.html();new $.Fotorama($fotorama,$.extend({},{width:null,minwidth:null,maxwidth:"100%",height:null,minheight:null,maxheight:null,ratio:null,margin:MARGIN,glimpse:0,nav:"dots",navposition:"bottom",thumbwidth:THUMB_SIZE,thumbheight:THUMB_SIZE,thumbmargin:MARGIN,thumbborderwidth:MARGIN,allowfullscreen:false,fit:"contain",transition:"slide",transitionduration:TRANSITION_DURATION,captions:true,hash:false,startindex:0,loop:false,autoplay:false,stopautoplayontouch:true,keyboard:false,arrows:true,click:true,swipe:true,trackpad:true,shuffle:false,direction:"ltr",shadows:true,spinner:null},window.fotoramaDefaults,opts,fotoramaData))})}else{fotorama.setOptions(opts)}})};$.Fotorama.instances=[];function calculateIndexes(){$.each($.Fotorama.instances,function(index,instance){instance.index=index})}function addInstance(instance){$.Fotorama.instances.push(instance);calculateIndexes()}function hideInstance(instance){$.Fotorama.instances.splice(instance.index,1);calculateIndexes()}$.Fotorama.cache={};$.Fotorama.measures={};$=$||{};$.Fotorama=$.Fotorama||{};$.Fotorama.jst=$.Fotorama.jst||{};$.Fotorama.jst.style=function(v){var __t,__p="",__e=_.escape;__p+=".fotorama"+((__t=v.s)==null?"":__t)+" .fotorama__nav--thumbs .fotorama__nav__frame{\npadding:"+((__t=v.m)==null?"":__t)+"px;\nheight:"+((__t=v.h)==null?"":__t)+"px}\n.fotorama"+((__t=v.s)==null?"":__t)+" .fotorama__thumb-border{\nheight:"+((__t=v.h-v.b*(v.q?0:2))==null?"":__t)+"px;\nborder-width:"+((__t=v.b)==null?"":__t)+"px;\nmargin-top:"+((__t=v.m)==null?"":__t)+"px}";return __p};$.Fotorama.jst.video=function(v){var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}__p+='
      ';return __p};$(function(){$("."+_fotoramaClass+':not([data-auto="false"])').fotorama()})})(window,document,location,window.jQuery); \ No newline at end of file diff --git a/themes/imobile/js/imobile.js b/themes/imobile/js/imobile.js new file mode 100755 index 0000000..40a9509 --- /dev/null +++ b/themes/imobile/js/imobile.js @@ -0,0 +1,106 @@ +$(function() { + + var j=-1; + for (var i in images) { + // generate fotorama DOM + if (images[i].type != 'album') { + if (images[i].type == 'video') { + $('').appendTo('.fotorama'); + } else { + $('').appendTo('.fotorama'); + } + } + + // generate thumbnail DOM + thumbhtml = '
      '; + if (images[i].type == 'album') { + thumbhtml = thumbhtml + '' + thumbhtml = thumbhtml + ''; + thumbhtml = thumbhtml + '
      ' + images[i].caption + '
      '; + } else { + j++; + thumbhtml = thumbhtml + ''; + } + if (images[i].type == 'video') { + thumbhtml = thumbhtml + '
      '; + } + thumbhtml = thumbhtml + '
      '; + $(thumbhtml).appendTo('.thumbs'); + } + + $(".thumbnail img").unveil(100, function() { + $(this).load(function() { + this.style.opacity = 1; + }); + }); + + + // fotorama init + fr = $('.fotorama'); + th = $('.thumbs'); + // you can customize the slideshow settings according to http://fotorama.io/customize + fr.fotorama({ + width: '100%', + height: '100%', + allowfullscreen: true, + nav: 'thumbs', + fit: 'contain', + captions: false + }); + + fr.addClass("hide"); + fr.on('fotorama:fullscreenexit ', + function (e, fotorama, extra) { + fr.addClass("hide"); + th.removeClass("hide"); + } + ) + + // album add form autofill + $("#g-add-album-form input[name=title]").change( + function() { + $("#g-add-album-form input[name=name]").val( + $("#g-add-album-form input[name=title]").val() + .replace(/[\s\/]+/g, "-").replace(/\.+$/, "")); + $("#g-add-album-form input[name=slug]").val( + $("#g-add-album-form input[name=title]").val() + .replace(/[^A-Za-z0-9-_]+/g, "-") + .replace(/^-+/, "") + .replace(/-+$/, "")); + }); + + $("#g-add-album-form input[name=title]").keyup( + function() { + $("#g-add-album-form input[name=name]").val( + $("#g-add-album-form input[name=title]").val() + .replace(/[\s\/]+/g, "-") + .replace(/\.+$/, "")); + $("#g-add-album-form input[name=slug]").val( + $("#g-add-album-form input[name=title]").val() + .replace(/[^A-Za-z0-9-_]+/g, "-") + .replace(/^-+/, "") + .replace(/-+$/, "")); + }); + + // item add form autofill + $("#item_file").change( + function() { + //strip the extention + input = $(this).val(); + //title = "C:\\fakepath\\" + input.substr(0, input.lastIndexOf('.')) || input; + title = input.substr(0, input.lastIndexOf('.')) || input; + //set the default name of the title + $('#item_title').val(title); + }); +}); + +function startFotorama(index) { + fr.removeClass("hide"); + th.addClass("hide"); + + var $fotoramaDiv = fr.fotorama(); + var fotorama = $fotoramaDiv.data('fotorama'); + + fotorama.show(index); + fotorama.requestFullScreen(); +} diff --git a/themes/imobile/js/imobile.min.js b/themes/imobile/js/imobile.min.js new file mode 100755 index 0000000..7882a45 --- /dev/null +++ b/themes/imobile/js/imobile.min.js @@ -0,0 +1 @@ +$(function(){var j=-1;for(var i in images){if(images[i].type!="album"){if(images[i].type=="video"){$('').appendTo(".fotorama")}else{$('').appendTo(".fotorama")}}thumbhtml='
      ';if(images[i].type=="album"){thumbhtml=thumbhtml+'';thumbhtml=thumbhtml+'';thumbhtml=thumbhtml+'
      '+images[i].caption+"
      "}else{j++;thumbhtml=thumbhtml+''}if(images[i].type=="video"){thumbhtml=thumbhtml+'
      '}thumbhtml=thumbhtml+"
      ";$(thumbhtml).appendTo(".thumbs")}$(".thumbnail img").unveil(100,function(){$(this).load(function(){this.style.opacity=1})});fr=$(".fotorama");th=$(".thumbs");fr.fotorama({width:"100%",height:"100%",allowfullscreen:true,nav:"thumbs",fit:"contain",captions:false});fr.addClass("hide");fr.on("fotorama:fullscreenexit ",function(e,fotorama,extra){fr.addClass("hide");th.removeClass("hide")});$("#g-add-album-form input[name=title]").change(function(){$("#g-add-album-form input[name=name]").val($("#g-add-album-form input[name=title]").val().replace(/[\s\/]+/g,"-").replace(/\.+$/,""));$("#g-add-album-form input[name=slug]").val($("#g-add-album-form input[name=title]").val().replace(/[^A-Za-z0-9-_]+/g,"-").replace(/^-+/,"").replace(/-+$/,""))});$("#g-add-album-form input[name=title]").keyup(function(){$("#g-add-album-form input[name=name]").val($("#g-add-album-form input[name=title]").val().replace(/[\s\/]+/g,"-").replace(/\.+$/,""));$("#g-add-album-form input[name=slug]").val($("#g-add-album-form input[name=title]").val().replace(/[^A-Za-z0-9-_]+/g,"-").replace(/^-+/,"").replace(/-+$/,""))});$("#item_file").change(function(){input=$(this).val();title=input.substr(0,input.lastIndexOf("."))||input;$("#item_title").val(title)})});function startFotorama(index){fr.removeClass("hide");th.addClass("hide");var $fotoramaDiv=fr.fotorama();var fotorama=$fotoramaDiv.data("fotorama");fotorama.show(index);fotorama.requestFullScreen()} \ No newline at end of file diff --git a/themes/imobile/js/jquery-1.11.0.min.js b/themes/imobile/js/jquery-1.11.0.min.js new file mode 100755 index 0000000..73f33fb --- /dev/null +++ b/themes/imobile/js/jquery-1.11.0.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="
      ",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f +}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML="
      a",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/\s*$/g,sb={option:[1,""],legend:[1,"
      ","
      "],area:[1,"",""],param:[1,"",""],thead:[1,"","
      "],tr:[2,"","
      "],col:[2,"","
      "],td:[3,"","
      "],_default:l.htmlSerialize?[0,"",""]:[1,"X
      ","
      "]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?""!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("