code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
/* Galleria Folio Theme 2012-04-04 | http://galleria.io/license/ | (c) Aino */ .galleria-container { position:relative; font-family:arial,sans-serif; background:transparent; } .galleria-container img { -moz-user-select: none; -webkit-user-select: none; -o-user-select: none; } .galleria-stage { width:100%; height:100%; background:#000; display:none; top:0; left:0; } .galleria-thumbnails .galleria-image { width: 150px; height: 120px; margin: 0 5px 5px 0; position:absolute!important; top:0; left:0; cursor: pointer; /* opera */ cursor: url(cursor-zoom.png), -moz-zoom-in; /* chrome, FF */ cursor: pointer\9; /* IE */ background:#eee url(miniloader.gif) no-repeat 50% 50%; } .galleria-loader { width:64px; height:64px; display:none; position:absolute; top:50%; left:50%; margin-left:-16px; margin-top:-16px; background:#000 url(loader.gif) no-repeat 50% 50%; z-index:3; opacity:.5; filter: alpha(opacity=50); border-radius:5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; } .galleria-info { display:none; background:#000; color:#fff; padding:8px 0; z-index:3; position:absolute; bottom:10px; background:rgba(0,0,0,0.7); font-size:12px; line-height:16px; max-width:50%; } .galleria-info-text { padding: 0 12px; } .galleria-info-description { color:#bbb; } :root *> .galleria-info-description { color:rgba(255,255,255,0.6); } .galleria-plus { position:absolute; top:0; left:0; height:100%; width:100%; background:url(bg.png); color:#fff; line-height:1.2; font-size:11px; display:none; } .galleria-plus span { position:absolute; bottom:5px; left:5px; background:#000; background:rgba(0,0,0,.5); padding: 1px 5px; max-width:160px; } .galleria-close{ width:50px; height:50px; position:absolute; top:0; right:0; background:url(close.png) no-repeat 0 0; z-index:100; cursor:pointer; } .galleria-close:hover{ background-position:0 -50px; } .galleria-image-nav { height:100%; width:100%; position:absolute; top:0; left:0; } .galleria-image-nav-left, .galleria-image-nav-right { width:50%; height:100%; background:url(left.png) no-repeat 0 50%; position:absolute; left:0; z-index:3; cursor:pointer; } .galleria-image-nav-right { left:auto; right:0; background:url(right.png) no-repeat 100% 50%; } .galleria-image-nav-left:hover{background-image:url(left-hover.png);} .galleria-image-nav-right:hover{background-image:url(right-hover.png);} .galleria-image-nav-left.cur{cursor:url(left-cursor.png),pointer;background:none!important} .galleria-image-nav-right.cur{cursor:url(right-cursor.png),pointer;background:none!important} .galleria-container.iframe .galleria-image-nav{height:100px;top:50%;margin-top:-50px} .galleria-container.iframe.touch .galleria-images iframe{margin-top:40px} .galleria-container.iframe.touch .galleria-info{bottom:40px} .galleria-container.iframe .galleria-image-nav-left, .galleria-container.iframe .galleria-image-nav-left.cur{cursor:pointer;background:url(left.png) no-repeat 0 50%!important;width:100px;} .galleria-container.iframe .galleria-image-nav-right, .galleria-container.iframe .galleria-image-nav-right.cur{cursor:pointer;background:url(right.png) no-repeat 100% 50%!important;width:100px} .galleria-container.iframe .galleria-image-nav-left:hover, .galleria-container.iframe .galleria-image-nav-left.cur:hover{background-image:url(left-hover.png)!important;} .galleria-container.iframe .galleria-image-nav-right:hover, .galleria-container.iframe .galleria-image-nav-right.cur:hover{background-image:url(right-hover.png)!important;} .galleria-preloader{height:4px;width:180px;background:#eee;position:absolute;top:0;} .galleria-loaded{height:4px;width:0%;background:#444;}
0x6a
trunk/libraries/galleria/themes/folio/galleria.folio.css
CSS
asf20
3,998
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Galleria Folio Theme</title> <style> /* Demo styles */ html,body{background:#222;margin:0;} body{border-top:4px solid #000;} .content{color:#777;font:12px/1.4 "helvetica neue",arial,sans-serif;width:620px;margin:20px auto;} h1{font-size:12px;font-weight:normal;color:#ddd;margin:0;} p{margin:0 0 20px} a {color:#22BCB9;text-decoration:none;} .cred{margin-top:20px;font-size:11px;} /* This rule is read by Galleria to define the gallery height: */ #galleria{height:320px} </style> <!-- load jQuery --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <!-- load Galleria --> <script src="../../galleria-1.2.7.min.js"></script> <!-- Load the Folio theme --> <script src="galleria.folio.min.js"></script> </head> <body> <div class="content"> <h1>Galleria Folio Theme</h1> <p>Demonstrating a basic gallery example.</p> <!-- Adding gallery images. We use resized thumbnails here for better performance, but it’s not necessary --> <div id="galleria"> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/3/34/Locomotives-Roundhouse2.jpg/800px-Locomotives-Roundhouse2.jpg"> <img data-title="Locomotives Roundhouse" data-description="Steam locomotives of the Chicago &amp; North Western Railway." src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/34/Locomotives-Roundhouse2.jpg/100px-Locomotives-Roundhouse2.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/3/36/Icebergs_in_the_High_Arctic_-_20050907.jpg/1000px-Icebergs_in_the_High_Arctic_-_20050907.jpg"> <img data-title="Icebergs in the High Arctic" data-description="”The debris loading isn't particularly extensive, but the color is usual.”" src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/36/Icebergs_in_the_High_Arctic_-_20050907.jpg/100px-Icebergs_in_the_High_Arctic_-_20050907.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Ara%C3%B1a._A_Estrada%2C_Galiza._02.jpg/1000px-Ara%C3%B1a._A_Estrada%2C_Galiza._02.jpg"> <img data-title="Araña" data-description="Xysticus cristatus, A Estrada, Galicia, Spain" src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Ara%C3%B1a._A_Estrada%2C_Galiza._02.jpg/100px-Ara%C3%B1a._A_Estrada%2C_Galiza._02.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/9104_-_Milano_-_Museo_storia_naturale_-_Fluorite_-_Foto_Giovanni_Dall%27Orto_22-Apr-2007.jpg/1000px-9104_-_Milano_-_Museo_storia_naturale_-_Fluorite_-_Foto_Giovanni_Dall%27Orto_22-Apr-2007.jpg"> <img data-title="Museo storia naturale" src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/9104_-_Milano_-_Museo_storia_naturale_-_Fluorite_-_Foto_Giovanni_Dall%27Orto_22-Apr-2007.jpg/100px-9104_-_Milano_-_Museo_storia_naturale_-_Fluorite_-_Foto_Giovanni_Dall%27Orto_22-Apr-2007.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Grj%C3%B3tagj%C3%A1_caves_in_summer_2009_%282%29.jpg/1000px-Grj%C3%B3tagj%C3%A1_caves_in_summer_2009_%282%29.jpg"> <img data-title="Grjótagjá caves in summer 2009" src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Grj%C3%B3tagj%C3%A1_caves_in_summer_2009_%282%29.jpg/100px-Grj%C3%B3tagj%C3%A1_caves_in_summer_2009_%282%29.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/9/90/20091128_Loutra_Thermes_Xanthi_Thrace_Greece_2.jpg/1000px-20091128_Loutra_Thermes_Xanthi_Thrace_Greece_2.jpg"> <img data-title="Thermes" data-description="Xanthi hot-spa springs, Xanthi Prefecture, Greece" src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/90/20091128_Loutra_Thermes_Xanthi_Thrace_Greece_2.jpg/100px-20091128_Loutra_Thermes_Xanthi_Thrace_Greece_2.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Polish_Army_Ko%C5%82obrzeg_077.JPG/1024px-Polish_Army_Ko%C5%82obrzeg_077.JPG"> <img data-title="Polish Army Kołobrzeg" data-description="A display of the Polish Army. Both the soldier, and the vehicle belong to the 7th Pomeranian Coastal Defence Brigade, a part of the Szczecin-based 12th Mechanized Division ”Bolesław Krzywousty”" src="http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Polish_Army_Ko%C5%82obrzeg_077.JPG/100px-Polish_Army_Ko%C5%82obrzeg_077.JPG"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/20100213_Zlatograd_Bulgaria_3.jpg/1024px-20100213_Zlatograd_Bulgaria_3.jpg"> <img data-title="Zlatograd Bulgaria" src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/20100213_Zlatograd_Bulgaria_3.jpg/100px-20100213_Zlatograd_Bulgaria_3.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/b/b5/FEMA_-_5399_-_Photograph_by_Andrea_Booher_taken_on_09-28-2001_in_New_York.jpg/1024px-FEMA_-_5399_-_Photograph_by_Andrea_Booher_taken_on_09-28-2001_in_New_York.jpg"> <img data-title="09-28-2001 in New York City" data-description="New York, NY, September 28, 2001 -- Debris on surrounding roofs at the site of the World Trade Center. Photo by Andrea Booher/ FEMA News Photo" src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/b5/FEMA_-_5399_-_Photograph_by_Andrea_Booher_taken_on_09-28-2001_in_New_York.jpg/100px-FEMA_-_5399_-_Photograph_by_Andrea_Booher_taken_on_09-28-2001_in_New_York.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Antennae%2C_Hubble_images.jpg/1024px-Antennae%2C_Hubble_images.jpg"> <imgsrc="http://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Antennae%2C_Hubble_images.jpg/100px-Antennae%2C_Hubble_images.jpg"> </a> </div> <p class="cred">Made by <a href="http://galleria.aino.se">Galleria</a>.</p> </div> <script> // Initialize Galleria Galleria.run('#galleria'); </script> </body> </html>
0x6a
trunk/libraries/galleria/themes/folio/folio-demo.html
HTML
asf20
5,968
/** * @preserve Galleria Twelve Theme 2011-06-09 * http://galleria.aino.se * * Copyright (c) 2011, Aino */ /*global jQuery, Galleria */ (function($) { Galleria.addTheme({ name: 'twelve', author: 'Galleria', css: 'galleria.twelve.css', defaults: { transition: 'pulse', transitionSpeed: 500, imageCrop: true, thumbCrop: true, carousel: false, // theme specific defaults: _locale: { show_thumbnails: 'Show thumbnails', hide_thumbnails: 'Hide thumbnails', play: 'Play slideshow', pause: 'Pause slideshow', enter_fullscreen: 'Enter fullscreen', exit_fullscreen: 'Exit fullscreen', popout_image: 'Popout image', showing_image: 'Showing image %s of %s' }, _showFullscreen: true, _showPopout: true, _showProgress: true, _showTooltip: true }, init: function(options) { // add some elements this.addElement('bar','fullscreen','play','popout','thumblink','s1','s2','s3','s4','progress'); this.append({ 'stage' : 'progress', 'container': ['bar','tooltip'], 'bar' : ['fullscreen','play','popout','thumblink','info','s1','s2','s3','s4'] }); this.prependChild('info','counter'); // copy the scope var gallery = this, // cache some stuff thumbs = this.$('thumbnails-container'), thumb_link = this.$('thumblink'), fs_link = this.$('fullscreen'), play_link = this.$('play'), pop_link = this.$('popout'), bar = this.$('bar'), progress = this.$('progress'), transition = options.transition, lang = options._locale, // statics OPEN = false, FULLSCREEN = false, PLAYING = !!options.autoplay, CONTINUE = false, // helper functions scaleThumbs = function() { thumbs.height( gallery.getStageHeight() ).width( gallery.getStageWidth() ).css('top', OPEN ? 0 : gallery.getStageHeight()+30 ); }, toggleThumbs = function(e) { if (OPEN && CONTINUE) { gallery.play(); } else { CONTINUE = PLAYING; gallery.pause(); } Galleria.utils.animate( thumbs, { top: OPEN ? gallery.getStageHeight()+30 : 0 } , { easing:'galleria', duration:400, complete: function() { gallery.defineTooltip('thumblink', OPEN ? lang.show_thumbnails : lang.hide_thumbnails); thumb_link[OPEN ? 'removeClass' : 'addClass']('open'); OPEN = !OPEN; } }); }; // scale the thumbnail container scaleThumbs(); // bind the tooltips if (options._showTooltip) { gallery.bindTooltip({ 'thumblink': lang.show_thumbnails, 'fullscreen': lang.enter_fullscreen, 'play': lang.play, 'popout': lang.popout_image, 'caption': function() { var data = gallery.getData(); var str = ''; if (data) { if (data.title && data.title.length) { str+='<strong>'+data.title+'</strong>'; } if (data.description && data.description.length) { str+='<br>'+data.description; } } return str; }, 'counter': function() { return lang.showing_image.replace( /\%s/, gallery.getIndex() + 1 ).replace( /\%s/, gallery.getDataLength() ); } }); } if ( !options.showInfo ) { this.$( 'info' ).hide(); } // bind galleria events this.bind( 'play', function() { PLAYING = true; play_link.addClass('playing'); }); this.bind( 'pause', function() { PLAYING = false; play_link.removeClass('playing'); progress.width(0); }); if (options._showProgress) { this.bind( 'progress', function(e) { progress.width( e.percent/100 * this.getStageWidth() ); }); } this.bind( 'loadstart', function(e) { if (!e.cached) { this.$('loader').show(); } }); this.bind( 'loadfinish', function(e) { progress.width(0); this.$('loader').hide(); this.refreshTooltip('counter','caption'); }); this.bind( 'thumbnail', function(e) { $(e.thumbTarget).hover(function() { gallery.setInfo(e.thumbOrder); gallery.setCounter(e.thumbOrder); }, function() { gallery.setInfo(); gallery.setCounter(); }).click(function() { toggleThumbs(); }); }); this.bind( 'fullscreen_enter', function(e) { FULLSCREEN = true; gallery.setOptions('transition', false); fs_link.addClass('open'); bar.css('bottom',0); this.defineTooltip('fullscreen', lang.exit_fullscreen); if ( !Galleria.TOUCH ) { this.addIdleState(bar, { bottom: -31 }); } }); this.bind( 'fullscreen_exit', function(e) { FULLSCREEN = false; Galleria.utils.clearTimer('bar'); gallery.setOptions('transition',transition); fs_link.removeClass('open'); bar.css('bottom',0); this.defineTooltip('fullscreen', lang.enter_fullscreen); if ( !Galleria.TOUCH ) { this.removeIdleState(bar, { bottom:-31 }); } }); this.bind( 'rescale', scaleThumbs); if ( !Galleria.TOUCH ) { // STB //this.addIdleState(this.get('image-nav-left'), {left:-36}); //this.addIdleState(this.get('image-nav-right'), {right:-36}); } // bind thumblink thumb_link.click( toggleThumbs ); // bind popup if (options._showPopout) { pop_link.click(function(e) { gallery.openLightbox(); e.preventDefault(); }); } else { pop_link.remove(); if (options._showFullscreen) { this.$('s4').remove(); this.$('info').css('right',40); fs_link.css('right',0); } } // bind play button play_link.click(function() { gallery.defineTooltip('play', PLAYING ? lang.play : lang.pause); if (PLAYING) { gallery.pause(); } else { if (OPEN) { thumb_link.click(); } gallery.play(); } }); // bind fullscreen if (options._showFullscreen) { fs_link.click(function() { if (FULLSCREEN) { gallery.exitFullscreen(); } else { gallery.enterFullscreen(); } }); } else { fs_link.remove(); if (options._show_popout) { this.$('s4').remove(); this.$('info').css('right',40); pop_link.css('right',0); } } if (!options._showFullscreen && !options._showPopout) { this.$('s3,s4').remove(); this.$('info').css('right',10); } if (options.autoplay) { this.trigger( 'play' ); } } }); }( jQuery ));
0x6a
trunk/libraries/galleria/themes/twelve/galleria.twelve.js
JavaScript
asf20
8,763
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Galleria Twelve Theme</title> <style> /* Demo styles */ html,body{background:#222;margin:0;} body{border-top:4px solid #000;} .content{color:#777;font:12px/1.4 "helvetica neue",arial,sans-serif;width:620px;margin:20px auto;} h1{font-size:12px;font-weight:normal;color:#ddd;margin:0;} p{margin:0 0 20px} a {color:#22BCB9;text-decoration:none;} .cred{margin-top:20px;font-size:11px;} /* This rule is read by Galleria to define the gallery height: */ #galleria{height:320px} </style> <!-- load jQuery --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <!-- load Galleria --> <script src="../../galleria-1.2.7.min.js"></script> <!-- Load the Twelve theme --> <script src="galleria.twelve.min.js"></script> </head> <body> <div class="content"> <h1>Galleria Twelve Theme</h1> <p>Demonstrating a basic gallery example.</p> <!-- Adding gallery images. We use resized thumbnails here for better performance, but it’s not necessary --> <div id="galleria"> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/3/34/Locomotives-Roundhouse2.jpg/800px-Locomotives-Roundhouse2.jpg"> <img data-title="Locomotives Roundhouse" data-description="Steam locomotives of the Chicago &amp; North Western Railway." src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/34/Locomotives-Roundhouse2.jpg/100px-Locomotives-Roundhouse2.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/3/36/Icebergs_in_the_High_Arctic_-_20050907.jpg/1000px-Icebergs_in_the_High_Arctic_-_20050907.jpg"> <img data-title="Icebergs in the High Arctic" data-description="”The debris loading isn't particularly extensive, but the color is usual.”" src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/36/Icebergs_in_the_High_Arctic_-_20050907.jpg/100px-Icebergs_in_the_High_Arctic_-_20050907.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Ara%C3%B1a._A_Estrada%2C_Galiza._02.jpg/1000px-Ara%C3%B1a._A_Estrada%2C_Galiza._02.jpg"> <img data-title="Araña" data-description="Xysticus cristatus, A Estrada, Galicia, Spain" src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Ara%C3%B1a._A_Estrada%2C_Galiza._02.jpg/100px-Ara%C3%B1a._A_Estrada%2C_Galiza._02.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/9104_-_Milano_-_Museo_storia_naturale_-_Fluorite_-_Foto_Giovanni_Dall%27Orto_22-Apr-2007.jpg/1000px-9104_-_Milano_-_Museo_storia_naturale_-_Fluorite_-_Foto_Giovanni_Dall%27Orto_22-Apr-2007.jpg"> <img data-title="Museo storia naturale" src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/9104_-_Milano_-_Museo_storia_naturale_-_Fluorite_-_Foto_Giovanni_Dall%27Orto_22-Apr-2007.jpg/100px-9104_-_Milano_-_Museo_storia_naturale_-_Fluorite_-_Foto_Giovanni_Dall%27Orto_22-Apr-2007.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Grj%C3%B3tagj%C3%A1_caves_in_summer_2009_%282%29.jpg/1000px-Grj%C3%B3tagj%C3%A1_caves_in_summer_2009_%282%29.jpg"> <img data-title="Grjótagjá caves in summer 2009" src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Grj%C3%B3tagj%C3%A1_caves_in_summer_2009_%282%29.jpg/100px-Grj%C3%B3tagj%C3%A1_caves_in_summer_2009_%282%29.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/9/90/20091128_Loutra_Thermes_Xanthi_Thrace_Greece_2.jpg/1000px-20091128_Loutra_Thermes_Xanthi_Thrace_Greece_2.jpg"> <img data-title="Thermes" data-description="Xanthi hot-spa springs, Xanthi Prefecture, Greece" src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/90/20091128_Loutra_Thermes_Xanthi_Thrace_Greece_2.jpg/100px-20091128_Loutra_Thermes_Xanthi_Thrace_Greece_2.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Polish_Army_Ko%C5%82obrzeg_077.JPG/1024px-Polish_Army_Ko%C5%82obrzeg_077.JPG"> <img data-title="Polish Army Kołobrzeg" data-description="A display of the Polish Army. Both the soldier, and the vehicle belong to the 7th Pomeranian Coastal Defence Brigade, a part of the Szczecin-based 12th Mechanized Division ”Bolesław Krzywousty”" src="http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Polish_Army_Ko%C5%82obrzeg_077.JPG/100px-Polish_Army_Ko%C5%82obrzeg_077.JPG"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/20100213_Zlatograd_Bulgaria_3.jpg/1024px-20100213_Zlatograd_Bulgaria_3.jpg"> <img data-title="Zlatograd Bulgaria" src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/20100213_Zlatograd_Bulgaria_3.jpg/100px-20100213_Zlatograd_Bulgaria_3.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/b/b5/FEMA_-_5399_-_Photograph_by_Andrea_Booher_taken_on_09-28-2001_in_New_York.jpg/1024px-FEMA_-_5399_-_Photograph_by_Andrea_Booher_taken_on_09-28-2001_in_New_York.jpg"> <img data-title="09-28-2001 in New York City" data-description="New York, NY, September 28, 2001 -- Debris on surrounding roofs at the site of the World Trade Center. Photo by Andrea Booher/ FEMA News Photo" src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/b5/FEMA_-_5399_-_Photograph_by_Andrea_Booher_taken_on_09-28-2001_in_New_York.jpg/100px-FEMA_-_5399_-_Photograph_by_Andrea_Booher_taken_on_09-28-2001_in_New_York.jpg"> </a> <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Antennae%2C_Hubble_images.jpg/1024px-Antennae%2C_Hubble_images.jpg"> <imgsrc="http://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Antennae%2C_Hubble_images.jpg/100px-Antennae%2C_Hubble_images.jpg"> </a> </div> <p class="cred">Made by <a href="http://galleria.aino.se">Galleria</a>.</p> </div> <script> // Initialize Galleria Galleria.run('#galleria'); </script> </body> </html>
0x6a
trunk/libraries/galleria/themes/twelve/twelve-demo.html
HTML
asf20
5,972
/* * Galleria Twelve Theme 2011-06-07 * Copyright (c) 2011, Aino */ .galleria-container { position: relative; overflow: hidden; font: 11px/1.4 arial,sans-serif; color: #fff; } .galleria-container img { -moz-user-select: none; -webkit-user-select: none; -o-user-select: none; } .galleria-stage { overflow: hidden; background: #000; position: absolute; top: 0; left: 0; right: 0; bottom: 30px; } .galleria-container.fullscreen .galleria-stage { bottom: 0 } .galleria-bar { height: 31px; width: 100%; position: absolute; bottom: 0; left: 0; background: url(bar.png) repeat-x; z-index: 3; } .galleria-s1, .galleria-s2, .galleria-s3, .galleria-s4 { background: url(separator.png); height: 29px; width: 2px; position: absolute; left: 28px; bottom: 1px; } .galleria-s2 { left: 58px } .galleria-s3 { right: 29px; left: auto; } .galleria-s4 { right: 58px; left: auto; } .galleria-progress { height: 2px; position: absolute; top: 0; left: 0; width: 0; background: #aaa; opacity: .5; z-index: 3; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; filter: alpha(opacity=50); } .galleria-thumblink, .galleria-fullscreen, .galleria-play, .galleria-popout { width: 29px; height: 29px; position: absolute; left: 0; bottom: 1px; background: url(thumbs.png) no-repeat 50% 50%; cursor: pointer; } .galleria-fullscreen, .galleria-popout { left: auto; right: 0; background-image: url(fullscreen.png); background-position: 8px 7px; } .galleria-popout { background-image: url(popout.png); right: 30px; background-position: 50% 50%; } .galleria-play { left: 30px; background-image: url(playpause.png); background-position: 10px 9px; } .galleria-play.playing { background-position: 10px -91px } .galleria-fullscreen.open { background-position: 8px -93px } .galleria-container.notouch .galleria-thumblink:hover, .galleria-container.touch .galleria-thumblink:active, .galleria-thumblink.open, .galleria-container.notouch .galleria-fullscreen:hover, .galleria-container.touch .galleria-fullscreen:active, .galleria-container.notouch .galleria-play:hover, .galleria-container.touch .galleria-play:active, .galleria-container.notouch .galleria-popout:hover, .galleria-container.touch .galleria-popout:active { background-color: #000 } .galleria-thumbnails-container { position: absolute; top: 0; left: 0; width: 0; height: 0; background: url(bg.png); z-index: 2; } .galleria-thumbnails-list { position: absolute!important; top: 10px; right: 10px; left: 10px; bottom: 41px; overflow: auto!important; } .galleria-thumbnails .galleria-image { width: 80px; height: 45px; float: left; margin: 0 7px 7px 0; border: 3px solid #fff; cursor: pointer; } .galleria-container.notouch .galleria-thumbnails .galleria-image:hover, .galleria-container.touch .galleria-thumbnails .galleria-image:active { opacity: .9; box-shadow: 0 0 3px rgba(0,0,0,.4); -moz-box-shadow: 0 0 3px rgba(0,0,0,.4); -webkit-box-shadow: 0 0 3px rgba(0,0,0,.4); } .galleria-info { position: absolute; overflow: hidden; height: 29px; line-height: 29px; left: 70px; right: 70px; bottom: 1px; color: #bbb; } .galleria-info > *, .galleria-info-text > * { display: inline } .galleria-info-title { color: #fff; font-weight: bold; padding: 0 10px; } .galleria-info-text { padding-left: 10px } .galleria-counter { background: url(separator.png) no-repeat 100% 0; display: inline-block; *display: inline; padding-right: 10px; _height: 29px; zoom: 1; } .galleria-loader { width: 48px; height: 48px; position: absolute; top: 50%; left: 50%; margin: -24px 0 0 -24px; z-index: 2; display: none; background: #000 url(loader.gif) no-repeat 50% 50%; opacity: .8; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; filter: alpha(opacity=80); -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; } .galleria-image-nav { position: absolute; top: 50%; margin-top: -18px; width: 100%; height: 36px; left: 0; } .galleria-image-nav-left, .galleria-image-nav-right { cursor: pointer; width: 36px; height: 36px; position: absolute; left: 20px; z-index: 2; background: url(nav.png); } .galleria-image-nav-right { left: auto; right: 20px; background-position: -36px 0; z-index: 2; } .galleria-container.notouch .galleria-image-nav-left:hover, .galleria-container.touch .galleria-image-nav-left:active { background-position: 0 -36px } .galleria-container.notouch .galleria-image-nav-right:hover, .galleria-container.touch .galleria-image-nav-right:active { background-position: -36px -36px } .galleria-thumb-nav-left, .galleria-thumb-nav-right { cursor: pointer; display: none; background-position: -495px 5px; position: absolute; left: 0; top: 0; height: 40px; width: 23px; z-index: 3; opacity: .8; } .galleria-thumb-nav-right { background-position: -578px 5px; border-right: none; right: 0; left: auto; } .galleria-thumbnails-container .disabled, .galleria-thumbnails-container .disabled:hover, .galleria-thumbnails-container .disabled:active { opacity: .2; cursor: default; } .galleria-container.notouch .galleria-thumb-nav-left:hover, .galleria-container.touch .galleria-thumb-nav-left:active, .galleria-container.notouch .galleria-thumb-nav-right:hover, .galleria-container.touch .galleria-thumb-nav-right:active { opacity: 1; background-color: #111; } .galleria-carousel .galleria-thumb-nav-left, .galleria-carousel .galleria-thumb-nav-right { display: block } .galleria-lightbox-content { background: url(loader_pos.gif) no-repeat 50% 50% }
0x6a
trunk/libraries/galleria/themes/twelve/galleria.twelve.css
CSS
asf20
6,247
<!DOCTYPE html> <html lang="en"> <head> <title>403 Request forbidden</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css"> body{background: #ebebeb;font-family: dotum,tahoma} .error_contain{ padding: 0px; position:relative; } .error_contain div{ width:500px;margin:0 auto; } .error_contain h1{ padding: 40px 0; font-family: arial; text-align: center; margin: 0; font-size: 169px; line-height: normal; color: #ffffff; text-shadow: 0 0 10px #ffffff, 0 4px 3px #ffffff, 0 9px 3px #dddddd, 0 12px 1px #cccccc, 0 14px 5px rgba(0, 0, 0, 0.4), 0 20px 10px rgba(0, 0, 0, 0.1), 0 15px 80px rgba(0, 0, 100, 0.2); } .error_contain h3{color: #777;margin: 0;padding: 8px;padding-top: 20px} .error_contain p{margin: 0;padding: 8px;color: #777;text-align: justify;font-size: 13px} </style> </head> <body> <div class="error_contain"> <h1 style="">403</h1> <div> <h3>Oops! Request forbidden...<span style="float: right">٩(๏̯͡๏)۶</span></h3> <p> Sorry, it appears the page you were looking for is forbidden and not accessible. If the problem persists, please contact our support at example@domain.com. </p> </div> </div> </body> </html>
0x6a
trunk/libraries/galleria/index.html
HTML
asf20
1,319
/** * Galleria v 1.2.8 2012-08-09 * http://galleria.io * * Licensed under the MIT license * https://raw.github.com/aino/galleria/master/LICENSE * */ (function( $ ) { /*global jQuery, navigator, Galleria:true, Image */ // some references var undef, window = this, doc = window.document, $doc = $( doc ), $win = $( window ), // native prototypes protoArray = Array.prototype, // internal constants VERSION = 1.28, DEBUG = true, TIMEOUT = 30000, DUMMY = false, NAV = navigator.userAgent.toLowerCase(), HASH = window.location.hash.replace(/#\//, ''), F = function(){}, FALSE = function() { return false; }, IE = (function() { var v = 3, div = doc.createElement( 'div' ), all = div.getElementsByTagName( 'i' ); do { div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->'; } while ( all[0] ); return v > 4 ? v : undef; }() ), DOM = function() { return { html: doc.documentElement, body: doc.body, head: doc.getElementsByTagName('head')[0], title: doc.title }; }, // list of Galleria events _eventlist = 'data ready thumbnail loadstart loadfinish image play pause progress ' + 'fullscreen_enter fullscreen_exit idle_enter idle_exit rescale ' + 'lightbox_open lightbox_close lightbox_image', _events = (function() { var evs = []; $.each( _eventlist.split(' '), function( i, ev ) { evs.push( ev ); // legacy events if ( /_/.test( ev ) ) { evs.push( ev.replace( /_/g, '' ) ); } }); return evs; }()), // legacy options // allows the old my_setting syntax and converts it to camel case _legacyOptions = function( options ) { var n; if ( typeof options !== 'object' ) { // return whatever it was... return options; } $.each( options, function( key, value ) { if ( /^[a-z]+_/.test( key ) ) { n = ''; $.each( key.split('_'), function( i, k ) { n += i > 0 ? k.substr( 0, 1 ).toUpperCase() + k.substr( 1 ) : k; }); options[ n ] = value; delete options[ key ]; } }); return options; }, _patchEvent = function( type ) { // allow 'image' instead of Galleria.IMAGE if ( $.inArray( type, _events ) > -1 ) { return Galleria[ type.toUpperCase() ]; } return type; }, // video providers _video = { youtube: { reg: /https?:\/\/(?:[a-zA_Z]{2,3}.)?(?:youtube\.com\/watch\?)((?:[\w\d\-\_\=]+&amp;(?:amp;)?)*v(?:&lt;[A-Z]+&gt;)?=([0-9a-zA-Z\-\_]+))/i, embed: function(id) { return 'http://www.youtube.com/embed/'+id; }, getThumb: function( id, success, fail ) { fail = fail || F; $.getJSON('http://gdata.youtube.com/feeds/api/videos/' + id + '?v=2&alt=json-in-script&callback=?', function(data) { try { success( data.entry.media$group.media$thumbnail[0].url ); } catch(e) { fail(); } }).error(fail); } }, vimeo: { reg: /https?:\/\/(?:www\.)?(vimeo\.com)\/(?:hd#)?([0-9]+)/i, embed: function(id) { return 'http://player.vimeo.com/video/'+id; }, getThumb: function( id, success, fail ) { fail = fail || F; $.getJSON('http://vimeo.com/api/v2/video/' + id + '.json?callback=?', function(data) { try { success( data[0].thumbnail_medium ); } catch(e) { fail(); } }).error(fail); } }, dailymotion: { reg: /https?:\/\/(?:www\.)?(dailymotion\.com)\/video\/([^_]+)/, embed: function(id) { return 'http://www.dailymotion.com/embed/video/'+id; }, getThumb: function( id, success, fail ) { fail = fail || F; $.getJSON('https://api.dailymotion.com/video/'+id+'?fields=thumbnail_medium_url&callback=?', function(data) { try { success( data.thumbnail_medium_url ); } catch(e) { fail(); } }).error(fail); } } }, // utility for testing the video URL and getting the video ID _videoTest = function( url ) { var match; for ( var v in _video ) { match = url && url.match( _video[v].reg ); if( match && match.length ) { return { id: match[2], provider: v }; } } return false; }, // native fullscreen handler _nativeFullscreen = { support: (function() { var html = DOM().html; return html.requestFullscreen || html.mozRequestFullScreen || html.webkitRequestFullScreen; }()), callback: F, enter: function( instance, callback ) { this.instance = instance; this.callback = callback || F; var html = DOM().html; if ( html.requestFullscreen ) { html.requestFullscreen(); } else if ( html.mozRequestFullScreen ) { html.mozRequestFullScreen(); } else if ( html.webkitRequestFullScreen ) { html.webkitRequestFullScreen(); } }, exit: function( callback ) { this.callback = callback || F; if ( doc.exitFullscreen ) { doc.exitFullscreen(); } else if ( doc.mozCancelFullScreen ) { doc.mozCancelFullScreen(); } else if ( doc.webkitCancelFullScreen ) { doc.webkitCancelFullScreen(); } }, instance: null, listen: function() { if ( !this.support ) { return; } var handler = function() { if ( !_nativeFullscreen.instance ) { return; } var fs = _nativeFullscreen.instance._fullscreen; if ( doc.fullscreen || doc.mozFullScreen || doc.webkitIsFullScreen ) { fs._enter( _nativeFullscreen.callback ); } else { fs._exit( _nativeFullscreen.callback ); } }; doc.addEventListener( 'fullscreenchange', handler, false ); doc.addEventListener( 'mozfullscreenchange', handler, false ); doc.addEventListener( 'webkitfullscreenchange', handler, false ); } }, // the internal gallery holder _galleries = [], // the internal instance holder _instances = [], // flag for errors _hasError = false, // canvas holder _canvas = false, // instance pool, holds the galleries until themeLoad is triggered _pool = [], // themeLoad trigger _themeLoad = function( theme ) { Galleria.theme = theme; // run the instances we have in the pool $.each( _pool, function( i, instance ) { if ( !instance._initialized ) { instance._init.call( instance ); } }); }, // the Utils singleton Utils = (function() { return { // legacy support for clearTimer clearTimer: function( id ) { $.each( Galleria.get(), function() { this.clearTimer( id ); }); }, // legacy support for addTimer addTimer: function( id ) { $.each( Galleria.get(), function() { this.addTimer( id ); }); }, array : function( obj ) { return protoArray.slice.call(obj, 0); }, create : function( className, nodeName ) { nodeName = nodeName || 'div'; var elem = doc.createElement( nodeName ); elem.className = className; return elem; }, getScriptPath : function( src ) { // the currently executing script is always the last src = src || $('script:last').attr('src'); var slices = src.split('/'); if (slices.length == 1) { return ''; } slices.pop(); return slices.join('/') + '/'; }, // CSS3 transitions, added in 1.2.4 animate : (function() { // detect transition var transition = (function( style ) { var props = 'transition WebkitTransition MozTransition OTransition'.split(' '), i; // disable css3 animations in opera until stable if ( window.opera ) { return false; } for ( i = 0; props[i]; i++ ) { if ( typeof style[ props[ i ] ] !== 'undefined' ) { return props[ i ]; } } return false; }(( doc.body || doc.documentElement).style )); // map transitionend event var endEvent = { MozTransition: 'transitionend', OTransition: 'oTransitionEnd', WebkitTransition: 'webkitTransitionEnd', transition: 'transitionend' }[ transition ]; // map bezier easing conversions var easings = { _default: [0.25, 0.1, 0.25, 1], galleria: [0.645, 0.045, 0.355, 1], galleriaIn: [0.55, 0.085, 0.68, 0.53], galleriaOut: [0.25, 0.46, 0.45, 0.94], ease: [0.25, 0, 0.25, 1], linear: [0.25, 0.25, 0.75, 0.75], 'ease-in': [0.42, 0, 1, 1], 'ease-out': [0, 0, 0.58, 1], 'ease-in-out': [0.42, 0, 0.58, 1] }; // function for setting transition css for all browsers var setStyle = function( elem, value, suffix ) { var css = {}; suffix = suffix || 'transition'; $.each( 'webkit moz ms o'.split(' '), function() { css[ '-' + this + '-' + suffix ] = value; }); elem.css( css ); }; // clear styles var clearStyle = function( elem ) { setStyle( elem, 'none', 'transition' ); if ( Galleria.WEBKIT && Galleria.TOUCH ) { setStyle( elem, 'translate3d(0,0,0)', 'transform' ); if ( elem.data('revert') ) { elem.css( elem.data('revert') ); elem.data('revert', null); } } }; // various variables var change, strings, easing, syntax, revert, form, css; // the actual animation method return function( elem, to, options ) { // extend defaults options = $.extend({ duration: 400, complete: F, stop: false }, options); // cache jQuery instance elem = $( elem ); if ( !options.duration ) { elem.css( to ); options.complete.call( elem[0] ); return; } // fallback to jQuery's animate if transition is not supported if ( !transition ) { elem.animate(to, options); return; } // stop if ( options.stop ) { // clear the animation elem.unbind( endEvent ); clearStyle( elem ); } // see if there is a change change = false; $.each( to, function( key, val ) { css = elem.css( key ); if ( Utils.parseValue( css ) != Utils.parseValue( val ) ) { change = true; } // also add computed styles for FF elem.css( key, css ); }); if ( !change ) { window.setTimeout( function() { options.complete.call( elem[0] ); }, options.duration ); return; } // the css strings to be applied strings = []; // the easing bezier easing = options.easing in easings ? easings[ options.easing ] : easings._default; // the syntax syntax = ' ' + options.duration + 'ms' + ' cubic-bezier(' + easing.join(',') + ')'; // add a tiny timeout so that the browsers catches any css changes before animating window.setTimeout( (function(elem, endEvent, to, syntax) { return function() { // attach the end event elem.one(endEvent, (function( elem ) { return function() { // clear the animation clearStyle(elem); // run the complete method options.complete.call(elem[0]); }; }( elem ))); // do the webkit translate3d for better performance on iOS if( Galleria.WEBKIT && Galleria.TOUCH ) { revert = {}; form = [0,0,0]; $.each( ['left', 'top'], function(i, m) { if ( m in to ) { form[ i ] = ( Utils.parseValue( to[ m ] ) - Utils.parseValue(elem.css( m )) ) + 'px'; revert[ m ] = to[ m ]; delete to[ m ]; } }); if ( form[0] || form[1]) { elem.data('revert', revert); strings.push('-webkit-transform' + syntax); // 3d animate setStyle( elem, 'translate3d(' + form.join(',') + ')', 'transform'); } } // push the animation props $.each(to, function( p, val ) { strings.push(p + syntax); }); // set the animation styles setStyle( elem, strings.join(',') ); // animate elem.css( to ); }; }(elem, endEvent, to, syntax)), 2); }; }()), removeAlpha : function( elem ) { if ( IE < 9 && elem ) { var style = elem.style, currentStyle = elem.currentStyle, filter = currentStyle && currentStyle.filter || style.filter || ""; if ( /alpha/.test( filter ) ) { style.filter = filter.replace( /alpha\([^)]*\)/i, '' ); } } }, forceStyles : function( elem, styles ) { elem = $(elem); if ( elem.attr( 'style' ) ) { elem.data( 'styles', elem.attr( 'style' ) ).removeAttr( 'style' ); } elem.css( styles ); }, revertStyles : function() { $.each( Utils.array( arguments ), function( i, elem ) { elem = $( elem ); elem.removeAttr( 'style' ); elem.attr('style',''); // "fixes" webkit bug if ( elem.data( 'styles' ) ) { elem.attr( 'style', elem.data('styles') ).data( 'styles', null ); } }); }, moveOut : function( elem ) { Utils.forceStyles( elem, { position: 'absolute', left: -10000 }); }, moveIn : function() { Utils.revertStyles.apply( Utils, Utils.array( arguments ) ); }, elem : function( elem ) { if (elem instanceof $) { return { $: elem, dom: elem[0] }; } else { return { $: $(elem), dom: elem }; } }, hide : function( elem, speed, callback ) { callback = callback || F; var el = Utils.elem( elem ), $elem = el.$; elem = el.dom; // save the value if not exist if (! $elem.data('opacity') ) { $elem.data('opacity', $elem.css('opacity') ); } // always hide var style = { opacity: 0 }; if (speed) { var complete = IE < 9 && elem ? function() { Utils.removeAlpha( elem ); elem.style.visibility = 'hidden'; callback.call( elem ); } : callback; Utils.animate( elem, style, { duration: speed, complete: complete, stop: true }); } else { if ( IE < 9 && elem ) { Utils.removeAlpha( elem ); elem.style.visibility = 'hidden'; } else { $elem.css( style ); } } }, show : function( elem, speed, callback ) { callback = callback || F; var el = Utils.elem( elem ), $elem = el.$; elem = el.dom; // bring back saved opacity var saved = parseFloat( $elem.data('opacity') ) || 1, style = { opacity: saved }; // animate or toggle if (speed) { if ( IE < 9 ) { $elem.css('opacity', 0); elem.style.visibility = 'visible'; } var complete = IE < 9 && elem ? function() { if ( style.opacity == 1 ) { Utils.removeAlpha( elem ); } callback.call( elem ); } : callback; Utils.animate( elem, style, { duration: speed, complete: complete, stop: true }); } else { if ( IE < 9 && style.opacity == 1 && elem ) { Utils.removeAlpha( elem ); elem.style.visibility = 'visible'; } else { $elem.css( style ); } } }, // enhanced click for mobile devices // we bind a touchend and hijack any click event in the bubble // then we execute the click directly and save it in a separate data object for later optimizeTouch: (function() { var node, evs, fakes, travel, evt = {}, handler = function( e ) { e.preventDefault(); evt = $.extend({}, e, true); }, attach = function() { this.evt = evt; }, fake = function() { this.handler.call(node, this.evt); }; return function( elem ) { $(elem).bind('touchend', function( e ) { node = e.target; travel = true; while( node.parentNode && node != e.currentTarget && travel ) { evs = $(node).data('events'); fakes = $(node).data('fakes'); if (evs && 'click' in evs) { travel = false; e.preventDefault(); // fake the click and save the event object $(node).click(handler).click(); // remove the faked click evs.click.pop(); // attach the faked event $.each( evs.click, attach); // save the faked clicks in a new data object $(node).data('fakes', evs.click); // remove all clicks delete evs.click; } else if ( fakes ) { travel = false; e.preventDefault(); // fake all clicks $.each( fakes, fake ); } // bubble node = node.parentNode; } }); }; }()), wait : function(options) { options = $.extend({ until : FALSE, success : F, error : function() { Galleria.raise('Could not complete wait function.'); }, timeout: 3000 }, options); var start = Utils.timestamp(), elapsed, now, fn = function() { now = Utils.timestamp(); elapsed = now - start; if ( options.until( elapsed ) ) { options.success(); return false; } if (typeof options.timeout == 'number' && now >= start + options.timeout) { options.error(); return false; } window.setTimeout(fn, 10); }; window.setTimeout(fn, 10); }, toggleQuality : function( img, force ) { if ( ( IE !== 7 && IE !== 8 ) || !img || img.nodeName.toUpperCase() != 'IMG' ) { return; } if ( typeof force === 'undefined' ) { force = img.style.msInterpolationMode === 'nearest-neighbor'; } img.style.msInterpolationMode = force ? 'bicubic' : 'nearest-neighbor'; }, insertStyleTag : function( styles ) { var style = doc.createElement( 'style' ); DOM().head.appendChild( style ); if ( style.styleSheet ) { // IE style.styleSheet.cssText = styles; } else { var cssText = doc.createTextNode( styles ); style.appendChild( cssText ); } }, // a loadscript method that works for local scripts loadScript: function( url, callback ) { var done = false, script = $('<scr'+'ipt>').attr({ src: url, async: true }).get(0); // Attach handlers for all browsers script.onload = script.onreadystatechange = function() { if ( !done && (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete') ) { done = true; // Handle memory leak in IE script.onload = script.onreadystatechange = null; if (typeof callback === 'function') { callback.call( this, this ); } } }; DOM().head.appendChild( script ); }, // parse anything into a number parseValue: function( val ) { if (typeof val === 'number') { return val; } else if (typeof val === 'string') { var arr = val.match(/\-?\d|\./g); return arr && arr.constructor === Array ? arr.join('')*1 : 0; } else { return 0; } }, // timestamp abstraction timestamp: function() { return new Date().getTime(); }, loadCSS : function( href, id, callback ) { var link, length; // look for manual css $('link[rel=stylesheet]').each(function() { if ( new RegExp( href ).test( this.href ) ) { link = this; return false; } }); if ( typeof id === 'function' ) { callback = id; id = undef; } callback = callback || F; // dirty // if already present, return if ( link ) { callback.call( link, link ); return link; } // save the length of stylesheets to check against length = doc.styleSheets.length; // check for existing id if( $( '#' + id ).length ) { $( '#' + id ).attr( 'href', href ); length--; } else { link = $( '<link>' ).attr({ rel: 'stylesheet', href: href, id: id }).get(0); var styles = $('link[rel="stylesheet"], style'); if ( styles.length ) { styles.get(0).parentNode.insertBefore( link, styles[0] ); } else { DOM().head.appendChild( link ); } if ( IE ) { // IE has a limit of 31 stylesheets in one document if( length >= 31 ) { Galleria.raise( 'You have reached the browser stylesheet limit (31)', true ); return; } } } if ( typeof callback === 'function' ) { // First check for dummy element (new in 1.2.8) var $loader = $('<s>').attr( 'id', 'galleria-loader' ).hide().appendTo( DOM().body ); Utils.wait({ until: function() { return $loader.height() == 1; }, success: function() { $loader.remove(); callback.call( link, link ); }, error: function() { $loader.remove(); // If failed, tell the dev to download the latest theme Galleria.raise( 'Theme CSS could not load after 20 sec. Please download the latest theme at http://galleria.io/customer/', true ); }, timeout: 20000 }); } return link; } }; }()), // the transitions holder _transitions = (function() { var _slide = function(params, complete, fade, door) { var easing = this.getOptions('easing'), distance = this.getStageWidth(), from = { left: distance * ( params.rewind ? -1 : 1 ) }, to = { left: 0 }; if ( fade ) { from.opacity = 0; to.opacity = 1; } else { from.opacity = 1; } $(params.next).css(from); Utils.animate(params.next, to, { duration: params.speed, complete: (function( elems ) { return function() { complete(); elems.css({ left: 0 }); }; }( $( params.next ).add( params.prev ) )), queue: false, easing: easing }); if (door) { params.rewind = !params.rewind; } if (params.prev) { from = { left: 0 }; to = { left: distance * ( params.rewind ? 1 : -1 ) }; if ( fade ) { from.opacity = 1; to.opacity = 0; } $(params.prev).css(from); Utils.animate(params.prev, to, { duration: params.speed, queue: false, easing: easing, complete: function() { $(this).css('opacity', 0); } }); } }; return { active: false, init: function( effect, params, complete ) { if ( _transitions.effects.hasOwnProperty( effect ) ) { _transitions.effects[ effect ].call( this, params, complete ); } }, effects: { fade: function(params, complete) { $(params.next).css({ opacity: 0, left: 0 }).show(); Utils.animate(params.next, { opacity: 1 },{ duration: params.speed, complete: complete }); if (params.prev) { $(params.prev).css('opacity',1).show(); Utils.animate(params.prev, { opacity: 0 },{ duration: params.speed }); } }, flash: function(params, complete) { $(params.next).css({ opacity: 0, left: 0 }); if (params.prev) { Utils.animate( params.prev, { opacity: 0 },{ duration: params.speed/2, complete: function() { Utils.animate( params.next, { opacity:1 },{ duration: params.speed, complete: complete }); } }); } else { Utils.animate( params.next, { opacity: 1 },{ duration: params.speed, complete: complete }); } }, pulse: function(params, complete) { if (params.prev) { $(params.prev).hide(); } $(params.next).css({ opacity: 0, left: 0 }).show(); Utils.animate(params.next, { opacity:1 },{ duration: params.speed, complete: complete }); }, slide: function(params, complete) { _slide.apply( this, Utils.array( arguments ) ); }, fadeslide: function(params, complete) { _slide.apply( this, Utils.array( arguments ).concat( [true] ) ); }, doorslide: function(params, complete) { _slide.apply( this, Utils.array( arguments ).concat( [false, true] ) ); } } }; }()); _nativeFullscreen.listen(); /** The main Galleria class @class @constructor @example var gallery = new Galleria(); @author http://aino.se @requires jQuery */ Galleria = function() { var self = this; // internal options this._options = {}; // flag for controlling play/pause this._playing = false; // internal interval for slideshow this._playtime = 5000; // internal variable for the currently active image this._active = null; // the internal queue, arrayified this._queue = { length: 0 }; // the internal data array this._data = []; // the internal dom collection this._dom = {}; // the internal thumbnails array this._thumbnails = []; // the internal layers array this._layers = []; // internal init flag this._initialized = false; // internal firstrun flag this._firstrun = false; // global stagewidth/height this._stageWidth = 0; this._stageHeight = 0; // target holder this._target = undef; // bind hashes this._binds = []; // instance id this._id = parseInt(Math.random()*10000, 10); // add some elements var divs = 'container stage images image-nav image-nav-left image-nav-right ' + 'info info-text info-title info-description ' + 'thumbnails thumbnails-list thumbnails-container thumb-nav-left thumb-nav-right ' + 'loader counter tooltip', spans = 'current total'; $.each( divs.split(' '), function( i, elemId ) { self._dom[ elemId ] = Utils.create( 'galleria-' + elemId ); }); $.each( spans.split(' '), function( i, elemId ) { self._dom[ elemId ] = Utils.create( 'galleria-' + elemId, 'span' ); }); // the internal keyboard object // keeps reference of the keybinds and provides helper methods for binding keys var keyboard = this._keyboard = { keys : { 'UP': 38, 'DOWN': 40, 'LEFT': 37, 'RIGHT': 39, 'RETURN': 13, 'ESCAPE': 27, 'BACKSPACE': 8, 'SPACE': 32 }, map : {}, bound: false, press: function(e) { var key = e.keyCode || e.which; if ( key in keyboard.map && typeof keyboard.map[key] === 'function' ) { keyboard.map[key].call(self, e); } }, attach: function(map) { var key, up; for( key in map ) { if ( map.hasOwnProperty( key ) ) { up = key.toUpperCase(); if ( up in keyboard.keys ) { keyboard.map[ keyboard.keys[up] ] = map[key]; } else { keyboard.map[ up ] = map[key]; } } } if ( !keyboard.bound ) { keyboard.bound = true; $doc.bind('keydown', keyboard.press); } }, detach: function() { keyboard.bound = false; keyboard.map = {}; $doc.unbind('keydown', keyboard.press); } }; // internal controls for keeping track of active / inactive images var controls = this._controls = { 0: undef, 1: undef, active : 0, swap : function() { controls.active = controls.active ? 0 : 1; }, getActive : function() { return controls[ controls.active ]; }, getNext : function() { return controls[ 1 - controls.active ]; } }; // internal carousel object var carousel = this._carousel = { // shortcuts next: self.$('thumb-nav-right'), prev: self.$('thumb-nav-left'), // cache the width width: 0, // track the current position current: 0, // cache max value max: 0, // save all hooks for each width in an array hooks: [], // update the carousel // you can run this method anytime, f.ex on window.resize update: function() { var w = 0, h = 0, hooks = [0]; $.each( self._thumbnails, function( i, thumb ) { if ( thumb.ready ) { w += thumb.outerWidth || $( thumb.container ).outerWidth( true ); hooks[ i+1 ] = w; h = Math.max( h, thumb.outerHeight || $( thumb.container).outerHeight( true ) ); } }); self.$( 'thumbnails' ).css({ width: w, height: h }); carousel.max = w; carousel.hooks = hooks; carousel.width = self.$( 'thumbnails-list' ).width(); carousel.setClasses(); self.$( 'thumbnails-container' ).toggleClass( 'galleria-carousel', w > carousel.width ); // one extra calculation carousel.width = self.$( 'thumbnails-list' ).width(); // todo: fix so the carousel moves to the left }, bindControls: function() { var i; carousel.next.bind( 'click', function(e) { e.preventDefault(); if ( self._options.carouselSteps === 'auto' ) { for ( i = carousel.current; i < carousel.hooks.length; i++ ) { if ( carousel.hooks[i] - carousel.hooks[ carousel.current ] > carousel.width ) { carousel.set(i - 2); break; } } } else { carousel.set( carousel.current + self._options.carouselSteps); } }); carousel.prev.bind( 'click', function(e) { e.preventDefault(); if ( self._options.carouselSteps === 'auto' ) { for ( i = carousel.current; i >= 0; i-- ) { if ( carousel.hooks[ carousel.current ] - carousel.hooks[i] > carousel.width ) { carousel.set( i + 2 ); break; } else if ( i === 0 ) { carousel.set( 0 ); break; } } } else { carousel.set( carousel.current - self._options.carouselSteps ); } }); }, // calculate and set positions set: function( i ) { i = Math.max( i, 0 ); while ( carousel.hooks[i - 1] + carousel.width >= carousel.max && i >= 0 ) { i--; } carousel.current = i; carousel.animate(); }, // get the last position getLast: function(i) { return ( i || carousel.current ) - 1; }, // follow the active image follow: function(i) { //don't follow if position fits if ( i === 0 || i === carousel.hooks.length - 2 ) { carousel.set( i ); return; } // calculate last position var last = carousel.current; while( carousel.hooks[last] - carousel.hooks[ carousel.current ] < carousel.width && last <= carousel.hooks.length ) { last ++; } // set position if ( i - 1 < carousel.current ) { carousel.set( i - 1 ); } else if ( i + 2 > last) { carousel.set( i - last + carousel.current + 2 ); } }, // helper for setting disabled classes setClasses: function() { carousel.prev.toggleClass( 'disabled', !carousel.current ); carousel.next.toggleClass( 'disabled', carousel.hooks[ carousel.current ] + carousel.width >= carousel.max ); }, // the animation method animate: function(to) { carousel.setClasses(); var num = carousel.hooks[ carousel.current ] * -1; if ( isNaN( num ) ) { return; } Utils.animate(self.get( 'thumbnails' ), { left: num },{ duration: self._options.carouselSpeed, easing: self._options.easing, queue: false }); } }; // tooltip control // added in 1.2 var tooltip = this._tooltip = { initialized : false, open: false, timer: 'tooltip' + self._id, swapTimer: 'swap' + self._id, init: function() { tooltip.initialized = true; var css = '.galleria-tooltip{padding:3px 8px;max-width:50%;background:#ffe;color:#000;z-index:3;position:absolute;font-size:11px;line-height:1.3;' + 'opacity:0;box-shadow:0 0 2px rgba(0,0,0,.4);-moz-box-shadow:0 0 2px rgba(0,0,0,.4);-webkit-box-shadow:0 0 2px rgba(0,0,0,.4);}'; Utils.insertStyleTag(css); self.$( 'tooltip' ).css({ opacity: 0.8, visibility: 'visible', display: 'none' }); }, // move handler move: function( e ) { var mouseX = self.getMousePosition(e).x, mouseY = self.getMousePosition(e).y, $elem = self.$( 'tooltip' ), x = mouseX, y = mouseY, height = $elem.outerHeight( true ) + 1, width = $elem.outerWidth( true ), limitY = height + 15; var maxX = self.$( 'container').width() - width - 2, maxY = self.$( 'container').height() - height - 2; if ( !isNaN(x) && !isNaN(y) ) { x += 10; y -= 30; x = Math.max( 0, Math.min( maxX, x ) ); y = Math.max( 0, Math.min( maxY, y ) ); if( mouseY < limitY ) { y = limitY; } $elem.css({ left: x, top: y }); } }, // bind elements to the tooltip // you can bind multiple elementIDs using { elemID : function } or { elemID : string } // you can also bind single DOM elements using bind(elem, string) bind: function( elem, value ) { // todo: revise if alternative tooltip is needed for mobile devices if (Galleria.TOUCH) { return; } if (! tooltip.initialized ) { tooltip.init(); } var mouseout = function() { self.$( 'container' ).unbind( 'mousemove', tooltip.move ); self.clearTimer( tooltip.timer ); self.$( 'tooltip' ).stop().animate({ opacity: 0 }, 200, function() { self.$( 'tooltip' ).hide(); self.addTimer( tooltip.swapTimer, function() { tooltip.open = false; }, 1000); }); }; var hover = function( elem, value) { tooltip.define( elem, value ); $( elem ).hover(function() { self.clearTimer( tooltip.swapTimer ); self.$('container').unbind( 'mousemove', tooltip.move ).bind( 'mousemove', tooltip.move ).trigger( 'mousemove' ); tooltip.show( elem ); self.addTimer( tooltip.timer, function() { self.$( 'tooltip' ).stop().show().animate({ opacity: 1 }); tooltip.open = true; }, tooltip.open ? 0 : 500); }, mouseout).click(mouseout); }; if ( typeof value === 'string' ) { hover( ( elem in self._dom ? self.get( elem ) : elem ), value ); } else { // asume elemID here $.each( elem, function( elemID, val ) { hover( self.get(elemID), val ); }); } }, show: function( elem ) { elem = $( elem in self._dom ? self.get(elem) : elem ); var text = elem.data( 'tt' ), mouseup = function( e ) { // attach a tiny settimeout to make sure the new tooltip is filled window.setTimeout( (function( ev ) { return function() { tooltip.move( ev ); }; }( e )), 10); elem.unbind( 'mouseup', mouseup ); }; text = typeof text === 'function' ? text() : text; if ( ! text ) { return; } self.$( 'tooltip' ).html( text.replace(/\s/, '&nbsp;') ); // trigger mousemove on mouseup in case of click elem.bind( 'mouseup', mouseup ); }, define: function( elem, value ) { // we store functions, not strings if (typeof value !== 'function') { var s = value; value = function() { return s; }; } elem = $( elem in self._dom ? self.get(elem) : elem ).data('tt', value); tooltip.show( elem ); } }; // internal fullscreen control var fullscreen = this._fullscreen = { scrolled: 0, crop: undef, transition: undef, active: false, keymap: self._keyboard.map, parseCallback: function( callback, enter ) { return _transitions.active ? function() { if ( typeof callback == 'function' ) { callback(); } var active = self._controls.getActive(), next = self._controls.getNext(); self._scaleImage( next ); self._scaleImage( active ); if ( enter && self._options.trueFullscreen ) { // Firefox bug, revise later $( active.container ).add( next.container ).trigger( 'transitionend' ); } } : callback; }, enter: function( callback ) { callback = fullscreen.parseCallback( callback, true ); if ( self._options.trueFullscreen && _nativeFullscreen.support ) { _nativeFullscreen.enter( self, callback ); } else { fullscreen._enter( callback ); } }, _enter: function( callback ) { fullscreen.active = true; // hide the image until rescale is complete Utils.hide( self.getActiveImage() ); self.$( 'container' ).addClass( 'fullscreen' ); fullscreen.scrolled = $win.scrollTop(); // begin styleforce Utils.forceStyles(self.get('container'), { position: 'fixed', top: 0, left: 0, width: '100%', height: '100%', zIndex: 10000 }); var htmlbody = { height: '100%', overflow: 'hidden', margin:0, padding:0 }, data = self.getData(), options = self._options; Utils.forceStyles( DOM().html, htmlbody ); Utils.forceStyles( DOM().body, htmlbody ); // temporarily attach some keys // save the old ones first in a cloned object fullscreen.keymap = $.extend({}, self._keyboard.map); self.attachKeyboard({ escape: self.exitFullscreen, right: self.next, left: self.prev }); // temporarily save the crop fullscreen.crop = options.imageCrop; // set fullscreen options if ( options.fullscreenCrop != undef ) { options.imageCrop = options.fullscreenCrop; } // swap to big image if it's different from the display image if ( data && data.big && data.image !== data.big ) { var big = new Galleria.Picture(), cached = big.isCached( data.big ), index = self.getIndex(), thumb = self._thumbnails[ index ]; self.trigger( { type: Galleria.LOADSTART, cached: cached, rewind: false, index: index, imageTarget: self.getActiveImage(), thumbTarget: thumb, galleriaData: data }); big.load( data.big, function( big ) { self._scaleImage( big, { complete: function( big ) { self.trigger({ type: Galleria.LOADFINISH, cached: cached, index: index, rewind: false, imageTarget: big.image, thumbTarget: thumb }); var image = self._controls.getActive().image; if ( image ) { $( image ).width( big.image.width ).height( big.image.height ) .attr( 'style', $( big.image ).attr('style') ) .attr( 'src', big.image.src ); } } }); }); } // init the first rescale and attach callbacks self.rescale(function() { self.addTimer(false, function() { // show the image after 50 ms Utils.show( self.getActiveImage() ); if (typeof callback === 'function') { callback.call( self ); } }, 100); self.trigger( Galleria.FULLSCREEN_ENTER ); }); // bind the scaling to the resize event $win.resize( function() { fullscreen.scale(); } ); }, scale : function() { self.rescale(); }, exit: function( callback ) { callback = fullscreen.parseCallback( callback ); if ( self._options.trueFullscreen && _nativeFullscreen.support ) { _nativeFullscreen.exit( callback ); } else { fullscreen._exit( callback ); } }, _exit: function( callback ) { fullscreen.active = false; Utils.hide( self.getActiveImage() ); self.$('container').removeClass( 'fullscreen' ); // revert all styles Utils.revertStyles( self.get('container'), DOM().html, DOM().body ); // scroll back window.scrollTo(0, fullscreen.scrolled); // detach all keyboard events and apply the old keymap self.detachKeyboard(); self.attachKeyboard( fullscreen.keymap ); // bring back cached options self._options.imageCrop = fullscreen.crop; //self._options.transition = fullscreen.transition; // return to original image var big = self.getData().big, image = self._controls.getActive().image; if ( !self.getData().iframe && image && big && big == image.src ) { window.setTimeout(function(src) { return function() { image.src = src; }; }( self.getData().image ), 1 ); } self.rescale(function() { self.addTimer(false, function() { // show the image after 50 ms Utils.show( self.getActiveImage() ); if ( typeof callback === 'function' ) { callback.call( self ); } $win.trigger( 'resize' ); }, 50); self.trigger( Galleria.FULLSCREEN_EXIT ); }); $win.unbind('resize', fullscreen.scale); } }; // the internal idle object for controlling idle states var idle = this._idle = { trunk: [], bound: false, active: false, add: function(elem, to, from, hide) { if (!elem) { return; } if (!idle.bound) { idle.addEvent(); } elem = $(elem); if ( typeof from == 'boolean' ) { hide = from; from = {}; } from = from || {}; var extract = {}, style; for ( style in to ) { if ( to.hasOwnProperty( style ) ) { extract[ style ] = elem.css( style ); } } elem.data('idle', { from: $.extend( extract, from ), to: to, complete: true, busy: false }); if ( !hide ) { idle.addTimer(); } else { elem.css( to ); } idle.trunk.push(elem); }, remove: function(elem) { elem = $(elem); $.each(idle.trunk, function(i, el) { if ( el && el.length && !el.not(elem).length ) { elem.css( elem.data( 'idle' ).from ); idle.trunk.splice(i, 1); } }); if (!idle.trunk.length) { idle.removeEvent(); self.clearTimer( idle.timer ); } }, addEvent : function() { idle.bound = true; self.$('container').bind( 'mousemove click', idle.showAll ); if ( self._options.idleMode == 'hover' ) { self.$('container').bind( 'mouseleave', idle.hide ); } }, removeEvent : function() { idle.bound = false; self.$('container').bind( 'mousemove click', idle.showAll ); if ( self._options.idleMode == 'hover' ) { self.$('container').unbind( 'mouseleave', idle.hide ); } }, addTimer : function() { if( self._options.idleMode == 'hover' ) { return; } self.addTimer( 'idle', function() { idle.hide(); }, self._options.idleTime ); }, hide : function() { if ( !self._options.idleMode || self.getIndex() === false || self.getData().iframe ) { return; } self.trigger( Galleria.IDLE_ENTER ); var len = idle.trunk.length; $.each( idle.trunk, function(i, elem) { var data = elem.data('idle'); if (! data) { return; } elem.data('idle').complete = false; Utils.animate( elem, data.to, { duration: self._options.idleSpeed, complete: function() { if ( i == len-1 ) { idle.active = false; } } }); }); }, showAll : function() { self.clearTimer( 'idle' ); $.each( idle.trunk, function( i, elem ) { idle.show( elem ); }); }, show: function(elem) { var data = elem.data('idle'); if ( !idle.active || ( !data.busy && !data.complete ) ) { data.busy = true; self.trigger( Galleria.IDLE_EXIT ); self.clearTimer( 'idle' ); Utils.animate( elem, data.from, { duration: self._options.idleSpeed/2, complete: function() { idle.active = true; $(elem).data('idle').busy = false; $(elem).data('idle').complete = true; } }); } idle.addTimer(); } }; // internal lightbox object // creates a predesigned lightbox for simple popups of images in galleria var lightbox = this._lightbox = { width : 0, height : 0, initialized : false, active : null, image : null, elems : {}, keymap: false, init : function() { // trigger the event self.trigger( Galleria.LIGHTBOX_OPEN ); if ( lightbox.initialized ) { return; } lightbox.initialized = true; // create some elements to work with var elems = 'overlay box content shadow title info close prevholder prev nextholder next counter image', el = {}, op = self._options, css = '', abs = 'position:absolute;', prefix = 'lightbox-', cssMap = { overlay: 'position:fixed;display:none;opacity:'+op.overlayOpacity+';filter:alpha(opacity='+(op.overlayOpacity*100)+ ');top:0;left:0;width:100%;height:100%;background:'+op.overlayBackground+';z-index:99990', box: 'position:fixed;display:none;width:400px;height:400px;top:50%;left:50%;margin-top:-200px;margin-left:-200px;z-index:99991', shadow: abs+'background:#000;width:100%;height:100%;', content: abs+'background-color:#fff;top:10px;left:10px;right:10px;bottom:10px;overflow:hidden', info: abs+'bottom:10px;left:10px;right:10px;color:#444;font:11px/13px arial,sans-serif;height:13px', close: abs+'top:10px;right:10px;height:20px;width:20px;background:#fff;text-align:center;cursor:pointer;color:#444;font:16px/22px arial,sans-serif;z-index:99999', image: abs+'top:10px;left:10px;right:10px;bottom:30px;overflow:hidden;display:block;', prevholder: abs+'width:50%;top:0;bottom:40px;cursor:pointer;', nextholder: abs+'width:50%;top:0;bottom:40px;right:-1px;cursor:pointer;', prev: abs+'top:50%;margin-top:-20px;height:40px;width:30px;background:#fff;left:20px;display:none;text-align:center;color:#000;font:bold 16px/36px arial,sans-serif', next: abs+'top:50%;margin-top:-20px;height:40px;width:30px;background:#fff;right:20px;left:auto;display:none;font:bold 16px/36px arial,sans-serif;text-align:center;color:#000', title: 'float:left', counter: 'float:right;margin-left:8px;' }, hover = function(elem) { return elem.hover( function() { $(this).css( 'color', '#bbb' ); }, function() { $(this).css( 'color', '#444' ); } ); }, appends = {}; // IE8 fix for IE's transparent background event "feature" if ( IE && IE > 7 ) { cssMap.nextholder += 'background:#000;filter:alpha(opacity=0);'; cssMap.prevholder += 'background:#000;filter:alpha(opacity=0);'; } // create and insert CSS $.each(cssMap, function( key, value ) { css += '.galleria-'+prefix+key+'{'+value+'}'; }); css += '.galleria-'+prefix+'box.iframe .galleria-'+prefix+'prevholder,'+ '.galleria-'+prefix+'box.iframe .galleria-'+prefix+'nextholder{'+ 'width:100px;height:100px;top:50%;margin-top:-70px}'; Utils.insertStyleTag( css ); // create the elements $.each(elems.split(' '), function( i, elemId ) { self.addElement( 'lightbox-' + elemId ); el[ elemId ] = lightbox.elems[ elemId ] = self.get( 'lightbox-' + elemId ); }); // initiate the image lightbox.image = new Galleria.Picture(); // append the elements $.each({ box: 'shadow content close prevholder nextholder', info: 'title counter', content: 'info image', prevholder: 'prev', nextholder: 'next' }, function( key, val ) { var arr = []; $.each( val.split(' '), function( i, prop ) { arr.push( prefix + prop ); }); appends[ prefix+key ] = arr; }); self.append( appends ); $( el.image ).append( lightbox.image.container ); $( DOM().body ).append( el.overlay, el.box ); Utils.optimizeTouch( el.box ); // add the prev/next nav and bind some controls hover( $( el.close ).bind( 'click', lightbox.hide ).html('&#215;') ); $.each( ['Prev','Next'], function(i, dir) { var $d = $( el[ dir.toLowerCase() ] ).html( /v/.test( dir ) ? '&#8249;&nbsp;' : '&nbsp;&#8250;' ), $e = $( el[ dir.toLowerCase()+'holder'] ); $e.bind( 'click', function() { lightbox[ 'show' + dir ](); }); // IE7 and touch devices will simply show the nav if ( IE < 8 || Galleria.TOUCH ) { $d.show(); return; } $e.hover( function() { $d.show(); }, function(e) { $d.stop().fadeOut( 200 ); }); }); $( el.overlay ).bind( 'click', lightbox.hide ); // the lightbox animation is slow on ipad if ( Galleria.IPAD ) { self._options.lightboxTransitionSpeed = 0; } }, rescale: function(event) { // calculate var width = Math.min( $win.width()-40, lightbox.width ), height = Math.min( $win.height()-60, lightbox.height ), ratio = Math.min( width / lightbox.width, height / lightbox.height ), destWidth = Math.round( lightbox.width * ratio ) + 40, destHeight = Math.round( lightbox.height * ratio ) + 60, to = { width: destWidth, height: destHeight, 'margin-top': Math.ceil( destHeight / 2 ) *- 1, 'margin-left': Math.ceil( destWidth / 2 ) *- 1 }; // if rescale event, don't animate if ( event ) { $( lightbox.elems.box ).css( to ); } else { $( lightbox.elems.box ).animate( to, { duration: self._options.lightboxTransitionSpeed, easing: self._options.easing, complete: function() { var image = lightbox.image, speed = self._options.lightboxFadeSpeed; self.trigger({ type: Galleria.LIGHTBOX_IMAGE, imageTarget: image.image }); $( image.container ).show(); $( image.image ).animate({ opacity: 1 }, speed); Utils.show( lightbox.elems.info, speed ); } }); } }, hide: function() { // remove the image lightbox.image.image = null; $win.unbind('resize', lightbox.rescale); $( lightbox.elems.box ).hide(); Utils.hide( lightbox.elems.info ); self.detachKeyboard(); self.attachKeyboard( lightbox.keymap ); lightbox.keymap = false; Utils.hide( lightbox.elems.overlay, 200, function() { $( this ).hide().css( 'opacity', self._options.overlayOpacity ); self.trigger( Galleria.LIGHTBOX_CLOSE ); }); }, showNext: function() { lightbox.show( self.getNext( lightbox.active ) ); }, showPrev: function() { lightbox.show( self.getPrev( lightbox.active ) ); }, show: function(index) { lightbox.active = index = typeof index === 'number' ? index : self.getIndex() || 0; if ( !lightbox.initialized ) { lightbox.init(); } // temporarily attach some keys // save the old ones first in a cloned object if ( !lightbox.keymap ) { lightbox.keymap = $.extend({}, self._keyboard.map); self.attachKeyboard({ escape: lightbox.hide, right: lightbox.showNext, left: lightbox.showPrev }); } $win.unbind('resize', lightbox.rescale ); var data = self.getData(index), total = self.getDataLength(), n = self.getNext( index ), ndata, p, i; Utils.hide( lightbox.elems.info ); try { for ( i = self._options.preload; i > 0; i-- ) { p = new Galleria.Picture(); ndata = self.getData( n ); p.preload( 'big' in ndata ? ndata.big : ndata.image ); n = self.getNext( n ); } } catch(e) {} lightbox.image.isIframe = !!data.iframe; $(lightbox.elems.box).toggleClass( 'iframe', !!data.iframe ); lightbox.image.load( data.iframe || data.big || data.image, function( image ) { lightbox.width = image.isIframe ? $(window).width() : image.original.width; lightbox.height = image.isIframe ? $(window).height() : image.original.height; $( image.image ).css({ width: image.isIframe ? '100%' : '100.1%', height: image.isIframe ? '100%' : '100.1%', top: 0, zIndex: 99998, opacity: 0, visibility: 'visible' }); lightbox.elems.title.innerHTML = data.title || ''; lightbox.elems.counter.innerHTML = (index + 1) + ' / ' + total; $win.resize( lightbox.rescale ); lightbox.rescale(); }); $( lightbox.elems.overlay ).show().css( 'visibility', 'visible' ); $( lightbox.elems.box ).show(); } }; // the internal timeouts object // provides helper methods for controlling timeouts var _timer = this._timer = { trunk: {}, add: function( id, fn, delay, loop ) { id = id || new Date().getTime(); loop = loop || false; this.clear( id ); if ( loop ) { var old = fn; fn = function() { old(); _timer.add( id, fn, delay ); }; } this.trunk[ id ] = window.setTimeout( fn, delay ); }, clear: function( id ) { var del = function( i ) { window.clearTimeout( this.trunk[ i ] ); delete this.trunk[ i ]; }, i; if ( !!id && id in this.trunk ) { del.call( this, id ); } else if ( typeof id === 'undefined' ) { for ( i in this.trunk ) { if ( this.trunk.hasOwnProperty( i ) ) { del.call( this, i ); } } } } }; return this; }; // end Galleria constructor Galleria.prototype = { // bring back the constructor reference constructor: Galleria, /** Use this function to initialize the gallery and start loading. Should only be called once per instance. @param {HTMLElement} target The target element @param {Object} options The gallery options @returns Instance */ init: function( target, options ) { var self = this; options = _legacyOptions( options ); // save the original ingredients this._original = { target: target, options: options, data: null }; // save the target here this._target = this._dom.target = target.nodeName ? target : $( target ).get(0); // save the original content for destruction this._original.html = this._target.innerHTML; // push the instance _instances.push( this ); // raise error if no target is detected if ( !this._target ) { Galleria.raise('Target not found', true); return; } // apply options this._options = { autoplay: false, carousel: true, carouselFollow: true, // legacy, deprecate at 1.3 carouselSpeed: 400, carouselSteps: 'auto', clicknext: false, dailymotion: { foreground: '%23EEEEEE', highlight: '%235BCEC5', background: '%23222222', logo: 0, hideInfos: 1 }, dataConfig : function( elem ) { return {}; }, dataSelector: 'img', dataSort: false, dataSource: this._target, debug: undef, dummy: undef, // 1.2.5 easing: 'galleria', extend: function(options) {}, fullscreenCrop: undef, // 1.2.5 fullscreenDoubleTap: true, // 1.2.4 toggles fullscreen on double-tap for touch devices fullscreenTransition: undef, // 1.2.6 height: 0, idleMode: true, // 1.2.4 toggles idleMode idleTime: 3000, idleSpeed: 200, imageCrop: false, imageMargin: 0, imagePan: false, imagePanSmoothness: 12, imagePosition: '50%', imageTimeout: undef, // 1.2.5 initialTransition: undef, // 1.2.4, replaces transitionInitial keepSource: false, layerFollow: true, // 1.2.5 lightbox: false, // 1.2.3 lightboxFadeSpeed: 200, lightboxTransitionSpeed: 200, linkSourceImages: true, maxScaleRatio: undef, minScaleRatio: undef, overlayOpacity: 0.85, overlayBackground: '#0b0b0b', pauseOnInteraction: true, popupLinks: false, preload: 2, queue: true, responsive: true, show: 0, showInfo: true, showCounter: true, showImagenav: true, swipe: true, // 1.2.4 thumbCrop: true, thumbEventType: 'click', thumbFit: true, // legacy, deprecate at 1.3 thumbMargin: 0, thumbQuality: 'auto', thumbDisplayOrder: true, // 1.2.8 thumbnails: true, touchTransition: undef, // 1.2.6 transition: 'fade', transitionInitial: undef, // legacy, deprecate in 1.3. Use initialTransition instead. transitionSpeed: 400, trueFullscreen: true, // 1.2.7 useCanvas: false, // 1.2.4 vimeo: { title: 0, byline: 0, portrait: 0, color: 'aaaaaa' }, wait: 5000, // 1.2.7 width: 'auto', youtube: { modestbranding: 1, autohide: 1, color: 'white', hd: 1, rel: 0, showinfo: 0 } }; // legacy support for transitionInitial this._options.initialTransition = this._options.initialTransition || this._options.transitionInitial; // turn off debug if ( options && options.debug === false ) { DEBUG = false; } // set timeout if ( options && typeof options.imageTimeout === 'number' ) { TIMEOUT = options.imageTimeout; } // set dummy if ( options && typeof options.dummy === 'string' ) { DUMMY = options.dummy; } // hide all content $( this._target ).children().hide(); // now we just have to wait for the theme... if ( typeof Galleria.theme === 'object' ) { this._init(); } else { // push the instance into the pool and run it when the theme is ready _pool.push( this ); } return this; }, // this method should only be called once per instance // for manipulation of data, use the .load method _init: function() { var self = this, options = this._options; if ( this._initialized ) { Galleria.raise( 'Init failed: Gallery instance already initialized.' ); return this; } this._initialized = true; if ( !Galleria.theme ) { Galleria.raise( 'Init failed: No theme found.', true ); return this; } // merge the theme & caller options $.extend( true, options, Galleria.theme.defaults, this._original.options, Galleria.configure.options ); // check for canvas support (function( can ) { if ( !( 'getContext' in can ) ) { can = null; return; } _canvas = _canvas || { elem: can, context: can.getContext( '2d' ), cache: {}, length: 0 }; }( doc.createElement( 'canvas' ) ) ); // bind the gallery to run when data is ready this.bind( Galleria.DATA, function() { // Warn for quirks mode if ( Galleria.QUIRK ) { Galleria.raise('Your page is in Quirks mode, Galleria may not render correctly. Please validate your HTML.'); } // save the new data this._original.data = this._data; // lets show the counter here this.get('total').innerHTML = this.getDataLength(); // cache the container var $container = this.$( 'container' ); // set ratio if height is < 2 if ( self._options.height < 2 ) { self._ratio = self._options.height; } // the gallery is ready, let's just wait for the css var num = { width: 0, height: 0 }; var testHeight = function() { return self.$( 'stage' ).height(); }; // check container and thumbnail height Utils.wait({ until: function() { // keep trying to get the value num = self._getWH(); $container.width( num.width ).height( num.height ); return testHeight() && num.width && num.height > 50; }, success: function() { self._width = num.width; self._height = num.height; self._ratio = self._ratio || num.height/num.width; // for some strange reason, webkit needs a single setTimeout to play ball if ( Galleria.WEBKIT ) { window.setTimeout( function() { self._run(); }, 1); } else { self._run(); } }, error: function() { // Height was probably not set, raise hard errors if ( testHeight() ) { Galleria.raise('Could not extract sufficient width/height of the gallery container. Traced measures: width:' + num.width + 'px, height: ' + num.height + 'px.', true); } else { Galleria.raise('Could not extract a stage height from the CSS. Traced height: ' + testHeight() + 'px.', true); } }, timeout: typeof this._options.wait == 'number' ? this._options.wait : false }); }); // build the gallery frame this.append({ 'info-text' : ['info-title', 'info-description'], 'info' : ['info-text'], 'image-nav' : ['image-nav-right', 'image-nav-left'], 'stage' : ['images', 'loader', 'counter', 'image-nav'], 'thumbnails-list' : ['thumbnails'], 'thumbnails-container' : ['thumb-nav-left', 'thumbnails-list', 'thumb-nav-right'], 'container' : ['stage', 'thumbnails-container', 'info', 'tooltip'] }); Utils.hide( this.$( 'counter' ).append( this.get( 'current' ), doc.createTextNode(' / '), this.get( 'total' ) ) ); this.setCounter('&#8211;'); Utils.hide( self.get('tooltip') ); // add a notouch class on the container to prevent unwanted :hovers on touch devices this.$( 'container' ).addClass( Galleria.TOUCH ? 'touch' : 'notouch' ); // add images to the controls $.each( new Array(2), function( i ) { // create a new Picture instance var image = new Galleria.Picture(); // apply some styles, create & prepend overlay $( image.container ).css({ position: 'absolute', top: 0, left: 0 }).prepend( self._layers[i] = $( Utils.create('galleria-layer') ).css({ position: 'absolute', top:0, left:0, right:0, bottom:0, zIndex:2 })[0] ); // append the image self.$( 'images' ).append( image.container ); // reload the controls self._controls[i] = image; }); // some forced generic styling this.$( 'images' ).css({ position: 'relative', top: 0, left: 0, width: '100%', height: '100%' }); this.$( 'thumbnails, thumbnails-list' ).css({ overflow: 'hidden', position: 'relative' }); // bind image navigation arrows this.$( 'image-nav-right, image-nav-left' ).bind( 'click', function(e) { // tune the clicknext option if ( options.clicknext ) { e.stopPropagation(); } // pause if options is set if ( options.pauseOnInteraction ) { self.pause(); } // navigate var fn = /right/.test( this.className ) ? 'next' : 'prev'; self[ fn ](); }); // hide controls if chosen to $.each( ['info','counter','image-nav'], function( i, el ) { if ( options[ 'show' + el.substr(0,1).toUpperCase() + el.substr(1).replace(/-/,'') ] === false ) { Utils.moveOut( self.get( el.toLowerCase() ) ); } }); // load up target content this.load(); // now it's usually safe to remove the content // IE will never stop loading if we remove it, so let's keep it hidden for IE (it's usually fast enough anyway) if ( !options.keepSource && !IE ) { this._target.innerHTML = ''; } // re-append the errors, if they happened before clearing if ( this.get( 'errors' ) ) { this.appendChild( 'target', 'errors' ); } // append the gallery frame this.appendChild( 'target', 'container' ); // parse the carousel on each thumb load if ( options.carousel ) { var count = 0, show = options.show; this.bind( Galleria.THUMBNAIL, function() { this.updateCarousel(); if ( ++count == this.getDataLength() && typeof show == 'number' && show > 0 ) { this._carousel.follow( show ); } }); } // bind window resize for responsiveness if ( options.responsive ) { $win.bind( 'resize', function() { if ( !self.isFullscreen() ) { self.resize(); } }); } // bind swipe gesture if ( options.swipe ) { (function( images ) { var swipeStart = [0,0], swipeStop = [0,0], limitX = 30, limitY = 100, multi = false, tid = 0, data, ev = { start: 'touchstart', move: 'touchmove', stop: 'touchend' }, getData = function(e) { return e.originalEvent.touches ? e.originalEvent.touches[0] : e; }, moveHandler = function( e ) { if ( e.originalEvent.touches && e.originalEvent.touches.length > 1 ) { return; } data = getData( e ); swipeStop = [ data.pageX, data.pageY ]; if ( !swipeStart[0] ) { swipeStart = swipeStop; } if ( Math.abs( swipeStart[0] - swipeStop[0] ) > 10 ) { e.preventDefault(); } }, upHandler = function( e ) { images.unbind( ev.move, moveHandler ); // if multitouch (possibly zooming), abort if ( ( e.originalEvent.touches && e.originalEvent.touches.length ) || multi ) { multi = !multi; return; } if ( Utils.timestamp() - tid < 1000 && Math.abs( swipeStart[0] - swipeStop[0] ) > limitX && Math.abs( swipeStart[1] - swipeStop[1] ) < limitY ) { e.preventDefault(); self[ swipeStart[0] > swipeStop[0] ? 'next' : 'prev' ](); } swipeStart = swipeStop = [0,0]; }; images.bind(ev.start, function(e) { if ( e.originalEvent.touches && e.originalEvent.touches.length > 1 ) { return; } data = getData(e); tid = Utils.timestamp(); swipeStart = swipeStop = [ data.pageX, data.pageY ]; images.bind(ev.move, moveHandler ).one(ev.stop, upHandler); }); }( self.$( 'images' ) )); // double-tap/click fullscreen toggle if ( options.fullscreenDoubleTap ) { this.$( 'stage' ).bind( 'touchstart', (function() { var last, cx, cy, lx, ly, now, getData = function(e) { return e.originalEvent.touches ? e.originalEvent.touches[0] : e; }; return function(e) { now = Galleria.utils.timestamp(); cx = getData(e).pageX; cy = getData(e).pageY; if ( ( now - last < 500 ) && ( cx - lx < 20) && ( cy - ly < 20) ) { self.toggleFullscreen(); e.preventDefault(); self.$( 'stage' ).unbind( 'touchend', arguments.callee ); return; } last = now; lx = cx; ly = cy; }; }())); } } // optimize touch for container Utils.optimizeTouch( this.get( 'container' ) ); // bind the ons $.each( Galleria.on.binds, function(i, bind) { // check if already bound if ( $.inArray( bind.hash, self._binds ) == -1 ) { self.bind( bind.type, bind.callback ); } }); return this; }, addTimer : function() { this._timer.add.apply( this._timer, Utils.array( arguments ) ); return this; }, clearTimer : function() { this._timer.clear.apply( this._timer, Utils.array( arguments ) ); return this; }, // parse width & height from CSS or options _getWH : function() { var $container = this.$( 'container' ), $target = this.$( 'target' ), self = this, num = {}, arr; $.each(['width', 'height'], function( i, m ) { // first check if options is set if ( self._options[ m ] && typeof self._options[ m ] === 'number') { num[ m ] = self._options[ m ]; } else { arr = [ Utils.parseValue( $container.css( m ) ), // the container css height Utils.parseValue( $target.css( m ) ), // the target css height $container[ m ](), // the container jQuery method $target[ m ]() // the target jQuery method ]; // if first time, include the min-width & min-height if ( !self[ '_'+m ] ) { arr.splice(arr.length, Utils.parseValue( $container.css( 'min-'+m ) ), Utils.parseValue( $target.css( 'min-'+m ) ) ); } // else extract the measures from different sources and grab the highest value num[ m ] = Math.max.apply( Math, arr ); } }); // allow setting a height ratio instead of exact value // useful when doing responsive galleries if ( self._ratio ) { num.height = num.width * self._ratio; } return num; }, // Creates the thumbnails and carousel // can be used at any time, f.ex when the data object is manipulated // push is an optional argument with pushed images _createThumbnails : function( push ) { this.get( 'total' ).innerHTML = this.getDataLength(); var src, thumb, data, special, $container, self = this, o = this._options, i = push ? this._data.length - push.length : 0, chunk = i, thumbchunk = [], loadindex = 0, gif = IE < 8 ? 'http://upload.wikimedia.org/wikipedia/commons/c/c0/Blank.gif' : 'data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D', // get previously active thumbnail, if exists active = (function() { var a = self.$('thumbnails').find('.active'); if ( !a.length ) { return false; } return a.find('img').attr('src'); }()), // cache the thumbnail option optval = typeof o.thumbnails === 'string' ? o.thumbnails.toLowerCase() : null, // move some data into the instance // for some reason, jQuery cant handle css(property) when zooming in FF, breaking the gallery // so we resort to getComputedStyle for browsers who support it getStyle = function( prop ) { return doc.defaultView && doc.defaultView.getComputedStyle ? doc.defaultView.getComputedStyle( thumb.container, null )[ prop ] : $container.css( prop ); }, fake = function(image, index, container) { return function() { $( container ).append( image ); self.trigger({ type: Galleria.THUMBNAIL, thumbTarget: image, index: index, galleriaData: self.getData( index ) }); }; }, onThumbEvent = function( e ) { // pause if option is set if ( o.pauseOnInteraction ) { self.pause(); } // extract the index from the data var index = $( e.currentTarget ).data( 'index' ); if ( self.getIndex() !== index ) { self.show( index ); } e.preventDefault(); }, thumbComplete = function( thumb, callback ) { $( thumb.container ).css( 'visibility', 'visible' ); self.trigger({ type: Galleria.THUMBNAIL, thumbTarget: thumb.image, index: thumb.data.order, galleriaData: self.getData( thumb.data.order ) }); if ( typeof callback == 'function' ) { callback.call( self, thumb ); } }, onThumbLoad = function( thumb, callback ) { // scale when ready thumb.scale({ width: thumb.data.width, height: thumb.data.height, crop: o.thumbCrop, margin: o.thumbMargin, canvas: o.useCanvas, complete: function( thumb ) { // shrink thumbnails to fit var top = ['left', 'top'], arr = ['Width', 'Height'], m, css, data = self.getData( thumb.index ), special = data.thumb.split(':'); // calculate shrinked positions $.each(arr, function( i, measure ) { m = measure.toLowerCase(); if ( (o.thumbCrop !== true || o.thumbCrop === m ) && o.thumbFit ) { css = {}; css[ m ] = thumb[ m ]; $( thumb.container ).css( css ); css = {}; css[ top[ i ] ] = 0; $( thumb.image ).css( css ); } // cache outer measures thumb[ 'outer' + measure ] = $( thumb.container )[ 'outer' + measure ]( true ); }); // set high quality if downscale is moderate Utils.toggleQuality( thumb.image, o.thumbQuality === true || ( o.thumbQuality === 'auto' && thumb.original.width < thumb.width * 3 ) ); // get "special" thumbs from provider if( data.iframe && special.length == 2 && special[0] in _video ) { _video[ special[0] ].getThumb( special[1], (function(img) { return function(src) { img.src = src; thumbComplete( thumb, callback ); }; }( thumb.image ) )); } else if ( o.thumbDisplayOrder && !thumb.lazy ) { $.each( thumbchunk, function( i, th ) { if ( i === loadindex && th.ready && !th.displayed ) { loadindex++; th.displayed = true; thumbComplete( th, callback ); return; } }); } else { thumbComplete( thumb, callback ); } } }); }; if ( !push ) { this._thumbnails = []; this.$( 'thumbnails' ).empty(); } // loop through data and create thumbnails for( ; this._data[ i ]; i++ ) { data = this._data[ i ]; // get source from thumb or image src = data.thumb || data.image; if ( ( o.thumbnails === true || optval == 'lazy' ) && ( data.thumb || data.image ) ) { // add a new Picture instance thumb = new Galleria.Picture(i); // save the index thumb.index = i; // flag displayed thumb.displayed = false; // flag lazy thumb.lazy = false; // flag video thumb.video = false; // append the thumbnail this.$( 'thumbnails' ).append( thumb.container ); // cache the container $container = $( thumb.container ); // hide it $container.css( 'visibility', 'hidden' ); thumb.data = { width : Utils.parseValue( getStyle( 'width' ) ), height : Utils.parseValue( getStyle( 'height' ) ), order : i, src : src }; // grab & reset size for smoother thumbnail loads if ( o.thumbFit && o.thumbCrop !== true ) { $container.css( { width: 'auto', height: 'auto' } ); } else { $container.css( { width: thumb.data.width, height: thumb.data.height } ); } // load the thumbnail special = src.split(':'); if ( special.length == 2 && special[0] in _video ) { thumb.video = true; thumb.ready = true; thumb.load( gif, { height: thumb.data.height, width: thumb.data.height*1.25 }, onThumbLoad); } else if ( optval == 'lazy' ) { $container.addClass( 'lazy' ); thumb.lazy = true; thumb.load( gif, { height: thumb.data.height, width: thumb.data.width }); } else { thumb.load( src, onThumbLoad ); } // preload all images here if ( o.preload === 'all' ) { thumb.preload( data.image ); } // create empty spans if thumbnails is set to 'empty' } else if ( data.iframe || optval === 'empty' || optval === 'numbers' ) { thumb = { container: Utils.create( 'galleria-image' ), image: Utils.create( 'img', 'span' ), ready: true }; // create numbered thumbnails if ( optval === 'numbers' ) { $( thumb.image ).text( i + 1 ); } if ( data.iframe ) { $( thumb.image ).addClass( 'iframe' ); } this.$( 'thumbnails' ).append( thumb.container ); // we need to "fake" a loading delay before we append and trigger // 50+ should be enough window.setTimeout( ( fake )( thumb.image, i, thumb.container ), 50 + ( i*20 ) ); // create null object to silent errors } else { thumb = { container: null, image: null }; } // add events for thumbnails // you can control the event type using thumb_event_type // we'll add the same event to the source if it's kept $( thumb.container ).add( o.keepSource && o.linkSourceImages ? data.original : null ) .data('index', i).bind( o.thumbEventType, onThumbEvent ) .data('thumbload', onThumbLoad); if (active === src) { $( thumb.container ).addClass( 'active' ); } this._thumbnails.push( thumb ); } thumbchunk = this._thumbnails.slice( chunk ); return this; }, /** Lazy-loads thumbnails. You can call this method to load lazy thumbnails at run time @param {Array|Number} index Index or array of indexes of thumbnails to be loaded @param {Function} complete Callback that is called when all lazy thumbnails have been loaded @returns Instance */ lazyLoad: function( index, complete ) { var arr = index.constructor == Array ? index : [ index ], self = this, thumbnails = this.$( 'thumbnails' ).children().filter(function() { return $(this).data('lazy-src'); }), loaded = 0; $.each( arr, function(i, ind) { if ( ind > self._thumbnails.length - 1 ) { return; } var thumb = self._thumbnails[ ind ], data = thumb.data, special = data.src.split(':'), callback = function() { if ( ++loaded == arr.length && typeof complete == 'function' ) { complete.call( self ); } }, thumbload = $( thumb.container ).data( 'thumbload' ); if ( thumb.video ) { thumbload.call( self, thumb, callback ); } else { thumb.load( data.src , function( thumb ) { thumbload.call( self, thumb, callback ); }); } }); return this; }, /** Lazy-loads thumbnails in chunks. This method automatcally chops up the loading process of many thumbnails into chunks @param {Number} size Size of each chunk to be loaded @param {Number} [delay] Delay between each loads @returns Instance */ lazyLoadChunks: function( size, delay ) { var len = this.getDataLength(), i = 0, n = 0, arr = [], temp = [], self = this; delay = delay || 0; for( ; i<len; i++ ) { temp.push(i); if ( ++n == size || i == len-1 ) { arr.push( temp ); n = 0; temp = []; } } var init = function( wait ) { var a = arr.shift(); if ( a ) { window.setTimeout(function() { self.lazyLoad(a, function() { init( true ); }); }, ( delay && wait ) ? delay : 0 ); } }; init( false ); return this; }, // the internal _run method should be called after loading data into galleria // makes sure the gallery has proper measurements before postrun & ready _run : function() { var self = this; self._createThumbnails(); // make sure we have a stageHeight && stageWidth Utils.wait({ timeout: 10000, until: function() { // Opera crap if ( Galleria.OPERA ) { self.$( 'stage' ).css( 'display', 'inline-block' ); } self._stageWidth = self.$( 'stage' ).width(); self._stageHeight = self.$( 'stage' ).height(); return( self._stageWidth && self._stageHeight > 50 ); // what is an acceptable height? }, success: function() { // save the instance _galleries.push( self ); // postrun some stuff after the gallery is ready // show counter Utils.show( self.get('counter') ); // bind carousel nav if ( self._options.carousel ) { self._carousel.bindControls(); } // start autoplay if ( self._options.autoplay ) { self.pause(); if ( typeof self._options.autoplay === 'number' ) { self._playtime = self._options.autoplay; } self._playing = true; } // if second load, just do the show and return if ( self._firstrun ) { if ( self._options.autoplay ) { self.trigger( Galleria.PLAY ); } if ( typeof self._options.show === 'number' ) { self.show( self._options.show ); } return; } self._firstrun = true; // initialize the History plugin if ( Galleria.History ) { // bind the show method Galleria.History.change(function( value ) { // if ID is NaN, the user pressed back from the first image // return to previous address if ( isNaN( value ) ) { window.history.go(-1); // else show the image } else { self.show( value, undef, true ); } }); } self.trigger( Galleria.READY ); // call the theme init method Galleria.theme.init.call( self, self._options ); // Trigger Galleria.ready $.each( Galleria.ready.callbacks, function(i ,fn) { if ( typeof fn == 'function' ) { fn.call( self, self._options ); } }); // call the extend option self._options.extend.call( self, self._options ); // show the initial image // first test for permalinks in history if ( /^[0-9]{1,4}$/.test( HASH ) && Galleria.History ) { self.show( HASH, undef, true ); } else if( self._data[ self._options.show ] ) { self.show( self._options.show ); } // play trigger if ( self._options.autoplay ) { self.trigger( Galleria.PLAY ); } }, error: function() { Galleria.raise('Stage width or height is too small to show the gallery. Traced measures: width:' + self._stageWidth + 'px, height: ' + self._stageHeight + 'px.', true); } }); }, /** Loads data into the gallery. You can call this method on an existing gallery to reload the gallery with new data. @param {Array|string} [source] Optional JSON array of data or selector of where to find data in the document. Defaults to the Galleria target or dataSource option. @param {string} [selector] Optional element selector of what elements to parse. Defaults to 'img'. @param {Function} [config] Optional function to modify the data extraction proceedure from the selector. See the dataConfig option for more information. @returns Instance */ load : function( source, selector, config ) { var self = this, o = this._options; // empty the data array this._data = []; // empty the thumbnails this._thumbnails = []; this.$('thumbnails').empty(); // shorten the arguments if ( typeof selector === 'function' ) { config = selector; selector = null; } // use the source set by target source = source || o.dataSource; // use selector set by option selector = selector || o.dataSelector; // use the dataConfig set by option config = config || o.dataConfig; // if source is a true object, make it into an array if( /^function Object/.test( source.constructor ) ) { source = [source]; } // check if the data is an array already if ( source.constructor === Array ) { if ( this.validate( source ) ) { this._data = source; } else { Galleria.raise( 'Load failed: JSON Array not valid.' ); } } else { // add .video and .iframe to the selector (1.2.7) selector += ',.video,.iframe'; // loop through images and set data $( source ).find( selector ).each( function( i, elem ) { elem = $( elem ); var data = {}, parent = elem.parent(), href = parent.attr( 'href' ), rel = parent.attr( 'rel' ); if( href && ( elem[0].nodeName == 'IMG' || elem.hasClass('video') ) && _videoTest( href ) ) { data.video = href; } else if( href && elem.hasClass('iframe') ) { data.iframe = href; } else { data.image = data.big = href; } if ( rel ) { data.big = rel; } // alternative extraction from HTML5 data attribute, added in 1.2.7 $.each( 'big title description link layer'.split(' '), function( i, val ) { if ( elem.data(val) ) { data[ val ] = elem.data(val); } }); // mix default extractions with the hrefs and config // and push it into the data array self._data.push( $.extend({ title: elem.attr('title') || '', thumb: elem.attr('src'), image: elem.attr('src'), big: elem.attr('src'), description: elem.attr('alt') || '', link: elem.attr('longdesc'), original: elem.get(0) // saved as a reference }, data, config( elem ) ) ); }); } if ( typeof o.dataSort == 'function' ) { protoArray.sort.call( this._data, o.dataSort ); } else if ( o.dataSort == 'random' ) { this._data.sort( function() { return Math.round(Math.random())-0.5; }); } // trigger the DATA event and return if ( this.getDataLength() ) { this._parseData().trigger( Galleria.DATA ); } return this; }, // make sure the data works properly _parseData : function() { var self = this, current; $.each( this._data, function( i, data ) { current = self._data[ i ]; // copy image as thumb if no thumb exists if ( 'thumb' in data === false ) { current.thumb = data.image; } // copy image as big image if no biggie exists if ( !'big' in data ) { current.big = data.image; } // parse video if ( 'video' in data ) { var result = _videoTest( data.video ); if ( result ) { current.iframe = _video[ result.provider ].embed( result.id ) + (function() { // add options if ( typeof self._options[ result.provider ] == 'object' ) { var str = '?', arr = []; $.each( self._options[ result.provider ], function( key, val ) { arr.push( key + '=' + val ); }); // small youtube specifics, perhaps move to _video later if ( result.provider == 'youtube' ) { arr = ['wmode=opaque'].concat(arr); } return str + arr.join('&'); } return ''; }()); delete current.video; if( !('thumb' in current) || !current.thumb ) { current.thumb = result.provider+':'+result.id; } } } }); return this; }, /** Destroy the Galleria instance and recover the original content @example this.destroy(); @returns Instance */ destroy : function() { this.get('target').innerHTML = this._original.html; this.clearTimer(); return this; }, /** Adds and/or removes images from the gallery Works just like Array.splice https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/splice @example this.splice( 2, 4 ); // removes 4 images after the second image @returns Instance */ splice : function() { var self = this, args = Utils.array( arguments ); window.setTimeout(function() { protoArray.splice.apply( self._data, args ); self._parseData()._createThumbnails(); },2); return self; }, /** Append images to the gallery Works just like Array.push https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/push @example this.push({ image: 'image1.jpg' }); // appends the image to the gallery @returns Instance */ push : function() { var self = this, args = Utils.array( arguments ); if ( args.length == 1 && args[0].constructor == Array ) { args = args[0]; } window.setTimeout(function() { protoArray.push.apply( self._data, args ); self._parseData()._createThumbnails( args ); },2); return self; }, _getActive: function() { return this._controls.getActive(); }, validate : function( data ) { // todo: validate a custom data array return true; }, /** Bind any event to Galleria @param {string} type The Event type to listen for @param {Function} fn The function to execute when the event is triggered @example this.bind( 'image', function() { Galleria.log('image shown') }); @returns Instance */ bind : function(type, fn) { // allow 'image' instead of Galleria.IMAGE type = _patchEvent( type ); this.$( 'container' ).bind( type, this.proxy(fn) ); return this; }, /** Unbind any event to Galleria @param {string} type The Event type to forget @returns Instance */ unbind : function(type) { type = _patchEvent( type ); this.$( 'container' ).unbind( type ); return this; }, /** Manually trigger a Galleria event @param {string} type The Event to trigger @returns Instance */ trigger : function( type ) { type = typeof type === 'object' ? $.extend( type, { scope: this } ) : { type: _patchEvent( type ), scope: this }; this.$( 'container' ).trigger( type ); return this; }, /** Assign an "idle state" to any element. The idle state will be applied after a certain amount of idle time Useful to hide f.ex navigation when the gallery is inactive @param {HTMLElement|string} elem The Dom node or selector to apply the idle state to @param {Object} styles the CSS styles to apply when in idle mode @param {Object} [from] the CSS styles to apply when in normal @param {Boolean} [hide] set to true if you want to hide it first @example addIdleState( this.get('image-nav'), { opacity: 0 }); @example addIdleState( '.galleria-image-nav', { top: -200 }, true); @returns Instance */ addIdleState: function( elem, styles, from, hide ) { this._idle.add.apply( this._idle, Utils.array( arguments ) ); return this; }, /** Removes any idle state previously set using addIdleState() @param {HTMLElement|string} elem The Dom node or selector to remove the idle state from. @returns Instance */ removeIdleState: function( elem ) { this._idle.remove.apply( this._idle, Utils.array( arguments ) ); return this; }, /** Force Galleria to enter idle mode. @returns Instance */ enterIdleMode: function() { this._idle.hide(); return this; }, /** Force Galleria to exit idle mode. @returns Instance */ exitIdleMode: function() { this._idle.showAll(); return this; }, /** Enter FullScreen mode @param {Function} callback the function to be executed when the fullscreen mode is fully applied. @returns Instance */ enterFullscreen: function( callback ) { this._fullscreen.enter.apply( this, Utils.array( arguments ) ); return this; }, /** Exits FullScreen mode @param {Function} callback the function to be executed when the fullscreen mode is fully applied. @returns Instance */ exitFullscreen: function( callback ) { this._fullscreen.exit.apply( this, Utils.array( arguments ) ); return this; }, /** Toggle FullScreen mode @param {Function} callback the function to be executed when the fullscreen mode is fully applied or removed. @returns Instance */ toggleFullscreen: function( callback ) { this._fullscreen[ this.isFullscreen() ? 'exit' : 'enter'].apply( this, Utils.array( arguments ) ); return this; }, /** Adds a tooltip to any element. You can also call this method with an object as argument with elemID:value pairs to apply tooltips to (see examples) @param {HTMLElement} elem The DOM Node to attach the event to @param {string|Function} value The tooltip message. Can also be a function that returns a string. @example this.bindTooltip( this.get('thumbnails'), 'My thumbnails'); @example this.bindTooltip( this.get('thumbnails'), function() { return 'My thumbs' }); @example this.bindTooltip( { image_nav: 'Navigation' }); @returns Instance */ bindTooltip: function( elem, value ) { this._tooltip.bind.apply( this._tooltip, Utils.array(arguments) ); return this; }, /** Note: this method is deprecated. Use refreshTooltip() instead. Redefine a tooltip. Use this if you want to re-apply a tooltip value to an already bound tooltip element. @param {HTMLElement} elem The DOM Node to attach the event to @param {string|Function} value The tooltip message. Can also be a function that returns a string. @returns Instance */ defineTooltip: function( elem, value ) { this._tooltip.define.apply( this._tooltip, Utils.array(arguments) ); return this; }, /** Refresh a tooltip value. Use this if you want to change the tooltip value at runtime, f.ex if you have a play/pause toggle. @param {HTMLElement} elem The DOM Node that has a tooltip that should be refreshed @returns Instance */ refreshTooltip: function( elem ) { this._tooltip.show.apply( this._tooltip, Utils.array(arguments) ); return this; }, /** Open a pre-designed lightbox with the currently active image. You can control some visuals using gallery options. @returns Instance */ openLightbox: function() { this._lightbox.show.apply( this._lightbox, Utils.array( arguments ) ); return this; }, /** Close the lightbox. @returns Instance */ closeLightbox: function() { this._lightbox.hide.apply( this._lightbox, Utils.array( arguments ) ); return this; }, /** Get the currently active image element. @returns {HTMLElement} The image element */ getActiveImage: function() { return this._getActive().image || undef; }, /** Get the currently active thumbnail element. @returns {HTMLElement} The thumbnail element */ getActiveThumb: function() { return this._thumbnails[ this._active ].image || undef; }, /** Get the mouse position relative to the gallery container @param e The mouse event @example var gallery = this; $(document).mousemove(function(e) { console.log( gallery.getMousePosition(e).x ); }); @returns {Object} Object with x & y of the relative mouse postion */ getMousePosition : function(e) { return { x: e.pageX - this.$( 'container' ).offset().left, y: e.pageY - this.$( 'container' ).offset().top }; }, /** Adds a panning effect to the image @param [img] The optional image element. If not specified it takes the currently active image @returns Instance */ addPan : function( img ) { if ( this._options.imageCrop === false ) { return; } img = $( img || this.getActiveImage() ); // define some variables and methods var self = this, x = img.width() / 2, y = img.height() / 2, destX = parseInt( img.css( 'left' ), 10 ), destY = parseInt( img.css( 'top' ), 10 ), curX = destX || 0, curY = destY || 0, distX = 0, distY = 0, active = false, ts = Utils.timestamp(), cache = 0, move = 0, // positions the image position = function( dist, cur, pos ) { if ( dist > 0 ) { move = Math.round( Math.max( dist * -1, Math.min( 0, cur ) ) ); if ( cache !== move ) { cache = move; if ( IE === 8 ) { // scroll is faster for IE img.parent()[ 'scroll' + pos ]( move * -1 ); } else { var css = {}; css[ pos.toLowerCase() ] = move; img.css(css); } } } }, // calculates mouse position after 50ms calculate = function(e) { if (Utils.timestamp() - ts < 50) { return; } active = true; x = self.getMousePosition(e).x; y = self.getMousePosition(e).y; }, // the main loop to check loop = function(e) { if (!active) { return; } distX = img.width() - self._stageWidth; distY = img.height() - self._stageHeight; destX = x / self._stageWidth * distX * -1; destY = y / self._stageHeight * distY * -1; curX += ( destX - curX ) / self._options.imagePanSmoothness; curY += ( destY - curY ) / self._options.imagePanSmoothness; position( distY, curY, 'Top' ); position( distX, curX, 'Left' ); }; // we need to use scroll in IE8 to speed things up if ( IE === 8 ) { img.parent().scrollTop( curY * -1 ).scrollLeft( curX * -1 ); img.css({ top: 0, left: 0 }); } // unbind and bind event this.$( 'stage' ).unbind( 'mousemove', calculate ).bind( 'mousemove', calculate ); // loop the loop this.addTimer( 'pan' + self._id, loop, 50, true); return this; }, /** Brings the scope into any callback @param fn The callback to bring the scope into @param [scope] Optional scope to bring @example $('#fullscreen').click( this.proxy(function() { this.enterFullscreen(); }) ) @returns {Function} Return the callback with the gallery scope */ proxy : function( fn, scope ) { if ( typeof fn !== 'function' ) { return F; } scope = scope || this; return function() { return fn.apply( scope, Utils.array( arguments ) ); }; }, /** Removes the panning effect set by addPan() @returns Instance */ removePan: function() { // todo: doublecheck IE8 this.$( 'stage' ).unbind( 'mousemove' ); this.clearTimer( 'pan' + this._id ); return this; }, /** Adds an element to the Galleria DOM array. When you add an element here, you can access it using element ID in many API calls @param {string} id The element ID you wish to use. You can add many elements by adding more arguments. @example addElement('mybutton'); @example addElement('mybutton','mylink'); @returns Instance */ addElement : function( id ) { var dom = this._dom; $.each( Utils.array(arguments), function( i, blueprint ) { dom[ blueprint ] = Utils.create( 'galleria-' + blueprint ); }); return this; }, /** Attach keyboard events to Galleria @param {Object} map The map object of events. Possible keys are 'UP', 'DOWN', 'LEFT', 'RIGHT', 'RETURN', 'ESCAPE', 'BACKSPACE', and 'SPACE'. @example this.attachKeyboard({ right: this.next, left: this.prev, up: function() { console.log( 'up key pressed' ) } }); @returns Instance */ attachKeyboard : function( map ) { this._keyboard.attach.apply( this._keyboard, Utils.array( arguments ) ); return this; }, /** Detach all keyboard events to Galleria @returns Instance */ detachKeyboard : function() { this._keyboard.detach.apply( this._keyboard, Utils.array( arguments ) ); return this; }, /** Fast helper for appending galleria elements that you added using addElement() @param {string} parentID The parent element ID where the element will be appended @param {string} childID the element ID that should be appended @example this.addElement('myElement'); this.appendChild( 'info', 'myElement' ); @returns Instance */ appendChild : function( parentID, childID ) { this.$( parentID ).append( this.get( childID ) || childID ); return this; }, /** Fast helper for prepending galleria elements that you added using addElement() @param {string} parentID The parent element ID where the element will be prepended @param {string} childID the element ID that should be prepended @example this.addElement('myElement'); this.prependChild( 'info', 'myElement' ); @returns Instance */ prependChild : function( parentID, childID ) { this.$( parentID ).prepend( this.get( childID ) || childID ); return this; }, /** Remove an element by blueprint @param {string} elemID The element to be removed. You can remove multiple elements by adding arguments. @returns Instance */ remove : function( elemID ) { this.$( Utils.array( arguments ).join(',') ).remove(); return this; }, // a fast helper for building dom structures // leave this out of the API for now append : function( data ) { var i, j; for( i in data ) { if ( data.hasOwnProperty( i ) ) { if ( data[i].constructor === Array ) { for( j = 0; data[i][j]; j++ ) { this.appendChild( i, data[i][j] ); } } else { this.appendChild( i, data[i] ); } } } return this; }, // an internal helper for scaling according to options _scaleImage : function( image, options ) { image = image || this._controls.getActive(); // janpub (JH) fix: // image might be unselected yet // e.g. when external logics rescales the gallery on window resize events if( !image ) { return; } var self = this, complete, scaleLayer = function( img ) { $( img.container ).children(':first').css({ top: Math.max(0, Utils.parseValue( img.image.style.top )), left: Math.max(0, Utils.parseValue( img.image.style.left )), width: Utils.parseValue( img.image.width ), height: Utils.parseValue( img.image.height ) }); }; options = $.extend({ width: this._stageWidth, height: this._stageHeight, crop: this._options.imageCrop, max: this._options.maxScaleRatio, min: this._options.minScaleRatio, margin: this._options.imageMargin, position: this._options.imagePosition }, options ); if ( this._options.layerFollow && this._options.imageCrop !== true ) { if ( typeof options.complete == 'function' ) { complete = options.complete; options.complete = function() { complete.call( image, image ); scaleLayer( image ); }; } else { options.complete = scaleLayer; } } else { $( image.container ).children(':first').css({ top: 0, left: 0 }); } image.scale( options ); return this; }, /** Updates the carousel, useful if you resize the gallery and want to re-check if the carousel nav is needed. @returns Instance */ updateCarousel : function() { this._carousel.update(); return this; }, /** Resize the entire gallery container @param {Object} [measures] Optional object with width/height specified @param {Function} [complete] The callback to be called when the scaling is complete @returns Instance */ resize : function( measures, complete ) { if ( typeof measures == 'function' ) { complete = measures; measures = undef; } measures = $.extend( { width:0, height:0 }, measures ); var self = this, $container = this.$( 'container' ); $.each( measures, function( m, val ) { if ( !val ) { $container[ m ]( 'auto' ); measures[ m ] = self._getWH()[ m ]; } }); $.each( measures, function( m, val ) { $container[ m ]( val ); }); return this.rescale( complete ); }, /** Rescales the gallery @param {number} width The target width @param {number} height The target height @param {Function} complete The callback to be called when the scaling is complete @returns Instance */ rescale : function( width, height, complete ) { var self = this; // allow rescale(fn) if ( typeof width === 'function' ) { complete = width; width = undef; } var scale = function() { // set stagewidth self._stageWidth = width || self.$( 'stage' ).width(); self._stageHeight = height || self.$( 'stage' ).height(); // scale the active image self._scaleImage(); if ( self._options.carousel ) { self.updateCarousel(); } self.trigger( Galleria.RESCALE ); if ( typeof complete === 'function' ) { complete.call( self ); } }; scale.call( self ); return this; }, /** Refreshes the gallery. Useful if you change image options at runtime and want to apply the changes to the active image. @returns Instance */ refreshImage : function() { this._scaleImage(); if ( this._options.imagePan ) { this.addPan(); } return this; }, /** Shows an image by index @param {number|boolean} index The index to show @param {Boolean} rewind A boolean that should be true if you want the transition to go back @returns Instance */ show : function( index, rewind, _history ) { // do nothing if index is false or queue is false and transition is in progress if ( index === false || ( !this._options.queue && this._queue.stalled ) ) { return; } index = Math.max( 0, Math.min( parseInt( index, 10 ), this.getDataLength() - 1 ) ); rewind = typeof rewind !== 'undefined' ? !!rewind : index < this.getIndex(); _history = _history || false; // do the history thing and return if ( !_history && Galleria.History ) { Galleria.History.set( index.toString() ); return; } this._active = index; protoArray.push.call( this._queue, { index : index, rewind : rewind }); if ( !this._queue.stalled ) { this._show(); } return this; }, // the internal _show method does the actual showing _show : function() { // shortcuts var self = this, queue = this._queue[ 0 ], data = this.getData( queue.index ); if ( !data ) { return; } var src = data.iframe || ( this.isFullscreen() && 'big' in data ? data.big : data.image ), // use big image if fullscreen mode active = this._controls.getActive(), next = this._controls.getNext(), cached = next.isCached( src ), thumb = this._thumbnails[ queue.index ], mousetrigger = function() { $( next.image ).trigger( 'mouseup' ); }; // to be fired when loading & transition is complete: var complete = (function( data, next, active, queue, thumb ) { return function() { var win; _transitions.active = false; // remove stalled self._queue.stalled = false; // optimize quality Utils.toggleQuality( next.image, self._options.imageQuality ); // remove old layer self._layers[ self._controls.active ].innerHTML = ''; // swap $( active.container ).css({ zIndex: 0, opacity: 0 }).show(); if( active.isIframe ) { $( active.container ).find( 'iframe' ).remove(); } self.$('container').toggleClass('iframe', !!data.iframe); $( next.container ).css({ zIndex: 1, left: 0, top: 0 }).show(); self._controls.swap(); // add pan according to option if ( self._options.imagePan ) { self.addPan( next.image ); } // make the image link or add lightbox // link takes precedence over lightbox if both are detected if ( data.link || self._options.lightbox || self._options.clicknext ) { $( next.image ).css({ cursor: 'pointer' }).bind( 'mouseup', function() { // clicknext if ( self._options.clicknext && !Galleria.TOUCH ) { if ( self._options.pauseOnInteraction ) { self.pause(); } self.next(); return; } // popup link if ( data.link ) { if ( self._options.popupLinks ) { win = window.open( data.link, '_blank' ); } else { window.location.href = data.link; } return; } if ( self._options.lightbox ) { self.openLightbox(); } }); } // remove the queued image protoArray.shift.call( self._queue ); // if we still have images in the queue, show it if ( self._queue.length ) { self._show(); } // check if we are playing self._playCheck(); // trigger IMAGE event self.trigger({ type: Galleria.IMAGE, index: queue.index, imageTarget: next.image, thumbTarget: thumb.image, galleriaData: data }); }; }( data, next, active, queue, thumb )); // let the carousel follow if ( this._options.carousel && this._options.carouselFollow ) { this._carousel.follow( queue.index ); } // preload images if ( this._options.preload ) { var p, i, n = this.getNext(), ndata; try { for ( i = this._options.preload; i > 0; i-- ) { p = new Galleria.Picture(); ndata = self.getData( n ); p.preload( this.isFullscreen() && 'big' in ndata ? ndata.big : ndata.image ); n = self.getNext( n ); } } catch(e) {} } // show the next image, just in case Utils.show( next.container ); next.isIframe = !!data.iframe; // add active classes $( self._thumbnails[ queue.index ].container ) .addClass( 'active' ) .siblings( '.active' ) .removeClass( 'active' ); // trigger the LOADSTART event self.trigger( { type: Galleria.LOADSTART, cached: cached, index: queue.index, rewind: queue.rewind, imageTarget: next.image, thumbTarget: thumb.image, galleriaData: data }); // begin loading the next image next.load( src, function( next ) { // add layer HTML var layer = $( self._layers[ 1-self._controls.active ] ).html( data.layer || '' ).hide(); self._scaleImage( next, { complete: function( next ) { // toggle low quality for IE if ( 'image' in active ) { Utils.toggleQuality( active.image, false ); } Utils.toggleQuality( next.image, false ); // stall the queue self._queue.stalled = true; // remove the image panning, if applied // TODO: rethink if this is necessary self.removePan(); // set the captions and counter self.setInfo( queue.index ); self.setCounter( queue.index ); // show the layer now if ( data.layer ) { layer.show(); // inherit click events set on image if ( data.link || self._options.lightbox || self._options.clicknext ) { layer.css( 'cursor', 'pointer' ).unbind( 'mouseup' ).mouseup( mousetrigger ); } } // trigger the LOADFINISH event self.trigger({ type: Galleria.LOADFINISH, cached: cached, index: queue.index, rewind: queue.rewind, imageTarget: next.image, thumbTarget: self._thumbnails[ queue.index ].image, galleriaData: self.getData( queue.index ) }); var transition = self._options.transition; // can JavaScript loop through objects in order? yes. $.each({ initial: active.image === null, touch: Galleria.TOUCH, fullscreen: self.isFullscreen() }, function( type, arg ) { if ( arg && self._options[ type + 'Transition' ] !== undef ) { transition = self._options[ type + 'Transition' ]; return false; } }); // validate the transition if ( transition in _transitions.effects === false ) { complete(); } else { var params = { prev: active.container, next: next.container, rewind: queue.rewind, speed: self._options.transitionSpeed || 400 }; _transitions.active = true; // call the transition function and send some stuff _transitions.init.call( self, transition, params, complete ); } } }); }); }, /** Gets the next index @param {number} [base] Optional starting point @returns {number} the next index, or the first if you are at the first (looping) */ getNext : function( base ) { base = typeof base === 'number' ? base : this.getIndex(); return base === this.getDataLength() - 1 ? 0 : base + 1; }, /** Gets the previous index @param {number} [base] Optional starting point @returns {number} the previous index, or the last if you are at the first (looping) */ getPrev : function( base ) { base = typeof base === 'number' ? base : this.getIndex(); return base === 0 ? this.getDataLength() - 1 : base - 1; }, /** Shows the next image in line @returns Instance */ next : function() { if ( this.getDataLength() > 1 ) { this.show( this.getNext(), false ); } return this; }, /** Shows the previous image in line @returns Instance */ prev : function() { if ( this.getDataLength() > 1 ) { this.show( this.getPrev(), true ); } return this; }, /** Retrieve a DOM element by element ID @param {string} elemId The delement ID to fetch @returns {HTMLElement} The elements DOM node or null if not found. */ get : function( elemId ) { return elemId in this._dom ? this._dom[ elemId ] : null; }, /** Retrieve a data object @param {number} index The data index to retrieve. If no index specified it will take the currently active image @returns {Object} The data object */ getData : function( index ) { return index in this._data ? this._data[ index ] : this._data[ this._active ]; }, /** Retrieve the number of data items @returns {number} The data length */ getDataLength : function() { return this._data.length; }, /** Retrieve the currently active index @returns {number|boolean} The active index or false if none found */ getIndex : function() { return typeof this._active === 'number' ? this._active : false; }, /** Retrieve the stage height @returns {number} The stage height */ getStageHeight : function() { return this._stageHeight; }, /** Retrieve the stage width @returns {number} The stage width */ getStageWidth : function() { return this._stageWidth; }, /** Retrieve the option @param {string} key The option key to retrieve. If no key specified it will return all options in an object. @returns option or options */ getOptions : function( key ) { return typeof key === 'undefined' ? this._options : this._options[ key ]; }, /** Set options to the instance. You can set options using a key & value argument or a single object argument (see examples) @param {string} key The option key @param {string} value the the options value @example setOptions( 'autoplay', true ) @example setOptions({ autoplay: true }); @returns Instance */ setOptions : function( key, value ) { if ( typeof key === 'object' ) { $.extend( this._options, key ); } else { this._options[ key ] = value; } return this; }, /** Starts playing the slideshow @param {number} delay Sets the slideshow interval in milliseconds. If you set it once, you can just call play() and get the same interval the next time. @returns Instance */ play : function( delay ) { this._playing = true; this._playtime = delay || this._playtime; this._playCheck(); this.trigger( Galleria.PLAY ); return this; }, /** Stops the slideshow if currently playing @returns Instance */ pause : function() { this._playing = false; this.trigger( Galleria.PAUSE ); return this; }, /** Toggle between play and pause events. @param {number} delay Sets the slideshow interval in milliseconds. @returns Instance */ playToggle : function( delay ) { return ( this._playing ) ? this.pause() : this.play( delay ); }, /** Checks if the gallery is currently playing @returns {Boolean} */ isPlaying : function() { return this._playing; }, /** Checks if the gallery is currently in fullscreen mode @returns {Boolean} */ isFullscreen : function() { return this._fullscreen.active; }, _playCheck : function() { var self = this, played = 0, interval = 20, now = Utils.timestamp(), timer_id = 'play' + this._id; if ( this._playing ) { this.clearTimer( timer_id ); var fn = function() { played = Utils.timestamp() - now; if ( played >= self._playtime && self._playing ) { self.clearTimer( timer_id ); self.next(); return; } if ( self._playing ) { // trigger the PROGRESS event self.trigger({ type: Galleria.PROGRESS, percent: Math.ceil( played / self._playtime * 100 ), seconds: Math.floor( played / 1000 ), milliseconds: played }); self.addTimer( timer_id, fn, interval ); } }; self.addTimer( timer_id, fn, interval ); } }, /** Modify the slideshow delay @param {number} delay the number of milliseconds between slides, @returns Instance */ setPlaytime: function( delay ) { this._playtime = delay; return this; }, setIndex: function( val ) { this._active = val; return this; }, /** Manually modify the counter @param {number} [index] Optional data index to fectch, if no index found it assumes the currently active index @returns Instance */ setCounter: function( index ) { if ( typeof index === 'number' ) { index++; } else if ( typeof index === 'undefined' ) { index = this.getIndex()+1; } this.get( 'current' ).innerHTML = index; if ( IE ) { // weird IE bug var count = this.$( 'counter' ), opacity = count.css( 'opacity' ); if ( parseInt( opacity, 10 ) === 1) { Utils.removeAlpha( count[0] ); } else { this.$( 'counter' ).css( 'opacity', opacity ); } } return this; }, /** Manually set captions @param {number} [index] Optional data index to fectch and apply as caption, if no index found it assumes the currently active index @returns Instance */ setInfo : function( index ) { var self = this, data = this.getData( index ); $.each( ['title','description'], function( i, type ) { var elem = self.$( 'info-' + type ); if ( !!data[type] ) { elem[ data[ type ].length ? 'show' : 'hide' ]().html( data[ type ] ); } else { elem.empty().hide(); } }); return this; }, /** Checks if the data contains any captions @param {number} [index] Optional data index to fectch, if no index found it assumes the currently active index. @returns {boolean} */ hasInfo : function( index ) { var check = 'title description'.split(' '), i; for ( i = 0; check[i]; i++ ) { if ( !!this.getData( index )[ check[i] ] ) { return true; } } return false; }, jQuery : function( str ) { var self = this, ret = []; $.each( str.split(','), function( i, elemId ) { elemId = $.trim( elemId ); if ( self.get( elemId ) ) { ret.push( elemId ); } }); var jQ = $( self.get( ret.shift() ) ); $.each( ret, function( i, elemId ) { jQ = jQ.add( self.get( elemId ) ); }); return jQ; }, /** Converts element IDs into a jQuery collection You can call for multiple IDs separated with commas. @param {string} str One or more element IDs (comma-separated) @returns jQuery @example this.$('info,container').hide(); */ $ : function( str ) { return this.jQuery.apply( this, Utils.array( arguments ) ); } }; // End of Galleria prototype // Add events as static variables $.each( _events, function( i, ev ) { // legacy events var type = /_/.test( ev ) ? ev.replace( /_/g, '' ) : ev; Galleria[ ev.toUpperCase() ] = 'galleria.'+type; } ); $.extend( Galleria, { // Browser helpers IE9: IE === 9, IE8: IE === 8, IE7: IE === 7, IE6: IE === 6, IE: IE, WEBKIT: /webkit/.test( NAV ), CHROME: /chrome/.test( NAV ), SAFARI: /safari/.test( NAV ) && !(/chrome/.test( NAV )), QUIRK: ( IE && doc.compatMode && doc.compatMode === "BackCompat" ), MAC: /mac/.test( navigator.platform.toLowerCase() ), OPERA: !!window.opera, IPHONE: /iphone/.test( NAV ), IPAD: /ipad/.test( NAV ), ANDROID: /android/.test( NAV ), TOUCH: ('ontouchstart' in doc) }); // Galleria static methods /** Adds a theme that you can use for your Gallery @param {Object} theme Object that should contain all your theme settings. <ul> <li>name - name of the theme</li> <li>author - name of the author</li> <li>css - css file name (not path)</li> <li>defaults - default options to apply, including theme-specific options</li> <li>init - the init function</li> </ul> @returns {Object} theme */ Galleria.addTheme = function( theme ) { // make sure we have a name if ( !theme.name ) { Galleria.raise('No theme name specified'); } if ( typeof theme.defaults !== 'object' ) { theme.defaults = {}; } else { theme.defaults = _legacyOptions( theme.defaults ); } var css = false, reg; if ( typeof theme.css === 'string' ) { // look for manually added CSS $('link').each(function( i, link ) { reg = new RegExp( theme.css ); if ( reg.test( link.href ) ) { // we found the css css = true; // the themeload trigger _themeLoad( theme ); return false; } }); // else look for the absolute path and load the CSS dynamic if ( !css ) { $('script').each(function( i, script ) { // look for the theme script reg = new RegExp( 'galleria\\.' + theme.name.toLowerCase() + '\\.' ); if( reg.test( script.src )) { // we have a match css = script.src.replace(/[^\/]*$/, '') + theme.css; window.setTimeout(function() { Utils.loadCSS( css, 'galleria-theme', function() { // the themeload trigger _themeLoad( theme ); }); }, 1); } }); } if ( !css ) { Galleria.raise('No theme CSS loaded'); } } else { // pass _themeLoad( theme ); } return theme; }; /** loadTheme loads a theme js file and attaches a load event to Galleria @param {string} src The relative path to the theme source file @param {Object} [options] Optional options you want to apply @returns Galleria */ Galleria.loadTheme = function( src, options ) { var loaded = false, length = _galleries.length, err = window.setTimeout( function() { Galleria.raise( "Theme at " + src + " could not load, check theme path.", true ); }, 5000 ); // first clear the current theme, if exists Galleria.theme = undef; // load the theme Utils.loadScript( src, function() { window.clearTimeout( err ); // check for existing galleries and reload them with the new theme if ( length ) { // temporary save the new galleries var refreshed = []; // refresh all instances // when adding a new theme to an existing gallery, all options will be resetted but the data will be kept // you can apply new options as a second argument $.each( Galleria.get(), function(i, instance) { // mix the old data and options into the new instance var op = $.extend( instance._original.options, { data_source: instance._data }, options); // remove the old container instance.$('container').remove(); // create a new instance var g = new Galleria(); // move the id g._id = instance._id; // initialize the new instance g.init( instance._original.target, op ); // push the new instance refreshed.push( g ); }); // now overwrite the old holder with the new instances _galleries = refreshed; } }); return Galleria; }; /** Retrieves a Galleria instance. @param {number} [index] Optional index to retrieve. If no index is supplied, the method will return all instances in an array. @returns Instance or Array of instances */ Galleria.get = function( index ) { if ( !!_instances[ index ] ) { return _instances[ index ]; } else if ( typeof index !== 'number' ) { return _instances; } else { Galleria.raise('Gallery index ' + index + ' not found'); } }; /** Configure Galleria options via a static function. The options will be applied to all instances @param {string|object} key The options to apply or a key @param [value] If key is a string, this is the value @returns Galleria */ Galleria.configure = function( key, value ) { var opts = {}; if( typeof key == 'string' && value ) { opts[key] = value; key = opts; } else { $.extend( opts, key ); } Galleria.configure.options = opts; $.each( Galleria.get(), function(i, instance) { instance.setOptions( opts ); }); return Galleria; }; Galleria.configure.options = {}; /** Bind a Galleria event to the gallery @param {string} type A string representing the galleria event @param {function} callback The function that should run when the event is triggered @returns Galleria */ Galleria.on = function( type, callback ) { if ( !type ) { return; } callback = callback || F; // hash the bind var hash = type + callback.toString().replace(/\s/g,'') + Utils.timestamp(); // for existing instances $.each( Galleria.get(), function(i, instance) { instance._binds.push( hash ); instance.bind( type, callback ); }); // for future instances Galleria.on.binds.push({ type: type, callback: callback, hash: hash }); return Galleria; }; Galleria.on.binds = []; /** Run Galleria Alias for $(selector).galleria(options) @param {string} selector A selector of element(s) to intialize galleria to @param {object} options The options to apply @returns Galleria */ Galleria.run = function( selector, options ) { $( selector || '#galleria' ).galleria( options ); return Galleria; }; /** Creates a transition to be used in your gallery @param {string} name The name of the transition that you will use as an option @param {Function} fn The function to be executed in the transition. The function contains two arguments, params and complete. Use the params Object to integrate the transition, and then call complete when you are done. @returns Galleria */ Galleria.addTransition = function( name, fn ) { _transitions.effects[name] = fn; return Galleria; }; /** The Galleria utilites */ Galleria.utils = Utils; /** A helper metod for cross-browser logging. It uses the console log if available otherwise it falls back to alert @example Galleria.log("hello", document.body, [1,2,3]); */ Galleria.log = function() { var args = Utils.array( arguments ); if( 'console' in window && 'log' in window.console ) { try { return window.console.log.apply( window.console, args ); } catch( e ) { $.each( args, function() { window.console.log(this); }); } } else { return window.alert( args.join('<br>') ); } }; /** A ready method for adding callbacks when a gallery is ready Each method is call before the extend option for every instance @param {function} callback The function to call @returns Galleria */ Galleria.ready = function( fn ) { if ( typeof fn != 'function' ) { return Galleria; } $.each( _galleries, function( i, gallery ) { fn.call( gallery, gallery._options ); }); Galleria.ready.callbacks.push( fn ); return Galleria; }; Galleria.ready.callbacks = []; /** Method for raising errors @param {string} msg The message to throw @param {boolean} [fatal] Set this to true to override debug settings and display a fatal error */ Galleria.raise = function( msg, fatal ) { var type = fatal ? 'Fatal error' : 'Error', self = this, css = { color: '#fff', position: 'absolute', top: 0, left: 0, zIndex: 100000 }, echo = function( msg ) { var html = '<div style="padding:4px;margin:0 0 2px;background:#' + ( fatal ? '811' : '222' ) + '";>' + ( fatal ? '<strong>' + type + ': </strong>' : '' ) + msg + '</div>'; $.each( _instances, function() { var cont = this.$( 'errors' ), target = this.$( 'target' ); if ( !cont.length ) { target.css( 'position', 'relative' ); cont = this.addElement( 'errors' ).appendChild( 'target', 'errors' ).$( 'errors' ).css(css); } cont.append( html ); }); if ( !_instances.length ) { $('<div>').css( $.extend( css, { position: 'fixed' } ) ).append( html ).appendTo( DOM().body ); } }; // if debug is on, display errors and throw exception if fatal if ( DEBUG ) { echo( msg ); if ( fatal ) { throw new Error(type + ': ' + msg); } // else just echo a silent generic error if fatal } else if ( fatal ) { if ( _hasError ) { return; } _hasError = true; fatal = false; echo( 'Gallery could not load.' ); } }; // Add the version Galleria.version = VERSION; /** A method for checking what version of Galleria the user has installed and throws a readable error if the user needs to upgrade. Useful when building plugins that requires a certain version to function. @param {number} version The minimum version required @param {string} [msg] Optional message to display. If not specified, Galleria will throw a generic error. @returns Galleria */ Galleria.requires = function( version, msg ) { msg = msg || 'You need to upgrade Galleria to version ' + version + ' to use one or more components.'; if ( Galleria.version < version ) { Galleria.raise(msg, true); } return Galleria; }; /** Adds preload, cache, scale and crop functionality @constructor @requires jQuery @param {number} [id] Optional id to keep track of instances */ Galleria.Picture = function( id ) { // save the id this.id = id || null; // the image should be null until loaded this.image = null; // Create a new container this.container = Utils.create('galleria-image'); // add container styles $( this.container ).css({ overflow: 'hidden', position: 'relative' // for IE Standards mode }); // saves the original measurements this.original = { width: 0, height: 0 }; // flag when the image is ready this.ready = false; // flag for iframe Picture this.isIframe = false; }; Galleria.Picture.prototype = { // the inherited cache object cache: {}, // show the image on stage show: function() { Utils.show( this.image ); }, // hide the image hide: function() { Utils.moveOut( this.image ); }, clear: function() { this.image = null; }, /** Checks if an image is in cache @param {string} src The image source path, ex '/path/to/img.jpg' @returns {boolean} */ isCached: function( src ) { return !!this.cache[src]; }, /** Preloads an image into the cache @param {string} src The image source path, ex '/path/to/img.jpg' @returns Galleria.Picture */ preload: function( src ) { $( new Image() ).load((function(src, cache) { return function() { cache[ src ] = src; }; }( src, this.cache ))).attr( 'src', src ); }, /** Loads an image and call the callback when ready. Will also add the image to cache. @param {string} src The image source path, ex '/path/to/img.jpg' @param {Object} [size] The forced size of the image, defined as an object { width: xx, height:xx } @param {Function} callback The function to be executed when the image is loaded & scaled @returns The image container (jQuery object) */ load: function(src, size, callback) { if ( typeof size == 'function' ) { callback = size; size = null; } if( this.isIframe ) { var id = 'if'+new Date().getTime(); this.image = $('<iframe>', { src: src, frameborder: 0, id: id, allowfullscreen: true, css: { visibility: 'hidden' } })[0]; $( this.container ).find( 'iframe,img' ).remove(); this.container.appendChild( this.image ); $('#'+id).load( (function( self, callback ) { return function() { window.setTimeout(function() { $( self.image ).css( 'visibility', 'visible' ); if( typeof callback == 'function' ) { callback.call( self, self ); } }, 10); }; }( this, callback ))); return this.container; } this.image = new Image(); var i = 0, reload = false, resort = false, // some jquery cache $container = $( this.container ), $image = $( this.image ), onerror = function() { if ( !reload ) { reload = true; // reload the image with a timestamp window.setTimeout((function(image, src) { return function() { image.attr('src', src + '?' + Utils.timestamp() ); }; }( $(this), src )), 50); } else { // apply the dummy image if it exists if ( DUMMY ) { $( this ).attr( 'src', DUMMY ); } else { Galleria.raise('Image not found: ' + src); } } }, // the onload method onload = (function( self, callback, src ) { return function() { var complete = function() { $( this ).unbind( 'load' ); // save the original size self.original = size || { height: this.height, width: this.width }; self.container.appendChild( this ); self.cache[ src ] = src; // will override old cache if (typeof callback == 'function' ) { window.setTimeout(function() { callback.call( self, self ); },1); } }; // Delay the callback to "fix" the Adblock Bug // http://code.google.com/p/adblockforchrome/issues/detail?id=3701 if ( ( !this.width || !this.height ) ) { window.setTimeout( (function( img ) { return function() { if ( img.width && img.height ) { complete.call( img ); } else { // last resort, this should never happen but just in case it does... if ( !resort ) { $(new Image()).load( onload ).attr( 'src', img.src ); resort = true; } else { Galleria.raise('Could not extract width/height from image: ' + img.src + '. Traced measures: width:' + img.width + 'px, height: ' + img.height + 'px.'); } } }; }( this )), 2); } else { complete.call( this ); } }; }( this, callback, src )); // remove any previous images $container.find( 'iframe,img' ).remove(); // append the image $image.css( 'display', 'block'); // hide it for now Utils.hide( this.image ); // remove any max/min scaling $.each('minWidth minHeight maxWidth maxHeight'.split(' '), function(i, prop) { $image.css(prop, (/min/.test(prop) ? '0' : 'none')); }); // begin load and insert in cache when done $image.load( onload ).error( onerror ).attr( 'src', src ); // return the container return this.container; }, /** Scales and crops the image @param {Object} options The method takes an object with a number of options: <ul> <li>width - width of the container</li> <li>height - height of the container</li> <li>min - minimum scale ratio</li> <li>max - maximum scale ratio</li> <li>margin - distance in pixels from the image border to the container</li> <li>complete - a callback that fires when scaling is complete</li> <li>position - positions the image, works like the css background-image property.</li> <li>crop - defines how to crop. Can be true, false, 'width' or 'height'</li> <li>canvas - set to true to try a canvas-based rescale</li> </ul> @returns The image container object (jQuery) */ scale: function( options ) { var self = this; // extend some defaults options = $.extend({ width: 0, height: 0, min: undef, max: undef, margin: 0, complete: F, position: 'center', crop: false, canvas: false }, options); if( this.isIframe ) { $( this.image ).width( options.width ).height( options.height ).removeAttr( 'width' ).removeAttr( 'height' ); $( this.container ).width( options.width ).height( options.height) ; options.complete.call(self, self); try { if( this.image.contentWindow ) { $( this.image.contentWindow ).trigger('resize'); } } catch(e) {} return this.container; } // return the element if no image found if (!this.image) { return this.container; } // store locale variables var width, height, $container = $( self.container ), data; // wait for the width/height Utils.wait({ until: function() { width = options.width || $container.width() || Utils.parseValue( $container.css('width') ); height = options.height || $container.height() || Utils.parseValue( $container.css('height') ); return width && height; }, success: function() { // calculate some cropping var newWidth = ( width - options.margin * 2 ) / self.original.width, newHeight = ( height - options.margin * 2 ) / self.original.height, min = Math.min( newWidth, newHeight ), max = Math.max( newWidth, newHeight ), cropMap = { 'true' : max, 'width' : newWidth, 'height': newHeight, 'false' : min, 'landscape': self.original.width > self.original.height ? max : min, 'portrait': self.original.width < self.original.height ? max : min }, ratio = cropMap[ options.crop.toString() ], canvasKey = ''; // allow maxScaleRatio if ( options.max ) { ratio = Math.min( options.max, ratio ); } // allow minScaleRatio if ( options.min ) { ratio = Math.max( options.min, ratio ); } $.each( ['width','height'], function( i, m ) { $( self.image )[ m ]( self[ m ] = self.image[ m ] = Math.round( self.original[ m ] * ratio ) ); }); $( self.container ).width( width ).height( height ); if ( options.canvas && _canvas ) { _canvas.elem.width = self.width; _canvas.elem.height = self.height; canvasKey = self.image.src + ':' + self.width + 'x' + self.height; self.image.src = _canvas.cache[ canvasKey ] || (function( key ) { _canvas.context.drawImage(self.image, 0, 0, self.original.width*ratio, self.original.height*ratio); try { data = _canvas.elem.toDataURL(); _canvas.length += data.length; _canvas.cache[ key ] = data; return data; } catch( e ) { return self.image.src; } }( canvasKey ) ); } // calculate image_position var pos = {}, mix = {}, getPosition = function(value, measure, margin) { var result = 0; if (/\%/.test(value)) { var flt = parseInt( value, 10 ) / 100, m = self.image[ measure ] || $( self.image )[ measure ](); result = Math.ceil( m * -1 * flt + margin * flt ); } else { result = Utils.parseValue( value ); } return result; }, positionMap = { 'top': { top: 0 }, 'left': { left: 0 }, 'right': { left: '100%' }, 'bottom': { top: '100%' } }; $.each( options.position.toLowerCase().split(' '), function( i, value ) { if ( value === 'center' ) { value = '50%'; } pos[i ? 'top' : 'left'] = value; }); $.each( pos, function( i, value ) { if ( positionMap.hasOwnProperty( value ) ) { $.extend( mix, positionMap[ value ] ); } }); pos = pos.top ? $.extend( pos, mix ) : mix; pos = $.extend({ top: '50%', left: '50%' }, pos); // apply position $( self.image ).css({ position : 'absolute', top : getPosition(pos.top, 'height', height), left : getPosition(pos.left, 'width', width) }); // show the image self.show(); // flag ready and call the callback self.ready = true; options.complete.call( self, self ); }, error: function() { Galleria.raise('Could not scale image: '+self.image.src); }, timeout: 1000 }); return this; } }; // our own easings $.extend( $.easing, { galleria: function (_, t, b, c, d) { if ((t/=d/2) < 1) { return c/2*t*t*t + b; } return c/2*((t-=2)*t*t + 2) + b; }, galleriaIn: function (_, t, b, c, d) { return c*(t/=d)*t + b; }, galleriaOut: function (_, t, b, c, d) { return -c *(t/=d)*(t-2) + b; } }); // the plugin initializer $.fn.galleria = function( options ) { var selector = this.selector; // try domReady if element not found if ( !$(this).length ) { $(function() { if ( $( selector ).length ) { // if found on domReady, go ahead $( selector ).galleria( options ); } else { // if not, try fetching the element for 5 secs, then raise a warning. Galleria.utils.wait({ until: function() { return $( selector ).length; }, success: function() { $( selector ).galleria( options ); }, error: function() { Galleria.raise('Init failed: Galleria could not find the element "'+selector+'".'); }, timeout: 5000 }); } }); return this; } return this.each(function() { // fail silent if already run if ( !$.data(this, 'galleria') ) { $.data( this, 'galleria', new Galleria().init( this, options ) ); } }); }; // phew }( jQuery ) );
0x6a
trunk/libraries/galleria/galleria-1.2.8.js
JavaScript
asf20
180,360
(function($) { var cultures = $.global.cultures, en = cultures.en, standard = en.calendars.standard, culture = cultures["en-CA"] = $.extend(true, {}, en, { name: "en-CA", englishName: "English (Canada)", nativeName: "English (Canada)", numberFormat: { currency: { pattern: ["-$n","$n"] } }, calendars: { standard: $.extend(true, {}, standard, { patterns: { d: "dd/MM/yyyy", D: "MMMM-dd-yy", f: "MMMM-dd-yy h:mm tt", F: "MMMM-dd-yy h:mm:ss tt" } }) } }, cultures["en-CA"]); culture.calendar = culture.calendars.standard; })(jQuery);
0x6a
trunk/libraries/jqwidgets/globalization/jquery.glob.en-CA.js
JavaScript
asf20
803
/*! * Globalize * * http://github.com/jquery/globalize * * Copyright Software Freedom Conservancy, Inc. * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license */ (function( window, undefined ) { var Globalize, // private variables regexHex, regexInfinity, regexParseFloat, regexTrim, // private JavaScript utility functions arrayIndexOf, endsWith, extend, isArray, isFunction, isObject, startsWith, trim, truncate, zeroPad, // private Globalization utility functions appendPreOrPostMatch, expandFormat, formatDate, formatNumber, getTokenRegExp, getEra, getEraYear, parseExact, parseNegativePattern; // Global variable (Globalize) or CommonJS module (globalize) Globalize = function( cultureSelector ) { return new Globalize.prototype.init( cultureSelector ); }; if ( typeof require !== "undefined" && typeof exports !== "undefined" && typeof module !== "undefined" ) { // Assume CommonJS module.exports = Globalize; } else { // Export as global variable window.Globalize = Globalize; } Globalize.cultures = {}; Globalize.prototype = { constructor: Globalize, init: function( cultureSelector ) { this.cultures = Globalize.cultures; this.cultureSelector = cultureSelector; return this; } }; Globalize.prototype.init.prototype = Globalize.prototype; // 1. When defining a culture, all fields are required except the ones stated as optional. // 2. Each culture should have a ".calendars" object with at least one calendar named "standard" // which serves as the default calendar in use by that culture. // 3. Each culture should have a ".calendar" object which is the current calendar being used, // it may be dynamically changed at any time to one of the calendars in ".calendars". Globalize.cultures[ "default" ] = { // A unique name for the culture in the form <language code>-<country/region code> name: "en", // the name of the culture in the english language englishName: "English", // the name of the culture in its own language nativeName: "English", // whether the culture uses right-to-left text isRTL: false, // "language" is used for so-called "specific" cultures. // For example, the culture "es-CL" means "Spanish, in Chili". // It represents the Spanish-speaking culture as it is in Chili, // which might have different formatting rules or even translations // than Spanish in Spain. A "neutral" culture is one that is not // specific to a region. For example, the culture "es" is the generic // Spanish culture, which may be a more generalized version of the language // that may or may not be what a specific culture expects. // For a specific culture like "es-CL", the "language" field refers to the // neutral, generic culture information for the language it is using. // This is not always a simple matter of the string before the dash. // For example, the "zh-Hans" culture is netural (Simplified Chinese). // And the "zh-SG" culture is Simplified Chinese in Singapore, whose lanugage // field is "zh-CHS", not "zh". // This field should be used to navigate from a specific culture to it's // more general, neutral culture. If a culture is already as general as it // can get, the language may refer to itself. language: "en", // numberFormat defines general number formatting rules, like the digits in // each grouping, the group separator, and how negative numbers are displayed. numberFormat: { // [negativePattern] // Note, numberFormat.pattern has no "positivePattern" unlike percent and currency, // but is still defined as an array for consistency with them. // negativePattern: one of "(n)|-n|- n|n-|n -" pattern: [ "-n" ], // number of decimal places normally shown decimals: 2, // string that separates number groups, as in 1,000,000 ",": ",", // string that separates a number from the fractional portion, as in 1.99 ".": ".", // array of numbers indicating the size of each number group. // TODO: more detailed description and example groupSizes: [ 3 ], // symbol used for positive numbers "+": "+", // symbol used for negative numbers "-": "-", // symbol used for NaN (Not-A-Number) "NaN": "NaN", // symbol used for Negative Infinity negativeInfinity: "-Infinity", // symbol used for Positive Infinity positiveInfinity: "Infinity", percent: { // [negativePattern, positivePattern] // negativePattern: one of "-n %|-n%|-%n|%-n|%n-|n-%|n%-|-% n|n %-|% n-|% -n|n- %" // positivePattern: one of "n %|n%|%n|% n" pattern: [ "-n %", "n %" ], // number of decimal places normally shown decimals: 2, // array of numbers indicating the size of each number group. // TODO: more detailed description and example groupSizes: [ 3 ], // string that separates number groups, as in 1,000,000 ",": ",", // string that separates a number from the fractional portion, as in 1.99 ".": ".", // symbol used to represent a percentage symbol: "%" }, currency: { // [negativePattern, positivePattern] // negativePattern: one of "($n)|-$n|$-n|$n-|(n$)|-n$|n-$|n$-|-n $|-$ n|n $-|$ n-|$ -n|n- $|($ n)|(n $)" // positivePattern: one of "$n|n$|$ n|n $" pattern: [ "($n)", "$n" ], // number of decimal places normally shown decimals: 2, // array of numbers indicating the size of each number group. // TODO: more detailed description and example groupSizes: [ 3 ], // string that separates number groups, as in 1,000,000 ",": ",", // string that separates a number from the fractional portion, as in 1.99 ".": ".", // symbol used to represent currency symbol: "$" } }, // calendars defines all the possible calendars used by this culture. // There should be at least one defined with name "standard", and is the default // calendar used by the culture. // A calendar contains information about how dates are formatted, information about // the calendar's eras, a standard set of the date formats, // translations for day and month names, and if the calendar is not based on the Gregorian // calendar, conversion functions to and from the Gregorian calendar. calendars: { standard: { // name that identifies the type of calendar this is name: "Gregorian_USEnglish", // separator of parts of a date (e.g. "/" in 11/05/1955) "/": "/", // separator of parts of a time (e.g. ":" in 05:44 PM) ":": ":", // the first day of the week (0 = Sunday, 1 = Monday, etc) firstDay: 0, days: { // full day names names: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // abbreviated day names namesAbbr: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // shortest day names namesShort: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ] }, months: { // full month names (13 months for lunar calendards -- 13th month should be "" if not lunar) names: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", "" ], // abbreviated month names namesAbbr: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "" ] }, // AM and PM designators in one of these forms: // The usual view, and the upper and lower case versions // [ standard, lowercase, uppercase ] // The culture does not use AM or PM (likely all standard date formats use 24 hour time) // null AM: [ "AM", "am", "AM" ], PM: [ "PM", "pm", "PM" ], eras: [ // eras in reverse chronological order. // name: the name of the era in this culture (e.g. A.D., C.E.) // start: when the era starts in ticks (gregorian, gmt), null if it is the earliest supported era. // offset: offset in years from gregorian calendar { "name": "A.D.", "start": null, "offset": 0 } ], // when a two digit year is given, it will never be parsed as a four digit // year greater than this year (in the appropriate era for the culture) // Set it as a full year (e.g. 2029) or use an offset format starting from // the current year: "+19" would correspond to 2029 if the current year 2010. twoDigitYearMax: 2029, // set of predefined date and time patterns used by the culture // these represent the format someone in this culture would expect // to see given the portions of the date that are shown. patterns: { // short date pattern d: "M/d/yyyy", // long date pattern D: "dddd, MMMM dd, yyyy", // short time pattern t: "h:mm tt", // long time pattern T: "h:mm:ss tt", // long date, short time pattern f: "dddd, MMMM dd, yyyy h:mm tt", // long date, long time pattern F: "dddd, MMMM dd, yyyy h:mm:ss tt", // month/day pattern M: "MMMM dd", // month/year pattern Y: "yyyy MMMM", // S is a sortable format that does not vary by culture S: "yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss" } // optional fields for each calendar: /* monthsGenitive: Same as months but used when the day preceeds the month. Omit if the culture has no genitive distinction in month names. For an explaination of genitive months, see http://blogs.msdn.com/michkap/archive/2004/12/25/332259.aspx convert: Allows for the support of non-gregorian based calendars. This convert object is used to to convert a date to and from a gregorian calendar date to handle parsing and formatting. The two functions: fromGregorian( date ) Given the date as a parameter, return an array with parts [ year, month, day ] corresponding to the non-gregorian based year, month, and day for the calendar. toGregorian( year, month, day ) Given the non-gregorian year, month, and day, return a new Date() object set to the corresponding date in the gregorian calendar. */ } }, // For localized strings messages: {} }; Globalize.cultures[ "default" ].calendar = Globalize.cultures[ "default" ].calendars.standard; Globalize.cultures.en = Globalize.cultures[ "default" ]; Globalize.cultureSelector = "en"; // // private variables // regexHex = /^0x[a-f0-9]+$/i; regexInfinity = /^[+\-]?infinity$/i; regexParseFloat = /^[+\-]?\d*\.?\d*(e[+\-]?\d+)?$/; regexTrim = /^\s+|\s+$/g; // // private JavaScript utility functions // arrayIndexOf = function( array, item ) { if ( array.indexOf ) { return array.indexOf( item ); } for ( var i = 0, length = array.length; i < length; i++ ) { if ( array[i] === item ) { return i; } } return -1; }; endsWith = function( value, pattern ) { return value.substr( value.length - pattern.length ) === pattern; }; extend = function() { var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; target = arguments[1] || {}; // skip the boolean and the target i = 2; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !isFunction(target) ) { target = {}; } for ( ; i < length; i++ ) { // Only deal with non-null/undefined values if ( (options = arguments[ i ]) != null ) { // Extend the base object for ( name in options ) { src = target[ name ]; copy = options[ name ]; // Prevent never-ending loop if ( target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( isObject(copy) || (copyIsArray = isArray(copy)) ) ) { if ( copyIsArray ) { copyIsArray = false; clone = src && isArray(src) ? src : []; } else { clone = src && isObject(src) ? src : {}; } // Never move original objects, clone them target[ name ] = extend( deep, clone, copy ); // Don't bring in undefined values } else if ( copy !== undefined ) { target[ name ] = copy; } } } } // Return the modified object return target; }; isArray = Array.isArray || function( obj ) { return Object.prototype.toString.call( obj ) === "[object Array]"; }; isFunction = function( obj ) { return Object.prototype.toString.call( obj ) === "[object Function]"; }; isObject = function( obj ) { return Object.prototype.toString.call( obj ) === "[object Object]"; }; startsWith = function( value, pattern ) { return value.indexOf( pattern ) === 0; }; trim = function( value ) { return ( value + "" ).replace( regexTrim, "" ); }; truncate = function( value ) { if ( isNaN( value ) ) { return NaN; } return Math[ value < 0 ? "ceil" : "floor" ]( value ); }; zeroPad = function( str, count, left ) { var l; for ( l = str.length; l < count; l += 1 ) { str = ( left ? ("0" + str) : (str + "0") ); } return str; }; // // private Globalization utility functions // appendPreOrPostMatch = function( preMatch, strings ) { // appends pre- and post- token match strings while removing escaped characters. // Returns a single quote count which is used to determine if the token occurs // in a string literal. var quoteCount = 0, escaped = false; for ( var i = 0, il = preMatch.length; i < il; i++ ) { var c = preMatch.charAt( i ); switch ( c ) { case "\'": if ( escaped ) { strings.push( "\'" ); } else { quoteCount++; } escaped = false; break; case "\\": if ( escaped ) { strings.push( "\\" ); } escaped = !escaped; break; default: strings.push( c ); escaped = false; break; } } return quoteCount; }; expandFormat = function( cal, format ) { // expands unspecified or single character date formats into the full pattern. format = format || "F"; var pattern, patterns = cal.patterns, len = format.length; if ( len === 1 ) { pattern = patterns[ format ]; if ( !pattern ) { throw "Invalid date format string \'" + format + "\'."; } format = pattern; } else if ( len === 2 && format.charAt(0) === "%" ) { // %X escape format -- intended as a custom format string that is only one character, not a built-in format. format = format.charAt( 1 ); } return format; }; formatDate = function( value, format, culture ) { var cal = culture.calendar, convert = cal.convert, ret; if ( !format || !format.length || format === "i" ) { if ( culture && culture.name.length ) { if ( convert ) { // non-gregorian calendar, so we cannot use built-in toLocaleString() ret = formatDate( value, cal.patterns.F, culture ); } else { var eraDate = new Date( value.getTime() ), era = getEra( value, cal.eras ); eraDate.setFullYear( getEraYear(value, cal, era) ); ret = eraDate.toLocaleString(); } } else { ret = value.toString(); } return ret; } var eras = cal.eras, sortable = format === "s"; format = expandFormat( cal, format ); // Start with an empty string ret = []; var hour, zeros = [ "0", "00", "000" ], foundDay, checkedDay, dayPartRegExp = /([^d]|^)(d|dd)([^d]|$)/g, quoteCount = 0, tokenRegExp = getTokenRegExp(), converted; function padZeros( num, c ) { var r, s = num + ""; if ( c > 1 && s.length < c ) { r = ( zeros[c - 2] + s); return r.substr( r.length - c, c ); } else { r = s; } return r; } function hasDay() { if ( foundDay || checkedDay ) { return foundDay; } foundDay = dayPartRegExp.test( format ); checkedDay = true; return foundDay; } function getPart( date, part ) { if ( converted ) { return converted[ part ]; } switch ( part ) { case 0: return date.getFullYear(); case 1: return date.getMonth(); case 2: return date.getDate(); default: throw "Invalid part value " + part; } } if ( !sortable && convert ) { converted = convert.fromGregorian( value ); } for ( ; ; ) { // Save the current index var index = tokenRegExp.lastIndex, // Look for the next pattern ar = tokenRegExp.exec( format ); // Append the text before the pattern (or the end of the string if not found) var preMatch = format.slice( index, ar ? ar.index : format.length ); quoteCount += appendPreOrPostMatch( preMatch, ret ); if ( !ar ) { break; } // do not replace any matches that occur inside a string literal. if ( quoteCount % 2 ) { ret.push( ar[0] ); continue; } var current = ar[ 0 ], clength = current.length; switch ( current ) { case "ddd": //Day of the week, as a three-letter abbreviation case "dddd": // Day of the week, using the full name var names = ( clength === 3 ) ? cal.days.namesAbbr : cal.days.names; ret.push( names[value.getDay()] ); break; case "d": // Day of month, without leading zero for single-digit days case "dd": // Day of month, with leading zero for single-digit days foundDay = true; ret.push( padZeros( getPart(value, 2), clength ) ); break; case "MMM": // Month, as a three-letter abbreviation case "MMMM": // Month, using the full name var part = getPart( value, 1 ); ret.push( ( cal.monthsGenitive && hasDay() ) ? ( cal.monthsGenitive[ clength === 3 ? "namesAbbr" : "names" ][ part ] ) : ( cal.months[ clength === 3 ? "namesAbbr" : "names" ][ part ] ) ); break; case "M": // Month, as digits, with no leading zero for single-digit months case "MM": // Month, as digits, with leading zero for single-digit months ret.push( padZeros( getPart(value, 1) + 1, clength ) ); break; case "y": // Year, as two digits, but with no leading zero for years less than 10 case "yy": // Year, as two digits, with leading zero for years less than 10 case "yyyy": // Year represented by four full digits part = converted ? converted[ 0 ] : getEraYear( value, cal, getEra(value, eras), sortable ); if ( clength < 4 ) { part = part % 100; } ret.push( padZeros( part, clength ) ); break; case "h": // Hours with no leading zero for single-digit hours, using 12-hour clock case "hh": // Hours with leading zero for single-digit hours, using 12-hour clock hour = value.getHours() % 12; if ( hour === 0 ) hour = 12; ret.push( padZeros( hour, clength ) ); break; case "H": // Hours with no leading zero for single-digit hours, using 24-hour clock case "HH": // Hours with leading zero for single-digit hours, using 24-hour clock ret.push( padZeros( value.getHours(), clength ) ); break; case "m": // Minutes with no leading zero for single-digit minutes case "mm": // Minutes with leading zero for single-digit minutes ret.push( padZeros( value.getMinutes(), clength ) ); break; case "s": // Seconds with no leading zero for single-digit seconds case "ss": // Seconds with leading zero for single-digit seconds ret.push( padZeros( value.getSeconds(), clength ) ); break; case "t": // One character am/pm indicator ("a" or "p") case "tt": // Multicharacter am/pm indicator part = value.getHours() < 12 ? ( cal.AM ? cal.AM[0] : " " ) : ( cal.PM ? cal.PM[0] : " " ); ret.push( clength === 1 ? part.charAt(0) : part ); break; case "f": // Deciseconds case "ff": // Centiseconds case "fff": // Milliseconds ret.push( padZeros( value.getMilliseconds(), 3 ).substr( 0, clength ) ); break; case "z": // Time zone offset, no leading zero case "zz": // Time zone offset with leading zero hour = value.getTimezoneOffset() / 60; ret.push( ( hour <= 0 ? "+" : "-" ) + padZeros( Math.floor(Math.abs(hour)), clength ) ); break; case "zzz": // Time zone offset with leading zero hour = value.getTimezoneOffset() / 60; ret.push( ( hour <= 0 ? "+" : "-" ) + padZeros( Math.floor(Math.abs(hour)), 2 ) + // Hard coded ":" separator, rather than using cal.TimeSeparator // Repeated here for consistency, plus ":" was already assumed in date parsing. ":" + padZeros( Math.abs(value.getTimezoneOffset() % 60), 2 ) ); break; case "g": case "gg": if ( cal.eras ) { ret.push( cal.eras[ getEra(value, eras) ].name ); } break; case "/": ret.push( cal["/"] ); break; default: throw "Invalid date format pattern \'" + current + "\'."; } } return ret.join( "" ); }; // formatNumber (function() { var expandNumber; expandNumber = function( number, precision, formatInfo ) { var groupSizes = formatInfo.groupSizes, curSize = groupSizes[ 0 ], curGroupIndex = 1, factor = Math.pow( 10, precision ), rounded = Math.round( number * factor ) / factor; if ( !isFinite(rounded) ) { rounded = number; } number = rounded; var numberString = number+"", right = "", split = numberString.split( /e/i ), exponent = split.length > 1 ? parseInt( split[1], 10 ) : 0; numberString = split[ 0 ]; split = numberString.split( "." ); numberString = split[ 0 ]; right = split.length > 1 ? split[ 1 ] : ""; var l; if ( exponent > 0 ) { right = zeroPad( right, exponent, false ); numberString += right.slice( 0, exponent ); right = right.substr( exponent ); } else if ( exponent < 0 ) { exponent = -exponent; numberString = zeroPad( numberString, exponent + 1, true ); right = numberString.slice( -exponent, numberString.length ) + right; numberString = numberString.slice( 0, -exponent ); } if ( precision > 0 ) { right = formatInfo[ "." ] + ( (right.length > precision) ? right.slice(0, precision) : zeroPad(right, precision) ); } else { right = ""; } var stringIndex = numberString.length - 1, sep = formatInfo[ "," ], ret = ""; while ( stringIndex >= 0 ) { if ( curSize === 0 || curSize > stringIndex ) { return numberString.slice( 0, stringIndex + 1 ) + ( ret.length ? (sep + ret + right) : right ); } ret = numberString.slice( stringIndex - curSize + 1, stringIndex + 1 ) + ( ret.length ? (sep + ret) : "" ); stringIndex -= curSize; if ( curGroupIndex < groupSizes.length ) { curSize = groupSizes[ curGroupIndex ]; curGroupIndex++; } } return numberString.slice( 0, stringIndex + 1 ) + sep + ret + right; }; formatNumber = function( value, format, culture ) { if ( !isFinite(value) ) { if ( value === Infinity ) { return culture.numberFormat.positiveInfinity; } if ( value === -Infinity ) { return culture.numberFormat.negativeInfinity; } return culture.numberFormat.NaN; } if ( !format || format === "i" ) { return culture.name.length ? value.toLocaleString() : value.toString(); } format = format || "D"; var nf = culture.numberFormat, number = Math.abs( value ), precision = -1, pattern; if ( format.length > 1 ) precision = parseInt( format.slice(1), 10 ); var current = format.charAt( 0 ).toUpperCase(), formatInfo; switch ( current ) { case "D": pattern = "n"; number = truncate( number ); if ( precision !== -1 ) { number = zeroPad( "" + number, precision, true ); } if ( value < 0 ) number = "-" + number; break; case "N": formatInfo = nf; /* falls through */ case "C": formatInfo = formatInfo || nf.currency; /* falls through */ case "P": formatInfo = formatInfo || nf.percent; pattern = value < 0 ? formatInfo.pattern[ 0 ] : ( formatInfo.pattern[1] || "n" ); if ( precision === -1 ) precision = formatInfo.decimals; number = expandNumber( number * (current === "P" ? 100 : 1), precision, formatInfo ); break; default: throw "Bad number format specifier: " + current; } var patternParts = /n|\$|-|%/g, ret = ""; for ( ; ; ) { var index = patternParts.lastIndex, ar = patternParts.exec( pattern ); ret += pattern.slice( index, ar ? ar.index : pattern.length ); if ( !ar ) { break; } switch ( ar[0] ) { case "n": ret += number; break; case "$": ret += nf.currency.symbol; break; case "-": // don't make 0 negative if ( /[1-9]/.test(number) ) { ret += nf[ "-" ]; } break; case "%": ret += nf.percent.symbol; break; } } return ret; }; }()); getTokenRegExp = function() { // regular expression for matching date and time tokens in format strings. return (/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g); }; getEra = function( date, eras ) { if ( !eras ) return 0; var start, ticks = date.getTime(); for ( var i = 0, l = eras.length; i < l; i++ ) { start = eras[ i ].start; if ( start === null || ticks >= start ) { return i; } } return 0; }; getEraYear = function( date, cal, era, sortable ) { var year = date.getFullYear(); if ( !sortable && cal.eras ) { // convert normal gregorian year to era-shifted gregorian // year by subtracting the era offset year -= cal.eras[ era ].offset; } return year; }; // parseExact (function() { var expandYear, getDayIndex, getMonthIndex, getParseRegExp, outOfRange, toUpper, toUpperArray; expandYear = function( cal, year ) { // expands 2-digit year into 4 digits. if ( year < 100 ) { var now = new Date(), era = getEra( now ), curr = getEraYear( now, cal, era ), twoDigitYearMax = cal.twoDigitYearMax; twoDigitYearMax = typeof twoDigitYearMax === "string" ? new Date().getFullYear() % 100 + parseInt( twoDigitYearMax, 10 ) : twoDigitYearMax; year += curr - ( curr % 100 ); if ( year > twoDigitYearMax ) { year -= 100; } } return year; }; getDayIndex = function ( cal, value, abbr ) { var ret, days = cal.days, upperDays = cal._upperDays; if ( !upperDays ) { cal._upperDays = upperDays = [ toUpperArray( days.names ), toUpperArray( days.namesAbbr ), toUpperArray( days.namesShort ) ]; } value = toUpper( value ); if ( abbr ) { ret = arrayIndexOf( upperDays[1], value ); if ( ret === -1 ) { ret = arrayIndexOf( upperDays[2], value ); } } else { ret = arrayIndexOf( upperDays[0], value ); } return ret; }; getMonthIndex = function( cal, value, abbr ) { var months = cal.months, monthsGen = cal.monthsGenitive || cal.months, upperMonths = cal._upperMonths, upperMonthsGen = cal._upperMonthsGen; if ( !upperMonths ) { cal._upperMonths = upperMonths = [ toUpperArray( months.names ), toUpperArray( months.namesAbbr ) ]; cal._upperMonthsGen = upperMonthsGen = [ toUpperArray( monthsGen.names ), toUpperArray( monthsGen.namesAbbr ) ]; } value = toUpper( value ); var i = arrayIndexOf( abbr ? upperMonths[1] : upperMonths[0], value ); if ( i < 0 ) { i = arrayIndexOf( abbr ? upperMonthsGen[1] : upperMonthsGen[0], value ); } return i; }; getParseRegExp = function( cal, format ) { // converts a format string into a regular expression with groups that // can be used to extract date fields from a date string. // check for a cached parse regex. var re = cal._parseRegExp; if ( !re ) { cal._parseRegExp = re = {}; } else { var reFormat = re[ format ]; if ( reFormat ) { return reFormat; } } // expand single digit formats, then escape regular expression characters. var expFormat = expandFormat( cal, format ).replace( /([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g, "\\\\$1" ), regexp = [ "^" ], groups = [], index = 0, quoteCount = 0, tokenRegExp = getTokenRegExp(), match; // iterate through each date token found. while ( (match = tokenRegExp.exec(expFormat)) !== null ) { var preMatch = expFormat.slice( index, match.index ); index = tokenRegExp.lastIndex; // don't replace any matches that occur inside a string literal. quoteCount += appendPreOrPostMatch( preMatch, regexp ); if ( quoteCount % 2 ) { regexp.push( match[0] ); continue; } // add a regex group for the token. var m = match[ 0 ], len = m.length, add; switch ( m ) { case "dddd": case "ddd": case "MMMM": case "MMM": case "gg": case "g": add = "(\\D+)"; break; case "tt": case "t": add = "(\\D*)"; break; case "yyyy": case "fff": case "ff": case "f": add = "(\\d{" + len + "})"; break; case "dd": case "d": case "MM": case "M": case "yy": case "y": case "HH": case "H": case "hh": case "h": case "mm": case "m": case "ss": case "s": add = "(\\d\\d?)"; break; case "zzz": add = "([+-]?\\d\\d?:\\d{2})"; break; case "zz": case "z": add = "([+-]?\\d\\d?)"; break; case "/": add = "(\\/)"; break; default: throw "Invalid date format pattern \'" + m + "\'."; } if ( add ) { regexp.push( add ); } groups.push( match[0] ); } appendPreOrPostMatch( expFormat.slice(index), regexp ); regexp.push( "$" ); // allow whitespace to differ when matching formats. var regexpStr = regexp.join( "" ).replace( /\s+/g, "\\s+" ), parseRegExp = { "regExp": regexpStr, "groups": groups }; // cache the regex for this format. return re[ format ] = parseRegExp; }; outOfRange = function( value, low, high ) { return value < low || value > high; }; toUpper = function( value ) { // "he-IL" has non-breaking space in weekday names. return value.split( "\u00A0" ).join( " " ).toUpperCase(); }; toUpperArray = function( arr ) { var results = []; for ( var i = 0, l = arr.length; i < l; i++ ) { results[ i ] = toUpper( arr[i] ); } return results; }; parseExact = function( value, format, culture ) { // try to parse the date string by matching against the format string // while using the specified culture for date field names. value = trim( value ); var cal = culture.calendar, // convert date formats into regular expressions with groupings. // use the regexp to determine the input format and extract the date fields. parseInfo = getParseRegExp( cal, format ), match = new RegExp( parseInfo.regExp ).exec( value ); if ( match === null ) { return null; } // found a date format that matches the input. var groups = parseInfo.groups, era = null, year = null, month = null, date = null, weekDay = null, hour = 0, hourOffset, min = 0, sec = 0, msec = 0, tzMinOffset = null, pmHour = false; // iterate the format groups to extract and set the date fields. for ( var j = 0, jl = groups.length; j < jl; j++ ) { var matchGroup = match[ j + 1 ]; if ( matchGroup ) { var current = groups[ j ], clength = current.length, matchInt = parseInt( matchGroup, 10 ); switch ( current ) { case "dd": case "d": // Day of month. date = matchInt; // check that date is generally in valid range, also checking overflow below. if ( outOfRange(date, 1, 31) ) return null; break; case "MMM": case "MMMM": month = getMonthIndex( cal, matchGroup, clength === 3 ); if ( outOfRange(month, 0, 11) ) return null; break; case "M": case "MM": // Month. month = matchInt - 1; if ( outOfRange(month, 0, 11) ) return null; break; case "y": case "yy": case "yyyy": year = clength < 4 ? expandYear( cal, matchInt ) : matchInt; if ( outOfRange(year, 0, 9999) ) return null; break; case "h": case "hh": // Hours (12-hour clock). hour = matchInt; if ( hour === 12 ) hour = 0; if ( outOfRange(hour, 0, 11) ) return null; break; case "H": case "HH": // Hours (24-hour clock). hour = matchInt; if ( outOfRange(hour, 0, 23) ) return null; break; case "m": case "mm": // Minutes. min = matchInt; if ( outOfRange(min, 0, 59) ) return null; break; case "s": case "ss": // Seconds. sec = matchInt; if ( outOfRange(sec, 0, 59) ) return null; break; case "tt": case "t": // AM/PM designator. // see if it is standard, upper, or lower case PM. If not, ensure it is at least one of // the AM tokens. If not, fail the parse for this format. pmHour = cal.PM && ( matchGroup === cal.PM[0] || matchGroup === cal.PM[1] || matchGroup === cal.PM[2] ); if ( !pmHour && ( !cal.AM || ( matchGroup !== cal.AM[0] && matchGroup !== cal.AM[1] && matchGroup !== cal.AM[2] ) ) ) return null; break; case "f": // Deciseconds. case "ff": // Centiseconds. case "fff": // Milliseconds. msec = matchInt * Math.pow( 10, 3 - clength ); if ( outOfRange(msec, 0, 999) ) return null; break; case "ddd": // Day of week. case "dddd": // Day of week. weekDay = getDayIndex( cal, matchGroup, clength === 3 ); if ( outOfRange(weekDay, 0, 6) ) return null; break; case "zzz": // Time zone offset in +/- hours:min. var offsets = matchGroup.split( /:/ ); if ( offsets.length !== 2 ) return null; hourOffset = parseInt( offsets[0], 10 ); if ( outOfRange(hourOffset, -12, 13) ) return null; var minOffset = parseInt( offsets[1], 10 ); if ( outOfRange(minOffset, 0, 59) ) return null; tzMinOffset = ( hourOffset * 60 ) + ( startsWith(matchGroup, "-") ? -minOffset : minOffset ); break; case "z": case "zz": // Time zone offset in +/- hours. hourOffset = matchInt; if ( outOfRange(hourOffset, -12, 13) ) return null; tzMinOffset = hourOffset * 60; break; case "g": case "gg": var eraName = matchGroup; if ( !eraName || !cal.eras ) return null; eraName = trim( eraName.toLowerCase() ); for ( var i = 0, l = cal.eras.length; i < l; i++ ) { if ( eraName === cal.eras[i].name.toLowerCase() ) { era = i; break; } } // could not find an era with that name if ( era === null ) return null; break; } } } var result = new Date(), defaultYear, convert = cal.convert; defaultYear = convert ? convert.fromGregorian( result )[ 0 ] : result.getFullYear(); if ( year === null ) { year = defaultYear; } else if ( cal.eras ) { // year must be shifted to normal gregorian year // but not if year was not specified, its already normal gregorian // per the main if clause above. year += cal.eras[( era || 0 )].offset; } // set default day and month to 1 and January, so if unspecified, these are the defaults // instead of the current day/month. if ( month === null ) { month = 0; } if ( date === null ) { date = 1; } // now have year, month, and date, but in the culture's calendar. // convert to gregorian if necessary if ( convert ) { result = convert.toGregorian( year, month, date ); // conversion failed, must be an invalid match if ( result === null ) return null; } else { // have to set year, month and date together to avoid overflow based on current date. result.setFullYear( year, month, date ); // check to see if date overflowed for specified month (only checked 1-31 above). if ( result.getDate() !== date ) return null; // invalid day of week. if ( weekDay !== null && result.getDay() !== weekDay ) { return null; } } // if pm designator token was found make sure the hours fit the 24-hour clock. if ( pmHour && hour < 12 ) { hour += 12; } result.setHours( hour, min, sec, msec ); if ( tzMinOffset !== null ) { // adjust timezone to utc before applying local offset. var adjustedMin = result.getMinutes() - ( tzMinOffset + result.getTimezoneOffset() ); // Safari limits hours and minutes to the range of -127 to 127. We need to use setHours // to ensure both these fields will not exceed this range. adjustedMin will range // somewhere between -1440 and 1500, so we only need to split this into hours. result.setHours( result.getHours() + parseInt(adjustedMin / 60, 10), adjustedMin % 60 ); } return result; }; }()); parseNegativePattern = function( value, nf, negativePattern ) { var neg = nf[ "-" ], pos = nf[ "+" ], ret; switch ( negativePattern ) { case "n -": neg = " " + neg; pos = " " + pos; /* falls through */ case "n-": if ( endsWith(value, neg) ) { ret = [ "-", value.substr(0, value.length - neg.length) ]; } else if ( endsWith(value, pos) ) { ret = [ "+", value.substr(0, value.length - pos.length) ]; } break; case "- n": neg += " "; pos += " "; /* falls through */ case "-n": if ( startsWith(value, neg) ) { ret = [ "-", value.substr(neg.length) ]; } else if ( startsWith(value, pos) ) { ret = [ "+", value.substr(pos.length) ]; } break; case "(n)": if ( startsWith(value, "(") && endsWith(value, ")") ) { ret = [ "-", value.substr(1, value.length - 2) ]; } break; } return ret || [ "", value ]; }; // // public instance functions // Globalize.prototype.findClosestCulture = function( cultureSelector ) { return Globalize.findClosestCulture.call( this, cultureSelector ); }; Globalize.prototype.format = function( value, format, cultureSelector ) { return Globalize.format.call( this, value, format, cultureSelector ); }; Globalize.prototype.localize = function( key, cultureSelector ) { return Globalize.localize.call( this, key, cultureSelector ); }; Globalize.prototype.parseInt = function( value, radix, cultureSelector ) { return Globalize.parseInt.call( this, value, radix, cultureSelector ); }; Globalize.prototype.parseFloat = function( value, radix, cultureSelector ) { return Globalize.parseFloat.call( this, value, radix, cultureSelector ); }; Globalize.prototype.culture = function( cultureSelector ) { return Globalize.culture.call( this, cultureSelector ); }; // // public singleton functions // Globalize.addCultureInfo = function( cultureName, baseCultureName, info ) { var base = {}, isNew = false; if ( typeof cultureName !== "string" ) { // cultureName argument is optional string. If not specified, assume info is first // and only argument. Specified info deep-extends current culture. info = cultureName; cultureName = this.culture().name; base = this.cultures[ cultureName ]; } else if ( typeof baseCultureName !== "string" ) { // baseCultureName argument is optional string. If not specified, assume info is second // argument. Specified info deep-extends specified culture. // If specified culture does not exist, create by deep-extending default info = baseCultureName; isNew = ( this.cultures[ cultureName ] == null ); base = this.cultures[ cultureName ] || this.cultures[ "default" ]; } else { // cultureName and baseCultureName specified. Assume a new culture is being created // by deep-extending an specified base culture isNew = true; base = this.cultures[ baseCultureName ]; } this.cultures[ cultureName ] = extend(true, {}, base, info ); // Make the standard calendar the current culture if it's a new culture if ( isNew ) { this.cultures[ cultureName ].calendar = this.cultures[ cultureName ].calendars.standard; } }; Globalize.findClosestCulture = function( name ) { var match; if ( !name ) { return this.findClosestCulture( this.cultureSelector ) || this.cultures[ "default" ]; } if ( typeof name === "string" ) { name = name.split( "," ); } if ( isArray(name) ) { var lang, cultures = this.cultures, list = name, i, l = list.length, prioritized = []; for ( i = 0; i < l; i++ ) { name = trim( list[i] ); var pri, parts = name.split( ";" ); lang = trim( parts[0] ); if ( parts.length === 1 ) { pri = 1; } else { name = trim( parts[1] ); if ( name.indexOf("q=") === 0 ) { name = name.substr( 2 ); pri = parseFloat( name ); pri = isNaN( pri ) ? 0 : pri; } else { pri = 1; } } prioritized.push({ lang: lang, pri: pri }); } prioritized.sort(function( a, b ) { if ( a.pri < b.pri ) { return 1; } else if ( a.pri > b.pri ) { return -1; } return 0; }); // exact match for ( i = 0; i < l; i++ ) { lang = prioritized[ i ].lang; match = cultures[ lang ]; if ( match ) { return match; } } // neutral language match for ( i = 0; i < l; i++ ) { lang = prioritized[ i ].lang; do { var index = lang.lastIndexOf( "-" ); if ( index === -1 ) { break; } // strip off the last part. e.g. en-US => en lang = lang.substr( 0, index ); match = cultures[ lang ]; if ( match ) { return match; } } while ( 1 ); } // last resort: match first culture using that language for ( i = 0; i < l; i++ ) { lang = prioritized[ i ].lang; for ( var cultureKey in cultures ) { var culture = cultures[ cultureKey ]; if ( culture.language == lang ) { return culture; } } } } else if ( typeof name === "object" ) { return name; } return match || null; }; Globalize.format = function( value, format, cultureSelector ) { var culture = this.findClosestCulture( cultureSelector ); if ( value instanceof Date ) { value = formatDate( value, format, culture ); } else if ( typeof value === "number" ) { value = formatNumber( value, format, culture ); } return value; }; Globalize.localize = function( key, cultureSelector ) { return this.findClosestCulture( cultureSelector ).messages[ key ] || this.cultures[ "default" ].messages[ key ]; }; Globalize.parseDate = function( value, formats, culture ) { culture = this.findClosestCulture( culture ); var date, prop, patterns; if ( formats ) { if ( typeof formats === "string" ) { formats = [ formats ]; } if ( formats.length ) { for ( var i = 0, l = formats.length; i < l; i++ ) { var format = formats[ i ]; if ( format ) { date = parseExact( value, format, culture ); if ( date ) { break; } } } } } else { patterns = culture.calendar.patterns; for ( prop in patterns ) { date = parseExact( value, patterns[prop], culture ); if ( date ) { break; } } } return date || null; }; Globalize.parseInt = function( value, radix, cultureSelector ) { return truncate( Globalize.parseFloat(value, radix, cultureSelector) ); }; Globalize.parseFloat = function( value, radix, cultureSelector ) { // radix argument is optional if ( typeof radix !== "number" ) { cultureSelector = radix; radix = 10; } var culture = this.findClosestCulture( cultureSelector ); var ret = NaN, nf = culture.numberFormat; if ( value.indexOf(culture.numberFormat.currency.symbol) > -1 ) { // remove currency symbol value = value.replace( culture.numberFormat.currency.symbol, "" ); // replace decimal seperator value = value.replace( culture.numberFormat.currency["."], culture.numberFormat["."] ); } //Remove percentage character from number string before parsing if ( value.indexOf(culture.numberFormat.percent.symbol) > -1){ value = value.replace( culture.numberFormat.percent.symbol, "" ); } // remove spaces: leading, trailing and between - and number. Used for negative currency pt-BR value = value.replace( / /g, "" ); // allow infinity or hexidecimal if ( regexInfinity.test(value) ) { ret = parseFloat( value ); } else if ( !radix && regexHex.test(value) ) { ret = parseInt( value, 16 ); } else { // determine sign and number var signInfo = parseNegativePattern( value, nf, nf.pattern[0] ), sign = signInfo[ 0 ], num = signInfo[ 1 ]; // #44 - try parsing as "(n)" if ( sign === "" && nf.pattern[0] !== "(n)" ) { signInfo = parseNegativePattern( value, nf, "(n)" ); sign = signInfo[ 0 ]; num = signInfo[ 1 ]; } // try parsing as "-n" if ( sign === "" && nf.pattern[0] !== "-n" ) { signInfo = parseNegativePattern( value, nf, "-n" ); sign = signInfo[ 0 ]; num = signInfo[ 1 ]; } sign = sign || "+"; // determine exponent and number var exponent, intAndFraction, exponentPos = num.indexOf( "e" ); if ( exponentPos < 0 ) exponentPos = num.indexOf( "E" ); if ( exponentPos < 0 ) { intAndFraction = num; exponent = null; } else { intAndFraction = num.substr( 0, exponentPos ); exponent = num.substr( exponentPos + 1 ); } // determine decimal position var integer, fraction, decSep = nf[ "." ], decimalPos = intAndFraction.indexOf( decSep ); if ( decimalPos < 0 ) { integer = intAndFraction; fraction = null; } else { integer = intAndFraction.substr( 0, decimalPos ); fraction = intAndFraction.substr( decimalPos + decSep.length ); } // handle groups (e.g. 1,000,000) var groupSep = nf[ "," ]; integer = integer.split( groupSep ).join( "" ); var altGroupSep = groupSep.replace( /\u00A0/g, " " ); if ( groupSep !== altGroupSep ) { integer = integer.split( altGroupSep ).join( "" ); } // build a natively parsable number string var p = sign + integer; if ( fraction !== null ) { p += "." + fraction; } if ( exponent !== null ) { // exponent itself may have a number patternd var expSignInfo = parseNegativePattern( exponent, nf, "-n" ); p += "e" + ( expSignInfo[0] || "+" ) + expSignInfo[ 1 ]; } if ( regexParseFloat.test(p) ) { ret = parseFloat( p ); } } return ret; }; Globalize.culture = function( cultureSelector ) { // setter if ( typeof cultureSelector !== "undefined" ) { this.cultureSelector = cultureSelector; } // getter return this.findClosestCulture( cultureSelector ) || this.cultures[ "default" ]; }; }( this ));
0x6a
trunk/libraries/jqwidgets/globalization/globalize.js
JavaScript
asf20
45,714
(function($) { var cultures = $.global.cultures, en = cultures.en, standard = en.calendars.standard, culture = cultures["en-US"] = $.extend(true, {}, en, { }, cultures["en-US"]); culture.calendar = culture.calendars.standard; })(jQuery);
0x6a
trunk/libraries/jqwidgets/globalization/jquery.glob.en-US.js
JavaScript
asf20
276
(function($) { var cultures = $.global.cultures, en = cultures.en, standard = en.calendars.standard, culture = cultures["ru-RU"] = $.extend(true, {}, en, { name: "ru-RU", englishName: "Russian (Russia)", nativeName: "русский (Россия)", language: "ru", numberFormat: { ',': " ", '.': ",", percent: { pattern: ["-n%","n%"], ',': " ", '.': "," }, currency: { pattern: ["-n$","n$"], ',': " ", '.': ",", symbol: "р." } }, calendars: { standard: $.extend(true, {}, standard, { '/': ".", firstDay: 1, days: { names: ["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"], namesAbbr: ["Вс","Пн","Вт","Ср","Чт","Пт","Сб"], namesShort: ["Вс","Пн","Вт","Ср","Чт","Пт","Сб"] }, months: { names: ["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""], namesAbbr: ["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""] }, monthsGenitive: { names: ["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря",""], namesAbbr: ["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""] }, AM: null, PM: null, patterns: { d: "dd.MM.yyyy", D: "d MMMM yyyy 'г.'", t: "H:mm", T: "H:mm:ss", f: "d MMMM yyyy 'г.' H:mm", F: "d MMMM yyyy 'г.' H:mm:ss", Y: "MMMM yyyy" } }) } }, cultures["ru-RU"]); culture.calendar = culture.calendars.standard; })(jQuery);
0x6a
trunk/libraries/jqwidgets/globalization/jquery.glob.ru-RU.js
JavaScript
asf20
2,489
(function($) { var cultures = $.global.cultures, en = cultures.en, standard = en.calendars.standard, culture = cultures["fr-FR"] = $.extend(true, {}, en, { name: "fr-FR", englishName: "French (France)", nativeName: "français (France)", language: "fr", numberFormat: { ',': " ", '.': ",", percent: { ',': " ", '.': "," }, currency: { pattern: ["-n $","n $"], ',': " ", '.': ",", symbol: "€" } }, calendars: { standard: $.extend(true, {}, standard, { firstDay: 1, days: { names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], namesShort: ["di","lu","ma","me","je","ve","sa"] }, months: { names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] }, AM: null, PM: null, eras: [{"name":"ap. J.-C.","start":null,"offset":0}], patterns: { d: "dd/MM/yyyy", D: "dddd d MMMM yyyy", t: "HH:mm", T: "HH:mm:ss", f: "dddd d MMMM yyyy HH:mm", F: "dddd d MMMM yyyy HH:mm:ss", M: "d MMMM", Y: "MMMM yyyy" } }) } }, cultures["fr-FR"]); culture.calendar = culture.calendars.standard; })(jQuery);
0x6a
trunk/libraries/jqwidgets/globalization/jquery.glob.fr-FR.js
JavaScript
asf20
1,955
(function($) { var cultures = $.global.cultures, en = cultures.en, standard = en.calendars.standard, culture = cultures["de-DE"] = $.extend(true, {}, en, { name: "de-DE", englishName: "German (Germany)", nativeName: "Deutsch (Deutschland)", language: "de", numberFormat: { ',': ".", '.': ",", percent: { pattern: ["-n%","n%"], ',': ".", '.': "," }, currency: { pattern: ["-n $","n $"], ',': ".", '.': ",", symbol: "€" } }, calendars: { standard: $.extend(true, {}, standard, { '/': ".", firstDay: 1, days: { names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"], namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"], namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"] }, months: { names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""], namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] }, AM: null, PM: null, eras: [{"name":"n. Chr.","start":null,"offset":0}], patterns: { d: "dd.MM.yyyy", D: "dddd, d. MMMM yyyy", t: "HH:mm", T: "HH:mm:ss", f: "dddd, d. MMMM yyyy HH:mm", F: "dddd, d. MMMM yyyy HH:mm:ss", M: "dd MMMM", Y: "MMMM yyyy" } }) } }, cultures["de-DE"]); culture.calendar = culture.calendars.standard; })(jQuery);
0x6a
trunk/libraries/jqwidgets/globalization/jquery.glob.de-DE.js
JavaScript
asf20
2,052
(function($) { var cultures = $.global.cultures, en = cultures.en, standard = en.calendars.standard, culture = cultures["cs-CZ"] = $.extend(true, {}, en, { name: "cs-CZ", englishName: "Czech (Czech Republic)", nativeName: "čeština (Česká republika)", language: "cs", numberFormat: { ',': " ", '.': ",", percent: { pattern: ["-n%","n%"], ',': " ", '.': "," }, currency: { pattern: ["-n $","n $"], ',': " ", '.': ",", symbol: "Kč" } }, calendars: { standard: $.extend(true, {}, standard, { '/': ".", firstDay: 1, days: { names: ["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"], namesAbbr: ["ne","po","út","st","čt","pá","so"], namesShort: ["ne","po","út","st","čt","pá","so"] }, months: { names: ["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec",""], namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] }, monthsGenitive: { names: ["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince",""], namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] }, AM: ["dop.","dop.","DOP."], PM: ["odp.","odp.","ODP."], eras: [{"name":"n. l.","start":null,"offset":0}], patterns: { d: "d.M.yyyy", D: "d. MMMM yyyy", t: "H:mm", T: "H:mm:ss", f: "d. MMMM yyyy H:mm", F: "d. MMMM yyyy H:mm:ss", M: "dd MMMM", Y: "MMMM yyyy" } }) } }, cultures["cs-CZ"]); culture.calendar = culture.calendars.standard; })(jQuery);
0x6a
trunk/libraries/jqwidgets/globalization/jquery.glob.cs-CZ.js
JavaScript
asf20
2,307
(function($) { var cultures = $.global.cultures, en = cultures.en, standard = en.calendars.standard, culture = cultures["ja-JP"] = $.extend(true, {}, en, { name: "ja-JP", englishName: "Japanese (Japan)", nativeName: "日本語 (日本)", language: "ja", numberFormat: { percent: { pattern: ["-n%","n%"] }, currency: { pattern: ["-$n","$n"], decimals: 0, symbol: "¥" } }, calendars: { standard: $.extend(true, {}, standard, { days: { names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"], namesAbbr: ["日","月","火","水","木","金","土"], namesShort: ["日","月","火","水","木","金","土"] }, months: { names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""], namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] }, AM: ["午前","午前","午前"], PM: ["午後","午後","午後"], eras: [{"name":"西暦","start":null,"offset":0}], patterns: { d: "yyyy/MM/dd", D: "yyyy'年'M'月'd'日'", t: "H:mm", T: "H:mm:ss", f: "yyyy'年'M'月'd'日' H:mm", F: "yyyy'年'M'月'd'日' H:mm:ss", M: "M'月'd'日'", Y: "yyyy'年'M'月'" } }), Japanese: $.extend(true, {}, standard, { name: "Japanese", days: { names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"], namesAbbr: ["日","月","火","水","木","金","土"], namesShort: ["日","月","火","水","木","金","土"] }, months: { names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""], namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] }, AM: ["午前","午前","午前"], PM: ["午後","午後","午後"], eras: [{"name":"平成","start":null,"offset":1867},{"name":"昭和","start":-1812153600000,"offset":1911},{"name":"大正","start":-1357603200000,"offset":1925},{"name":"明治","start":60022080000,"offset":1988}], twoDigitYearMax: 99, patterns: { d: "gg y/M/d", D: "gg y'年'M'月'd'日'", t: "H:mm", T: "H:mm:ss", f: "gg y'年'M'月'd'日' H:mm", F: "gg y'年'M'月'd'日' H:mm:ss", M: "M'月'd'日'", Y: "gg y'年'M'月'" } }) } }, cultures["ja-JP"]); culture.calendar = culture.calendars.standard; })(jQuery);
0x6a
trunk/libraries/jqwidgets/globalization/jquery.glob.ja-JP.js
JavaScript
asf20
3,279
/*! * jQuery globalization Plugin v1.0.0pre * http://github.com/jquery/jquery-global * * Copyright Software Freedom Conservancy, Inc. * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license */ (function() { var globalization = {}, localized = { en: {} }; localized["default"] = localized.en; globalization.extend = function( deep ) { var target = arguments[ 1 ] || {}; for ( var i = 2, l = arguments.length; i < l; i++ ) { var source = arguments[ i ]; if ( source ) { for ( var field in source ) { var sourceVal = source[ field ]; if ( typeof sourceVal !== "undefined" ) { if ( deep && (isObject( sourceVal ) || isArray( sourceVal )) ) { var targetVal = target[ field ]; // extend onto the existing value, or create a new one targetVal = targetVal && (isObject( targetVal ) || isArray( targetVal )) ? targetVal : (isArray( sourceVal ) ? [] : {}); target[ field ] = this.extend( true, targetVal, sourceVal ); } else { target[ field ] = sourceVal; } } } } } return target; } globalization.findClosestCulture = function(name) { var match; if ( !name ) { return this.culture || this.cultures["default"]; } if ( isString( name ) ) { name = name.split( ',' ); } if ( isArray( name ) ) { var lang, cultures = this.cultures, list = name, i, l = list.length, prioritized = []; for ( i = 0; i < l; i++ ) { name = trim( list[ i ] ); var pri, parts = name.split( ';' ); lang = trim( parts[ 0 ] ); if ( parts.length === 1 ) { pri = 1; } else { name = trim( parts[ 1 ] ); if ( name.indexOf("q=") === 0 ) { name = name.substr( 2 ); pri = parseFloat( name, 10 ); pri = isNaN( pri ) ? 0 : pri; } else { pri = 1; } } prioritized.push( { lang: lang, pri: pri } ); } prioritized.sort(function(a, b) { return a.pri < b.pri ? 1 : -1; }); // exact match for ( i = 0; i < l; i++ ) { lang = prioritized[ i ].lang; match = cultures[ lang ]; if ( match ) { return match; } } // neutral language match for ( i = 0; i < l; i++ ) { lang = prioritized[ i ].lang; do { var index = lang.lastIndexOf( "-" ); if ( index === -1 ) { break; } // strip off the last part. e.g. en-US => en lang = lang.substr( 0, index ); match = cultures[ lang ]; if ( match ) { return match; } } while ( 1 ); } // last resort: match first culture using that language for ( i = 0; i < l; i++ ) { lang = prioritized[ i ].lang; for ( var cultureKey in cultures ) { var culture = cultures[ cultureKey ]; if ( culture.language == lang ) { return culture; } } } } else if ( typeof name === 'object' ) { return name; } return match || null; } globalization.preferCulture = function(name) { this.culture = this.findClosestCulture( name ) || this.cultures["default"]; } globalization.localize = function(key, culture, value) { // usign default culture in case culture is not provided if (typeof culture !== 'string') { culture = this.culture.name || this.culture || "default"; } culture = this.cultures[ culture ] || { name: culture }; var local = localized[ culture.name ]; if ( arguments.length === 3 ) { if ( !local) { local = localized[ culture.name ] = {}; } local[ key ] = value; } else { if ( local ) { value = local[ key ]; } if ( typeof value === 'undefined' ) { var language = localized[ culture.language ]; if ( language ) { value = language[ key ]; } if ( typeof value === 'undefined' ) { value = localized["default"][ key ]; } } } return typeof value === "undefined" ? null : value; } globalization.format = function(value, format, culture) { culture = this.findClosestCulture( culture ); if ( typeof value === "number" ) { value = formatNumber( value, format, culture ); } else if ( value instanceof Date ) { value = formatDate( value, format, culture ); } return value; } globalization.parseInt = function(value, radix, culture) { return Math.floor( this.parseFloat( value, radix, culture ) ); } globalization.parseFloat = function(value, radix, culture) { // make radix optional if (typeof radix === "string") { culture = radix; radix = 10; } culture = this.findClosestCulture( culture ); var ret = NaN, nf = culture.numberFormat; if (value.indexOf(culture.numberFormat.currency.symbol) > -1) { // remove currency symbol value = value.replace(culture.numberFormat.currency.symbol, ""); // replace decimal seperator value = value.replace(culture.numberFormat.currency["."], culture.numberFormat["."]); } // trim leading and trailing whitespace value = trim( value ); // allow infinity or hexidecimal if (regexInfinity.test(value)) { ret = parseFloat(value, radix); } else if (!radix && regexHex.test(value)) { ret = parseInt(value, 16); } else { var signInfo = parseNegativePattern( value, nf, nf.pattern[0] ), sign = signInfo[0], num = signInfo[1]; // determine sign and number if ( sign === "" && nf.pattern[0] !== "-n" ) { signInfo = parseNegativePattern( value, nf, "-n" ); sign = signInfo[0]; num = signInfo[1]; } sign = sign || "+"; // determine exponent and number var exponent, intAndFraction, exponentPos = num.indexOf( 'e' ); if ( exponentPos < 0 ) exponentPos = num.indexOf( 'E' ); if ( exponentPos < 0 ) { intAndFraction = num; exponent = null; } else { intAndFraction = num.substr( 0, exponentPos ); exponent = num.substr( exponentPos + 1 ); } // determine decimal position var integer, fraction, decSep = nf['.'], decimalPos = intAndFraction.indexOf( decSep ); if ( decimalPos < 0 ) { integer = intAndFraction; fraction = null; } else { integer = intAndFraction.substr( 0, decimalPos ); fraction = intAndFraction.substr( decimalPos + decSep.length ); } // handle groups (e.g. 1,000,000) var groupSep = nf[","]; integer = integer.split(groupSep).join(''); var altGroupSep = groupSep.replace(/\u00A0/g, " "); if ( groupSep !== altGroupSep ) { integer = integer.split(altGroupSep).join(''); } // build a natively parsable number string var p = sign + integer; if ( fraction !== null ) { p += '.' + fraction; } if ( exponent !== null ) { // exponent itself may have a number patternd var expSignInfo = parseNegativePattern( exponent, nf, "-n" ); p += 'e' + (expSignInfo[0] || "+") + expSignInfo[1]; } if ( regexParseFloat.test( p ) ) { ret = parseFloat( p ); } } return ret; } globalization.parseDate = function(value, formats, culture) { culture = this.findClosestCulture( culture ); var date, prop, patterns; if ( formats ) { if ( typeof formats === "string" ) { formats = [ formats ]; } if ( formats.length ) { for ( var i = 0, l = formats.length; i < l; i++ ) { var format = formats[ i ]; if ( format ) { date = parseExact( value, format, culture ); if ( date ) { break; } } } } } else { patterns = culture.calendar.patterns; for ( prop in patterns ) { date = parseExact( value, patterns[prop], culture ); if ( date ) { break; } } } return date || null; } // 1. When defining a culture, all fields are required except the ones stated as optional. // 2. You can use globalization.extend to copy an existing culture and provide only the differing values, // a good practice since most cultures do not differ too much from the 'default' culture. // DO use the 'default' culture if you do this, as it is the only one that definitely // exists. // 3. Other plugins may add to the culture information provided by extending it. However, // that plugin may extend it prior to the culture being defined, or after. Therefore, // do not overwrite values that already exist when defining the baseline for a culture, // by extending your culture object with the existing one. // 4. Each culture should have a ".calendars" object with at least one calendar named "standard" // which serves as the default calendar in use by that culture. // 5. Each culture should have a ".calendar" object which is the current calendar being used, // it may be dynamically changed at any time to one of the calendars in ".calendars". // To define a culture, use the following pattern, which handles defining the culture based // on the 'default culture, extending it with the existing culture if it exists, and defining // it if it does not exist. // globalization.cultures.foo = globalization.extend(true, globalization.extend(true, {}, globalization.cultures['default'], fooCulture), globalization.cultures.foo) var cultures = globalization.cultures = globalization.cultures || {}; var en = cultures["default"] = cultures.en = globalization.extend(true, { // A unique name for the culture in the form <language code>-<country/region code> name: "en", // the name of the culture in the english language englishName: "English", // the name of the culture in its own language nativeName: "English", // whether the culture uses right-to-left text isRTL: false, // 'language' is used for so-called "specific" cultures. // For example, the culture "es-CL" means "Spanish, in Chili". // It represents the Spanish-speaking culture as it is in Chili, // which might have different formatting rules or even translations // than Spanish in Spain. A "neutral" culture is one that is not // specific to a region. For example, the culture "es" is the generic // Spanish culture, which may be a more generalized version of the language // that may or may not be what a specific culture expects. // For a specific culture like "es-CL", the 'language' field refers to the // neutral, generic culture information for the language it is using. // This is not always a simple matter of the string before the dash. // For example, the "zh-Hans" culture is netural (Simplified Chinese). // And the 'zh-SG' culture is Simplified Chinese in Singapore, whose lanugage // field is "zh-CHS", not "zh". // This field should be used to navigate from a specific culture to it's // more general, neutral culture. If a culture is already as general as it // can get, the language may refer to itself. language: "en", // numberFormat defines general number formatting rules, like the digits in // each grouping, the group separator, and how negative numbers are displayed. numberFormat: { // [negativePattern] // Note, numberFormat.pattern has no 'positivePattern' unlike percent and currency, // but is still defined as an array for consistency with them. // negativePattern: one of "(n)|-n|- n|n-|n -" pattern: ["-n"], // number of decimal places normally shown decimals: 2, // string that separates number groups, as in 1,000,000 ',': ",", // string that separates a number from the fractional portion, as in 1.99 '.': ".", // array of numbers indicating the size of each number group. // TODO: more detailed description and example groupSizes: [3], // symbol used for positive numbers '+': "+", // symbol used for negative numbers '-': "-", percent: { // [negativePattern, positivePattern] // negativePattern: one of "-n %|-n%|-%n|%-n|%n-|n-%|n%-|-% n|n %-|% n-|% -n|n- %" // positivePattern: one of "n %|n%|%n|% n" pattern: ["-n %","n %"], // number of decimal places normally shown decimals: 2, // array of numbers indicating the size of each number group. // TODO: more detailed description and example groupSizes: [3], // string that separates number groups, as in 1,000,000 ',': ",", // string that separates a number from the fractional portion, as in 1.99 '.': ".", // symbol used to represent a percentage symbol: "%" }, currency: { // [negativePattern, positivePattern] // negativePattern: one of "($n)|-$n|$-n|$n-|(n$)|-n$|n-$|n$-|-n $|-$ n|n $-|$ n-|$ -n|n- $|($ n)|(n $)" // positivePattern: one of "$n|n$|$ n|n $" pattern: ["($n)","$n"], // number of decimal places normally shown decimals: 2, // array of numbers indicating the size of each number group. // TODO: more detailed description and example groupSizes: [3], // string that separates number groups, as in 1,000,000 ',': ",", // string that separates a number from the fractional portion, as in 1.99 '.': ".", // symbol used to represent currency symbol: "$" } }, // calendars defines all the possible calendars used by this culture. // There should be at least one defined with name 'standard', and is the default // calendar used by the culture. // A calendar contains information about how dates are formatted, information about // the calendar's eras, a standard set of the date formats, // translations for day and month names, and if the calendar is not based on the Gregorian // calendar, conversion functions to and from the Gregorian calendar. calendars: { standard: { // name that identifies the type of calendar this is name: "Gregorian_USEnglish", // separator of parts of a date (e.g. '/' in 11/05/1955) '/': "/", // separator of parts of a time (e.g. ':' in 05:44 PM) ':': ":", // the first day of the week (0 = Sunday, 1 = Monday, etc) firstDay: 0, days: { // full day names names: ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"], // abbreviated day names namesAbbr: ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"], // shortest day names namesShort: ["Su","Mo","Tu","We","Th","Fr","Sa"] }, months: { // full month names (13 months for lunar calendards -- 13th month should be "" if not lunar) names: ["January","February","March","April","May","June","July","August","September","October","November","December",""], // abbreviated month names namesAbbr: ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""] }, // AM and PM designators in one of these forms: // The usual view, and the upper and lower case versions // [standard,lowercase,uppercase] // The culture does not use AM or PM (likely all standard date formats use 24 hour time) // null AM: ["AM", "am", "AM"], PM: ["PM", "pm", "PM"], eras: [ // eras in reverse chronological order. // name: the name of the era in this culture (e.g. A.D., C.E.) // start: when the era starts in ticks (gregorian, gmt), null if it is the earliest supported era. // offset: offset in years from gregorian calendar { "name": "A.D.", "start": null, "offset": 0 } ], // when a two digit year is given, it will never be parsed as a four digit // year greater than this year (in the appropriate era for the culture) // Set it as a full year (e.g. 2029) or use an offset format starting from // the current year: "+19" would correspond to 2029 if the current year 2010. twoDigitYearMax: 2029, // set of predefined date and time patterns used by the culture // these represent the format someone in this culture would expect // to see given the portions of the date that are shown. patterns: { // short date pattern d: "M/d/yyyy", // long date pattern D: "dddd, MMMM dd, yyyy", // short time pattern t: "h:mm tt", // long time pattern T: "h:mm:ss tt", // long date, short time pattern f: "dddd, MMMM dd, yyyy h:mm tt", // long date, long time pattern F: "dddd, MMMM dd, yyyy h:mm:ss tt", // month/day pattern M: "MMMM dd", // month/year pattern Y: "yyyy MMMM", // S is a sortable format that does not vary by culture S: "yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss" } // optional fields for each calendar: /* monthsGenitive: Same as months but used when the day preceeds the month. Omit if the culture has no genitive distinction in month names. For an explaination of genitive months, see http://blogs.msdn.com/michkap/archive/2004/12/25/332259.aspx convert: Allows for the support of non-gregorian based calendars. This convert object is used to to convert a date to and from a gregorian calendar date to handle parsing and formatting. The two functions: fromGregorian(date) Given the date as a parameter, return an array with parts [year, month, day] corresponding to the non-gregorian based year, month, and day for the calendar. toGregorian(year, month, day) Given the non-gregorian year, month, and day, return a new Date() object set to the corresponding date in the gregorian calendar. */ } } }, cultures.en); en.calendar = en.calendar || en.calendars.standard; var regexTrim = /^\s+|\s+$/g, regexInfinity = /^[+-]?infinity$/i, regexHex = /^0x[a-f0-9]+$/i, regexParseFloat = /^[+-]?\d*\.?\d*(e[+-]?\d+)?$/, toString = Object.prototype.toString; function startsWith(value, pattern) { return value.indexOf( pattern ) === 0; } function endsWith(value, pattern) { return value.substr( value.length - pattern.length ) === pattern; } function trim(value) { return (value+"").replace( regexTrim, "" ); } function zeroPad(str, count, left) { for (var l=str.length; l < count; l++) { str = (left ? ('0' + str) : (str + '0')); } return str; } function isArray(obj) { return toString.call(obj) === "[object Array]"; } function isString(obj) { return toString.call(obj) === "[object String]"; } function isObject(obj) { return toString.call(obj) === "[object Object]"; } function arrayIndexOf( array, item ) { if ( array.indexOf ) { return array.indexOf( item ); } for ( var i = 0, length = array.length; i < length; i++ ) { if ( array[ i ] === item ) { return i; } } return -1; } // *************************************** Numbers *************************************** function expandNumber(number, precision, formatInfo) { var groupSizes = formatInfo.groupSizes, curSize = groupSizes[ 0 ], curGroupIndex = 1, factor = Math.pow( 10, precision ), rounded = Math.round( number * factor ) / factor; if ( !isFinite(rounded) ) { rounded = number; } number = rounded; var numberString = number+"", right = "", split = numberString.split(/e/i), exponent = split.length > 1 ? parseInt( split[ 1 ], 10 ) : 0; numberString = split[ 0 ]; split = numberString.split( "." ); numberString = split[ 0 ]; right = split.length > 1 ? split[ 1 ] : ""; var l; if ( exponent > 0 ) { right = zeroPad( right, exponent, false ); numberString += right.slice( 0, exponent ); right = right.substr( exponent ); } else if ( exponent < 0 ) { exponent = -exponent; numberString = zeroPad( numberString, exponent + 1 ); right = numberString.slice( -exponent, numberString.length ) + right; numberString = numberString.slice( 0, -exponent ); } if ( precision > 0 ) { right = formatInfo['.'] + ((right.length > precision) ? right.slice( 0, precision ) : zeroPad( right, precision )); } else { right = ""; } var stringIndex = numberString.length - 1, sep = formatInfo[","], ret = ""; while ( stringIndex >= 0 ) { if ( curSize === 0 || curSize > stringIndex ) { return numberString.slice( 0, stringIndex + 1 ) + ( ret.length ? ( sep + ret + right ) : right ); } ret = numberString.slice( stringIndex - curSize + 1, stringIndex + 1 ) + ( ret.length ? ( sep + ret ) : "" ); stringIndex -= curSize; if ( curGroupIndex < groupSizes.length ) { curSize = groupSizes[ curGroupIndex ]; curGroupIndex++; } } return numberString.slice( 0, stringIndex + 1 ) + sep + ret + right; } function parseNegativePattern(value, nf, negativePattern) { var neg = nf["-"], pos = nf["+"], ret; switch (negativePattern) { case "n -": neg = ' ' + neg; pos = ' ' + pos; // fall through case "n-": if ( endsWith( value, neg ) ) { ret = [ '-', value.substr( 0, value.length - neg.length ) ]; } else if ( endsWith( value, pos ) ) { ret = [ '+', value.substr( 0, value.length - pos.length ) ]; } break; case "- n": neg += ' '; pos += ' '; // fall through case "-n": if ( startsWith( value, neg ) ) { ret = [ '-', value.substr( neg.length ) ]; } else if ( startsWith(value, pos) ) { ret = [ '+', value.substr( pos.length ) ]; } break; case "(n)": if ( startsWith( value, '(' ) && endsWith( value, ')' ) ) { ret = [ '-', value.substr( 1, value.length - 2 ) ]; } break; } return ret || [ '', value ]; } function formatNumber(value, format, culture) { if ( !format || format === 'i' ) { return culture.name.length ? value.toLocaleString() : value.toString(); } format = format || "D"; var nf = culture.numberFormat, number = Math.abs(value), precision = -1, pattern; if (format.length > 1) precision = parseInt( format.slice( 1 ), 10 ); var current = format.charAt( 0 ).toUpperCase(), formatInfo; switch (current) { case "D": pattern = 'n'; if (precision !== -1) { number = zeroPad( ""+number, precision, true ); } if (value < 0) number = -number; break; case "N": formatInfo = nf; // fall through case "C": formatInfo = formatInfo || nf.currency; // fall through case "P": formatInfo = formatInfo || nf.percent; pattern = value < 0 ? formatInfo.pattern[0] : (formatInfo.pattern[1] || "n"); if (precision === -1) precision = formatInfo.decimals; number = expandNumber( number * (current === "P" ? 100 : 1), precision, formatInfo ); break; default: throw "Bad number format specifier: " + current; } var patternParts = /n|\$|-|%/g, ret = ""; for (;;) { var index = patternParts.lastIndex, ar = patternParts.exec(pattern); ret += pattern.slice( index, ar ? ar.index : pattern.length ); if (!ar) { break; } switch (ar[0]) { case "n": ret += number; break; case "$": ret += nf.currency.symbol; break; case "-": // don't make 0 negative if ( /[1-9]/.test( number ) ) { ret += nf["-"]; } break; case "%": ret += nf.percent.symbol; break; } } return ret; } // *************************************** Dates *************************************** function outOfRange(value, low, high) { return value < low || value > high; } function expandYear(cal, year) { // expands 2-digit year into 4 digits. var now = new Date(), era = getEra(now); if ( year < 100 ) { var twoDigitYearMax = cal.twoDigitYearMax; twoDigitYearMax = typeof twoDigitYearMax === 'string' ? new Date().getFullYear() % 100 + parseInt( twoDigitYearMax, 10 ) : twoDigitYearMax; var curr = getEraYear( now, cal, era ); year += curr - ( curr % 100 ); if ( year > twoDigitYearMax ) { year -= 100; } } return year; } function getEra(date, eras) { if ( !eras ) return 0; var start, ticks = date.getTime(); for ( var i = 0, l = eras.length; i < l; i++ ) { start = eras[ i ].start; if ( start === null || ticks >= start ) { return i; } } return 0; } function toUpper(value) { // 'he-IL' has non-breaking space in weekday names. return value.split( "\u00A0" ).join(' ').toUpperCase(); } function toUpperArray(arr) { var results = []; for ( var i = 0, l = arr.length; i < l; i++ ) { results[i] = toUpper(arr[i]); } return results; } function getEraYear(date, cal, era, sortable) { var year = date.getFullYear(); if ( !sortable && cal.eras ) { // convert normal gregorian year to era-shifted gregorian // year by subtracting the era offset year -= cal.eras[ era ].offset; } return year; } function getDayIndex(cal, value, abbr) { var ret, days = cal.days, upperDays = cal._upperDays; if ( !upperDays ) { cal._upperDays = upperDays = [ toUpperArray( days.names ), toUpperArray( days.namesAbbr ), toUpperArray( days.namesShort ) ]; } value = toUpper( value ); if ( abbr ) { ret = arrayIndexOf( upperDays[ 1 ], value ); if ( ret === -1 ) { ret = arrayIndexOf( upperDays[ 2 ], value ); } } else { ret = arrayIndexOf( upperDays[ 0 ], value ); } return ret; } function getMonthIndex(cal, value, abbr) { var months = cal.months, monthsGen = cal.monthsGenitive || cal.months, upperMonths = cal._upperMonths, upperMonthsGen = cal._upperMonthsGen; if ( !upperMonths ) { cal._upperMonths = upperMonths = [ toUpperArray( months.names ), toUpperArray( months.namesAbbr ) ]; cal._upperMonthsGen = upperMonthsGen = [ toUpperArray( monthsGen.names ), toUpperArray( monthsGen.namesAbbr ) ]; } value = toUpper( value ); var i = arrayIndexOf( abbr ? upperMonths[ 1 ] : upperMonths[ 0 ], value ); if ( i < 0 ) { i = arrayIndexOf( abbr ? upperMonthsGen[ 1 ] : upperMonthsGen[ 0 ], value ); } return i; } function appendPreOrPostMatch(preMatch, strings) { // appends pre- and post- token match strings while removing escaped characters. // Returns a single quote count which is used to determine if the token occurs // in a string literal. var quoteCount = 0, escaped = false; for ( var i = 0, il = preMatch.length; i < il; i++ ) { var c = preMatch.charAt( i ); switch ( c ) { case '\'': if ( escaped ) { strings.push( "'" ); } else { quoteCount++; } escaped = false; break; case '\\': if ( escaped ) { strings.push( "\\" ); } escaped = !escaped; break; default: strings.push( c ); escaped = false; break; } } return quoteCount; } function expandFormat(cal, format) { // expands unspecified or single character date formats into the full pattern. format = format || "F"; var pattern, patterns = cal.patterns, len = format.length; if ( len === 1 ) { pattern = patterns[ format ]; if ( !pattern ) { throw "Invalid date format string '" + format + "'."; } format = pattern; } else if ( len === 2 && format.charAt(0) === "%" ) { // %X escape format -- intended as a custom format string that is only one character, not a built-in format. format = format.charAt( 1 ); } return format; } function getParseRegExp(cal, format) { // converts a format string into a regular expression with groups that // can be used to extract date fields from a date string. // check for a cached parse regex. var re = cal._parseRegExp; if ( !re ) { cal._parseRegExp = re = {}; } else { var reFormat = re[ format ]; if ( reFormat ) { return reFormat; } } // expand single digit formats, then escape regular expression characters. var expFormat = expandFormat( cal, format ).replace( /([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g, "\\\\$1" ), regexp = ["^"], groups = [], index = 0, quoteCount = 0, tokenRegExp = getTokenRegExp(), match; // iterate through each date token found. while ( (match = tokenRegExp.exec( expFormat )) !== null ) { var preMatch = expFormat.slice( index, match.index ); index = tokenRegExp.lastIndex; // don't replace any matches that occur inside a string literal. quoteCount += appendPreOrPostMatch( preMatch, regexp ); if ( quoteCount % 2 ) { regexp.push( match[ 0 ] ); continue; } // add a regex group for the token. var m = match[ 0 ], len = m.length, add; switch ( m ) { case 'dddd': case 'ddd': case 'MMMM': case 'MMM': case 'gg': case 'g': add = "(\\D+)"; break; case 'tt': case 't': add = "(\\D*)"; break; case 'yyyy': case 'fff': case 'ff': case 'f': add = "(\\d{" + len + "})"; break; case 'dd': case 'd': case 'MM': case 'M': case 'yy': case 'y': case 'HH': case 'H': case 'hh': case 'h': case 'mm': case 'm': case 'ss': case 's': add = "(\\d\\d?)"; break; case 'zzz': add = "([+-]?\\d\\d?:\\d{2})"; break; case 'zz': case 'z': add = "([+-]?\\d\\d?)"; break; case '/': add = "(\\" + cal["/"] + ")"; break; default: throw "Invalid date format pattern '" + m + "'."; break; } if ( add ) { regexp.push( add ); } groups.push( match[ 0 ] ); } appendPreOrPostMatch( expFormat.slice( index ), regexp ); regexp.push( "$" ); // allow whitespace to differ when matching formats. var regexpStr = regexp.join( '' ).replace( /\s+/g, "\\s+" ), parseRegExp = {'regExp': regexpStr, 'groups': groups}; // cache the regex for this format. return re[ format ] = parseRegExp; } function getTokenRegExp() { // regular expression for matching date and time tokens in format strings. return /\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g; } function parseExact(value, format, culture) { // try to parse the date string by matching against the format string // while using the specified culture for date field names. value = trim( value ); var cal = culture.calendar, // convert date formats into regular expressions with groupings. // use the regexp to determine the input format and extract the date fields. parseInfo = getParseRegExp(cal, format), match = new RegExp(parseInfo.regExp).exec(value); if (match === null) { return null; } // found a date format that matches the input. var groups = parseInfo.groups, era = null, year = null, month = null, date = null, weekDay = null, hour = 0, hourOffset, min = 0, sec = 0, msec = 0, tzMinOffset = null, pmHour = false; // iterate the format groups to extract and set the date fields. for ( var j = 0, jl = groups.length; j < jl; j++ ) { var matchGroup = match[ j + 1 ]; if ( matchGroup ) { var current = groups[ j ], clength = current.length, matchInt = parseInt( matchGroup, 10 ); switch ( current ) { case 'dd': case 'd': // Day of month. date = matchInt; // check that date is generally in valid range, also checking overflow below. if ( outOfRange( date, 1, 31 ) ) return null; break; case 'MMM': case 'MMMM': month = getMonthIndex( cal, matchGroup, clength === 3 ); if ( outOfRange( month, 0, 11 ) ) return null; break; case 'M': case 'MM': // Month. month = matchInt - 1; if ( outOfRange( month, 0, 11 ) ) return null; break; case 'y': case 'yy': case 'yyyy': year = clength < 4 ? expandYear( cal, matchInt ) : matchInt; if ( outOfRange( year, 0, 9999 ) ) return null; break; case 'h': case 'hh': // Hours (12-hour clock). hour = matchInt; if ( hour === 12 ) hour = 0; if ( outOfRange( hour, 0, 11 ) ) return null; break; case 'H': case 'HH': // Hours (24-hour clock). hour = matchInt; if ( outOfRange( hour, 0, 23 ) ) return null; break; case 'm': case 'mm': // Minutes. min = matchInt; if ( outOfRange( min, 0, 59 ) ) return null; break; case 's': case 'ss': // Seconds. sec = matchInt; if ( outOfRange( sec, 0, 59 ) ) return null; break; case 'tt': case 't': // AM/PM designator. // see if it is standard, upper, or lower case PM. If not, ensure it is at least one of // the AM tokens. If not, fail the parse for this format. pmHour = cal.PM && ( matchGroup === cal.PM[0] || matchGroup === cal.PM[1] || matchGroup === cal.PM[2] ); if ( !pmHour && ( !cal.AM || (matchGroup !== cal.AM[0] && matchGroup !== cal.AM[1] && matchGroup !== cal.AM[2]) ) ) return null; break; case 'f': // Deciseconds. case 'ff': // Centiseconds. case 'fff': // Milliseconds. msec = matchInt * Math.pow( 10, 3-clength ); if ( outOfRange( msec, 0, 999 ) ) return null; break; case 'ddd': // Day of week. case 'dddd': // Day of week. weekDay = getDayIndex( cal, matchGroup, clength === 3 ); if ( outOfRange( weekDay, 0, 6 ) ) return null; break; case 'zzz': // Time zone offset in +/- hours:min. var offsets = matchGroup.split( /:/ ); if ( offsets.length !== 2 ) return null; hourOffset = parseInt( offsets[ 0 ], 10 ); if ( outOfRange( hourOffset, -12, 13 ) ) return null; var minOffset = parseInt( offsets[ 1 ], 10 ); if ( outOfRange( minOffset, 0, 59 ) ) return null; tzMinOffset = (hourOffset * 60) + (startsWith( matchGroup, '-' ) ? -minOffset : minOffset); break; case 'z': case 'zz': // Time zone offset in +/- hours. hourOffset = matchInt; if ( outOfRange( hourOffset, -12, 13 ) ) return null; tzMinOffset = hourOffset * 60; break; case 'g': case 'gg': var eraName = matchGroup; if ( !eraName || !cal.eras ) return null; eraName = trim( eraName.toLowerCase() ); for ( var i = 0, l = cal.eras.length; i < l; i++ ) { if ( eraName === cal.eras[ i ].name.toLowerCase() ) { era = i; break; } } // could not find an era with that name if ( era === null ) return null; break; } } } var result = new Date(), defaultYear, convert = cal.convert; defaultYear = convert ? convert.fromGregorian( result )[ 0 ] : result.getFullYear(); if ( year === null ) { year = defaultYear; } else if ( cal.eras ) { // year must be shifted to normal gregorian year // but not if year was not specified, its already normal gregorian // per the main if clause above. year += cal.eras[ (era || 0) ].offset; } // set default day and month to 1 and January, so if unspecified, these are the defaults // instead of the current day/month. if ( month === null ) { month = 0; } if ( date === null ) { date = 1; } // now have year, month, and date, but in the culture's calendar. // convert to gregorian if necessary if ( convert ) { result = convert.toGregorian( year, month, date ); // conversion failed, must be an invalid match if ( result === null ) return null; } else { // have to set year, month and date together to avoid overflow based on current date. result.setFullYear( year, month, date ); // check to see if date overflowed for specified month (only checked 1-31 above). if ( result.getDate() !== date ) return null; // invalid day of week. if ( weekDay !== null && result.getDay() !== weekDay ) { return null; } } // if pm designator token was found make sure the hours fit the 24-hour clock. if ( pmHour && hour < 12 ) { hour += 12; } result.setHours( hour, min, sec, msec ); if ( tzMinOffset !== null ) { // adjust timezone to utc before applying local offset. var adjustedMin = result.getMinutes() - ( tzMinOffset + result.getTimezoneOffset() ); // Safari limits hours and minutes to the range of -127 to 127. We need to use setHours // to ensure both these fields will not exceed this range. adjustedMin will range // somewhere between -1440 and 1500, so we only need to split this into hours. result.setHours( result.getHours() + parseInt( adjustedMin / 60, 10 ), adjustedMin % 60 ); } return result; } function formatDate(value, format, culture) { var cal = culture.calendar, convert = cal.convert; if ( !format || !format.length || format === 'i' ) { var ret; if ( culture && culture.name.length ) { if ( convert ) { // non-gregorian calendar, so we cannot use built-in toLocaleString() ret = formatDate( value, cal.patterns.F, culture ); } else { var eraDate = new Date( value.getTime() ), era = getEra( value, cal.eras ); eraDate.setFullYear( getEraYear( value, cal, era ) ); ret = eraDate.toLocaleString(); } } else { ret = value.toString(); } return ret; } var eras = cal.eras, sortable = format === "s"; format = expandFormat( cal, format ); // Start with an empty string ret = []; var hour, zeros = ['0','00','000'], foundDay, checkedDay, dayPartRegExp = /([^d]|^)(d|dd)([^d]|$)/g, quoteCount = 0, tokenRegExp = getTokenRegExp(), converted; function padZeros(num, c) { var r, s = num+''; if ( c > 1 && s.length < c ) { r = ( zeros[ c - 2 ] + s); return r.substr( r.length - c, c ); } else { r = s; } return r; } function hasDay() { if ( foundDay || checkedDay ) { return foundDay; } foundDay = dayPartRegExp.test( format ); checkedDay = true; return foundDay; } function getPart( date, part ) { if ( converted ) { return converted[ part ]; } switch ( part ) { case 0: return date.getFullYear(); case 1: return date.getMonth(); case 2: return date.getDate(); } } if ( !sortable && convert ) { converted = convert.fromGregorian( value ); } for (;;) { // Save the current index var index = tokenRegExp.lastIndex, // Look for the next pattern ar = tokenRegExp.exec( format ); // Append the text before the pattern (or the end of the string if not found) var preMatch = format.slice( index, ar ? ar.index : format.length ); quoteCount += appendPreOrPostMatch( preMatch, ret ); if ( !ar ) { break; } // do not replace any matches that occur inside a string literal. if ( quoteCount % 2 ) { ret.push( ar[ 0 ] ); continue; } var current = ar[ 0 ], clength = current.length; switch ( current ) { case "ddd": //Day of the week, as a three-letter abbreviation case "dddd": // Day of the week, using the full name var names = (clength === 3) ? cal.days.namesAbbr : cal.days.names; ret.push( names[ value.getDay() ] ); break; case "d": // Day of month, without leading zero for single-digit days case "dd": // Day of month, with leading zero for single-digit days foundDay = true; ret.push( padZeros( getPart( value, 2 ), clength ) ); break; case "MMM": // Month, as a three-letter abbreviation case "MMMM": // Month, using the full name var part = getPart( value, 1 ); ret.push( (cal.monthsGenitive && hasDay()) ? cal.monthsGenitive[ clength === 3 ? "namesAbbr" : "names" ][ part ] : cal.months[ clength === 3 ? "namesAbbr" : "names" ][ part ] ); break; case "M": // Month, as digits, with no leading zero for single-digit months case "MM": // Month, as digits, with leading zero for single-digit months ret.push( padZeros( getPart( value, 1 ) + 1, clength ) ); break; case "y": // Year, as two digits, but with no leading zero for years less than 10 case "yy": // Year, as two digits, with leading zero for years less than 10 case "yyyy": // Year represented by four full digits part = converted ? converted[ 0 ] : getEraYear( value, cal, getEra( value, eras ), sortable ); if ( clength < 4 ) { part = part % 100; } ret.push( padZeros( part, clength ) ); break; case "h": // Hours with no leading zero for single-digit hours, using 12-hour clock case "hh": // Hours with leading zero for single-digit hours, using 12-hour clock hour = value.getHours() % 12; if ( hour === 0 ) hour = 12; ret.push( padZeros( hour, clength ) ); break; case "H": // Hours with no leading zero for single-digit hours, using 24-hour clock case "HH": // Hours with leading zero for single-digit hours, using 24-hour clock ret.push( padZeros( value.getHours(), clength ) ); break; case "m": // Minutes with no leading zero for single-digit minutes case "mm": // Minutes with leading zero for single-digit minutes ret.push( padZeros( value.getMinutes(), clength ) ); break; case "s": // Seconds with no leading zero for single-digit seconds case "ss": // Seconds with leading zero for single-digit seconds ret.push( padZeros(value .getSeconds(), clength ) ); break; case "t": // One character am/pm indicator ("a" or "p") case "tt": // Multicharacter am/pm indicator part = value.getHours() < 12 ? (cal.AM ? cal.AM[0] : " ") : (cal.PM ? cal.PM[0] : " "); ret.push( clength === 1 ? part.charAt( 0 ) : part ); break; case "f": // Deciseconds case "ff": // Centiseconds case "fff": // Milliseconds ret.push( padZeros( value.getMilliseconds(), 3 ).substr( 0, clength ) ); break; case "z": // Time zone offset, no leading zero case "zz": // Time zone offset with leading zero hour = value.getTimezoneOffset() / 60; ret.push( (hour <= 0 ? '+' : '-') + padZeros( Math.floor( Math.abs( hour ) ), clength ) ); break; case "zzz": // Time zone offset with leading zero hour = value.getTimezoneOffset() / 60; ret.push( (hour <= 0 ? '+' : '-') + padZeros( Math.floor( Math.abs( hour ) ), 2 ) + // Hard coded ":" separator, rather than using cal.TimeSeparator // Repeated here for consistency, plus ":" was already assumed in date parsing. ":" + padZeros( Math.abs( value.getTimezoneOffset() % 60 ), 2 ) ); break; case "g": case "gg": if ( cal.eras ) { ret.push( cal.eras[ getEra(value, eras) ].name ); } break; case "/": ret.push( cal["/"] ); break; default: throw "Invalid date format pattern '" + current + "'."; break; } } return ret.join( '' ); } // EXPORTS jQuery.global = globalization; })();
0x6a
trunk/libraries/jqwidgets/globalization/jquery.global.js
JavaScript
asf20
51,660
(function($) { var cultures = $.global.cultures, en = cultures.en, standard = en.calendars.standard, culture = cultures["it-IT"] = $.extend(true, {}, en, { name: "it-IT", englishName: "Italian (Italy)", nativeName: "italiano (Italia)", language: "it", numberFormat: { ',': ".", '.': ",", percent: { pattern: ["-n%","n%"], ',': ".", '.': "," }, currency: { pattern: ["-$ n","$ n"], ',': ".", '.': ",", symbol: "€" } }, calendars: { standard: $.extend(true, {}, standard, { firstDay: 1, days: { names: ["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"], namesAbbr: ["dom","lun","mar","mer","gio","ven","sab"], namesShort: ["do","lu","ma","me","gi","ve","sa"] }, months: { names: ["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""], namesAbbr: ["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""] }, AM: null, PM: null, eras: [{"name":"d.C.","start":null,"offset":0}], patterns: { d: "dd/MM/yyyy", D: "dddd d MMMM yyyy", t: "HH:mm", T: "HH:mm:ss", f: "dddd d MMMM yyyy HH:mm", F: "dddd d MMMM yyyy HH:mm:ss", M: "dd MMMM", Y: "MMMM yyyy" } }) } }, cultures["it-IT"]); culture.calendar = culture.calendars.standard; })(jQuery);
0x6a
trunk/libraries/jqwidgets/globalization/jquery.glob.it-IT.js
JavaScript
asf20
1,977
(function($) { var cultures = $.global.cultures, en = cultures.en, standard = en.calendars.standard, culture = cultures["he-IL"] = $.extend(true, {}, en, { name: "he-IL", englishName: "Hebrew (Israel)", nativeName: "עברית (ישראל)", language: "he", isRTL: true, numberFormat: { percent: { pattern: ["-n%","n%"] }, currency: { pattern: ["$-n","$ n"], symbol: "₪" } }, calendars: { standard: $.extend(true, {}, standard, { days: { names: ["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"], namesAbbr: ["יום א","יום ב","יום ג","יום ד","יום ה","יום ו","שבת"], namesShort: ["א","ב","ג","ד","ה","ו","ש"] }, months: { names: ["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר",""], namesAbbr: ["ינו","פבר","מרץ","אפר","מאי","יונ","יול","אוג","ספט","אוק","נוב","דצמ",""] }, eras: [{"name":"לספירה","start":null,"offset":0}], patterns: { d: "dd/MM/yyyy", D: "dddd dd MMMM yyyy", t: "HH:mm", T: "HH:mm:ss", f: "dddd dd MMMM yyyy HH:mm", F: "dddd dd MMMM yyyy HH:mm:ss", M: "dd MMMM", Y: "MMMM yyyy" } }), Hebrew: $.extend(true, {}, standard, { name: "Hebrew", '/': " ", days: { names: ["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"], namesAbbr: ["א","ב","ג","ד","ה","ו","ש"], namesShort: ["א","ב","ג","ד","ה","ו","ש"] }, months: { names: ["תשרי","חשון","כסלו","טבת","שבט","אדר","אדר ב","ניסן","אייר","סיון","תמוז","אב","אלול"], namesAbbr: ["תשרי","חשון","כסלו","טבת","שבט","אדר","אדר ב","ניסן","אייר","סיון","תמוז","אב","אלול"] }, eras: [{"name":"C.E.","start":null,"offset":0}], twoDigitYearMax: 5790, patterns: { d: "dd MMMM yyyy", D: "dddd dd MMMM yyyy", t: "HH:mm", T: "HH:mm:ss", f: "dddd dd MMMM yyyy HH:mm", F: "dddd dd MMMM yyyy HH:mm:ss", M: "dd MMMM", Y: "MMMM yyyy" } }) } }, cultures["he-IL"]); culture.calendar = culture.calendars.standard; })(jQuery);
0x6a
trunk/libraries/jqwidgets/globalization/jquery.glob.he-IL.js
JavaScript
asf20
3,270
(function($) { var cultures = $.global.cultures, en = cultures.en, standard = en.calendars.standard, culture = cultures["sa-IN"] = $.extend(true, {}, en, { name: "sa-IN", englishName: "Sanskrit (India)", nativeName: "संस्कृत (भारतम्)", language: "sa", numberFormat: { groupSizes: [3,2], percent: { groupSizes: [3,2] }, currency: { pattern: ["$ -n","$ n"], groupSizes: [3,2], symbol: "रु" } }, calendars: { standard: $.extend(true, {}, standard, { '/': "-", days: { names: ["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"], namesAbbr: ["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"], namesShort: ["र","स","म","ब","ग","श","श"] }, months: { names: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""], namesAbbr: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""] }, AM: ["पूर्वाह्न","पूर्वाह्न","पूर्वाह्न"], PM: ["अपराह्न","अपराह्न","अपराह्न"], patterns: { d: "dd-MM-yyyy", D: "dd MMMM yyyy dddd", t: "HH:mm", T: "HH:mm:ss", f: "dd MMMM yyyy dddd HH:mm", F: "dd MMMM yyyy dddd HH:mm:ss", M: "dd MMMM" } }) } }, cultures["sa-IN"]); culture.calendar = culture.calendars.standard; })(jQuery);
0x6a
trunk/libraries/jqwidgets/globalization/jquery.glob.sa-IN.js
JavaScript
asf20
2,532
(function($) { var cultures = $.global.cultures, en = cultures.en, standard = en.calendars.standard, culture = cultures["hr"] = $.extend(true, {}, en, { name: "hr", englishName: "Croatian", nativeName: "hrvatski", language: "hr", numberFormat: { pattern: ["- n"], ',': ".", '.': ",", percent: { pattern: ["-n%","n%"], ',': ".", '.': "," }, currency: { pattern: ["-n $","n $"], ',': ".", '.': ",", symbol: "kn" } }, calendars: { standard: $.extend(true, {}, standard, { '/': ".", firstDay: 1, days: { names: ["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"], namesAbbr: ["ned","pon","uto","sri","čet","pet","sub"], namesShort: ["ne","po","ut","sr","če","pe","su"] }, months: { names: ["siječanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac",""], namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] }, monthsGenitive: { names: ["siječnja","veljače","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca",""], namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] }, AM: null, PM: null, patterns: { d: "d.M.yyyy.", D: "d. MMMM yyyy.", t: "H:mm", T: "H:mm:ss", f: "d. MMMM yyyy. H:mm", F: "d. MMMM yyyy. H:mm:ss", M: "d. MMMM" } }) } }, cultures["hr"]); culture.calendar = culture.calendars.standard; })(jQuery);
0x6a
trunk/libraries/jqwidgets/globalization/jquery.glob.hr.js
JavaScript
asf20
2,214
.jqx-rc-tl-black { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; } /*top-right rounded Corners*/ .jqx-rc-tr-black { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; } /*bottom-left rounded Corners*/ .jqx-rc-bl-black { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; } /*bottom-right rounded Corners*/ .jqx-rc-br-black { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; } /*top rounded Corners*/ .jqx-rc-t-black { -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; } /*bottom rounded Corners*/ .jqx-rc-b-black { -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; } /*right rounded Corners*/ .jqx-rc-r-black { -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; } /*left rounded Corners*/ .jqx-rc-l-black { -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; } /*all rounded Corners*/ .jqx-rc-all-black { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; } .jqx-grid-selectionarea-black{background-color:#262626; border:1px solid #262626; opacity:0.5} .jqx-grid-group-cell-black{border-color:#262626; background-color:#fff} .jqx-grid-cell-sort-black, .jqx-grid-cell-filter-black, .jqx-grid-cell-pinned-black{ background-color:#eaf8ff} .jqx-grid-cell-alt-black, .jqx-grid-cell-sort-alt-black, .jqx-grid-cell-filter-alt-black{ background-color:#deedf5} .jqx-widget-black .jqx-grid-cell-black{background: #000; border-color:#555} .jqx-widget-black .jqx-grid-group-cell-black{background-color: #000; border-color: #555;} .jqx-widget-black .jqx-grid-cell-selected-black{color:#fff} .jqx-widget-black .jqx-grid-cell-hover-black{color:#fff} .jqx-widget-black{font-family:Tahoma,"Lucida Sans",Verdana,Helvetica,Arial,sans-serif; border-color:#222;} .jqx-widget-content-black{font-family:Tahoma,"Lucida Sans",Verdana,Helvetica,Arial,sans-serif; color:#fff; border-color:#262626; background: #111;} .jqx-fill-state-normal-black, .jqx-widget-header-black, .jqx-input-button-content-black{font-family:Tahoma,"Lucida Sans",Verdana,Helvetica,Arial,sans-serif; color:#fff; border-color:#000; background: #a4a4a4; background: -moz-linear-gradient(top, #a4a4a4 0%, #757575 4%, #4f4f4f 37%, #464646 48%, #000000 52%, #000000 56%, #0c0c0c 67%, #1e1e1e 78%, #414141 96%, #666666 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a4a4a4), color-stop(4%,#757575), color-stop(37%,#4f4f4f), color-stop(48%,#464646), color-stop(52%,#000000), color-stop(56%,#000000), color-stop(67%,#0c0c0c), color-stop(78%,#1e1e1e), color-stop(96%,#414141), color-stop(100%,#666666)); background: -webkit-linear-gradient(top, #a4a4a4 0%,#757575 4%,#4f4f4f 37%,#464646 48%,#000000 52%,#000000 56%,#0c0c0c 67%,#1e1e1e 78%,#414141 96%,#666666 100%); background: -o-linear-gradient(top, #a4a4a4 0%,#757575 4%,#4f4f4f 37%,#464646 48%,#000000 52%,#000000 56%,#0c0c0c 67%,#1e1e1e 78%,#414141 96%,#666666 100%); background: -ms-linear-gradient(top, #a4a4a4 0%,#757575 4%,#4f4f4f 37%,#464646 48%,#000000 52%,#000000 56%,#0c0c0c 67%,#1e1e1e 78%,#414141 96%,#666666 100%); background: linear-gradient(top, #a4a4a4 0%,#757575 4%,#4f4f4f 37%,#464646 48%,#000000 52%,#000000 56%,#0c0c0c 67%,#1e1e1e 78%,#414141 96%,#666666 100%);} .jqx-fill-state-hover-black, .jqx-input-button-header-black, .jqx-widget-black .jqx-grid-cell-hover-black{background: #f87948; background: -moz-linear-gradient(top, #f87948 0%, #fb4e0b 4%, #f44501 11%, #e24000 19%, #983600 44%, #983600 48%, #5c2900 52%, #692b00 67%, #c23700 96%, #bd3800 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f87948), color-stop(4%,#fb4e0b), color-stop(11%,#f44501), color-stop(19%,#e24000), color-stop(44%,#983600), color-stop(48%,#983600), color-stop(52%,#5c2900), color-stop(67%,#692b00), color-stop(96%,#c23700), color-stop(100%,#bd3800)); background: -webkit-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); background: -o-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); background: -ms-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); background: linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); border-color:#262626; color:#fff} .jqx-fill-state-pressed-black, .jqx-menu-item-top-hover-black, .jqx-widget-black .jqx-grid-cell-selected-black{background: #db4200; background: -moz-linear-gradient(top, #db4200 0%, #902e00 4%, #7d2a01 19%, #531c03 44%, #531c03 48%, #0f0906 52%, #221105 63%, #2b1705 67%, #592903 89%, #642e02 96%, #902e00 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#db4200), color-stop(4%,#902e00), color-stop(19%,#7d2a01), color-stop(44%,#531c03), color-stop(48%,#531c03), color-stop(52%,#0f0906), color-stop(63%,#221105), color-stop(67%,#2b1705), color-stop(89%,#592903), color-stop(96%,#642e02), color-stop(100%,#902e00)); background: -webkit-linear-gradient(top, #db4200 0%,#902e00 4%,#7d2a01 19%,#531c03 44%,#531c03 48%,#0f0906 52%,#221105 63%,#2b1705 67%,#592903 89%,#642e02 96%,#902e00 100%); background: -o-linear-gradient(top, #db4200 0%,#902e00 4%,#7d2a01 19%,#531c03 44%,#531c03 48%,#0f0906 52%,#221105 63%,#2b1705 67%,#592903 89%,#642e02 96%,#902e00 100%); background: -ms-linear-gradient(top, #db4200 0%,#902e00 4%,#7d2a01 19%,#531c03 44%,#531c03 48%,#0f0906 52%,#221105 63%,#2b1705 67%,#592903 89%,#642e02 96%,#902e00 100%); background: linear-gradient(top, #db4200 0%,#902e00 4%,#7d2a01 19%,#531c03 44%,#531c03 48%,#0f0906 52%,#221105 63%,#2b1705 67%,#592903 89%,#642e02 96%,#902e00 100%); border-color:#262626; color:#fff} .jqx-fill-state-disabled-black {cursor: default; color: #fff; opacity: .55; filter:Alpha(Opacity=45);} .jqx-checkbox-check-checked-black{background:transparent url(images/check_white.png) left top no-repeat} .jqx-checkbox-check-indeterminate-black{background:transparent url(images/check_indeterminate_white.png) left top no-repeat} .jqx-grid-black, .jqx-grid-header-black, .jqx-grid-cell-black{border-color:#262626} .jqx-widget-black .jqx-grid-column-menubutton-black, .jqx-widget-black .jqx-grid-column-sortascbutton-black, .jqx-widget-black .jqx-grid-column-sortdescbutton-black, .jqx-widget-black .jqx-grid-column-filterbutton-black{border-color:#262626} .jqx-widget-black .jqx-grid-column-header-black{border-color:#262626} .jqx-grid-bottomright-black, .jqx-panel-bottomright-black, .jqx-listbox-bottomright-black{background-color:#262626} .jqx-widget-black .jqx-grid-column-menubutton-black, .jqx-menu-vertical-black{background-color:#262626; border-color:#262626} .jqx-menu-vertical-black{background: #222; color:#fff;} .jqx-scrollbar-state-normal-black{background:#111; border:1px solid #111} .jqx-scrollbar-button-state-normal-black{border:1px solid #111; background:#111} .jqx-scrollbar-button-state-hover-black{background: #f87948; background: -moz-linear-gradient(top, #f87948 0%, #fb4e0b 4%, #f44501 11%, #e24000 19%, #983600 44%, #983600 48%, #5c2900 52%, #692b00 67%, #c23700 96%, #bd3800 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f87948), color-stop(4%,#fb4e0b), color-stop(11%,#f44501), color-stop(19%,#e24000), color-stop(44%,#983600), color-stop(48%,#983600), color-stop(52%,#5c2900), color-stop(67%,#692b00), color-stop(96%,#c23700), color-stop(100%,#bd3800)); background: -webkit-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); background: -o-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); background: -ms-linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); background: linear-gradient(top, #f87948 0%,#fb4e0b 4%,#f44501 11%,#e24000 19%,#983600 44%,#983600 48%,#5c2900 52%,#692b00 67%,#c23700 96%,#bd3800 100%); border:1px solid #000} .jqx-scrollbar-button-state-pressed-black{background:#555 url(images/darkred_gradient.png) left top scroll repeat-x; border:1px solid #000} .jqx-scrollbar-thumb-state-normal-horizontal-black{ background:#555; background-image:-webkit-gradient(linear,0 0,0 100%,from(#717171),to(#494949)); background-image:-moz-linear-gradient(top,#717171,#494949); background-image:-o-linear-gradient(top,#717171,#494949); border:1px solid #000} .jqx-scrollbar-thumb-state-hover-horizontal-black{ background:#983600; background-image:-webkit-gradient(linear,0 0,0 100%,from(#fb4e0b),to(#983600)); background-image:-moz-linear-gradient(top,#fb4e0b,#983600); background-image:-o-linear-gradient(top,#fb4e0b,#983600); border:1px solid #000} .jqx-scrollbar-thumb-state-pressed-horizontal-black{ background:#902e00; background-image:-webkit-gradient(linear,0 0,0 100%,from(#902e00),to(#531c03)); background-image:-moz-linear-gradient(top,#902e00,#531c03); background-image:-o-linear-gradient(top,#902e00,#531c03); border:1px solid #000} .jqx-scrollbar-thumb-state-normal-black{ background:#555; background-image:-webkit-gradient(linear,left top,right top,from(#717171),to(#494949)); background-image:-moz-linear-gradient(left,#717171,#494949); background-image:-o-linear-gradient(left,#717171,#494949); border:1px solid #000;} .jqx-scrollbar-thumb-state-hover-black{ background:#983600; background-image:-webkit-gradient(linear,left top,right top,from(#fb4e0b),to(#983600)); background-image:-moz-linear-gradient(left,#fb4e0b,#983600); background-image:-o-linear-gradient(left,#fb4e0b,#983600); border:1px solid #000} .jqx-scrollbar-thumb-state-pressed-black{ background:#902e00; background-image:-webkit-gradient(linear,left top,right top,from(#902e00),to(#531c03)); background-image:-moz-linear-gradient(left,#902e00,#531c03); background-image:-o-linear-gradient(left,#902e00,#531c03); border:1px solid #000} .jqx-splitter-splitbar-horizontal-black, .jqx-splitter-splitbar-vertical-black, .jqx-splitter-splitbar-hover-black, .jqx-splitter-splitbar-hover-horizontal-black{background: #555;} .jqx-splitter-collapse-button-horizontal-black, .jqx-splitter-collapse-button-vertical-black{background: #7f7f7f;} .jqx-grid-column-sortascbutton-black, .jqx-expander-arrow-bottom-black, .jqx-window-collapse-button-black, .jqx-menu-item-arrow-up-black, .jqx-menu-item-arrow-up-selected-black, .jqx-menu-item-arrow-top-up-black, .jqx-icon-arrow-up-black, .jqx-icon-arrow-up-hover-black, .jqx-icon-arrow-up-selected-black{background-image:url('images/icon-up-white.png'); background-repeat:no-repeat; background-position:center} .jqx-widget-black .jqx-grid-group-expand-black, .jqx-grid-group-expand-black, .jqx-grid-column-menubutton-black, .jqx-grid-column-sortdescbutton-black, .jqx-expander-arrow-top-black, .jqx-window-collapse-button-collapsed-black, .jqx-menu-item-arrow-down-black, .jqx-menu-item-arrow-down-selected-black, .jqx-menu-item-arrow-down-black, .jqx-icon-arrow-down-black, .jqx-icon-arrow-down-hover-black, .jqx-icon-arrow-down-selected-black{background-image:url('images/icon-down-white.png'); background-repeat:no-repeat; background-position:center} .jqx-tabs-arrow-left-black, .jqx-menu-item-arrow-left-selected-black, .jqx-menu-item-arrow-top-left, .jqx-icon-arrow-left-black, .jqx-icon-arrow-down-left-black, .jqx-icon-arrow-left-selected-black{background-image:url('images/icon-left-white.png'); background-repeat:no-repeat; background-position:center} .jqx-widget-black .jqx-grid-group-collapse-black, .jqx-grid-group-collapse-black,.jqx-tabs-arrow-right-black, .jqx-menu-item-arrow-right-selected-black, .jqx-menu-item-arrow-top-right-black, .jqx-icon-arrow-right-black, .jqx-icon-arrow-right-hover-black, .jqx-icon-arrow-right-selected-black{background-image:url('images/icon-right-white.png'); background-repeat:no-repeat; background-position:center} .jqx-window-close-button-black, .icon-close-black, .jqx-tabs-close-button-black, .jqx-tabs-close-button-hover-black, .jqx-tabs-close-button-selected-black{background-image:url(images/close_white.png); background-repeat:no-repeat; background-position:center} .jqx-tree-item-arrow-collapse-rtl-black, .jqx-tree-item-arrow-collapse-hover-rtl-black{background-image: url(images/icon-left.png);} .jqx-listitem-state-group-black{background: #222;} .jqx-calendar-cell-specialDate-black{border: 1px solid black;} .jqx-tabs-selection-tracker-top-black, .jqx-tabs-selection-tracker-bottom-black{background-color: #000; border-color: #000;} .jqx-widget-black .jqx-grid-cell-sort-black, .jqx-widget-black .jqx-grid-cell-alt-black, .jqx-widget-black .jqx-grid-cell-filter-black, .jqx-widget-black .jqx-grid-cell-pinned-black{background-color:#333} .jqx-listbox-feedback-black{ border-top: 1px dashed #ccc;} .jqx-combobox-input-black, .jqx-combobox-content-black, .jqx-input-black, .jqx-input-content-black{background: #f7f7f7; color: #000;} .jqx-widget-black, .jqx-widget-header-black, .jqx-widget-content-black{-webkit-background-clip: padding-box; background-clip: padding-box;} .jqx-fill-state-focus-black .jqx-widget-content{background: #fff; border-color: #000;} .jqx-radiobutton-check-checked-black{background: #fff;}
0x6a
trunk/libraries/jqwidgets/styles/jqx.black.css
CSS
asf20
14,500
.jqx-rc-tl-ui-le-frog{border-top-left-radius:10px; moz-border-radius-topleft:10px; webkit-border-top-left-radius:10px} .jqx-rc-tr-ui-le-frog{border-top-right-radius:10px; moz-border-radius-topright:10px; webkit-border-top-right-radius:10px} .jqx-rc-bl-ui-le-frog{border-bottom-left-radius:10px; moz-border-radius-bottomleft:10px; webkit-border-bottom-left-radius:10px} .jqx-rc-br-ui-le-frog{border-bottom-right-radius:10px; moz-border-radius-bottomright:10px; webkit-border-bottom-right-radius:10px} .jqx-rc-t-ui-le-frog{border-top-left-radius:10px; border-top-right-radius:10px; moz-border-radius-topleft:10px; moz-border-radius-topright:10px; webkit-border-top-left-radius:10px; webkit-border-top-right-radius:10px} .jqx-rc-b-ui-le-frog{border-bottom-left-radius:10px; border-bottom-right-radius:10px; moz-border-radius-bottomleft:10px; moz-border-radius-bottomright:10px; webkit-border-bottom-left-radius:10px; webkit-border-bottom-right-radius:10px} .jqx-rc-r-ui-le-frog{border-bottom-right-radius:10px; border-top-right-radius:10px; moz-border-radius-bottomright:10px; moz-border-radius-topright:10px; webkit-border-bottom-right-radius:10px; webkit-border-top-right-radius:10px} .jqx-rc-l-ui-le-frog{border-bottom-left-radius:10px; border-top-left-radius:10px; moz-border-radius-bottomleft:10px; moz-border-radius-topleft:10px; webkit-border-bottom-left-radius:10px; webkit-border-top-left-radius:10px} .jqx-rc-all-ui-le-frog{border-radius:10px; moz-border-radius:10px; webkit-border-radius:10px} /*Grid*/ .jqx-grid-column-sortascbutton-ui-le-frog{background-position:-96px -192px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png); margin-top:5px} .jqx-grid-column-sortdescbutton-ui-le-frog{margin-top:5px; background-position:-64px -192px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-grid-column-menubutton-ui-le-frog{margin-top:5px; background-position:-64px -192px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png); border-width:0px} .jqx-grid-cell-ui-le-frog{background: #35650f; border-color: #72b42d; color: #fff;} /*Tree*/ .jqx-tree-item-arrow-expand-ui-le-frog, .jqx-tree-item-arrow-expand-hover-ui-le-frog{background-position:-65px -16px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-tree-item-arrow-collapse-ui-le-frog, .jqx-tree-item-arrow-collapse-hover-ui-le-frog{background-position:-32px -16px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-menu-item-arrow-right-ui-le-frog, .jqx-menu-item-arrow-right-selected-ui-le-frog{background-position:-32px -16px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-menu-item-arrow-left-ui-le-frog, .jqx-menu-item-arrow-left-selected-ui-le-frog{background-position:-96px -16px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} /*Tabs*/ .jqx-tabs-title-ui-le-frog{border:1px solid transparent;} .jqx-tabs-header-ui-le-frog{border-width: 1px; margin:2px; border-radius:10px; moz-border-radius:10px; webkit-border-radius:10px} .jqx-tabs-header-bottom-ui-le-frog{margin-top:-2px !important; padding-bottom: 3px; padding-top:1px} .jqx-tabs-selection-tracker-top-ui-le-frog{background: #2d6006;border-bottom: 0px solid transparent;} .jqx-tabs-selection-tracker-bottom-ui-le-frog{background: #2d6006; border-top: 0px solid transparent;} /*Radio Button*/ .jqx-radiobutton-ui-le-frog .jqx-fill-state-pressed-ui-le-frog{background:#fcfefc; border:1px solid #72b42d} /*Calendar*/ .jqx-calendar-cell-ui-le-frog{font-size: 11px; padding:.2em; text-align:right; text-decoration:none; moz-border-radius:0px !important; webkit-border-radius:0px !important; border-radius:0px !important} .jqx-calendar-cell-today-ui-le-frog{background:#ffe45c url(images/le-frog/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; border:1px solid #fed22f; color:#363636} .jqx-calendar-title-container-ui-le-frog{border: 1px solid #72b42d; border-bottom-width: 0px; border-radius:10px; moz-border-radius:10px; webkit-border-radius:10px; font-weight: bold;} .jqx-calendar-month-container-ui-le-frog{border:none !important} .jqx-calendar-ui-le-frog{padding:2px} .jqx-calendar-column-cell-ui-le-frog{font-size: 11px; font-weight: bold;} .jqx-calendar-ui-le-frog .jqx-icon-arrow-left-ui-le-frog{background-image:url(images/le-frog/ui-icons_ffffff_256x240.png); background-position: -80px -192px; width:16px; height:16px; left:5px; position:relative} .jqx-calendar-ui-le-frog .jqx-icon-arrow-right-ui-le-frog{background-image:url(images/le-frog/ui-icons_ffffff_256x240.png); background-position: -48px -192px; width:16px; height:16px; right:5px; position:relative} /*Window*/ .jqx-window-ui-le-frog{padding: 2px;} .jqx-window-header-ui-le-frog{border: 1px solid #72b42d; font-weight: bold; font-size: 11px; moz-border-radius:10px; border-radius:10px; webkit-border-radius:10px} .jqx-window-content-ui-le-frog{border-width:0px !important} .jqx-window-close-button-ui-le-frog{background-position:-96px -128px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png);moz-border-radius:10px; border-radius:10px; webkit-border-radius:10px} .jqx-window-collapse-button-ui-le-frog{background-position:0 -16px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-window-collapse-button-hover-ui-le-frog{background-image:url(images/le-frog/ui-icons_72b42d_256x240.png); border-radius:10px; moz-border-radius:10px; webkit-border-radius:10px} .jqx-window-collapse-button-collapsed-ui-le-frog, .jqx-window-collapse-button-collapsed-hover-ui-le-frog{background-position:-65px -16px} .jqx-window-modal-ui-le-frog{background-image:url(images/le-frog/ui-bg_diagonals-thick_20_666666_40x40.png)} .jqx-window-close-button-hover-ui-le-frog{background-color:#fff; background-position:-96px -128px; background-image:url(images/le-frog/ui-icons_72b42d_256x240.png); cursor:pointer; width:16px; height:16px} /*Splitter*/ .jqx-splitter-ui-le-frog .jqx-widget-content-ui-le-frog{border-width:0px; background: #35650f;} /*Icons*/ .jqx-icon-arrow-up-ui-le-frog{background-position:0 -16px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-icon-arrow-down-ui-le-frog{background-position:-65px -16px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-icon-arrow-left-ui-le-frog{background-position:-96px -17px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-icon-arrow-right-ui-le-frog{background-position:-32px -17px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-icon-arrow-up-hover-ui-le-frog{background-position:0 -16px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-icon-arrow-down-hover-ui-le-frog{background-position:-65px -16px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-icon-arrow-left-selected-ui-le-frog{background-position:-96px -17px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-icon-arrow-right-selected-ui-le-frog{background-position:-32px -17px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-icon-arrow-up-selected-ui-le-frog, .jqx-menu-item-arrow-up-selected-ui-le-frog, .jqx-menu-item-arrow-up-ui-le-frog, .jqx-menu-item-arrow-up-hover-ui-le-frog{background-position:0 -16px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-icon-arrow-down-selected-ui-le-frog, .jqx-menu-item-arrow-down-selected-ui-le-frog, .jqx-menu-item-arrow-down-ui-le-frog, .jqx-menu-item-arrow-down-hover-ui-le-frog{background-position:-65px -16px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-icon-arrow-left-selected-ui-le-frog, .jqx-tree-item-arrow-collapse-rtl-ui-le-frog, .jqx-tree-item-arrow-collapse-hover-rtl-ui-le-frog{background-position:-96px -17px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-icon-arrow-right-selected-ui-le-frog{background-position:-32px -17px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .icon-close-ui-le-frog{background-image:url(images/le-frog/ui-icons_ffffff_256x240.png); background-position:-80px -128px; cursor:pointer} .icon-close-hover-ui-le-frog{background-image:url(images/le-frog/ui-icons_ffffff_256x240.png); background-position:-80px -128px; cursor:pointer} /*Common Settings*/ .jqx-widget-ui-le-frog{font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size:12px; font-style:normal;} .jqx-widget-content-ui-le-frog{font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; border-color: #72b42d; background: #285c00 url(images/le-frog/ui-bg_inset-soft_10_285c00_1x100.png) 50% bottom repeat-x; color: #ffffff; font-size:12px} .jqx-widget-content-ui-le-frog a{color:#ffffff} .jqx-widget-header-ui-le-frog{font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; border-color: #3f7506; background: #3a8104 url(images/le-frog/ui-bg_highlight-soft_33_3a8104_1x100.png) 50% 50% repeat-x; color: #ffffff; font-size:12px} .jqx-widget-header-ui-le-frog a{color:#ffffff} .jqx-fill-state-normal-ui-le-frog, .jqx-calendar-cell-ui-le-frog, .jqx-tabs-title-ui-le-frog, .jqx-expander-header-ui-le-frog{border-color: #45930b; background: #4ca20b url(images/le-frog/ui-bg_highlight-soft_60_4ca20b_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff;} .jqx-fill-state-normal-ui-le-frog a, .jqx-fill-state-normal-ui-le-frog a:link, .jqx-fill-state-normal-ui-le-frog a:visited{color:#ffffff; text-decoration:none} .jqx-fill-state-hover-ui-le-frog{border-color: #8bd83b; background: #4eb305 url(images/le-frog/ui-bg_highlight-soft_50_4eb305_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; } .jqx-fill-state-hover-ui-le-frog a, .jqx-fill-state-hover-ui-le-frog a:hover{color:#ffffff; text-decoration:none} .jqx-fill-state-focus-ui-le-frog {border-color: #31630b; } .jqx-fill-state-pressed-ui-le-frog{border-color: #72b42d; background: #285c00 url(images/le-frog/ui-bg_highlight-hard_30_285c00_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff;} .jqx-fill-state-pressed-ui-le-frog a, .jqx-fill-state-pressed-ui-le-frog a:link, .jqx-fill-state-pressed-ui-le-frog a:visited{color:#ffffff; text-decoration:none} .jqx-input-button-content-ui-le-frog{font-size:10px} .jqx-input-icon-ui-le-frog{margin-left:2px; margin-top:-1px} .jqx-checkbox-check-checked-ui-le-frog{margin-top:1px; background-position:-65px -147px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} /*Progress Bar*/ .jqx-progressbar-ui-le-frog .jqx-fill-state-pressed-ui-le-frog{background: #498b18; border-bottom: none;} .jqx-progressbar-value-vertical-ui-le-frog{background: #498b18; border-right: none; border-bottom: 1px solid #72b42d;} /*ScrollBar */ .jqx-scrollbar-thumb-state-normal-ui-le-frog, .jqx-scrollbar-thumb-state-normal-horizontal-ui-le-frog{ border: 1px solid #72b42d; background: #498b18;} .jqx-scrollbar-thumb-state-hover-ui-le-frog, .jqx-scrollbar-thumb-state-hover-horizontal-ui-le-frog{ background: #8bd83b;} .jqx-scrollbar-thumb-state-pressed-ui-le-frog, .jqx-scrollbar-thumb-state-pressed-horizontal-ui-le-frog{ background: #285c00;} .jqx-splitter-splitbar-horizontal-ui-le-frog, .jqx-splitter-splitbar-vertical-ui-le-frog{background: #72b42d;} .jqx-splitter-collapse-button-horizontal-ui-le-frog, .jqx-splitter-collapse-button-vertical-ui-le-frog{background: #285c00;} .jqx-tabs-title-selected-top-ui-le-frog { border-bottom: 1px solid #285c00; background-color: #285c00; } /*applied to the tab's title when the tab is selected and the jqxTab's position property is set to 'bottom' .*/ .jqx-tabs-title-selected-bottom-ui-le-frog { border-top: 1px solid #285c00; background-color: #285c00; } /*applied to the tab's selection tracker when the jqxTab's position property is set to 'top'.*/ .jqx-tabs-selection-tracker-top-ui-le-frog { border-bottom: 1px solid #285c00; } /*applied to the tab's selection tracker when the jqxTab's position property is set to 'bottom'.*/ .jqx-tabs-selection-tracker-bottom-ui-le-frog { border-top: 1px solid #285c00; } /*Slider*/ .jqx-slider-ui-le-frog .jqx-fill-state-pressed-ui-le-frog{background:#619a35;} .jqx-slider-track-ui-le-frog{border: 1px solid #72b42d; background: #35650f;} /*Grid*/ .jqx-grid-cell-sort-ui-le-frog, .jqx-grid-cell-filter-ui-le-frog, .jqx-grid-cell-pinned-ui-le-frog, .jqx-grid-cell-selected-ui-le-frog{background: #1c4000; color: #fcfefc;} .jqx-grid-bottomright-ui-le-frog, .jqx-panel-bottomright-ui-le-frog, .jqx-listbox-bottomright-ui-le-frog, .jqx-scrollbar-state-normal-ui-le-frog{background: #35650f;} .jqx-widget-ui-le-frog .jqx-grid-column-header-ui-le-frog, .jqx-grid-cell-ui-le-frog, .jqx-widget-ui-le-frog .jqx-grid-cell-ui-le-frog, .jqx-widget-ui-le-frog .jqx-grid-group-cell-ui-le-frog, .jqx-grid-group-cell-ui-le-frog{border-color:#72b42d} .jqx-grid-group-expand-ui-le-frog{background-position: 50% 50%; background-repeat: no-repeat;background-image: url(images/icon-down-white.png);} .jqx-grid-group-collapse-ui-le-frog{background-position: 50% 50%; background-repeat: no-repeat;background-image: url(images/icon-right-white.png);} /*Menu*/ .jqx-menu-dropdown-ui-le-frog { -moz-border-radius-bottomleft: 10px; -webkit-border-bottom-left-radius: 10px; border-bottom-left-radius: 10px; -moz-border-radius-topright: 10px; -webkit-border-top-right-radius: 10px; border-top-right-radius: 10px; -moz-border-radius-bottomright: 10px; -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; right: -1px; } /*Navigation Bar*/ .jqx-navigationbar-ui-le-frog{overflow: visible;} .jqx-expander-header-ui-le-frog{border:1px solid transparent; border-radius:10px !important; moz-border-radius:10px !important; webkit-border-radius:10px !important} .jqx-expander-header-hover-ui-le-frog{border:1px solid #72b42d;} .jqx-expander-header-expanded-ui-le-frog{border-color: #72b42d; background: #285c00 url(images/le-frog/ui-bg_highlight-hard_30_285c00_1x100.png) 50% 50% repeat-x; border:1px solid #72b42d; border-bottom-width:1px; border-top-left-radius:10px !important; border-top-right-radius:10px !important; moz-border-radius-topleft:10px !important; moz-border-radius-topright:10px !important; webkit-border-top-left-radius:10px !important; webkit-border-top-right-radius:10px !important; border-bottom-left-radius:0px !important; border-bottom-right-radius:0px !important; moz-border-radius-bottomleft:0px !important; moz-border-radius-bottomright:0px !important; webkit-border-bottom-left-radius:0px !important; webkit-border-bottom-right-radius:0px !important; margin-bottom:0px} .jqx-expander-content-bottom-ui-le-frog{border-bottom-left-radius:10px !important; border-bottom-right-radius:10px !important; moz-border-radius-bottomleft:10px !important; moz-border-radius-bottomright:10px !important; webkit-border-bottom-left-radius:10px !important; webkit-border-bottom-right-radius:10px !important; border-top-width:0px !important} .jqx-expander-arrow-top-ui-le-frog{background-position:-65px -16px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-expander-arrow-bottom-ui-le-frog{background-position:0 -16px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-tabs-arrow-right-ui-le-frog{background-position:-32px -16px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} .jqx-tabs-arrow-left-ui-le-frog{background-position:-96px -16px; background-image:url(images/le-frog/ui-icons_ffffff_256x240.png)} /*Scroll Bar*/ .jqx-scrollbar-ui-le-frog .jqx-icon-arrow-up-ui-le-frog{width: 16px; height: 16px; margin-left: auto;} .jqx-scrollbar-ui-le-frog .jqx-icon-arrow-down-ui-le-frog{width: 16px; height: 16px; margin-left: auto;} .jqx-scrollbar-ui-le-frog .jqx-icon-arrow-left-ui-le-frog{width: 16px; height: 16px; position: relative; top: 50%; margin-top: -8px;} .jqx-scrollbar-ui-le-frog .jqx-icon-arrow-right-ui-le-frog{width: 16px; height: 16px; position: relative; top: 50%; margin-top: -8px;}
0x6a
trunk/libraries/jqwidgets/styles/jqx.ui-le-frog.css
CSS
asf20
16,108
.jqx-rc-tl-ui-sunny{border-top-left-radius:8px; moz-border-radius-topleft:8px; webkit-border-top-left-radius:8px} .jqx-rc-tr-ui-sunny{border-top-right-radius:8px; moz-border-radius-topright:8px; webkit-border-top-right-radius:8px} .jqx-rc-bl-ui-sunny{border-bottom-left-radius:8px; moz-border-radius-bottomleft:8px; webkit-border-bottom-left-radius:8px} .jqx-rc-br-ui-sunny{border-bottom-right-radius:8px; moz-border-radius-bottomright:8px; webkit-border-bottom-right-radius:8px} .jqx-rc-t-ui-sunny{border-top-left-radius:8px; border-top-right-radius:8px; moz-border-radius-topleft:8px; moz-border-radius-topright:8px; webkit-border-top-left-radius:8px; webkit-border-top-right-radius:8px} .jqx-rc-b-ui-sunny{border-bottom-left-radius:8px; border-bottom-right-radius:8px; moz-border-radius-bottomleft:8px; moz-border-radius-bottomright:8px; webkit-border-bottom-left-radius:8px; webkit-border-bottom-right-radius:8px} .jqx-rc-r-ui-sunny{border-bottom-right-radius:8px; border-top-right-radius:8px; moz-border-radius-bottomright:8px; moz-border-radius-topright:8px; webkit-border-bottom-right-radius:8px; webkit-border-top-right-radius:8px} .jqx-rc-l-ui-sunny{border-bottom-left-radius:8px; border-top-left-radius:8px; moz-border-radius-bottomleft:8px; moz-border-radius-topleft:8px; webkit-border-bottom-left-radius:8px; webkit-border-top-left-radius:8px} .jqx-rc-all-ui-sunny{border-radius:8px; moz-border-radius:8px; webkit-border-radius:8px} /*Grid*/ .jqx-grid-column-sortascbutton-ui-sunny{background-position:-96px -192px; background-image:url(images/sunny/ui-icons_fadc7a_256x240.png); margin-top:5px} .jqx-grid-column-sortdescbutton-ui-sunny{margin-top:5px; background-position:-65px -192px; background-image:url(images/sunny/ui-icons_fadc7a_256x240.png)} .jqx-grid-column-menubutton-ui-sunny{margin-top:5px; background-position:-65px -192px; background-image:url(images/sunny/ui-icons_ffe180_256x240.png); border-width:0px} /*Tree*/ .jqx-tree-item-arrow-expand-ui-sunny, .jqx-tree-item-arrow-expand-hover-ui-sunny{background-position:-65px -16px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-tree-item-arrow-collapse-ui-sunny, .jqx-tree-item-arrow-collapse-hover-ui-sunny{background-position:-32px -16px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-menu-item-arrow-right-ui-sunny, .jqx-menu-item-arrow-right-selected-ui-sunny{background-position:-32px -16px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-menu-item-arrow-left-ui-sunny, .jqx-menu-item-arrow-left-selected-ui-sunny, .jqx-tree-item-arrow-collapse-rtl-ui-sunny, .jqx-tree-item-arrow-collapse-hover-rtl-ui-sunny{background-position:-96px -16px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} /*Tabs*/ .jqx-tabs-title-ui-sunny{font-weight: bold; border-color: #d19405; border-bottom-color: transparent; background: #fece2f url(images/sunny/ui-bg_gloss-wave_60_fece2f_500x100.png) 50% 50% repeat-x;color: #4c3000; } .jqx-tabs-title-bottom-ui-sunny{border-bottom-color:#d19405; border-top-color: transparent;} .jqx-tabs-header-ui-sunny{border-width: 1px; margin:2px; border-radius:8px; moz-border-radius:8px; webkit-border-radius:8px} .jqx-tabs-header-bottom-ui-sunny{margin-top:-2px !important; padding-bottom: 3px; padding-top:1px} /*Radio Button*/ .jqx-radiobutton-ui-sunny .jqx-fill-state-pressed-ui-sunny{background:#222; border:1px solid #000} /*Calendar*/ .jqx-calendar-cell-ui-sunny{font-size: 11px; border-color: #d19405; background: #fece2f url(images/sunny/ui-bg_gloss-wave_60_fece2f_500x100.png) 50% 50% repeat-x; color: #4c3000; padding:.2em; text-align:right; text-decoration:none; moz-border-radius:0px !important; webkit-border-radius:0px !important; border-radius:0px !important} .jqx-calendar-cell-today-ui-sunny{background:#ffe45c url(images/sunny/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; border:1px solid #fed22f; color:#363636} .jqx-calendar-title-container-ui-sunny{border: 1px solid #aaa; border-bottom-width: 0px; border-radius:8px; moz-border-radius:8px; webkit-border-radius:8px; font-weight: bold;} .jqx-calendar-month-container-ui-sunny{border:none !important} .jqx-calendar-ui-sunny{padding:2px} .jqx-calendar-column-cell-ui-sunny{font-size: 11px; font-weight: bold;} .jqx-calendar-ui-sunny .jqx-icon-arrow-left-ui-sunny{background-image:url(images/sunny/ui-icons_fadc7a_256x240.png); background-position: -80px -192px; width:16px; height:16px; left:5px; position:relative} .jqx-calendar-ui-sunny .jqx-icon-arrow-right-ui-sunny{background-image:url(images/sunny/ui-icons_fadc7a_256x240.png); background-position: -48px -192px; width:16px; height:16px; right:5px; position:relative} /*Window*/ .jqx-window-ui-sunny{padding: 2px;} .jqx-window-header-ui-sunny{border: 1px solid #aaa; font-weight: bold; font-size: 11px; moz-border-radius:8px; border-radius:8px; webkit-border-radius:8px} .jqx-window-content-ui-sunny{border-width:0px !important} .jqx-window-close-button-ui-sunny{background-position:-96px -128px; background-image:url(images/sunny/ui-icons_fadc7a_256x240.png);moz-border-radius:8px; border-radius:8px; webkit-border-radius:8px} .jqx-window-collapse-button-ui-sunny{background-position:0 -16px; background-image:url(images/sunny/ui-icons_fadc7a_256x240.png)} .jqx-window-collapse-button-hover-ui-sunny{background-image:url(images/sunny/ui-icons_bd7b00_256x240.png); background-color:#fff; border-radius:8px; moz-border-radius:8px; webkit-border-radius:8px} .jqx-window-collapse-button-collapsed-ui-sunny, .jqx-window-collapse-button-collapsed-hover-ui-sunny{background-position:-65px -16px} .jqx-window-modal-ui-sunny{background-image:url(images/sunny/ui-bg_diagonals-thick_20_666666_40x40.png)} .jqx-window-close-button-hover-ui-sunny{background-color:#fff; background-position:-96px -128px; background-image:url(images/sunny/ui-icons_bd7b00_256x240.png); cursor:pointer; width:16px; height:16px} /*Splitter*/ .jqx-splitter-ui-sunny .jqx-widget-content-ui-sunny{border-width:0px; background: #fff;} /*Icons*/ .jqx-icon-arrow-up-ui-sunny{background-position:0 -16px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-icon-arrow-down-ui-sunny{background-position:-65px -16px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-icon-arrow-left-ui-sunny{background-position:-96px -17px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-icon-arrow-right-ui-sunny{background-position:-32px -17px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-icon-arrow-up-hover-ui-sunny{background-position:0 -16px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-icon-arrow-down-hover-ui-sunny{background-position:-65px -16px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-icon-arrow-left-selected-ui-sunny{background-position:-96px -17px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-icon-arrow-right-selected-ui-sunny{background-position:-32px -17px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-icon-arrow-up-selected-ui-sunny{background-position:0 -16px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-icon-arrow-down-selected-ui-sunny{background-position:-65px -16px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-icon-arrow-left-selected-ui-sunny{background-position:-96px -17px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-icon-arrow-right-selected-ui-sunny{background-position:-32px -17px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .icon-close-ui-sunny{background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png); background-position:-80px -128px; cursor:pointer} .icon-close-hover-ui-sunny{background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png); background-position:-80px -128px; cursor:pointer} /*Common Settings*/ .jqx-widget-ui-sunny{font-family: Segoe UI, Arial, sans-serif; font-size:12px; font-style:normal;} .jqx-widget-content-ui-sunny{font-family: Segoe UI, Arial, sans-serif; background: #feeebd url(images/sunny/ui-bg_highlight-soft_100_feeebd_1x100.png) 50% top repeat-x; color: #383838; font-size:12px} .jqx-widget-content-ui-sunny a{color:#383838} .jqx-widget-header-ui-sunny{font-family: Segoe UI, Arial, sans-serif; border-color: #494437; background: #817865 url(images/sunny/ui-bg_gloss-wave_45_817865_500x100.png) 50% 50% repeat-x; color: #ffffff; font-size:12px} .jqx-widget-header-ui-sunny a{color:#fff} .jqx-fill-state-normal-ui-sunny{border-color: #d19405; background: #fece2f url(images/sunny/ui-bg_gloss-wave_60_fece2f_500x100.png) 50% 50% repeat-x;color: #4c3000;} .jqx-fill-state-normal-ui-sunny a, .jqx-fill-state-normal-ui-sunny a:link, .jqx-fill-state-normal-ui-sunny a:visited{color:#4c3000; text-decoration:none} .jqx-fill-state-hover-ui-sunny{border-color: #a45b13; background: #ffdd57 url(images/sunny/ui-bg_gloss-wave_70_ffdd57_500x100.png) 50% 50% repeat-x; color: #381f00; } .jqx-fill-state-hover-ui-sunny a, .jqx-fill-state-hover-ui-sunny a:hover{color:#381f00; text-decoration:none} .jqx-fill-state-focus-ui-sunny {border-color: #494437;} .jqx-fill-state-pressed-ui-sunny{ border-color:#655e4e; background: #ffffff url(images/sunny/ui-bg_inset-soft_30_ffffff_1x100.png) 50% 50% repeat-x; color: #0074c7;} .jqx-fill-state-pressed-ui-sunny a, .jqx-fill-state-pressed-ui-sunny a:link, .jqx-fill-state-pressed-ui-sunny a:visited{color:#0074c7; text-decoration:none} .jqx-fill-state-disabled-ui-sunny {cursor: default; color: #000; opacity: .55; filter:Alpha(Opacity=45);} .jqx-input-button-content-ui-sunny{font-size:10px} .jqx-input-icon-ui-sunny{margin-left:2px; margin-top:-1px} .jqx-checkbox-check-checked-ui-sunny{margin-top:1px; background-position:-65px -147px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} /*Progress Bar*/ .jqx-progressbar-ui-sunny .jqx-fill-state-pressed-ui-sunny{background: #9f998a; border-bottom: none;} .jqx-progressbar-value-vertical-ui-sunny{background: #9f998a; border-right: none; border-bottom: 1px solid #8e846b;} /*ScrollBar */ .jqx-scrollbar-thumb-state-normal-ui-sunny, .jqx-scrollbar-thumb-state-normal-horizontal-ui-sunny{ border: 1px solid #8e846b; background: #9f998a;} .jqx-scrollbar-thumb-state-hover-ui-sunny, .jqx-scrollbar-thumb-state-hover-horizontal-ui-sunny{ background: #dadada;} .jqx-scrollbar-thumb-state-pressed-ui-sunny, .jqx-scrollbar-thumb-state-pressed-horizontal-ui-sunny{ background: #ffffff;} .jqx-tabs-title-selected-top-ui-sunny { border-color: #aaa; border-bottom: 1px solid #fff; background-color: #fff; } /*applied to the tab's title when the tab is selected and the jqxTab's position property is set to 'bottom' .*/ .jqx-tabs-title-selected-bottom-ui-sunny { border-color: #aaa; border-top: 1px solid #fff; background-color: #fff; } /*applied to the tab's selection tracker when the jqxTab's position property is set to 'top'.*/ .jqx-tabs-selection-tracker-top-ui-sunny { border-color: #aaa; border-bottom: 1px solid #fff; } /*applied to the tab's selection tracker when the jqxTab's position property is set to 'bottom'.*/ .jqx-tabs-selection-tracker-bottom-ui-sunny { border-color: #aaa; border-top: 1px solid #fff; } /*Slider*/ .jqx-slider-ui-sunny .jqx-fill-state-pressed-ui-sunny{background:#9f998a;} .jqx-slider-track-ui-sunny{border: 1px solid #8e846b; background: #fef8e4;} /*Grid*/ .jqx-grid-cell-sort-ui-sunny, .jqx-grid-cell-filter-ui-sunny, .jqx-grid-cell-pinned-ui-sunny, .jqx-grid-cell-selected-ui-sunny{background:#fef8e4;} .jqx-grid-bottomright-ui-sunny, .jqx-panel-bottomright-ui-sunny, .jqx-listbox-bottomright-ui-sunny, .jqx-scrollbar-state-normal-ui-sunny{background: #fef8e4;} .jqx-grid-group-expand-ui-sunny{background-position: 50% 50%; background-repeat: no-repeat;background-image: url(images/icon-down.png);} .jqx-grid-group-collapse-ui-sunny{background-position: 50% 50%; background-repeat: no-repeat;background-image: url(images/icon-right.png);} /*Menu*/ .jqx-menu-dropdown-ui-sunny { -moz-border-radius-bottomleft: 8px; -webkit-border-bottom-left-radius: 8px; border-bottom-left-radius: 8px; -moz-border-radius-topright: 8px; -webkit-border-top-right-radius: 8px; border-top-right-radius: 8px; -moz-border-radius-bottomright: 8px; -webkit-border-bottom-right-radius: 8px; border-bottom-right-radius: 8px; right: -1px; } /*Navigation Bar*/ .jqx-navigationbar-ui-sunny{overflow: inherit;} .jqx-expander-header-ui-sunny{font-weight: bold; margin-bottom:2px; margin-top:2px} .jqx-expander-header-ui-sunny{background: #fece2f url(images/sunny/ui-bg_gloss-wave_60_fece2f_500x100.png) 50% 50% repeat-x;color: #4c3000; border:1px solid #d19405; border-radius:8px !important; moz-border-radius:8px !important; webkit-border-radius:8px !important} .jqx-expander-header-hover-ui-sunny{border:1px solid #a45b13; background: #ffdd57 url(images/sunny/ui-bg_gloss-wave_70_ffdd57_500x100.png) 50% 50% repeat-x; color: #381f00;} .jqx-expander-header-expanded-ui-sunny{color: #0074c7; background:#fff url(images/sunny/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; border:1px solid #aaa; border-bottom-width:0px; border-top-left-radius:8px !important; border-top-right-radius:8px !important; moz-border-radius-topleft:8px !important; moz-border-radius-topright:8px !important; webkit-border-top-left-radius:8px !important; webkit-border-top-right-radius:8px !important; border-bottom-left-radius:0px !important; border-bottom-right-radius:0px !important; moz-border-radius-bottomleft:0px !important; moz-border-radius-bottomright:0px !important; webkit-border-bottom-left-radius:0px !important; webkit-border-bottom-right-radius:0px !important; margin-bottom:0px} .jqx-expander-content-bottom-ui-sunny{border-bottom-left-radius:8px !important; border-bottom-right-radius:8px !important; moz-border-radius-bottomleft:8px !important; moz-border-radius-bottomright:8px !important; webkit-border-bottom-left-radius:8px !important; webkit-border-bottom-right-radius:8px !important; border-top-width:0px !important} .jqx-expander-arrow-top-ui-sunny{background-position:-65px -16px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-expander-arrow-bottom-ui-sunny{background-position:0 -16px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-tabs-arrow-right-ui-sunny{background-position:-32px -16px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} .jqx-tabs-arrow-left-ui-sunny{background-position:-96px -16px; background-image:url(images/sunny/ui-icons_3d3d3d_256x240.png)} /*Scroll Bar*/ .jqx-scrollbar-ui-sunny .jqx-icon-arrow-up-ui-sunny{width: 16px; height: 16px; margin-left: auto;} .jqx-scrollbar-ui-sunny .jqx-icon-arrow-down-ui-sunny{width: 16px; height: 16px; margin-left: auto;} .jqx-scrollbar-ui-sunny .jqx-icon-arrow-left-ui-sunny{width: 16px; height: 16px; position: relative; top: 50%; margin-top: -8px;} .jqx-scrollbar-ui-sunny .jqx-icon-arrow-right-ui-sunny{width: 16px; height: 16px; position: relative; top: 50%; margin-top: -8px;}
0x6a
trunk/libraries/jqwidgets/styles/jqx.ui-sunny.css
CSS
asf20
15,250
.jqx-rc-tl-ui-redmond{border-top-left-radius:5px; moz-border-radius-topleft:5px; webkit-border-top-left-radius:5px} .jqx-rc-tr-ui-redmond{border-top-right-radius:5px; moz-border-radius-topright:5px; webkit-border-top-right-radius:5px} .jqx-rc-bl-ui-redmond{border-bottom-left-radius:5px; moz-border-radius-bottomleft:5px; webkit-border-bottom-left-radius:5px} .jqx-rc-br-ui-redmond{border-bottom-right-radius:5px; moz-border-radius-bottomright:5px; webkit-border-bottom-right-radius:5px} .jqx-rc-t-ui-redmond{border-top-left-radius:5px; border-top-right-radius:5px; moz-border-radius-topleft:5px; moz-border-radius-topright:5px; webkit-border-top-left-radius:5px; webkit-border-top-right-radius:5px} .jqx-rc-b-ui-redmond{border-bottom-left-radius:5px; border-bottom-right-radius:5px; moz-border-radius-bottomleft:5px; moz-border-radius-bottomright:5px; webkit-border-bottom-left-radius:5px; webkit-border-bottom-right-radius:5px} .jqx-rc-r-ui-redmond{border-bottom-right-radius:5px; border-top-right-radius:5px; moz-border-radius-bottomright:5px; moz-border-radius-topright:5px; webkit-border-bottom-right-radius:5px; webkit-border-top-right-radius:5px} .jqx-rc-l-ui-redmond{border-bottom-left-radius:5px; border-top-left-radius:5px; moz-border-radius-bottomleft:5px; moz-border-radius-topleft:5px; webkit-border-bottom-left-radius:5px; webkit-border-top-left-radius:5px} .jqx-rc-all-ui-redmond{border-radius:5px; moz-border-radius:5px; webkit-border-radius:5px} /*Grid*/ .jqx-grid-column-sortascbutton-ui-redmond{background-position:-96px -192px; background-image:url(images/redmond/ui-icons_d8e7f3_256x240.png); margin-top:5px} .jqx-grid-column-sortdescbutton-ui-redmond{margin-top:5px; background-position:-64px -192px; background-image:url(images/redmond/ui-icons_d8e7f3_256x240.png)} .jqx-grid-column-menubutton-ui-redmond{margin-top:5px; background-position:-65px -16px; background-image:url(images/redmond/ui-icons_f9bd01_256x240.png); border-width:0px} /*Tree*/ .jqx-tree-item-arrow-expand-ui-redmond, .jqx-tree-item-arrow-expand-hover-ui-redmond{background-position:-65px -16px; background-image:url(images/redmond/ui-icons_6da8d5_256x240.png)} .jqx-tree-item-arrow-collapse-ui-redmond, .jqx-tree-item-arrow-collapse-hover-ui-redmond{background-position:-32px -16px; background-image:url(images/redmond/ui-icons_6da8d5_256x240.png)} .jqx-menu-item-arrow-right-ui-redmond, .jqx-menu-item-arrow-right-selected-ui-redmond{background-position:-32px -16px; background-image:url(images/redmond/ui-icons_6da8d5_256x240.png)} .jqx-menu-item-arrow-left-ui-redmond, .jqx-menu-item-arrow-left-selected-ui-redmond, .jqx-tree-item-arrow-collapse-rtl-ui-redmond, .jqx-tree-item-arrow-collapse-hover-rtl-ui-redmond{background-position:-96px -16px; background-image:url(images/redmond/ui-icons_6da8d5_256x240.png)} /*Tabs*/ .jqx-tabs-title-ui-redmond{font-weight: bold; border-color: #c5dbec; background: #dfeffc url(images/redmond/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x; color: #2e6e9e;} .jqx-tabs-header-ui-redmond{margin-left:2px; margin-right: 2px; margin-top: 2px; border-radius:5px; moz-border-radius:5px; webkit-border-radius:5px} .jqx-tabs-arrow-right-ui-redmond{background-position:-32px -16px; background-image:url(images/redmond/ui-icons_d8e7f3_256x240.png)} .jqx-tabs-arrow-left-ui-redmond{background-position:-96px -16px; background-image:url(images/redmond/ui-icons_d8e7f3_256x240.png)} /*Radio Button*/ .jqx-radiobutton-ui-redmond .jqx-fill-state-pressed-ui-redmond{background:#6caad4; border:1px solid #6caad4} /*Calendar*/ .jqx-calendar-cell-ui-redmond{font-weight: bold; font-size: 11px; border-color: #c5dbec; background: #dfeffc url(images/redmond/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x; color: #2e6e9e; padding:.2em; text-align:right; text-decoration:none; moz-border-radius:0px !important; webkit-border-radius:0px !important; border-radius:0px !important} .jqx-calendar-cell-today-ui-redmond{background:#ffe45c url(images/redmond/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; border:1px solid #fed22f; color:#363636} .jqx-calendar-title-container-ui-redmond{border: 1px solid #4297d7; border-bottom-width: 0px; border-radius:5px; moz-border-radius:5px; webkit-border-radius:5px; font-weight: bold;} .jqx-calendar-month-container-ui-redmond{border:none !important} .jqx-calendar-ui-redmond{padding:2px} .jqx-calendar-column-cell-ui-redmond{font-size: 11px; font-weight: bold;} .jqx-calendar-ui-redmond .jqx-icon-arrow-left-ui-redmond{background-image:url(images/redmond/ui-icons_d8e7f3_256x240.png); background-position: -80px -192px; width:16px; height:16px; left:5px; position:relative} .jqx-calendar-ui-redmond .jqx-icon-arrow-right-ui-redmond{background-image:url(images/redmond/ui-icons_d8e7f3_256x240.png); background-position: -48px -192px; width:16px; height:16px; right:5px; position:relative} /*Window*/ .jqx-window-ui-redmond{padding: 2px;} .jqx-window-header-ui-redmond{border: 1px solid #4297d7; font-weight: bold; font-size: 11px; moz-border-radius:5px; border-radius:5px; webkit-border-radius:5px} .jqx-window-content-ui-redmond{border-width:0px !important} .jqx-window-close-button-ui-redmond{background-position:-96px -128px; background-image:url(images/redmond/ui-icons_d8e7f3_256x240.png);moz-border-radius:5px; border-radius:5px; webkit-border-radius:5px} .jqx-window-collapse-button-ui-redmond{background-position:0 -16px; background-image:url(images/redmond/ui-icons_d8e7f3_256x240.png)} .jqx-window-collapse-button-hover-ui-redmond{background-image:url(images/redmond/ui-icons_217bc0_256x240.png); background-color:#fff; border-radius:5px; moz-border-radius:5px; webkit-border-radius:5px} .jqx-window-collapse-button-collapsed-ui-redmond, .jqx-window-collapse-button-collapsed-hover-ui-redmond{background-position:-65px -16px} .jqx-window-modal-ui-redmond{background: #aaaaaa url(images/redmond/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30);} .jqx-window-close-button-hover-ui-redmond{background-color:#fff; background-position:-96px -128px; background-image:url(images/redmond/ui-icons_217bc0_256x240.png); cursor:pointer; width:16px; height:16px} /*Splitter*/ .jqx-splitter-ui-redmond .jqx-widget-content-ui-redmond{border-width:0px; background: #fff;} /*Icons*/ .jqx-icon-arrow-up-ui-redmond{background-position:0 -16px; background-image:url(images/redmond/ui-icons_6da8d5_256x240.png)} .jqx-icon-arrow-down-ui-redmond{background-position:-65px -16px; background-image:url(images/redmond/ui-icons_6da8d5_256x240.png)} .jqx-icon-arrow-left-ui-redmond{background-position:-96px -17px; background-image:url(images/redmond/ui-icons_6da8d5_256x240.png)} .jqx-icon-arrow-right-ui-redmond{background-position:-32px -17px; background-image:url(images/redmond/ui-icons_6da8d5_256x240.png)} .jqx-icon-arrow-up-hover-ui-redmond{background-position:0 -16px; background-image:url(images/redmond/ui-icons_217bc0_256x240.png)} .jqx-icon-arrow-down-hover-ui-redmond{background-position:-65px -16px; background-image:url(images/redmond/ui-icons_217bc0_256x240.png)} .jqx-icon-arrow-left-hover-ui-redmond{background-position:-96px -17px; background-image:url(images/redmond/ui-icons_217bc0_256x240.png)} .jqx-icon-arrow-right-hover-ui-redmond{background-position:-32px -17px; background-image:url(images/redmond/ui-icons_217bc0_256x240.png)} .jqx-icon-arrow-left-selected-ui-redmond{background-position:-96px -17px; background-image:url(images/redmond/ui-icons_f9bd01_256x240.png)} .jqx-icon-arrow-right-selected-ui-redmond{background-position:-32px -17px; background-image:url(images/redmond/ui-icons_f9bd01_256x240.png)} .jqx-icon-arrow-up-selected-ui-redmond{background-position:0 -16px; background-image:url(images/redmond/ui-icons_f9bd01_256x240.png)} .jqx-icon-arrow-down-selected-ui-redmond{background-position:-65px -16px; background-image:url(images/redmond/ui-icons_f9bd01_256x240.png)} .icon-close-ui-redmond{background-image:url(images/redmond/ui-icons_6da8d5_256x240.png); background-position:-80px -128px; cursor:pointer} .icon-close-hover-ui-redmond{background-image:url(images/redmond/ui-icons_217bc0_256x240.png); background-position:-80px -128px; cursor:pointer} /*Common Settings*/ .jqx-widget-ui-redmond{font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size:13px; font-style:normal; webkit-tap-highlight-color:rgba(0,0,0,0)} .jqx-widget-content-ui-redmond{ font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; border-color: #a6c9e2; background: #fcfdfd url(images/redmond/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x; color: #222222; font-size:13px} .jqx-widget-content-ui-redmond a{color:#222} .jqx-widget-header-ui-redmond{font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; border-color: #4297d7; background: #5c9ccc url(images/redmond/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x; color: #ffffff; font-size:13px} .jqx-widget-header-ui-redmond a{color:#222} .jqx-fill-state-normal-ui-redmond{border-color: #c5dbec; background: #dfeffc url(images/redmond/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x; color: #2e6e9e;} .jqx-fill-state-normal-ui-redmond a, .jqx-fill-state-normal-ui-redmond a:link, .jqx-fill-state-normal-ui-redmond a:visited{color:#2e6e9e; text-decoration:none} .jqx-fill-state-hover-ui-redmond{border-color: #79b7e7; background: #d0e5f5 url(images/redmond/ui-bg_glass_75_d0e5f5_1x400.png) 50% 50% repeat-x; color: #1d5987;} .jqx-fill-state-hover-ui-redmond a, .jqx-fill-state-hover-ui-redmond a:hover{color:#1d5987; text-decoration:none} .jqx-fill-state-focus-ui-redmond {border-color: #79b7e7; color: #1d5987; } .jqx-fill-state-pressed-ui-redmond{border-color: #79b7e7; background: #f5f8f9 url(images/redmond/ui-bg_inset-hard_100_f5f8f9_1x100.png) 50% 50% repeat-x; color: #e17009; } .jqx-fill-state-pressed-ui-redmond a, .jqx-fill-state-pressed-ui-redmond a:link, .jqx-fill-state-pressed-ui-redmond a:visited{color:#e17009; text-decoration:none} .jqx-fill-state-disabled-ui-redmond {cursor: default; color: #000; opacity: .55; filter:Alpha(Opacity=45);} .jqx-input-button-content-ui-redmond{font-size:10px} .jqx-input-icon-ui-redmond{margin-left:2px; margin-top:-1px} .jqx-checkbox-check-checked-ui-redmond{margin-top:1px; background-position:-65px -147px; background-image:url(images/redmond/ui-icons_6da8d5_256x240.png)} /*Progress Bar*/ .jqx-progressbar-ui-redmond .jqx-fill-state-pressed-ui-redmond{background: #8db9db; border-bottom: none;} .jqx-progressbar-value-vertical-ui-redmond{background: #8db9db; border-right: none; border-bottom: 1px solid #c5dbec;} /*ScrollBar */ .jqx-scrollbar-thumb-state-normal-ui-redmond, .jqx-scrollbar-thumb-state-normal-horizontal-ui-redmond{ border: 1px solid #c5dbec; background: #e1effb;} .jqx-scrollbar-thumb-state-hover-ui-redmond, .jqx-scrollbar-thumb-state-hover-horizontal-ui-redmond{ border: 1px solid #79b7e7; background: #d0e5f5;} .jqx-scrollbar-thumb-state-pressed-ui-redmond, .jqx-scrollbar-thumb-state-pressed-horizontal-ui-redmond{ border: 1px solid #79b7e7; background: #f5f8f9;} .jqx-tabs-title-selected-top-ui-redmond { border-color: #c5dbec; border-bottom: 1px solid #fff; background-color: #fff; } /*applied to the tab's title when the tab is selected and the jqxTab's position property is set to 'bottom' .*/ .jqx-tabs-title-selected-bottom-ui-redmond { border-color: #c5dbec; border-top: 1px solid #fff; background-color: #fff; } /*applied to the tab's selection tracker when the jqxTab's position property is set to 'top'.*/ .jqx-tabs-selection-tracker-top-ui-redmond { border-color: #c5dbec; border-bottom: 1px solid #fff; } /*applied to the tab's selection tracker when the jqxTab's position property is set to 'bottom'.*/ .jqx-tabs-selection-tracker-bottom-ui-redmond { border-color: #c5dbec; border-top: 1px solid #fff; } /*Slider*/ .jqx-slider-ui-redmond .jqx-fill-state-pressed-ui-redmond{background:#8db9db;} .jqx-slider-track-ui-redmond{border: 1px solid #c5dbec; background: #fdfefe;} /*Grid*/ .jqx-grid-cell-selected-ui-redmond{border-color: #c5dbec; color: #e17009; background: #f5f8f9 url(images/redmond/ui-bg_inset-hard_100_f5f8f9_1x100.png) 50% 50% repeat-x;} .jqx-grid-cell-sort-ui-redmond, .jqx-grid-cell-filter-ui-redmond, .jqx-grid-cell-pinned-ui-redmond{background:#e1effb;} .jqx-grid-bottomright-ui-redmond, .jqx-panel-bottomright-ui-redmond, .jqx-listbox-bottomright-ui-redmond, .jqx-scrollbar-state-normal-ui-redmond{background: #fff;} .jqx-grid-cell-sort-alt-ui-redmond, .jqx-grid-cell-alt-ui-redmond, .jqx-grid-cell-filter-alt-ui-redmond{background: #e1effb;} .jqx-widget-ui-redmond .jqx-grid-column-header-ui-redmond, .jqx-grid-cell-ui-redmond, .jqx-widget-ui-redmond .jqx-grid-cell-ui-redmond, .jqx-widget-ui-redmond .jqx-grid-group-cell-ui-redmond, .jqx-grid-group-cell-ui-redmond{border-color:#c5dbec} .jqx-grid-column-header-ui-redmond{font-weight: bold;} .jqx-grid-group-expand-ui-redmond{background-position: 50% 50%; background-repeat: no-repeat;background-image: url(images/icon-down.png);} .jqx-grid-group-collapse-ui-redmond{background-position: 50% 50%; background-repeat: no-repeat;background-image: url(images/icon-right.png);} /*Menu*/ .jqx-menu-item-top-ui-redmond { font-weight: bold; } .jqx-menu-dropdown-ui-redmond { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; -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; right: -1px; } /*Navigation Bar*/ .jqx-navigationbar-ui-redmond{overflow: inherit;} .jqx-expander-header-ui-redmond{font-weight: bold; margin-top:2px} .jqx-expander-header-ui-redmond{background: #dfeffc url(images/redmond/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x; color: #2e6e9e; border:1px solid #c5dbec; border-radius:5px !important; moz-border-radius:5px !important; webkit-border-radius:5px !important} .jqx-expander-header-hover-ui-redmond{background: #d0e5f5 url(images/redmond/ui-bg_glass_75_d0e5f5_1x400.png) 50% 50% repeat-x; color: #1d5987; border:1px solid #79b7e7;} .jqx-expander-header-expanded-ui-redmond{color: #e17009; background:#f5f8f9 url(images/redmond/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; border:1px solid #a6c9e2; border-bottom-width:0px; border-top-left-radius:5px !important; border-top-right-radius:5px !important; moz-border-radius-topleft:5px !important; moz-border-radius-topright:5px !important; webkit-border-top-left-radius:5px !important; webkit-border-top-right-radius:5px !important; border-bottom-left-radius:0px !important; border-bottom-right-radius:0px !important; moz-border-radius-bottomleft:0px !important; moz-border-radius-bottomright:0px !important; webkit-border-bottom-left-radius:0px !important; webkit-border-bottom-right-radius:0px !important; margin-bottom:0px} .jqx-expander-content-bottom-ui-redmond{border-color: #a6c9e2; border-bottom-left-radius:5px !important; border-bottom-right-radius:5px !important; moz-border-radius-bottomleft:5px !important; moz-border-radius-bottomright:5px !important; webkit-border-bottom-left-radius:5px !important; webkit-border-bottom-right-radius:5px !important; border-top-width:0px !important} .jqx-expander-arrow-top-ui-redmond{position: relative; width: 16px; height: 16px; background-position:-65px -16px; background-image:url(images/redmond/ui-icons_6da8d5_256x240.png)} .jqx-expander-arrow-bottom-ui-redmond{position: relative; width: 16px; height: 16px; background-position:0 -16px; background-image:url(images/redmond/ui-icons_6da8d5_256x240.png)} /*Scroll Bar*/ .jqx-scrollbar-ui-redmond .jqx-icon-arrow-up-ui-redmond{width: 16px; height: 16px; margin-left: auto;} .jqx-scrollbar-ui-redmond .jqx-icon-arrow-down-ui-redmond{width: 16px; height: 16px; margin-left: auto;} .jqx-scrollbar-ui-redmond .jqx-icon-arrow-left-ui-redmond{width: 16px; height: 16px; position: relative; top: 50%; margin-top: -8px;} .jqx-scrollbar-ui-redmond .jqx-icon-arrow-right-ui-redmond{width: 16px; height: 16px; position: relative; top: 50%; margin-top: -8px;}
0x6a
trunk/libraries/jqwidgets/styles/jqx.ui-redmond.css
CSS
asf20
16,345
.jqx-rc-tl-ui-overcast{border-top-left-radius:6px; moz-border-radius-topleft:6px; webkit-border-top-left-radius:6px} .jqx-rc-tr-ui-overcast{border-top-right-radius:6px; moz-border-radius-topright:6px; webkit-border-top-right-radius:6px} .jqx-rc-bl-ui-overcast{border-bottom-left-radius:6px; moz-border-radius-bottomleft:6px; webkit-border-bottom-left-radius:6px} .jqx-rc-br-ui-overcast{border-bottom-right-radius:6px; moz-border-radius-bottomright:6px; webkit-border-bottom-right-radius:6px} .jqx-rc-t-ui-overcast{border-top-left-radius:6px; border-top-right-radius:6px; moz-border-radius-topleft:6px; moz-border-radius-topright:6px; webkit-border-top-left-radius:6px; webkit-border-top-right-radius:6px} .jqx-rc-b-ui-overcast{border-bottom-left-radius:6px; border-bottom-right-radius:6px; moz-border-radius-bottomleft:6px; moz-border-radius-bottomright:6px; webkit-border-bottom-left-radius:6px; webkit-border-bottom-right-radius:6px} .jqx-rc-r-ui-overcast{border-bottom-right-radius:6px; border-top-right-radius:6px; moz-border-radius-bottomright:6px; moz-border-radius-topright:6px; webkit-border-bottom-right-radius:6px; webkit-border-top-right-radius:6px} .jqx-rc-l-ui-overcast{border-bottom-left-radius:6px; border-top-left-radius:6px; moz-border-radius-bottomleft:6px; moz-border-radius-topleft:6px; webkit-border-bottom-left-radius:6px; webkit-border-top-left-radius:6px} .jqx-rc-all-ui-overcast{border-radius:6px; moz-border-radius:6px; webkit-border-radius:6px} /*Grid*/ .jqx-grid-column-sortascbutton-ui-overcast{background-position:-96px -192px; background-image:url(images/overcast/ui-icons_454545_256x240.png); margin-top:6px} .jqx-grid-column-sortdescbutton-ui-overcast{margin-top:6px; background-position:-64px -192px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} .jqx-grid-column-menubutton-ui-overcast{margin-top:6px; background-position:-64px -16px; background-image:url(images/overcast/ui-icons_454545_256x240.png); border-width:0px} /*Tree*/ .jqx-tree-item-arrow-expand-ui-overcast, .jqx-tree-item-arrow-expand-hover-ui-overcast{background-position:-64px -16px; background-image:url(images/overcast/ui-icons_999999_256x240.png)} .jqx-tree-item-arrow-collapse-ui-overcast, .jqx-tree-item-arrow-collapse-hover-ui-overcast{background-position:-32px -16px; background-image:url(images/overcast/ui-icons_999999_256x240.png)} .jqx-menu-item-arrow-right-ui-overcast, .jqx-menu-item-arrow-right-selected-ui-overcast{background-position:-32px -16px; background-image:url(images/overcast/ui-icons_999999_256x240.png)} .jqx-menu-item-arrow-left-ui-overcast, .jqx-menu-item-arrow-left-selected-ui-overcast, .jqx-tree-item-arrow-collapse-rtl-ui-overcast, .jqx-tree-item-arrow-collapse-hover-rtl-ui-overcast{background-position:-96px -16px; background-image:url(images/overcast/ui-icons_999999_256x240.png)} /*Tabs*/ .jqx-tabs-title-ui-overcast{font-weight: bold; border-color: #ccc; background: #eeeeee url(images/ui-bg_glass_60_eeeeee_1x400.png) 50% 50% repeat-x; color: #3383bb;} .jqx-tabs-header-ui-overcast{border-width: 1px; margin:2px; border-radius:6px; moz-border-radius:6px; webkit-border-radius:6px} .jqx-tabs-header-bottom-ui-overcast{margin-top:-2px !important; padding-bottom: 3px; padding-top:1px} .jqx-tabs-title-bottom-ui-overcast{border-bottom-color:#ccc; border-top-color: transparent;} /*Radio Button*/ .jqx-radiobutton-ui-overcast .jqx-fill-state-pressed-ui-overcast{background:#444644; border:1px solid #444644} /*Calendar*/ .jqx-calendar-cell-ui-overcast{font-weight: bold; font-size: 11px; border-color: #ccc; background: #eeeeee url(images/overcast/ui-bg_glass_60_eeeeee_1x400.png) 50% 50% repeat-x; color: #3383bb; padding:.2em; text-align:right; text-decoration:none; moz-border-radius:0px !important; webkit-border-radius:0px !important; border-radius:0px !important} .jqx-calendar-cell-today-ui-overcast{background:#ffe45c url(images/overcast/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; border:1px solid #fed22f; color:#363636} .jqx-calendar-title-container-ui-overcast{border: 1px solid #bbbbbb; border-bottom-width: 0px; border-radius:6px; moz-border-radius:6px; webkit-border-radius:6px; font-weight: bold;} .jqx-calendar-month-container-ui-overcast{border:none !important} .jqx-calendar-ui-overcast{padding:2px} .jqx-calendar-column-cell-ui-overcast{font-size: 11px; font-weight: bold;} .jqx-calendar-ui-overcast .jqx-icon-arrow-left-ui-overcast{background-image:url(images/overcast/ui-icons_999999_256x240.png); background-position: -80px -192px; width:16px; height:16px; left:6px; position:relative} .jqx-calendar-ui-overcast .jqx-icon-arrow-right-ui-overcast{background-image:url(images/overcast/ui-icons_999999_256x240.png); background-position: -48px -192px; width:16px; height:16px; right:6px; position:relative} /*Window*/ .jqx-window-ui-overcast{padding: 2px;} .jqx-window-header-ui-overcast{border: 1px solid #4297d7; font-weight: bold; font-size: 11px; moz-border-radius:6px; border-radius:6px; webkit-border-radius:6px} .jqx-window-content-ui-overcast{border-width:0px !important} .jqx-window-close-button-ui-overcast{background-position:-96px -128px; background-image:url(images/overcast/ui-icons_454545_256x240.png);moz-border-radius:6px; border-radius:6px; webkit-border-radius:6px} .jqx-window-close-button-hover-ui-overcast{background-color:#fff; background-position:-96px -128px; background-image:url(images/overcast/ui-icons_70b2e1_256x240.png); cursor:pointer; width:16px; height:16px} .jqx-window-collapse-button-ui-overcast{background-position:0 -16px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} .jqx-window-collapse-button-hover-ui-overcast{background-image:url(images/overcast/ui-icons_70b2e1_256x240.png); background-color:#fff; border-radius:6px; moz-border-radius:6px; webkit-border-radius:6px} .jqx-window-collapse-button-collapsed-ui-overcast, .jqx-window-collapse-button-collapsed-hover-ui-overcast{background-position:-64px -16px} .jqx-window-modal-ui-overcast{background: #aaaaaa url(images/overcast/ui-icons_454545_256x240.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30);} /*Icons*/ .jqx-icon-arrow-up-ui-overcast{background-position:0 -16px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} .jqx-icon-arrow-down-ui-overcast{background-position:-64px -16px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} .jqx-icon-arrow-left-ui-overcast{background-position:-96px -17px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} .jqx-icon-arrow-right-ui-overcast{background-position:-32px -17px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} .jqx-icon-arrow-up-hover-ui-overcast{background-position:0 -16px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} .jqx-icon-arrow-down-hover-ui-overcast{background-position:-64px -16px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} .jqx-icon-arrow-left-hover-ui-overcast{background-position:-96px -17px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} .jqx-icon-arrow-right-hover-ui-overcast{background-position:-32px -17px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} .jqx-icon-arrow-left-selected-ui-overcast{background-position:-96px -17px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} .jqx-icon-arrow-right-selected-ui-overcast{background-position:-32px -17px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} .jqx-icon-arrow-up-selected-ui-overcast{background-position:0 -16px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} .jqx-icon-arrow-down-selected-ui-overcast{background-position:-64px -16px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} .icon-close-ui-overcast{background-image:url(images/overcast/ui-icons_454545_256x240.png); background-position:-80px -128px; cursor:pointer} .icon-close-hover-ui-overcast{background-image:url(images/overcast/ui-icons_454545_256x240.png); background-position:-80px -128px; cursor:pointer} /*Common Settings*/ .jqx-widget-ui-overcast{line-height: 17px; font-family: Trebuchet MS, Helvetica, Arial, sans-serif; font-size:12px; font-style:normal; webkit-tap-highlight-color:rgba(0,0,0,0)} .jqx-widget-content-ui-overcast{ font-family: Trebuchet MS, Helvetica, Arial, sans-serif; border-color: #aaaaaa; background: #c9c9c9 url(images/ui-bg_inset-soft_50_c9c9c9_1x100.png) 50% bottom repeat-x; color: #333333; font-size:12px} .jqx-widget-content-ui-overcast a{color:#333333} .jqx-widget-header-ui-overcast{font-family: Trebuchet MS, Helvetica, Arial, sans-serif; border-color: #bbbbbb; background: #dddddd url(images/overcast/ui-bg_glass_35_dddddd_1x400.png) 50% 50% repeat-x; color: #444444; font-size:12px} .jqx-widget-header-ui-overcast a{color:#444444} .jqx-fill-state-normal-ui-overcast{border-color: #cccccc; background: #eeeeee url(images/ui-bg_glass_60_eeeeee_1x400.png) 50% 50% repeat-x; color: #3383bb;} .jqx-fill-state-normal-ui-overcast a, .jqx-fill-state-normal-ui-overcast a:link, .jqx-fill-state-normal-ui-overcast a:visited{color:#3383bb; text-decoration:none} .jqx-fill-state-hover-ui-overcast{border-color: #bbbbbb; background: #f8f8f8 url(images/overcast/ui-bg_glass_100_f8f8f8_1x400.png) 50% 50% repeat-x; color: #599fcf;} .jqx-fill-state-hover-ui-overcast a, .jqx-fill-state-hover-ui-overcast a:hover{color:#599fcf; text-decoration:none} .jqx-fill-state-focus-ui-overcast {border-color: #555555;} .jqx-fill-state-pressed-ui-overcast{border-color: #999999; background: #999999 url(images/overcast/ui-bg_inset-hard_75_999999_1x100.png) 50% 50% repeat-x; color: #ffffff; } .jqx-fill-state-pressed-ui-overcast a, .jqx-fill-state-pressed-ui-overcast a:link, .jqx-fill-state-pressed-ui-overcast a:visited{color:#ffffff; text-decoration:none} .jqx-fill-state-disabled-ui-overcast {cursor: default; color: #000; opacity: .55; filter:Alpha(Opacity=45);} .jqx-input-button-content-ui-overcast{font-size:10px} .jqx-input-icon-ui-overcast{margin-left:2px; margin-top:-1px} .jqx-checkbox-check-checked-ui-overcast{margin-top:1px; background-position:-64px -147px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} /*Progress Bar*/ .jqx-progressbar-ui-overcast .jqx-fill-state-pressed-ui-overcast{background: #dddddd; border-bottom: none;} .jqx-progressbar-value-vertical-ui-overcast{background: #dddddd; border-right: none; border-bottom: 1px solid #cccccc;} /*ScrollBar */ .jqx-scrollbar-thumb-state-normal-ui-overcast, .jqx-scrollbar-thumb-state-normal-horizontal-ui-overcast{ border: 1px solid #cccccc; background: #eeeeee;} .jqx-scrollbar-thumb-state-hover-ui-overcast, .jqx-scrollbar-thumb-state-hover-horizontal-ui-overcast{ border: 1px solid #bbbbbb; background: #f8f8f8;} .jqx-scrollbar-thumb-state-pressed-ui-overcast, .jqx-scrollbar-thumb-state-pressed-horizontal-ui-overcast{ border: 1px solid #999999; background: #999999;} .jqx-tabs-title-selected-top-ui-overcast { border-color: #cccccc; border-bottom: 1px solid #c9c9c9; background-color: #fff; } /*applied to the tab's title when the tab is selected and the jqxTab's position property is set to 'bottom' .*/ .jqx-tabs-title-selected-bottom-ui-overcast { border-color: #cccccc; border-top: 1px solid #c9c9c9; background-color: #fff; } /*applied to the tab's selection tracker when the jqxTab's position property is set to 'top'.*/ .jqx-tabs-selection-tracker-top-ui-overcast { border-color: #cccccc; border-bottom: 1px solid #c9c9c9; } /*applied to the tab's selection tracker when the jqxTab's position property is set to 'bottom'.*/ .jqx-tabs-selection-tracker-bottom-ui-overcast { border-color: #cccccc; border-top: 1px solid #c9c9c9; } /*Slider*/ .jqx-slider-ui-overcast .jqx-fill-state-pressed-ui-overcast{background:#e1e1e1;} .jqx-slider-track-ui-overcast{border: 1px solid #aaaaaa; background: #d9d9d9;} /*Grid*/ .jqx-grid-cell-sort-ui-overcast, .jqx-grid-cell-filter-ui-overcast, .jqx-grid-cell-pinned-ui-overcast{background:#e1e1e1;} .jqx-grid-bottomright-ui-overcast, .jqx-panel-bottomright-ui-overcast, .jqx-listbox-bottomright-ui-overcast, .jqx-scrollbar-state-normal-ui-overcast{background: #e1e1e1;} .jqx-grid-cell-sort-alt-ui-overcast, .jqx-grid-cell-alt-ui-overcast, .jqx-grid-cell-filter-alt-ui-overcast{background: #e1e1e1;} .jqx-widget-ui-overcast .jqx-grid-column-header-ui-overcast, .jqx-grid-cell-ui-overcast, .jqx-widget-ui-overcast .jqx-grid-cell-ui-overcast, .jqx-widget-ui-overcast .jqx-grid-group-cell-ui-overcast, .jqx-grid-group-cell-ui-overcast{border-color:#cccccc} .jqx-grid-column-header-ui-overcast{font-weight: bold;} .jqx-grid-cell-selected-ui-overcast{border-color: #cccccc; background: #999999 url(images/overcast/ui-bg_inset-hard_75_999999_1x100.png) 50% 50% repeat-x; color: #ffffff;} .jqx-grid-group-expand-ui-overcast{background-position: 50% 50%; background-repeat: no-repeat; background-image: url(images/icon-down.png);} .jqx-grid-group-collapse-ui-overcast{background-position: 50% 50%; background-repeat: no-repeat; background-image: url(images/icon-right.png);} /*Splitter*/ .jqx-splitter-collapse-button-vertical, .jqx-splitter-collapse-button-horizontal { background: #aaaaaa; } /*Menu*/ .jqx-menu-item-top-ui-overcast { font-weight: bold; } .jqx-menu-dropdown-ui-overcast { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; right: -1px; } /*Navigation Bar*/ .jqx-navigationbar-ui-overcast{overflow: inherit;} .jqx-expander-header-ui-overcast{font-weight: bold; margin-bottom:2px; margin-top:2px} .jqx-expander-header-ui-overcast{background: #eeeeee url(images/overcast/ui-bg_glass_60_eeeeee_1x400.png) 50% 50% repeat-x; color: #3383bb; border-color: #cccccc; border-radius:6px !important; moz-border-radius:6px !important; webkit-border-radius:6px !important} .jqx-expander-header-hover-ui-overcast{background: #f8f8f8 url(images/overcast/ui-bg_glass_100_f8f8f8_1x400.png) 50% 50% repeat-x; color: #599fcf; border:1px solid #bbbbbb;} .jqx-expander-header-expanded-ui-overcast{background: #999999 url(images/overcast/ui-bg_inset-hard_75_999999_1x100.png) 50% 50% repeat-x; color: #ffffff; border:1px solid #999999; border-bottom-width:0px; border-top-left-radius:6px !important; border-top-right-radius:6px !important; moz-border-radius-topleft:6px !important; moz-border-radius-topright:6px !important; webkit-border-top-left-radius:6px !important; webkit-border-top-right-radius:6px !important; border-bottom-left-radius:0px !important; border-bottom-right-radius:0px !important; moz-border-radius-bottomleft:0px !important; moz-border-radius-bottomright:0px !important; webkit-border-bottom-left-radius:0px !important; webkit-border-bottom-right-radius:0px !important; margin-bottom:0px} .jqx-expander-content-bottom-ui-overcast{border-bottom-left-radius:6px !important; border-bottom-right-radius:6px !important; moz-border-radius-bottomleft:6px !important; moz-border-radius-bottomright:6px !important; webkit-border-bottom-left-radius:6px !important; webkit-border-bottom-right-radius:6px !important; border-top-width:0px !important} .jqx-expander-arrow-top-ui-overcast{width: 16px; height: 16px; position: relative; background-position:-64px -16px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} .jqx-expander-arrow-bottom-ui-overcast{width: 16px; height: 16px; position: relative; background-position:0 -16px; background-image:url(images/overcast/ui-icons_454545_256x240.png)} /*Scroll Bar*/ .jqx-scrollbar-ui-overcast .jqx-icon-arrow-up-ui-overcast{width: 16px; height: 16px; margin-left: auto;} .jqx-scrollbar-ui-overcast .jqx-icon-arrow-down-ui-overcast{width: 16px; height: 16px; margin-left: auto;} .jqx-scrollbar-ui-overcast .jqx-icon-arrow-left-ui-overcast{width: 16px; height: 16px; position: relative; top: 50%; margin-top: -8px;} .jqx-scrollbar-ui-overcast .jqx-icon-arrow-right-ui-overcast{width: 16px; height: 16px; position: relative; top: 50%; margin-top: -8px;}
0x6a
trunk/libraries/jqwidgets/styles/jqx.ui-overcast.css
CSS
asf20
16,433
 /*Reset Style*/ .jqx-reset { padding: 0; margin: 0; border: none; background: transparent; } /*Disable browser selection*/ .jqx-disableselect { -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -o-user-select: none; user-select: none; -ms-user-select:none; -webkit-touch-callout:none; } .jqx-disableselect .enableselect *,.jqx-disableselect .redactor_editor[contenteditable='true'] *, .jqx-disableselect *[contenteditable='true'] *{ -webkit-user-select:all; -khtml-user-select: all; -moz-user-select: all; -o-user-select: all; user-select: all; } .jqx-hideborder { border: none !important; } .jqx-hidescrollbars { overflow: hidden !important; } /*jqxButton, jqxToggleButton, jqxRepeatButton Style*/ .jqx-button{outline: none; border: 1px solid transparent; padding: 3px; text-align: center; vertical-align: central; margin: 0 0 0 0; cursor: default; } .jqx-buttongroup{} /*applied to the link button's anchor element.*/ .jqx-link { text-decoration: none; color: #111111; } /*shows elements.*/ .jqx-visible { display: block; } /*hides elements.*/ .jqx-hidden { display: none; } /*jqxGauge Style*/ .jqx-gauge-label, .jqx-gauge-caption { fill: #333333; color: #333333; font-size: 11px; font-family: Tahoma,Verdana; } /*jqxChart Style*/ .jqx-chart-axis-text, .jqx-chart-label-text, .jqx-chart-tooltip-text, .jqx-chart-legend-text { fill: #333333; color: #333333; font-size: 11px; font-family: Tahoma,Verdana; } .jqx-chart-axis-description { fill: #555555; color: #555555; font-size: 11px; font-family: Tahoma,Verdana; } .jqx-chart-title-text { fill: #111111; color: #111111; font-size: 11px; font-weight: bold; font-family: Tahoma,Verdana; } .jqx-chart-title-description { fill: #111111; color: #111111; font-size: 11px; font-weight: normal; font-family: Tahoma,Verdana; } /*applied to the Grid's element.*/ .jqx-grid { overflow: hidden; border-style: solid; border-width: 1px; } /*applied to the Pager.*/ .jqx-grid-pager { border: none; border-top: 1px solid transparent; } /*applied to the Grid's bottom-right area between the horizontal and vertical scrollbars.*/ .jqx-grid-bottomright { } /*applied to the Grid's header area.*/ .jqx-grid-header { border-style: solid; border-width: 0px 0px 1px 0px; overflow: hidden; border-color: transparent; margin: 0px; padding: 0px; } /*applied to the columns.*/ .jqx-grid-column-header { border-style: solid; border-width: 0px 1px 0px 0px; border-color: transparent; white-space: nowrap; border-style: solid; font-weight: normal; overflow: hidden; text-align: left; padding: 0px; margin: 0px; } .jqx-grid-column-header-rtl { border-width: 0px 0px 0px 1px; } /*applied to the column's button.*/ .jqx-grid-column-menubutton { border-style: solid; border-width: 0px 0px 0px 1px; border-color: transparent; background-image: url('../resources/menubutton.png'); background-repeat: no-repeat; background-position: center; cursor: pointer; } .jqx-grid-column-menubutton-rtl { border-width: 0px 1px 0px 0px; } /*applied to the column's sort button when the sort order is ascending.*/ .jqx-grid-column-sortascbutton { border: none; background-image: url('../resources/sortascbutton.png'); background-repeat: no-repeat; background-position: center; cursor: pointer; } /*applied to the column's sort button when the sort order is descending.*/ .jqx-grid-column-sortdescbutton { border: none; background-image: url('../resources/sortdescbutton.png'); background-repeat: no-repeat; background-position: center; cursor: pointer; } /*applied to the column's filter button.*/ .jqx-grid-column-filterbutton { border: none; background-image: url('../resources/filter_dark.png'); background-repeat: no-repeat; background-position: center; } /*applied to the column's resize line.*/ .jqx-grid-column-resizeline { border-right: 1px dotted #555; } /*applied to the validation popup during cell editing.*/ .jqx-grid-validation { background: #df2227; color: #fff; padding: 4px 8px; } .jqx-grid-validation-arrow-up { background-image: url('../resources/red_arrow_up.png'); background-repeat: no-repeat; background-position: center center; } .jqx-grid-validation-arrow-down { background-image: url('../resources/red_arrow_down.png'); background-repeat: no-repeat; background-position: center center; } /*applied to the column's resize start line.*/ .jqx-grid-column-resizestartline { border-right: 1px solid #444; } /*applied to the sort ascending menu item in the Grid's Context Menu*/ .jqx-grid-sortasc-icon { background-image: url('../resources/sortasc.png'); background-repeat: no-repeat; background-position: left center; width: 16px; height: 16px; float: left; margin-left: -4px; margin-right: 4px; } /*applied to the sort ascending menu item in the Grid's Context Menu*/ .jqx-grid-sortdesc-icon { background-image: url('../resources/sortdesc.png'); background-repeat: no-repeat; background-position: left center; width: 16px; height: 16px; float: left; margin-left: -4px; margin-right: 4px; } /*applied to the grid menu's sort remove item/*/ .jqx-grid-sortremove-icon { background-image: url('../resources/sortremove.png'); background-repeat: no-repeat; background-position: left center; width: 16px; height: 16px; float: left; margin-left: -4px; margin-right: 4px; } /*applied to the grouping column's drag and drop item when the drop operation is allowed.*/ .jqx-grid-drag-icon { background-image: url('../resources/drag.png'); background-repeat: no-repeat; background-position: left center; width: 16px; height: 16px; } /*applied to the grouping column's drag and drop item when the drop operation is not allowed.*/ .jqx-grid-dragcancel-icon { background-image: url('../resources/dragcancel.png'); background-repeat: no-repeat; background-position: left center; width: 16px; height: 16px; } /*applied to the 'group by' menu item.*/ .jqx-grid-groupby-icon { background-repeat: no-repeat; background-position: left center; width: 16px; height: 16px; float: left; margin-left: -4px; margin-right: 4px; } /*applied to the column anchor tags.*/ .jqx-grid-column-header a:link{ display: block; margin: 4px; height: 18px; line-height: 18px; color: inherit; outline: 0 none; text-decoration: none; cursor: pointer; } .jqx-grid-column-header a:visited{ display: block; margin: 4px; height: 18px; line-height: 18px; color: inherit; outline: 0 none; text-decoration: none; cursor: pointer; } /*applied to the groups header area.*/ .jqx-grid-groups-header, .jqx-grid-toolbar { border-style: solid; border-width: 0px 0px 1px 0px; border-color: #ccc; white-space: nowrap; overflow: hidden; text-align: left; padding: 0px; margin: 0px; } /*applied to a grouping row.*/ .jqx-grid-groups-row { font-weight:bold; white-space: nowrap; text-align: left; padding: 0px; top: 50%; margin-top: -8px; } /*applied to the row details.*/ .jqx-grid-groups-row-details { font-weight: normal; } /*applied to a grouping column.*/ .jqx-grid-group-column { border: 1px solid transparent; white-space: nowrap; border-style: solid; font-weight: normal; overflow: hidden; text-align: left; padding: 0px; margin: 0px; } /*applied to the lines between the group columns.*/ .jqx-grid-group-column-line { background: #aaa; } /*applied to the drop line indicators displayed in the grouping header.*/ .jqx-grid-group-drag-line { background: #80be09; } /*applied to the anchor tags inside a grouping column.*/ .jqx-grid-group-column a:link{ display: block; margin: 4px; height: 18px; line-height: 18px; outline: 0 none; text-decoration: none; cursor: pointer; color: inherit; *color: expression(this.parentNode.currentStyle['color']); } .jqx-grid-group-column a:visited{ color: inherit; display: block; margin: 4px; height: 18px; line-height: 18px; outline: 0 none; text-decoration: none; cursor: pointer; *color: expression(this.parentNode.currentStyle['color']); } /*applied to a grid cell*/ .jqx-grid-cell { border-style: solid; border-width: 0px 1px 1px 0px; margin-right: 1px; margin-bottom: 1px; border-color: transparent; background: #fff; white-space: nowrap; font-weight: normal; font-size: inherit; } .jqx-grid-cleared-cell { visibility: hidden; } /*applied to a grid cell that is part of a rows group.*/ .jqx-grid-group-cell{background: #fff;} /*applied to the grid cells in the sort column*/ .jqx-grid-cell-sort { background-color: #f0f0f0; } /*applied to the grid cells in the filter column*/ .jqx-grid-cell-filter { background-color: #e6e6e6; } /*applied to the grid cells area.*/ .jqx-grid-content { border-style: solid; border-width: 0px 0px 0px 0px; border-color: transparent; white-space: nowrap; overflow: hidden; } /*applied to a grid cell that is part of a rows group.*/ .jqx-grid-group-cell, .jqx-grid-empty-cell { border-style: solid; border-width: 0px 0px 1px 0px; white-space: nowrap; font-weight: normal; } .jqx-grid-cell-wrap {white-space: normal;} /*applied to a grid cell that is part of a details row and grouping is enabled.*/ .jqx-grid-group-details-cell { } /*applied to a grid cell that is part of a details row.*/ .jqx-grid-details-cell { border-width: 0px 1px 0px 0px; } /*applied to a grid cell. Represents the alternating cell background.*/ .jqx-grid-cell-alt { background: #f9f9f9; } /*applied to a sorted and alternating grid cell*/ .jqx-grid-cell-sort-alt { background-color: #e5e5e5; }/*applied to a sorted and alternating grid cell*/ .jqx-grid-cell-filter-alt { background-color: #f0f0f0; } /*applied to a pinned grid cell.*/ .jqx-grid-cell-pinned { background-color: #e5e5e5; } /*applied to a pinned grid cell. Represents the alternating cell background.*/ .jqx-grid-cell-pinned-alt { background-color: #e5e5e5; } /*applied to a selected grid cell.*/ .jqx-grid-cell-selected { border-left: 0px solid transparent; } .jqx-grid-cell-rtl { border-width: 0px 0px 1px 1px; } /*applied to the selection area.*/ .jqx-grid-selectionarea { border: 1px solid transparent; opacity: 0.5; filter: alpha(opacity=50); } /*applied to a hovered grid cell.*/ .jqx-grid-cell-hover { border-color: transparent; } /*applied to a grid cell when the grid is empty.*/ .jqx-grid-empty-cell{ overflow: visible; border-bottom: none;} /*applied to the Grid when its loading the data.*/ .jqx-grid-load { padding-right: 0px; background-image: url(../resources/loader.gif); background-position: 50% 50%; background-repeat: no-repeat; z-index: 9999; } /*applied to a group's collapse button.*/ .jqx-grid-group-collapse { padding-right: 0px; background-image: url(images/icon-right.png); background-position: 50% 50%; background-repeat: no-repeat; cursor: pointer; } .jqx-grid-group-collapse-rtl { padding-right: 0px; background-image: url(images/icon-left.png); background-position: 50% 50%; background-repeat: no-repeat; cursor: pointer; } /*applied to a group's expand button.*/ .jqx-grid-group-expand, .jqx-grid-group-expand-rtl { padding-right: 0px; background-image: url(images/icon-down.png); background-position: 50% 50%; background-repeat: no-repeat; cursor: pointer; } /*jqxProgresBar Style*/ .jqx-progressbar { overflow: hidden; outline: none; border: 1px solid transparent; height: 2em; } /*applied to the progressbar's value element*/ .jqx-progressbar-value { outline: none; border: 0px solid transparent; height: 100%; } /*applied to the progress bar's vertical value element- when the widget's orientation is 'vertical'*/ .jqx-progressbar-value-vertical { outline: none; border: 0px solid transparent; height: 100%; background: transparent; } /*applied to the progressbar's text element*/ .jqx-progressbar-text { font-size: 10px; border: none; } /*applied to the progress bar when the widget is in disabled state*/ .jqx-progressbar-disabled { outline: none; border: 1px solid transparent; height: 2em; } /*jqxMenu Style*/ .jqx-menu { border: 1px solid transparent; float: none; margin: 0px; height: 100%; padding: 0px; overflow: hidden; text-align: left; } .jqx-menu-dropdown-column { float: left; } /*applied to the menu when it is horizontal. Sets the menu's background*/ .jqx-menu-horizontal { margin: 0px; padding: 0px; overflow: hidden; text-align: center; } /*applied to the menu when it is vertical. Sets the menu's background*/ .jqx-menu-vertical { text-align: left; } /*applied to the sub menu. Sets the sub menu's background*/ .jqx-menu-dropdown { left: 100%; margin: 0px; padding: 0px; right: 0; overflow: hidden; display: none; float: none; width: 150px; border-style: solid; border-width: 1px; text-align: left; padding: 2px; } /*applied to the sub menu's ul elements.*/ .jqx-menu-dropdown ul { left: 100%; margin: 0px; padding: 0px; right: 0; overflow: hidden; border: none; } /*applied to the menu's ul elements.*/ .jqx-menu ul { left: 100%; margin: 0px; padding: 2px; right: 0; overflow: hidden; background-color: transparent; border: none; } /*applied to the menu's li elements.*/ .jqx-menu li, .jqx-menu-dropdown li { line-height: 1.3; } /*applied to the top level menu items.*/ .jqx-menu-item-top { border: 1px solid transparent; text-indent: 0; list-style: none; padding: 4px 8px 4px 8px; left: 100%; overflow: hidden; color: inherit; right: 0; margin: 0px 1px 0px 1px; cursor: pointer; } /*applied to the sub menu items.*/ .jqx-menu-item { text-indent: 0; list-style: none; padding: 4px 8px 4px 8px; margin: 1px 1px 1px 1px; float: none; overflow: hidden; left: 100%; color: inherit; right: 0; text-align: left; cursor: pointer; *color: expression(this.parentNode.currentStyle['color']); } /*applied to a sub menu item when the mouse is over the item.*/ .jqx-menu-item-hover { color: inherit; right: 0; list-style: none; margin: 1px 1px 1px 1px; left: 100%; padding: 4px 8px 4px 8px; text-align: left; cursor: pointer; *color: expression(this.parentNode.currentStyle['color']); } /*applied to a top-level menu item when the mouse is over it.*/ .jqx-menu-item-top-hover { color: inherit; right: 0; list-style: none; margin: 0px 1px 0px 1px; left: 100%; padding: 4px 8px 4px 8px; top: 50%; cursor: pointer; *color: expression(this.parentNode.currentStyle['color']); } /*applied to a sub menu item when its sub menu is opened.*/ .jqx-menu-item-selected { right: 0; list-style: none; margin: 1px 1px 1px 1px; left: 100%; padding: 4px 8px 4px 8px; text-align: left; cursor: pointer; *color: expression(this.parentNode.currentStyle['color']); } /*applied to a disabled sub menu item.*/ .jqx-menu-item-disabled { } /*applied to a top-level menu item when its sub menu is opened.*/ .jqx-menu-item-top-selected { right: 0; list-style: none; margin: 0px 1px 0px 1px; left: 100%; padding: 4px 8px 4px 8px; cursor: pointer; } /*applied to the menu separator items.*/ .jqx-menu-item-separator { text-indent: 0; background-color: #ddd; border: none; list-style: none; height: 1px; line-height:0; padding: 0px; margin: 1px 2px 1px 2px; float: none; overflow: hidden; left: 100%; color: inherit; right: 0; font-size: 1px; } /*applied to a sub menu item when it has sub menu items. Displays right arrow icon.*/ .jqx-menu-item-arrow-right { padding-right: 0px; margin-right: -8px; width: 17px; height: 15px; background-image: url(images/icon-right.png); background-position: 100% 50%; background-repeat: no-repeat; } /*applied to a sub menu item when it has sub menu items. Displays down arrow icon.*/ .jqx-menu-item-arrow-down { padding-right: 0px; margin-right: -8px; width: 17px; height: 15px; background-image: url(images/icon-down.png); background-position: 100% 50%; background-repeat: no-repeat; } /*applied to a sub menu item when it has sub menu items. Displays up arrow icon.*/ .jqx-menu-item-arrow-up { padding-right: 0px; margin-right: -8px; width: 17px; height: 15px; background-image: url(images/icon-up.png); background-position: 100% 50%; background-repeat: no-repeat; } /*applied to a sub menu item when it has sub menu items. Displays left arrow icon.*/ .jqx-menu-item-arrow-left { padding-right: 0px; padding-left: 5px; width: 17px; height: 15px; background-image: url(images/icon-left.png); background-position: 0 50%; background-repeat: no-repeat; } /*applied to a sub menu item when it has sub menu items and its sub menu is opened. Displays right arrow icon.*/ .jqx-menu-item-arrow-right-selected { padding-right: 0px; margin-right: -8px; width: 17px; height: 15px; background-image: url(images/icon-right.png); background-position: 100% 50%; background-repeat: no-repeat; } /*applied to a sub menu item when it has sub menu items and its sub menu is opened. Displays down arrow icon.*/ .jqx-menu-item-arrow-down-selected { padding-right: 0px; margin-right: -8px; width: 17px; height: 15px; background-image: url(images/icon-down.png); background-position: 100% 50%; background-repeat: no-repeat; } /*applied to a sub menu item when it has sub menu items and its sub menu is opened. Displays up arrow icon.*/ .jqx-menu-item-arrow-up-selected { padding-right: 0px; margin-right: -8px; width: 17px; height: 15px; background-image: url(images/icon-up.png); background-position: 100% 50%; background-repeat: no-repeat; } /*applied to a sub menu item when it has sub menu items and its sub menu is opened. Displays left arrow icon.*/ .jqx-menu-item-arrow-left-selected { padding-right: 0px; padding-left: 5px; width: 17px; height: 15px; background-image: url(images/icon-left.png); background-position: 0 50%; background-repeat: no-repeat; } /*applied to a top-level menu item when it has sub menu items. Displays right arrow icon.*/ .jqx-menu-item-arrow-top-right { padding-right: 0px; margin-right: -8px; width: 17px; height: 15px; background-image: url(images/icon-right.png); background-position: 100% 50%; background-repeat: no-repeat; } /*applied to a top-level menu item when it has sub menu items. Displays left arrow icon.*/ .jqx-menu-item-arrow-top-left { padding-right: 0px; padding-left: 5px; width: 17px; height: 15px; background-image: url(images/icon-left.png); background-position: 0 50%; background-repeat: no-repeat; } /*applied to the anchor elements of a sub menu item.*/ .jqx-menu-item a:link, .jqx-menu-item a:visited { border: none; background-color: transparent; outline: none; color: inherit; text-decoration: none; *color: expression(this.parentNode.currentStyle['color']); } /*applied to the anchor elements of a sub menu item.*/ .jqx-menu-item a:hover { text-decoration: none; color: inherit; outline: none; background-color: transparent; *color: expression(this.parentNode.currentStyle['color']); } /*applied to the anchor elements of a top-level menu item.*/ .jqx-menu-item-top a:link { border: none; background-color: transparent; outline: none; color: inherit; text-decoration: none; *color: expression(this.parentNode.currentStyle['color']); } /*applied to the anchor elements of a top-level menu item.*/ .jqx-menu-item-top a:visited { border: none; background-color: transparent; outline: none; color: inherit; text-decoration: none; *color: expression(this.parentNode.currentStyle['color']); } /*applied to the anchor elements of a top-level menu item.*/ .jqx-menu-item-top a:hover { text-decoration: none; color: inherit; outline: none; background-color: transparent; border: none; *color: expression(this.parentNode.currentStyle['color']); } /*applied to the menu widget when it is disabled.*/ .jqx-menu-disabled { cursor: default; } /*applied to the anchor elements of all disabled menu items.*/ .jqx-menu-disabled a:link { cursor: default; text-decoration: none; } .jqx-menu-disabled a:visited { cursor: default; text-decoration: none; } .jqx-menu-disabled a:hover { cursor: default; } .jqx-menu-dropdown { right: -1px; } /*jqxtree Style*/ .jqx-tree { left: 100%; right: 0; float: none; margin: 0px; border-style: solid; border-width: 1px; padding: 0px; overflow: hidden; text-align: left; outline: none; white-space: nowrap; line-height: 14px; } /*applied to the jqxTree root UL element.*/ .jqx-tree-dropdown-root { left: 100%; padding: 0px 5px 0px 5px; right: 0; display: block; float: none; background-color: transparent; border-style: solid; border-width: 0px; border-color: #fff; text-align: left; outline: none; white-space: nowrap; } .jqx-tree-dropdown-root-rtl { padding: 0px 5px 0px 0px; text-align: right; float: right; } /*applied to the jqxTree UL elements.*/ .jqx-tree-dropdown { left: 100%; margin: 0px; padding: 0px 0px 0px 10px; right: 0; display: block; float: none; background-color: transparent; border-style: solid; border-width: 0px; border-color: transparent; text-align: left; outline: none; } .jqx-tree-dropdown-rtl { padding: 0px 0px 0px 0px; text-align: right; } /*applied to a tree item.*/ .jqx-tree-item { text-indent: 0; list-style: none; padding: 3px; margin: 0px; float: none; overflow: hidden; left: 100%; right: 0; text-align: left; cursor: default; text-decoration: none; } /*applied to the jqxTree LI elements.*/ .jqx-tree-item-li { text-indent: 0; background-color: transparent; border: 0px solid transparent; list-style: none; left: 100%; right: 0; text-align: left; outline: none; margin: 0px; margin-top: 1px; padding: 0px; } /*applied to the last LI elements in an UL element.*/ .jqx-tree-item-u-last { margin: 0px 0px 0px 0px; } /*applied to a tree item when the mouse is over the item.*/ .jqx-tree-item-hover { color: inherit; right: 0; padding: 3px; margin: 0px; list-style: none; left: 100%; cursor: pointer; text-decoration: none; } /*applied to a tree item when the item is selected.*/ .jqx-tree-item-selected { color: inherit; right: 0; padding: 3px; margin: 0px; list-style: none; left: 100%; cursor: pointer; text-decoration: none; } .jqx-tree-item-rtl { text-align: right; } .jqx-tree-item-li-rtl { text-align: right; } /*applied to the anchor element of a tree item.*/ .jqx-tree-item a:link { text-indent: 0; background-color: transparent; border: 0px solid transparent; list-style: none; padding: 0px; margin: 0px; float: none; overflow: hidden; left: 100%; color: inherit; right: 0; text-align: left; cursor: pointer; text-decoration: none; outline: none; } .jqx-tree-item-selected, .jqx-tree-item-hover a:hover { color: inherit; } .jqx-tree-item-selected, .jqx-tree-item-hover a:visited { color: inherit; } /*applied to a tree item when the item is disabled.*/ .jqx-tree-item-disabled { } /*applied to a tree item when it has sub items and is collapsed. Displays an arrow icon next to the item.*/ .jqx-tree-item-arrow-collapse, .jqx-tree-item-arrow-collapse-hover { padding-right: 0px; width: 17px; height: 17px; background-image: url(images/icon-right.png); background-position: 100% 50%; background-repeat: no-repeat; cursor: pointer; } .jqx-tree-item-arrow-collapse-rtl, .jqx-tree-item-arrow-collapse-hover-rtl { background-image: url(images/icon-left.png); } /*applied to a tree item when it has sub items and is expanded. Displays an arrow icon next to the item.*/ .jqx-tree-item-arrow-expand, .jqx-tree-item-arrow-expand-hover { padding-right: 0px; width: 17px; height: 17px; background-image: url(images/icon-down.png); background-position: 100% 50%; background-repeat: no-repeat; cursor: pointer; } /*applied to the tree when it is disabled.*/ .jqx-tree-disabled { cursor: default; } /*applied to the anchor elements in a tree when it is disabled.*/ .jqx-tree-disabled a:link { cursor: default; text-decoration: none; } .jqx-tree-disabled a:visited { cursor: default; text-decoration: none; } .jqx-tree-disabled a:hover { cursor: default; } /*jqxTabs*/ .jqx-tabs { outline: none; margin: 0 0 0 0; padding: 0px; overflow: hidden; background: transparent; border: 1px solid transparent; } /*applied to the tab close button.*/ .jqx-tabs-close-button { outline: none; background-image: url(images/close.png); cursor: pointer; margin: 0 0 0 0; padding: 0 0 0 0; position: relative; left: 5px; } /*applied to the tab close button when the tab is selected.*/ .jqx-tabs-close-button-selected { outline: none; background-image: url(images/close.png); cursor: pointer; margin: 0 0 0 0; padding: 0 0 0 0; } /*applied to the tab close button when the mouse is over the tab.*/ .jqx-tabs-close-button-hover { outline: none; background-image: url(images/close.png); cursor: pointer; margin: 0 0 0 0; padding: 0 0 0 0; } /*applied to the tab's left scroll arrow.*/ .jqx-tabs-arrow-left { outline: none; position: relative; z-index: 15; float: left; cursor: pointer; margin: 0 0 0 0; padding: 0 0 0 0; background-image: url('images/icon-left.png'); background-repeat: no-repeat; background-position: center; } /*applied to the tab's right scroll arrow.*/ .jqx-tabs-arrow-right { outline: none; position: relative; z-index: 15; background-image: url('images/icon-right.png'); background-repeat: no-repeat; background-position: center; float: left; cursor: pointer; margin: 0 0 0 0; padding: 0 0 0 0; } .jqx-tabs-arrow-background { background: #eeeeee; } /*applied to the tab's title.*/ .jqx-tabs-title { outline: none; display: block; cursor: pointer; white-space: nowrap; left: 100%; right: 0; text-indent: 0px; list-style: none; border: 1px solid transparent; margin: 0px 2px 0px 0px; overflow: hidden; z-index: 1; padding-left: 13px; padding-right: 13px; padding-bottom: 5px; padding-top: 5px; background: transparent; height: auto; position: relative; } .jqx-tabs-title-bottom { } .jqx-tabs-title a:link { color: inherit; *color: expression(this.parentNode.currentStyle['color']); text-decoration: none; } .jqx-tabs-title a:hover { color: inherit; *color: expression(this.parentNode.currentStyle['color']); text-decoration: none; } .jqx-tabs-title a:active { color: inherit; *color: expression(this.parentNode.currentStyle['color']); text-decoration: none; } .jqx-tabs-title a:visited { color: inherit; *color: expression(this.parentNode.currentStyle['color']); text-decoration: none; } /*applied to the tab's title when the tab is selected and the jqxTab's position property is set to 'top' .*/ .jqx-tabs-title-selected-top { z-index: 99; outline: none; border-top: 1px solid transparent; border-left: 1px solid transparent; border-right: 1px solid transparent; border-bottom: 1px solid #fff; background-color: #fff; padding-bottom: 7px; } /*applied to the tab's title when the tab is selected and the jqxTab's position property is set to 'bottom' .*/ .jqx-tabs-title-selected-bottom { outline: none; border-top: 1px solid #fff; border-left: 1px solid transparent; border-right: 1px solid transparent; border-bottom: 1px solid transparent; padding-top: 7px; padding-bottom: 5px; margin-top: -2px; background-color: #fff; } /*applied to the tab's title when the tab is hovered and the jqxTab's position property is set to 'top' .*/ .jqx-tabs-title-hover-top { outline: none; border: 1px solid transparent; padding-bottom: 5px; } /*applied to the tab's title when the tab is hovered and the jqxTab's position property is set to 'bottom' .*/ .jqx-tabs-title-hover-bottom { outline: none; border: 1px solid transparent; padding-top: 5px; } /*applied to the tab's title when the tab is disabled.*/ .jqx-tabs-title-disable { } /*applied to the tab's header.*/ .jqx-tabs-header { padding-left: 0px; padding-right: 0px; padding-top: 3px; padding-bottom: 1px; margin: 0px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-right: 0px solid transparent; border-bottom: 1px solid #aaa; background: #eeeeee; } /*applied to the tab's header when the position is bottom.*/ .jqx-tabs-header-bottom { padding-top: 1px; padding-bottom: 3px; border-top: 0px solid #aaa; border-left: 0px solid transparent; border-right: 0px solid transparent; border-bottom: 1px solid transparent; } /*applied to the tab's header when the tab is collapsed.*/ .jqx-tabs-header-collapsed { border: 1px solid #aaa; } /*applied to the tab's header when the position is bottom and tab is collapsed.*/ .jqx-tabs-header-collapsed-bottom { border: 1px solid #aaa; } .jqx-tabs-collapsed { border: 0px solid transparent; } .jqx-tabs-collapsed-bottom { border: 0px solid transparent; } /*applied to the tab's selection tracker container element.*/ .jqx-tabs-selection-tracker-container { outline: none; position: relative; text-indent: 0px; margin: 0 0 0 0; padding: 0 0 0 0; width: 100%; background: transparent; height: 0px; } /*applied to the tab's selection tracker when the jqxTab's position property is set to 'top'.*/ .jqx-tabs-selection-tracker-top { border-top: 1px solid transparent; border-left: 1px solid transparent; border-right: 1px solid transparent; padding-bottom: 2px; background-color: #fff; outline: none; position: absolute; z-index: 10; } /*applied to the tab's selection tracker when the jqxTab's position property is set to 'bottom'.*/ .jqx-tabs-selection-tracker-bottom { border-left: 1px solid transparent; border-right: 1px solid transparent; border-bottom: 1px solid transparent; background-color: #fff; outline: none; position: absolute; z-index: 10; margin-top: -1px; padding-bottom: 2px; } /*applied to the tab's content element which represents a DIV element.*/ .jqx-tabs-content { outline: none; border-bottom: 0px solid transparent; border-left: 0px solid transparent; border-right: 0px solid transparent; border-top: 0px solid transparent; text-align: left; clear: both; } .jqx-tabs-content-element { height: 100%; overflow: auto; } /*jqxCheckBox*/ .jqx-checkbox { text-align: left; border: none; outline: none; margin: 0 0 0 0; white-space: nowrap; text-overflow: ellipsis; } /*applied to the check box.*/ .jqx-checkbox-default { text-align: left; float: left; padding: 0px; border: 1px solid transparent; outline: none; margin: 0px 3px 0px 3px; } /*applied to the check box when the mouse cursor is over it.*/ .jqx-checkbox-hover { cursor: pointer; float: left; padding: 0px; border: 1px solid transparent; outline: none; margin: 0px 3px 0px 3px; } /*applied to the widget when it is disabled.*/ .jqx-checkbox-disabled { cursor: default; background: transparent; padding: 0px; border: none; outline: none; margin: 0px 0px 0px 0px; } /*applied to the check box when the widget is disabled.*/ .jqx-checkbox-disabled-box { float: left; padding: 0px; border: 1px solid transparent; outline: none; margin: 0px 3px 0px 3px; } /*applied to the check box when it is checked. Displays a check icon.*/ .jqx-checkbox-check-checked { float: left; background: transparent url(images/check_black.png) center center no-repeat; padding: 0px; border: none; outline: none; margin: 0 0 0 0; } /*applied to the check box when the widget is disabled. Displays a disabled check icon.*/ .jqx-checkbox-check-disabled { float: left; background: transparent url(images/check_disabled.png) center center no-repeat; padding: 0px; border: none; outline: none; margin: 0 0 0 0; } /*applied to the check box when its state is indeterminate.*/ .jqx-checkbox-check-indeterminate { float: left; background: transparent url(images/check_indeterminate_black.png) center center no-repeat; padding: 0px; border: none; outline: none; margin: 0 0 0 0; } /*applied to the check box when its state is indeterminate and it is disabled.*/ .jqx-checkbox-check-indeterminate-disabled { float: left; background: transparent url(images/check_indeterminate_disabled.png) center center no-repeat; padding: 0px; border: none; outline: none; margin: 0 0 0 0; } /*applied to the check box when its in rtl mode.*/ .jqx-checkbox-rtl { float: right; } /*jqxRadioButton*/ .jqx-radiobutton { text-overflow: ellipsis; border: none; outline: none; margin: 0 0 0 0; white-space: nowrap; } /*applied to the radio button.*/ .jqx-radiobutton-default { cursor: pointer; float: left; background: transparent url(images/roundbg_classic_normal.png) left center scroll repeat-x; padding: 0px; border: 1px solid transparent; outline: none; margin: 1px 3px 0px 3px; -moz-border-radius: 7px; -webkit-border-radius: 7px; border-radius: 7px; } /*applied to the radio button when the mouse is over it.*/ .jqx-radiobutton-hover { cursor: pointer; float: left; background: transparent; padding: 0px; border: 1px solid transparent; outline: none; margin: 1px 3px 0px 3px; -moz-border-radius: 7px; -webkit-border-radius: 7px; border-radius: 7px; } /*applied to the radio button when it is disabled.*/ .jqx-radiobutton-disabled { cursor: default; } /*applied to the radio button's radio icon when it is disabled.*/ .jqx-radiobutton-disabled-box { } /*applied to the radio button when it is checked.*/ .jqx-radiobutton-check-checked { float: left; background: transparent url(images/roundbg_check_black.png) left top no-repeat; padding: 0px; border: 1px solid transparent; outline: none; margin: 0 0 0 0; -moz-border-radius: 7px; -webkit-border-radius: 7px; border-radius: 7px; width: 7px; height: 7px; margin-left: 2px; margin-top: 2px; } /*applied to the radio button when it is checked and disabled.*/ .jqx-radiobutton-check-disabled { } /*applied to the radio button when it is in indeterminate state.*/ .jqx-radiobutton-check-indeterminate { float: left; background: transparent url(images/roundbg_check_indeterminate.png) left top no-repeat; padding: 0px; border: none; outline: none; margin: 0 0 0 0; -moz-border-radius: 7px; -webkit-border-radius: 7px; border-radius: 7px; width: 6px; height: 6px; margin-left: 2px; margin-top: 2px; } /*applied to the radio button when it is in indeterminate state and disabled.*/ .jqx-radiobutton-check-indeterminate-disabled { } /*applied to the radio button when its in rtl mode.*/ .jqx-radiobutton-rtl { float: right; } /*jqxRating*/ .jqx-rating { margin: 0px; padding: 0px; outline: none; overflow: hidden; } .jqx-rating-image { border-width: 0px; } .jqx-rating-image-default { margin: 0px; padding: 0px; outline: none; background-color: transparent; background-repeat: no-repeat; cursor: pointer; background-image: url(images/star.png); overflow: hidden; } /*applied to the rating when it is hovered.*/ .jqx-rating-image-hover { background-color: transparent; padding: 0px; background-repeat: no-repeat; cursor: pointer; background-image: url(images/star_hover.png); overflow: hidden; } /*applied to the rating when it is disabled.*/ .jqx-rating-image-backward { background-color: transparent; padding: 0px; background-repeat: no-repeat; cursor: pointer; background-image: url(images/star_disabled.png); overflow: hidden; } /*jqxCalendar Style*/ .jqx-calendar { border: 1px solid transparent; -webkit-appearance: none; overflow: hidden; outline: none; padding: 0px; margin: 0 0 0 0; cursor: default; border-collapse: separate; } /*applied to the calendar's row header. This header displays the week numbers.*/ .jqx-calendar-row-header { outline: none; border: 0px solid #f2f2f2; padding: 0; margin: 0 0 0 0; cursor: default; } /*applied to the calendar's column. This header displays the day names.*/ .jqx-calendar-column-header { outline: none; text-align: right; padding: 3; border-top: none; border-bottom: 1px solid transparent; border-left: none; border-right: none; margin: 0 0 0 0; cursor: default; } /*applied to the calendar's top-left header. This header is displayed before the day names and above the week numbers.*/ .jqx-calendar-top-left-header { outline: none; border: 0px solid #f2f2f2; margin: 0 0 0 0; cursor: default; } /*applied to the calendar's navigation buttons.*/ .jqx-calendar-title-navigation { cursor: pointer; background-color: transparent; margin: 0; padding: 0; border: none; width: 25px; height: 25px; } /*applied to the month table*/ .jqx-calendar-month { margin: 0; padding: 0; border: none; width: 100%; } /*applied to the calendar's title content.*/ .jqx-calendar-title-content { cursor: pointer; } /*applied to the calendar's navigation title.*/ .jqx-calendar-title-header { border-left: none; border-top: none; border-right: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0 0 0 0; } /*applied to the calendar's navigation title when the calendar is disabled.*/ .jqx-calendar-title-header-disabled { border-bottom-width: 1px; border-bottom-style:solid; margin: 0 0 0 0; border-left: 0px solid transparent; border-right: 0px solid transparent; border-top: 0px solid transparent; } /*applied to a calendar cell.*/ .jqx-calendar-cell { border: 1px solid transparent; margin: 0px; outline: none; text-align: center; padding: 1px; cursor: pointer; background-color: transparent; } .jqx-calendar-cell td { padding: 0; margin: 0; } /*applied to a calendar cell in decade and year views.*/ .jqx-calendar-cell-decade, .jqx-calendar-cell-year { text-align: center; } .jqx-calendar .jqx-fill-state-normal { background: transparent; border: 1px solid transparent; } /*applied to a calendar cell when the cell is hidden. A cell can be hidden when the showOtherMonthDays property is false and the calendar hides the cells with dates from the other months*/ .jqx-calendar-cell-hidden { margin: 0 0 0 0; visibility: hidden; cursor: default; } /*applied to a calendar cell when the cell's date is a weekend date.*/ .jqx-calendar-cell-weekend { color: #898989; margin: 0 0 0 0; cursor: pointer; } /*applied to a calendar cell when the cell's date is a special date(holiday, vacation, birthay. See the SpecialDates demo).*/ .jqx-calendar-cell-specialDate { color: #FF0000; background-color: transparent; border: 1px solid #FFFFFF; margin: 0 0 0 0; cursor: pointer; } /*applied to a calendar cell when the cell's date is the today date.*/ .jqx-calendar-cell-today { color: #898989; background-color: #ffffdb; border: 1px solid #fdc066; margin: 0 0 0 0; cursor: pointer; } /*applied to a calendar cell when the cell is hovered.*/ .jqx-calendar-cell-hover { margin: 0 0 0 0; cursor: pointer; } /*applied to a calendar cell when the cell is selected.*/ .jqx-calendar-cell-selected { margin: 0 0 0 0; cursor: pointer; } /*applied to a calendar cell when the cell's date represents a date from the previous or next month.*/ .jqx-calendar-cell-othermonth { color: #898989; margin: 0 0 0 0; cursor: pointer; } /*applied to a calendar cell when the calendar is disabled.*/ .jqx-calendar-cell-disabled { color: #ccc; } /*applied to a calendar cell when the cell is from the row header that displays the week numbers.*/ .jqx-calendar-row-cell { outline: none; text-align: center; border: 1px solid transparent; margin: 0 0 0 0; cursor: default; } /*applied to a calendar cell when the cell is from the row header that displays the week numbers and the calendar is disabled.*/ .jqx-calendar-row-cell-disabled { } .jqx-calendar-footer { margin: 5px; color: inherit; font-size: 11px; } .jqx-calendar-title-container { overflow: hidden; } /*applied to a calendar cell when the cell is from the column header that displays the day names.*/ .jqx-calendar-column-cell { overflow: hidden; text-align: center; outline: none; font-weight: normal; padding: 1px; border: 1px solid transparent; margin: 0 0 0 0; cursor: default; } /*applied to a calendar cell when the cell is from the column header that displays the day names and the calendar is disabled.*/ .jqx-calendar-column-cell-disabled { } /*applied to the calendar's cell area element.*/ .jqx-calendar-view { -webkit-appearance: none; outline: none; padding: 0px; border: 0px solid #FFFFFF; margin: 0 0 0 0; cursor: default; } /*jqxExpander and jqxNavigationBar Style*/ .jqx-expander { } /*applied to the Expander's header and content*/ .jqx-expander-header, .jqx-expander-content { border-left-width: 1px; border-right-width: 1px; border-left-style: solid; border-right-style: solid; padding-top: 5px; padding-bottom: 5px; outline: 0; } /*applid to the content of the expander header.*/ .jqx-expander-header-content { padding-left: 3px; } /*applid to the content of the expander header.*/ .jqx-expander-header-content-rtl { padding-right: 3px; } .jqx-expander-content{padding-top: 0px;padding-bottom:0px; overflow: auto; outline: 0;} /*applied to the Expander's header and its content when it is on the top of the header*/ .jqx-expander-header, .jqx-expander-content-top { border-top-width: 1px; border-top-style: solid; } /*applied to the Expander's header and its content when it is on the bottom of the header*/ .jqx-expander-header, .jqx-expander-content-bottom { border-bottom-width: 1px; border-bottom-style: solid; } /*applied to the Expander's header*/ .jqx-expander-header { cursor: pointer; overflow: hidden; } /*applied to the Expander's header when the expander is disabled or the toggleMode is "none"*/ .jqx-expander-header-disabled { cursor: default; } /*applied to the Expander's arrow*/ .jqx-expander-arrow { width: 17px; height: 17px; position: relative; } /*applied to the Expander's content if it is empty*/ .jqx-expander-content-empty { border-width: 0px; padding: 0px; } /*applied to jqxNavigationBar. The NavigationBar internally uses jqxExpander's classes and inherits all header and content style settings from the Expander.*/ .jqx-navigationbar { border: none; margin: 0px; -webkit-appearance: none; outline: none; } /*jqxPanel Style*/ .jqx-panel { border: 1px solid transparent; -webkit-appearance: none; outline: none; padding: 0px; margin: 0px; cursor: default; overflow: hidden; } /*applied to the Panel's element displayed when the horizontal and vertical scrollbars are visible and the element is positioned below the vertical scrollbar and on the right of the horizontal scrollbar.*/ .jqx-panel-bottomright { } /*applied to the DropDownButton's Popup.*/ .jqx-popup { -webkit-appearance: none; outline: none; border: 1px solid transparent; } .jqx-listbox { -webkit-appearance: none; outline: none; border: 1px solid transparent; padding: 0px; margin: 0px; cursor: default; } /*applied to the ListBox's element displayed when the horizontal and vertical scrollbars are visible and the element is positioned below the vertical scrollbar and on the right of the horizontal scrollbar.*/ .jqx-listbox-bottomright { } /*applied to the ListBox's groups.*/ .jqx-listitem-state-group { white-space: nowrap; padding: 4px 2px 4px 2px; background: transparent; font-weight: bold; text-align: left; outline: none; overflow: hidden; vertical-align: middle; } /*applied to a list item in default state.*/ .jqx-listitem-state-normal { white-space: nowrap; padding: 3px; margin: 1px; border: 1px solid transparent; outline: none; visibility: inherit; display: inherit; text-align: left; overflow: hidden; position: absolute; left: 0; top: 0; } /*applied to a list item in hovered state.*/ .jqx-listitem-state-hover { white-space: nowrap; background: transparent; padding: 3px 3px 2px 3px; margin: 1px; border: 1px solid transparent; } /*applied to a list item when the item is selected.*/ .jqx-listitem-state-selected { white-space: nowrap; padding: 3px 3px 2px 3px; margin: 1px; border: 1px solid transparent; } .jqx-listbox-feedback { height: 1px; border-top: 1px dashed #000; } .jqx-listitem-element { -ms-touch-action: none; border: none; width:100%; height: 100%; align:left; valign:top; position: absolute; } /*jqxComboBox Style*/ /*applied to the jqxComboBox's content which displays the text.*/ .jqx-combobox-content { padding: 0px; overflow: hidden; padding-left: 0px; padding-top: 0px; padding-bottom: 0px; padding-right: 0px; margin: 0px; text-align: left; vertical-align: middle; white-space: nowrap; -webkit-appearance: none; outline: none; border: none; -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; border-right: 1px solid transparent; -moz-background-clip: padding; background-clip: padding-box; -webkit-background-clip: padding-box; } .jqx-combobox-content-rtl { border: none; -moz-border-radius-topleft: 0px; -webkit-border-top-left-radius: 0px; border-top-left-radius: 0px; -moz-border-radius-bottomleft: 0px; -webkit-border-bottom-left-radius: 0px; border-bottom-left-radius: 0px; -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 0px; border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 0px; border-bottom-right-radius: 3px; border-right: none; border-left: 1px solid transparent; -moz-background-clip: padding; background-clip: padding-box; -webkit-background-clip: padding-box; } /*applied to the ComboBox's input field.*/ .jqx-combobox-input { -webkit-appearance: none; -webkit-border-radius: 0px; padding: 0 0 0 0; outline: none; border: 0px solid #aaaaaa; -moz-background-clip: padding; background-clip: padding-box; -webkit-background-clip: padding-box; } .jqx-combobox-input::-ms-clear { display: none; } /*applied to the ComboBox's content when the widget is disabled.*/ .jqx-combobox-content-disabled { color: #AAA; } /*applied to the ComboBox's arrow button.*/ .jqx-combobox-arrow-normal { -webkit-appearance: none; outline: none; overflow: hidden; margin: 0 0 0 0; border: none; } /*applied to the ComboBox's arrow button when the mouse is over the button.*/ .jqx-combobox-arrow-hover { -webkit-appearance: none; outline: none; overflow: hidden; margin: 0 0 0 0; } /*applied to the ComboBox's arrow button when the ComboBox's popup is opened.*/ .jqx-combobox-arrow-selected { -webkit-appearance: none; outline: none; overflow: hidden; margin: 0 0 0 0; } /*applied to the ComboBox in normal state.*/ .jqx-combobox-state-normal { -webkit-appearance: none; outline: none; border: 1px solid transparent; overflow: hidden; margin: 0 0 0 0; } /*applied to the ComboBox when the mouse is over the widget.*/ .jqx-combobox-state-hover { overflow: hidden; border: 1px solid transparent; margin: 0 0 0 0; cursor: pointer; } /*applied to the ComboBox when the popup ListBox is shown.*/ .jqx-combobox-state-selected { overflow: hidden; border: 1px solid transparent; margin: 0 0 0 0; cursor: pointer; } /*applied to the ComboBox when the widget is focused.*/ .jqx-combobox-state-focus { border: 1px solid transaprent; } /*applied to the ComboBox when the widget is disabled.*/ .jqx-combobox-state-disabled { white-space: nowrap; margin: 0px; color: #AAA; } /*jqxDropDownList Style*/ /*applied to the dropdownlist's content element which displays the selected item's text or html.*/ .jqx-dropdownlist-content { padding: 0px; overflow: hidden; padding-left: 3px; padding-top: 0px; padding-bottom: 0px; margin: 0px; text-align: left; vertical-align: middle; white-space: nowrap; -webkit-appearance: none; outline: 0 none; border: none; } .jqx-dropdownlist-content-rtl { padding-left: 0px; padding-right: 3px; } /*applied to the dropdownlist's content element which displays the selected item's text or html and the widget is disabled. */ .jqx-dropdownlist-content-disabled { } /*applied to the dropdownlist in default state.*/ .jqx-dropdownlist-state-normal { -webkit-appearance: none; outline: none; border: 1px solid transparent; overflow: hidden; margin: 0 0 0 0; } /*applied to the dropdownlist in hovered state.*/ .jqx-dropdownlist-state-hover { overflow: hidden; border: 1px solid transparent; margin: 0 0 0 0; cursor: pointer; } /*applied to the dropdownlist in selected state.*/ .jqx-dropdownlist-state-selected { overflow: hidden; background-color: transparent; border: 1px solid transparent; margin: 0 0 0 0; cursor: pointer; } /*applied to the dropdownlist in focused state.*/ .jqx-dropdownlist-state-focus { border: 1px solid #909090; } /*applied to the dropdownlist in disabled state.*/ .jqx-dropdownlist-state-disabled { } /*jqxScrollBar Style*/ .jqx-scrollbar { background: transparent; margin: 0; padding: 0; border: none; } /*applied to the scrollbar in default state.*/ .jqx-scrollbar-state-normal { background: #efefef; margin: 0px; padding: 0px; border: 1px solid transparent; } /*applied to the scrollbar buttons in default state.*/ .jqx-scrollbar-button-state-normal { margin: 0px; padding: 0px; border: 1px solid transparent; } /*applied to the scrollbar buttons in hovered state.*/ .jqx-scrollbar-button-state-hover { margin: 0px; padding: 0px; border: 1px solid transparent; } /*applied to the scrollbar buttons in pressed state.*/ .jqx-scrollbar-button-state-pressed { margin: 0px; padding: 0px; border: 1px solid transparent; } /*applied to the horizontal scrollbar thumb in default state.*/ .jqx-scrollbar-thumb-state-normal-horizontal { margin: 0px; padding: 0px; background: transparent; border: 1px solid transparent; } /*applied to the horizontal scrollbar thumb in hovered state.*/ .jqx-scrollbar-thumb-state-hover-horizontal { margin: 0px; padding: 0px; border: 1px solid transparent; } /*applied to the horizontal scrollbar thumb in default state.*/ .jqx-scrollbar-thumb-state-pressed-horizontal { margin: 0px; padding: 0px; border: 1px solid transparent; } /*applied to the vertical scrollbar thumb in default state.*/ .jqx-scrollbar-thumb-state-normal { margin: 0px; padding: 0px; border: 1px solid transparent; } /*applied to the vertical scrollbar thumb in default state.*/ .jqx-scrollbar-thumb-state-hover { margin: 0px; padding: 0px; background: transparent; border: 1px solid transparent; } /*applied to the vertical scrollbar thumb in default state.*/ .jqx-scrollbar-thumb-state-pressed { margin: 0px; padding: 0px; background: #d1d1d1; border: 1px solid #909090; } /* jqxWindow */ .jqx-window { position: absolute; overflow: hidden; border: 1px solid transparent; } /*applied to the jqxWindow when it’s disabled*/ .jqx-window-disabled { } /*applied to the window’s header*/ .jqx-window-header { outline: none; border-width: 0px; border-bottom: 1px solid transparent; overflow: hidden; padding: 5px; height: auto; white-space: nowrap; overflow: hidden; } /*applied to the window’s header when the window is disabled*/ .jqx-window-header-disabled { } /*applied to the window’s content*/ .jqx-window-content { outline: none; overflow: auto; text-align: left; background-color: transparent; padding: 5px; -webkit-background-clip: padding-box; background-clip: padding-box; } /*applied to the window’s content when the window is disabled*/ .jqx-window-content-disabled { outline: none; overflow: auto; text-align: left; padding: 5px; } /*applied to the window’s close button*/ .jqx-window-close-button { cursor: pointer; background-image: url(images/close.png); background-repeat: no-repeat; } /*applied to the window's collapse button*/ .jqx-window-collapse-button { background-image: url(images/icon-up.png); cursor: pointer; } /*applied to the window's collapse button when the window is collapsed*/ .jqx-window-collapse-button-collapsed { cursor: pointer; background-image: url(images/icon-down.png); } /*setting styles of the modal window’s background*/ .jqx-window-modal { background-color: Black; } .jqx-window-close-button-hover { } .jqx-docking { overflow: hidden; } .jqx-docking-panel { margin: 0px; padding: 0px; min-height: 100px; } .jqx-docking-drop-indicator { border-style: dashed; border-width: 1px; margin: 0px; } .jqx-docking-window { margin: 0px; } /* jxSlider */ /* applied to jqxSlider widget */ .jqx-slider { outline: none; clear: both; } /*applied to the ticks which can be in the top/bottom/both sides of the jqxSlider*/ .jqx-slider-tick { border-left: 1px solid transparent; z-index: 9; } /*applied to the ticks when the slider is in horizontal mode*/ .jqx-slider-tick-horizontal { width: 1px; border-left: none; margin-top: 1px; } /*applied to the ticks when the slider is in vertical mode*/ .jqx-slider-tick-vertical { height: 1px; border-top: none; } /*applied to the ticks container*/ .jqx-slider-tickscontainer { z-index: 10; position: relative; margin-top: 0px; margin-bottom: 0px; z-index: 9; } /*applied to the jqxSlider thumb used for changing/indicating current value*/ .jqx-slider-slider { cursor: pointer; width: 16px; height: 16px; z-index: 15; position: absolute; left: 0px; top: 0px; } .jqx-slider-button { -moz-border-radius: 9px; -webkit-border-radius: 9px; border-radius: 9px; } /*applied to the slider's thumb when the slider is in horizontal mode*/ .jqx-slider-slider-horizontal { background-image: url(images/slider_horizontal_classic.png); background-repeat: no-repeat; margin-top: -5px; -moz-border-radius: 7px; -webkit-border-radius: 7px; border-radius: 7px; border: 1px solid transparent; } /*applied to the slider's thumb when the slider is in vertical mode*/ .jqx-slider-slider-vertical { margin-left: -5px; background-image: url(images/slider_vertical_classic.png); background-repeat: no-repeat; -moz-border-radius: 7px; -webkit-border-radius: 7px; border-radius: 7px; border: 1px solid transparent; } /*applied to the track where is located the thumb*/ .jqx-slider-track { height: 8px; float:left; position: relative; z-index: 20; } /*used in horizontal slider*/ .jqx-slider-track-horizontal { height: 8px; margin-top: 2px; } /*used in vertical slider*/ .jqx-slider-track-vertical { width: 8px; } /*applied to the div which is between the thumbs in a range slider or from beginning of the track to the current thumb position in the default slider*/ .jqx-slider-rangebar { } /* jqxSplitter */ .jqx-splitter { overflow: hidden; border: 1px solid transparent; position: relative; } /* Split bar's class when the jqxSplitter is with horizontal orientation */ .jqx-splitter-splitbar-vertical { border: 1px solid transparent; border-top-width: 0px; border-bottom-width: 0px; cursor: e-resize; cursor: col-resize; position: absolute; } /* Split bar's mouse over state */ .jqx-splitter-splitbar-hover { background-color: transparent; } /* Split bar's class when the jqxSplitter is with horizontal orientation. */ .jqx-splitter-splitbar-horizontal { position: absolute; border: 1px solid transparent; border-left-width: 0px; border-right-width: 0px; cursor: n-resize; cursor: row-resize; } /* This class is applied to the splitter when it's dragged to it's max left/right boundary */ .jqx-splitter-splitbar-invalid { background: #FF0000 !important; } /* This class is added to split bar's collapse button when the splitter is with vectical orientation. */ .jqx-splitter-collapse-button-horizontal { cursor: pointer; width: 45px; height: 5px; } /* This class is added to split bar's collapse button when the splitter is with horizontal orientation. */ .jqx-splitter-collapse-button-vertical { cursor: pointer; width: 5px; height: 45px; } /* This class is added when the user disable the splitter. */ .jqx-splitter-splitbar-collapsed { cursor: default; } /* Applied to the jqxSplitter panels. */ .jqx-splitter-panel { border: none; outline: none; position: absolute; overflow: auto; } /* This class is added to a nested splitter.*/ .jqx-splitter-nested, .jqx-splitter-panel-nested { border: none; overflow: hidden; } .jqx-draggable { } .jqx-draggable-dragging { border: 0px solid black; } .jqx-draggable-disabled { cursor: default; } .jqx-validator-hint { height: 18px; width: auto; display: inline-block; cursor: pointer; padding-left: 5px; padding-right: 5px; font-family: Tahoma,Verdana; font-size: 11px; border: 1px solid #6E0000; background-color: #942724; color: #fff; z-index: 99999; } .jqx-validator-hint-arrow { z-index: 99999; height: 9px; width: 9px; padding: 0px; margin: 0px; background-color: transparent; background-image: url(images/multi-arrow.gif); } .jqx-validator-error-label { color: #dd4b39; vertical-align:top; text-align: left; display: block; cursor: default; line-height: 17px; } .jqx-validator-error-element { border-color: #dd4b39 !important; } .jqx-switchbutton { overflow: hidden; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; border: 1px solid #ccc; } .jqx-switchbutton-thumb { display: inline-block; cursor: pointer; border: 1px solid #ccc; } .jqx-switchbutton-label { font-size: 11px; font-family: Sans-Serif; text-align: center; text-transform: uppercase; font-weight: bold; } .jqx-switchbutton-wrapper { } .jqx-switchbutton-label-on { } .jqx-switchbutton-label-off { } /*left, right, up and down arrow icons.*/ .jqx-left-arrow { background: transparent; background-image: url('left.png'); cursor: pointer; } .jqx-right-arrow { background: transparent; background-image: url('right.png'); cursor: pointer; } .jqx-icon-arrow-up { background-image: url('images/icon-up.png'); background-repeat: no-repeat; background-position: center; } .jqx-icon-arrow-down { background-image: url('images/icon-down.png'); background-repeat: no-repeat; background-position: center; } .jqx-icon-arrow-left { background-image: url('images/icon-left.png'); background-repeat: no-repeat; background-position: center; } .jqx-icon-arrow-right { background-image: url('images/icon-right.png'); background-repeat: no-repeat; background-position: center; } .jqx-icon-arrow-up-hover { background-image: url('images/icon-up.png'); background-repeat: no-repeat; background-position: center; } .jqx-icon-arrow-down-hover { background-image: url('images/icon-down.png'); background-repeat: no-repeat; background-position: center; } .jqx-icon-arrow-left-hover { background-image: url('images/icon-left.png'); background-repeat: no-repeat; background-position: center; } .jqx-icon-arrow-right-hover { background-image: url('images/icon-right.png'); background-repeat: no-repeat; background-position: center; } .jqx-icon-arrow-up-selected { background-image: url('images/icon-up.png'); background-repeat: no-repeat; background-position: center; } .jqx-icon-arrow-down-selected { background-image: url('images/icon-down.png'); background-repeat: no-repeat; background-position: center; } .jqx-icon-arrow-left-selected { background-image: url('images/icon-left.png'); background-repeat: no-repeat; background-position: center; } .jqx-icon-arrow-right-selected { background-image: url('images/icon-right.png'); background-repeat: no-repeat; background-position: center; } .icon-close { cursor: pointer; background-image: url(images/close.png); background-repeat: no-repeat; background-position: center; } .icon-close-hover { cursor: pointer; background-image: url(images/close.png); background-repeat: no-repeat; background-position: center; } /* jqxScrollView */ .jqx-scrollview-button { width: 10px; height: 10px; border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; display: inline-block; margin: 2px; cursor: pointer; background-color: #aaaeaf; } .jqx-scrollview { background-color: #000; } .jqx-input{overflow: hidden; background-color: inherit; border-color: #c7c7c7;} /*applied to all widgets*/ .jqx-widget{-ms-touch-action: none; zoom: 1; color: #000000; -moz-background-clip: padding; background-clip: padding-box; -webkit-text-size-adjust: none; -webkit-appearance: none; -webkit-background-clip: padding-box; direction: ltr; -webkit-tap-highlight-color: rgba(0,0,0,0); font-family: Tahoma,Verdana,Arial,sans-serif; font-style: normal; font-size: 11px;} .jqx-item{-ms-touch-action: none; color: inherit; border: 1px solid transparent; background: transparent; -webkit-text-size-adjust: none;} /*applied to containers to set a background and border color. Tabs, NavigationBar, Calendar content.*/ .jqx-widget-content {-ms-touch-action: none; -moz-background-clip: padding; -webkit-text-size-adjust: none; background-clip: padding-box; -webkit-background-clip: padding-box; -webkit-tap-highlight-color: rgba(0,0,0,0); font-family: Tahoma,Verdana,Arial,sans-serif; font-style: normal; font-size: 11px; border-color: #c7c7c7; background: #fff; } /*applied to header areas. Tabs, Menu, Window, Calendar.*/ .jqx-widget-header {-ms-touch-action: none;-moz-background-clip: padding; -webkit-text-size-adjust: none; background-clip: padding-box; -webkit-background-clip: padding-box; -webkit-tap-highlight-color: rgba(0,0,0,0); border-color: #c5c5c5; background: #e8e8e8; } .jqx-fill-state-normal{-ms-touch-action: none;font-family: Tahoma,Verdana,Arial,sans-serif; font-style: normal; font-size: 11px; border-color:#aaa; background: #efefef; } .jqx-fill-state-hover {border-color:#999; background: #f1f1f1;} .jqx-fill-state-pressed{border-color:#999; background: #ddd;} .jqx-fill-state-focus {border-color: #555; } .jqx-fill-state-disabled {cursor: default; color: #000; opacity: .55; filter:Alpha(Opacity=45);} .jqx-widget .jqx-grid-cell, .jqx-widget .jqx-grid-column-header, .jqx-widget .jqx-grid-group-cell {border-color: #ccc;} .jqx-widget .jqx-grid-column-menubutton, .jqx-widget .jqx-grid-column-sortascbutton, .jqx-widget .jqx-grid-column-sortdescbutton, .jqx-widget .jqx-grid-column-filterbutton { background-color: transparent; border-color: #ccc; } .jqx-grid-column-header a:link, .jqx-grid-column-header a:visited { *color: expression(this.parentNode.currentStyle['color']); } .jqx-grid-bottomright, .jqx-panel-bottomright, .jqx-listbox-bottomright { background-color: #e5e5e5; } .jqx-tabs-title-selected-top { border-color: #ccc; border-bottom: 1px solid #fff; background-color: #fff; } /*applied to the tab's title when the tab is selected and the jqxTab's position property is set to 'bottom' .*/ .jqx-tabs-title-selected-bottom { border-color: #ccc; border-top: 1px solid #fff; background-color: #fff; } /*applied to the tab's selection tracker when the jqxTab's position property is set to 'top'.*/ .jqx-tabs-selection-tracker-top { border-color: #ccc; border-bottom: 1px solid #fff; } /*applied to the tab's selection tracker when the jqxTab's position property is set to 'bottom'.*/ .jqx-tabs-selection-tracker-bottom { border-color: #ccc; border-top: 1px solid #fff; } /*jqxMaskedInput and jqxNumberInput Styles*/ .jqx-input { -webkit-appearance: none; padding: 0 0 0 0; outline: none; border-width: 1px; border-style: solid; -moz-background-clip: padding; background-clip: padding-box; -webkit-background-clip: padding-box; } input[type=text].jqx-input, input[type=password].jqx-input { min-height: 16px; min-width: 16px; margin: 0px; border-width: 1px; border-style: solid; font-size: 11px; padding: 0px; } .jqx-input::-ms-clear { display: none; } .jqx-input-content::-ms-clear { display: none; } .jqx-input::-ms-value { margin: 0px; padding: 0px; min-height: 13px; line-height: 13px; } /*applied to the input when the validation fails.*/ .jqx-input-invalid { border-color: #dd4b39 !important; } /*applied to the input's content.*/ .jqx-input-content { -webkit-appearance: none; padding: 1px; resize: none; outline: none; outline-width: 0px; -moz-background-clip: padding; background-clip: padding-box; -webkit-background-clip: padding-box; } /*applied to the input when it is disabled.*/ .jqx-input-disabled { -webkit-appearance: none; resize: none; outline: none; outline-width: 0px; } /*applied to the jqxDateTimeInput's button header.*/ .jqx-input-button-header { cursor: pointer; -webkit-appearance: none; height: 3px; padding: 0px; outline: none; border-width: 1px; border-style: solid; } /*applied to the element which is in the middle of the jqxDateTimeInput's button header.*/ .jqx-input-button-innerHeader { cursor: pointer; -webkit-appearance: none; height: 3px; width: 3px; padding: 0px; outline: none; border: 0px solid #fff; } /*applied to the jqxDateTimeInput's button content.*/ .jqx-input-button-content { font-style: normal; text-align: center; vertical-align: middle; cursor: pointer; -webkit-appearance: none; padding: 0px; outline: none; border-width: 1px; border-style: solid; border-top-width: 0px; font-size: 10px; } .jqx-menu-vertical { background-color: #efefef; } .jqx-color-picker { } .jqx-color-picker-panel { } .jqx-color-picker-map { border: 1px solid #A0A0A0; background-color: transparent; background-image: url('images/map-saturation.png'); background-repeat: no-repeat; background-position: left top; overflow: hidden; } .jqx-color-picker-map-hue { border: 1px solid #A0A0A0; background-color: transparent; background-image: url('images/map-hue.png'); background-repeat: no-repeat; background-position: left top; overflow: hidden; } .jqx-color-picker-map-overlay { background-color: transparent; background-image: url('images/map-saturation-overlay.png'); background-repeat: no-repeat; background-position: left top; } .jqx-color-picker-bar { border: 1px solid #A0A0A0; background-color: transparent; background-image: url('images/bar-saturation.png'); background-repeat: no-repeat; background-position: left top; } .jqx-color-picker-bar-hue { border: 1px solid #A0A0A0; background-color: transparent; background-image: url('images/bar-hue.png'); background-repeat: no-repeat; background-position: left top; } .jqx-color-picker-preview { border: 1px solid #A0A0A0; } .jqx-color-picker-pointer { background-image: url('images/crosshair.png'); background-repeat: no-repeat; height: 16px; width: 16px; } .jqx-color-picker-pointer-alt { background-image: url('images/crosshair-white.png'); background-repeat: no-repeat; height: 16px; width: 16px; } .jqx-color-picker-bar-pointer { background-image: url('images/pointer.png'); background-repeat: no-repeat; height: 15px; margin-left: 6px; background-position: right top; } .icon { width: 16px; height: 16px; margin: 0 auto; position: relative; top: 50%; margin-top: -8px; } .jqx-input-icon { width: 13px; height: 13px; margin: 0 auto; } .jqx-scrollbar-thumb-state-normal-touch { -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; border-color:#c3c3c3; background: #c3c3c3; size: 8px; } .jqx-touch, .jqx-touch .jqx-fill-state-normal, .jqx-touch .jqx-widget-content, .jqx-touch .jqx-widget-header, .jqx-touch a:link{} .jqx-scrollbar .jqx-icon-arrow-up{width: 100%; height: 100%;} .jqx-scrollbar .jqx-icon-arrow-down{width: 100%; height: 100%;} .jqx-scrollbar .jqx-icon-arrow-left{width: 100%; height: 100%;} .jqx-scrollbar .jqx-icon-arrow-right{width: 100%; height: 100%;} /*jqx-listmenu*/ .jqx-listmenu-widget { border-width: 1px; border-style: solid; } ol.jqx-listmenu, ul.jqx-listmenu { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; line-height: 1; counter-reset: section; } .jqx-listmenu li { margin-left: 0px; list-style: none; line-height: 1; } .jqx-listmenu { width: 100%; } .jqx-listmenu-header { padding: 15px; } .jqx-listmenu-item { cursor: pointer; padding: 15px; float: none; overflow: hidden; text-align: left; position: relative; } .jqx-listmenu-separator { padding: 10px; counter-reset: section; } .jqx-listmenu-header-label { margin-left: 30px; } .jqx-listmenu-arrow-right { width: 16px; height: 16px; position: absolute; top: 50%; margin-top: -7px; right: 7px; } .jqx-listmenu-arrow-rtl { right: 0px; left: 7px; } .jqx-listmenu-arrow-right-pressed { width: 16px; height: 16px; } .jqx-listmenu-header .jqx-button { -moz-border-radius: 10px; -webkit-border-radius: 10px; -o-border-radius: 10px; border-radius: 10px; padding: 6px 10px; } .jqx-listmenu-filter-input { -moz-border-radius: 14px; -webkit-border-radius: 14px; border-radius: 14px; border: 1px solid; outline: none; width: 97%; padding: 3px; padding-left: 10px; padding-right: 10px; border-color: #c7c7c7; background-color: #fff; font-size: 20px; } .jqx-listmenu-filter { text-align: center; padding: 4px; } ol li .jqx-listmenu-item-label:before { content: counter(section) ". "; counter-increment: section; } .jqx-listmenu div { clear: both; } .jqx-listmenu-auto-separator { } .jqx-listmenu-item-readonly { cursor: default; } .jqx-tooltip { position: absolute; width: auto; height: auto; } .jqx-tooltip-main { position: relative; width: 100%; height: 100%; text-align: center; filter: inherit; border-style: solid; border-width: 1px; } .jqx-tooltip-text { padding: 5px 8px; overflow: hidden; filter: inherit; } .jqx-tooltip, .jqx-tooltip-text, .jqx-tooltip-main { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; -moz-background-clip: padding; background-clip: padding-box; -webkit-background-clip: padding-box; } .jqx-tooltip-arrow { position: absolute; width: 0px; height: 0px; display: block; border-style: solid; margin: -6px 0 0 -7px; background: transparent !important; filter: inherit; } .jqx-tooltip-arrow-t-b { border-left-color: transparent !important; border-right-color: transparent !important; } .jqx-tooltip-arrow-l-r { border-top-color: transparent !important; border-bottom-color: transparent !important; } /*Sets the text-alignment to right.*/ .jqx-rtl{text-align: right !important;} .jqx-shadow{ -webkit-box-shadow: 0 2px 3px rgba(0,0,0,.15)!important; -moz-box-shadow : 0 2px 3px rgba(0,0,0,.15)!important; -o-box-shadow : 0 2px 3px rgba(0,0,0,.15)!important; box-shadow : 0 2px 3px rgba(0,0,0,.15)!important; } .jqx-passwordinput-password-icon-ltr, .jqx-passwordinput-password-icon-rtl { background-image: url(images/icon-showpassword.png) !important; background-repeat: no-repeat !important; } .jqx-passwordinput-password-icon-ltr { background-position: right !important; } .jqx-passwordinput-password-icon-rtl { background-position: left !important; } .jqx-passwordinput-password-strength-inicator { width: 20%; height: 5px; margin-top: 5px; }
0x6a
trunk/libraries/jqwidgets/styles/jqx.base.css
CSS
asf20
78,473
.jqx-rc-tl-office { -moz-border-radius-topleft: 0px; -webkit-border-top-left-radius: 0px; border-top-left-radius: 0px; } .jqx-rc-tr-office { -moz-border-radius-topright: 0px; -webkit-border-top-right-radius: 0px; border-top-right-radius: 0px; } .jqx-rc-bl-office { -moz-border-radius-bottomleft: 0px; -webkit-border-bottom-left-radius: 0px; border-bottom-left-radius: 0px; } .jqx-rc-br-office { -moz-border-radius-bottomright: 0px; -webkit-border-bottom-right-radius: 0px; border-bottom-right-radius: 0px; } /*top rounded Corners*/ .jqx-rc-t-office { -moz-border-radius-topleft: 0px; -webkit-border-top-left-radius: 0px; border-top-left-radius: 0px; -moz-border-radius-topright: 0px; -webkit-border-top-right-radius: 0px; border-top-right-radius: 0px; } /*bottom rounded Corners*/ .jqx-rc-b-office { -moz-border-radius-bottomleft: 0px; -webkit-border-bottom-left-radius: 0px; border-bottom-left-radius: 0px; -moz-border-radius-bottomright: 0px; -webkit-border-bottom-right-radius: 0px; border-bottom-right-radius: 0px; } /*right rounded Corners*/ .jqx-rc-r-office { -moz-border-radius-topright: 0px; -webkit-border-top-right-radius: 0px; border-top-right-radius: 0px; -moz-border-radius-bottomright: 0px; -webkit-border-bottom-right-radius: 0px; border-bottom-right-radius: 0px; } /*left rounded Corners*/ .jqx-rc-l-office { -moz-border-radius-topleft: 0px; -webkit-border-top-left-radius: 0px; border-top-left-radius: 0px; -moz-border-radius-bottomleft: 0px; -webkit-border-bottom-left-radius: 0px; border-bottom-left-radius: 0px; } /*all rounded Corners*/ .jqx-rc-all-office { -moz-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; } .jqx-widget-office { font-family: Calibri; } .jqx-widget-content-office{font-family: Calibri; border-color: #d4d4d4; color: #444444; background-color: #fff;} .jqx-widget-header-office{font-family: Calibri; color: #444444; border-color:#d4d4d4; background-color:#ffffff;} .jqx-fill-state-normal-office{font-family: Calibri; border-color: #ababab; color: #444444; background: #fdfdfd;} .jqx-button-office {border-color: #ababab;} .jqx-fill-state-hover-office{border-color:#86bfa0; color: #000; background-color:#d3f0e0;} .jqx-input-office, .jqx-input-button-content-office {border-color: #ababab;} .jqx-fill-state-focus-office, .jqx-combobox-content-focus-office, .jqx-numberinput-focus { border-color: #86bfa0; } .jqx-fill-state-pressed-office{border-color:#429366; color: #000; background-color:#86bfa0;} .jqx-scrollbar-state-normal-office, .jqx-grid-bottomright-office, .jqx-panel-bottomright-office, .jqx-listbox-bottomright-office{background-color:#f3f3f3;} .jqx-widget-office .jqx-grid-column-header-office, .jqx-grid-cell-office, .jqx-widget-office .jqx-grid-cell-office, .jqx-widget-office .jqx-grid-group-cell-office, .jqx-grid-group-cell-office{font-family: Calibri; border-color:#f3f3f3;} .jqx-tabs-title-bottom-office, .jqx-tabs-title-office{color: #666666;} .jqx-tabs-title-hover-bottom-office, .jqx-tabs-title-hover-top-office{color: #217346; background-color: transparent; border-color: transparent;} .jqx-tabs-title-selected-bottom-office, .jqx-tabs-selection-tracker-bottom-office, .jqx-tabs-title-selected-top-office, .jqx-tabs-selection-tracker-top-office{font-weight: bold; color: #217346; border-color:#d4d4d4; border-bottom:1px solid #fff; background:#fff} .jqx-grid-cell-sort-alt-office, .jqx-grid-cell-filter-alt-office, .jqx-grid-cell-pinned-office, .jqx-grid-cell-alt-office, .jqx-grid-cell-sort-office{ background-color:#ededed; color: #000;} .jqx-menu-vertical-office{background: #fff; border-color: #d4d4d4;} .jqx-widget-office .jqx-grid-cell-office, .jqx-widget-office .jqx-grid-column-header-office, .jqx-widget-office .jqx-grid-group-cell-office {color: #000; border-color: #d4d4d4;} .jqx-widget-office .jqx-grid-column-menubutton-office, .jqx-widget-office .jqx-grid-column-sortascbutton-office, .jqx-widget-office .jqx-grid-column-sortdescbutton-office, .jqx-widget-office .jqx-grid-column-filterbutton-office { background-color: transparent; border-color: #d4d4d4; } .jqx-input-button-header-office, .jqx-calendar-title-header-office, .jqx-grid-office .jqx-widget-header-office, .jqx-grid-header-office, .jqx-grid-column-header-office, .jqx-grid-office {font-family: Calibri; border-color: #ababab; color: #444444; background: #fff;} .jqx-window-header-office{font-family: Calibri; color: #444444; background: #fff;} .jqx-grid-column-menubutton { background-image: url('images/office-icon-down.png'); } .jqx-widget-office .jqx-grid-cell-selected-office, .jqx-grid-cell-selected-office{ background-color:#c6c6c6; border-color: #a5a5a5; color:#000} .jqx-grid-cell-hover-office{ background-color:#dedede;} /*applied to the column's sort button when the sort order is ascending.*/ .jqx-grid-column-sortascbutton { background-image: url('images/office-icon-up.png'); } .jqx-grid-column-sortdescbutton { background-image: url('images/office-icon-down.png'); } .jqx-checkbox-hover-office { background-color: #fff; } .jqx-radiobutton-hover-office { background-color: #fff; } .jqx-scrollbar-thumb-state-normal-horizontal-office, .jqx-scrollbar-thumb-state-normal-office { background: #ffffff; border-color: #ababab; } .jqx-scrollbar-thumb-state-hover-horizontal-office, .jqx-scrollbar-thumb-state-hover-office { background: #f0f0f0; border-color: #ababab; } .jqx-scrollbar-thumb-state-pressed-horizontal-office, .jqx-scrollbar-thumb-state-pressed-office { background: #f0f0f0; border-color: #777777; } .jqx-scrollbar-button-state-normal-office { border: 1px solid #ababab; background: #fff; } /*applied to the scrollbar buttons in hovered state.*/ .jqx-scrollbar-button-state-hover-office { border: 1px solid #777777; background: #fff; } /*applied to the scrollbar buttons in pressed state.*/ .jqx-scrollbar-button-state-pressed-office { border: 1px solid #777777; background: #f0f0f0; } /*icons*/ .jqx-window-collapse-button-office { background-image: url(images/office-icon-up.png); } .jqx-window-collapse-button-collapsed-office { background-image: url(images/office-icon-down.png); } .jqx-icon-arrow-up-office { background-image: url('images/office-icon-up.png'); } .jqx-icon-arrow-down-office { background-image: url('images/office-icon-down.png'); } .jqx-icon-arrow-left-office { background-image: url('images/office-icon-left.png'); } .jqx-icon-arrow-right-office { background-image: url('images/office-icon-right.png'); } .jqx-tabs-arrow-left-office { background-image: url('images/office-icon-left.png'); } .jqx-tabs-arrow-right-office { background-image: url('images/office-icon-right.png'); } .jqx-menu-item-arrow-up-selected-office, .jqx-icon-arrow-up-selected-office{background-image:url('images/office-icon-up.png');background-repeat:no-repeat;background-position:center;} .jqx-menu-item-arrow-down-selected-office, .jqx-icon-arrow-down-selected-office{background-image:url('images/office-icon-down.png');background-repeat:no-repeat;background-position:center;} .jqx-menu-item-arrow-left-selected-office, .jqx-icon-arrow-left-selected-office{background-image:url('images/office-icon-left.png');background-repeat:no-repeat;background-position:center;} .jqx-menu-item-arrow-right-selected-office, .jqx-icon-arrow-right-selected-office{background-image:url('images/office-icon-right.png');background-repeat:no-repeat;background-position:center;} .jqx-tabs-close-button-office{background-image:url(images/close.png); background-repeat:no-repeat; background-position:center;} .jqx-tabs-close-button-selected-office{background-image:url(images/close.png); background-repeat:no-repeat; background-position:center;} .jqx-tabs-close-button-hover-office{background-image:url(images/close.png); background-repeat:no-repeat; background-position:center;} .jqx-expander-arrow-bottom-office,.jqx-scrollbar-office .jqx-icon-arrow-up-selected-office{background-image:url('images/office-icon-up.png'); background-repeat:no-repeat; background-position:center;} .jqx-expander-arrow-top-office, .jqx-scrollbar-office .jqx-icon-arrow-down-selected-office{background-image:url('images/office-icon-down.png'); background-repeat:no-repeat; background-position:center;} .jqx-scrollbar-office .jqx-icon-arrow-left-selected-office{background-image:url('images/office-icon-left.png'); background-repeat:no-repeat; background-position:center;} .jqx-scrollbar-office .jqx-icon-arrow-right-selected-office{background-image:url('images/office-icon-right.png');background-repeat:no-repeat; background-position:center;} .jqx-slider-slider-office { } .jqx-slider-button-office { -moz-border-radius: 9px; -webkit-border-radius: 9px; border-radius: 9px; } .jqx-input-button-content-office { font-size: 10px; } .jqx-dropdownlist-state-normal-office, .jqx-dropdownlist-state-hover-office, .jqx-dropdownlist-state-selected-office, .jqx-scrollbar-button-state-hover-office, .jqx-scrollbar-button-state-normal-office, .jqx-scrollbar-button-state-pressed-office, .jqx-scrollbar-thumb-state-normal-horizontal-office, .jqx-scrollbar-thumb-state-hover-horizontal-office, .jqx-scrollbar-thumb-state-pressed-horizontal-office, .jqx-scrollbar-thumb-state-normal-office, .jqx-scrollbar-thumb-state-pressed-office, .jqx-button-office, .jqx-tree-item-hover-office, .jqx-tree-item-selected-office, .jqx-tree-item-office, .jqx-menu-item-office, .jqx-menu-item-hover-office, .jqx-menu-item-selected-office, .jqx-menu-item-top-office, .jqx-menu-item-top-hover-office, .jqx-menu-item-top-selected-office, .jqx-slider-button-office, .jqx-slider-slider-office { -webkit-transition: background-color 100ms linear; -moz-transition: background-color 100ms linear; -o-transition: background-color 100ms linear; -ms-transition: background-color 100ms linear; transition: background-color 100ms linear; } .jqx-switchbutton-office { -moz-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; border: 2px solid #a6a6a6; } .jqx-switchbutton-thumb-office { width: 12px; background: #000; border: 1px solid #000; } .jqx-switchbutton-label-on-office { background: #429366; color: #429366; } .jqx-switchbutton-label-off-office { background: #a6a6a6; color: #a6a6a6; } .jqx-switchbutton-wrapper-office { }
0x6a
trunk/libraries/jqwidgets/styles/jqx.office.css
CSS
asf20
10,736
.jqx-rc-tl-metro { -moz-border-radius-topleft: 0px; -webkit-border-top-left-radius: 0px; border-top-left-radius: 0px; } .jqx-rc-tr-metro { -moz-border-radius-topright: 0px; -webkit-border-top-right-radius: 0px; border-top-right-radius: 0px; } .jqx-rc-bl-metro { -moz-border-radius-bottomleft: 0px; -webkit-border-bottom-left-radius: 0px; border-bottom-left-radius: 0px; } .jqx-rc-br-metro { -moz-border-radius-bottomright: 0px; -webkit-border-bottom-right-radius: 0px; border-bottom-right-radius: 0px; } /*top rounded Corners*/ .jqx-rc-t-metro { -moz-border-radius-topleft: 0px; -webkit-border-top-left-radius: 0px; border-top-left-radius: 0px; -moz-border-radius-topright: 0px; -webkit-border-top-right-radius: 0px; border-top-right-radius: 0px; } /*bottom rounded Corners*/ .jqx-rc-b-metro { -moz-border-radius-bottomleft: 0px; -webkit-border-bottom-left-radius: 0px; border-bottom-left-radius: 0px; -moz-border-radius-bottomright: 0px; -webkit-border-bottom-right-radius: 0px; border-bottom-right-radius: 0px; } /*right rounded Corners*/ .jqx-rc-r-metro { -moz-border-radius-topright: 0px; -webkit-border-top-right-radius: 0px; border-top-right-radius: 0px; -moz-border-radius-bottomright: 0px; -webkit-border-bottom-right-radius: 0px; border-bottom-right-radius: 0px; } /*left rounded Corners*/ .jqx-rc-l-metro { -moz-border-radius-topleft: 0px; -webkit-border-top-left-radius: 0px; border-top-left-radius: 0px; -moz-border-radius-bottomleft: 0px; -webkit-border-bottom-left-radius: 0px; border-bottom-left-radius: 0px; } /*all rounded Corners*/ .jqx-rc-all-metro { -moz-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; } .jqx-widget-metro { font-size: 11px; font-family: tahoma,arial, sans-serif; } .jqx-widget-content-metro{font-size: 11px; font-family: tahoma, arial, sans-serif; border-color: #e5e5e5; color: #767676; background-color: #fff;} .jqx-widget-header-metro{font-size: 11px; font-family: tahoma, arial, sans-serif; color: #767676; border-color:#e5e5e5; background-color:#f4f4f4;} .jqx-fill-state-normal-metro{font-size: 11px; font-family: tahoma, arial, sans-serif; border-color: #e5e5e5; color: #767676; background: #ffffff;} .jqx-button-metro {border-color: #cdcdcd;} .jqx-fill-state-hover-metro{border-color:#dedede; color: #000; background-color:#dedede; } .jqx-fill-state-focus-metro { border-color: #cdcdcd; } .jqx-fill-state-pressed-metro{border-color:#1faeff; color: #fff; background-color:#1faeff; } .jqx-input-metro { border-color: #e5e5e5; } .jqx-scrollbar-state-normal-metro, .jqx-grid-bottomright-metro, .jqx-panel-bottomright-metro, .jqx-listbox-bottomright-metro{background-color:#f0f0f0;} .jqx-widget-metro .jqx-grid-column-header-metro, .jqx-grid-cell-metro, .jqx-widget-metro .jqx-grid-cell-metro, .jqx-widget-metro .jqx-grid-group-cell-metro, .jqx-grid-group-cell-metro{font-size: 11px; font-family: tahoma, arial, sans-serif; border-color:#f0f0f0;} .jqx-tabs-title-selected-bottom-metro, .jqx-tabs-selection-tracker-bottom-metro, .jqx-tabs-title-selected-top-metro, .jqx-tabs-selection-tracker-top-metro{color: #767676; border-color:#e5e5e5; border-bottom:1px solid #fff; background:#fff} .jqx-grid-cell-sort-alt-metro, .jqx-grid-cell-filter-alt-metro, .jqx-grid-cell-pinned-metro, .jqx-grid-cell-alt-metro, .jqx-grid-cell-sort-metro{ background-color:#ededed; color: #000;} .jqx-menu-vertical-metro{background: #fff; border-color: #e5e5e5;} .jqx-widget-metro .jqx-grid-cell-metro, .jqx-widget-metro .jqx-grid-column-header-metro, .jqx-widget-metro .jqx-grid-group-cell-metro {color: #000; border-color: #e5e5e5;} .jqx-widget-metro .jqx-grid-column-menubutton-metro, .jqx-widget-metro .jqx-grid-column-sortascbutton-metro, .jqx-widget-metro .jqx-grid-column-sortdescbutton-metro, .jqx-widget-metro .jqx-grid-column-filterbutton-metro { background-color: transparent; border-color: #e5e5e5; } .jqx-window-header-metro, .jqx-input-button-header-metro, .jqx-calendar-title-header-metro, .jqx-grid-metro .jqx-widget-header-metro, .jqx-grid-header-metro, .jqx-grid-column-header-metro {font-size: 11px; font-family: tahoma, arial, sans-serif; border-color: #e5e5e5; color: #767676; background: #f4f4f4;} .jqx-grid-column-menubutton { background-image: url('images/metro-icon-down.png'); } .jqx-widget-metro .jqx-grid-cell-selected-metro, .jqx-grid-cell-selected-metro{ background-color:#1faeff; border-color: #1faeff; font-size: 11px; color:#fff} .jqx-grid-cell-hover-metro{ background-color:#dedede;} /*applied to the column's sort button when the sort order is ascending.*/ .jqx-grid-column-sortascbutton { background-image: url('images/metro-icon-up.png'); } .jqx-grid-column-sortdescbutton { background-image: url('images/metro-icon-down.png'); } .jqx-checkbox-hover-metro { background-color: #fff; } .jqx-radiobutton-hover-metro { background-color: #fff; } .jqx-scrollbar-thumb-state-normal-horizontal-metro, .jqx-scrollbar-thumb-state-normal-metro { background: #cdcdcd; border-color: #cdcdcd; } .jqx-scrollbar-thumb-state-hover-horizontal-metro, .jqx-scrollbar-thumb-state-hover-metro { background: #a6a6a6; border-color: #a6a6a6; } .jqx-scrollbar-thumb-state-pressed-horizontal-metro, .jqx-scrollbar-thumb-state-pressed-metro { background: #606060; border-color: #606060; } .jqx-scrollbar-button-state-normal-metro { border: 1px solid #f0f0f0; background: #f0f0f0; } /*applied to the scrollbar buttons in hovered state.*/ .jqx-scrollbar-button-state-hover-metro { border: 1px solid #dadada; background: #dadada; } /*applied to the scrollbar buttons in pressed state.*/ .jqx-scrollbar-button-state-pressed-metro { border: 1px solid #606060; background: #606060; } /*icons*/ .jqx-window-collapse-button-metro { background-image: url(images/metro-icon-up.png); } .jqx-window-collapse-button-collapsed-metro { background-image: url(images/metro-icon-down.png); } .jqx-item-metro .jqx-menu-item-arrow-up-selected-metro, .jqx-icon-arrow-up-metro, .jqx-expander-arrow-bottom-metro, .jqx-menu-item-arrow-up-metro { background-image: url('images/metro-icon-up.png'); } .jqx-item-metro .jqx-menu-item-arrow-down-selected-metro, .jqx-icon-arrow-down-metro, .jqx-expander-arrow-top-metro, .jqx-tree-item-arrow-expand-metro, .jqx-tree-item-arrow-expand-hover-metro, .jqx-menu-item-arrow-down-metro { background-image: url('images/metro-icon-down.png'); } .jqx-icon-arrow-left-metro, .jqx-menu-item-arrow-left-metro { background-image: url('images/metro-icon-left.png'); } .jqx-item-metro .jqx-menu-item-arrow-right-selected-metro, .jqx-icon-arrow-right-metro, .jqx-menu-item-arrow-right-metro, .jqx-tree-item-arrow-collapse-metro, .jqx-tree-item-arrow-collapse-hover-metro { background-image: url('images/metro-icon-right.png'); } .jqx-tabs-arrow-left-metro, .jqx-tree-item-arrow-collapse-rtl-metro, .jqx-tree-item-arrow-collapse-hover-rtl-metro { background-image: url('images/metro-icon-left.png'); } .jqx-tabs-arrow-right-metro { background-image: url('images/metro-icon-right.png'); } .jqx-menu-item-top-hover-metro .jqx-menu-item-arrow-up-selected-metro, .jqx-menu-item-top-selected-metro .jqx-menu-item-arrow-up-selected-metro,.jqx-menu-item-top-selected-metro .jqx-menu-item-arrow-up-metro, .jqx-menu-item-arrow-up-selected-metro, .jqx-icon-arrow-up-selected-metro{background-image:url('images/metro-icon-up-white.png');background-repeat:no-repeat;background-position:center;} .jqx-menu-item-top-hover-metro .jqx-menu-item-arrow-down-selected-metro, .jqx-menu-item-top-selected-metro .jqx-menu-item-arrow-down-selected-metro, .jqx-menu-item-arrow-down-selected-metro, .jqx-icon-arrow-down-selected-metro{background-image:url('images/metro-icon-down-white.png');background-repeat:no-repeat;background-position:center;} .jqx-menu-item-arrow-left-selected-metro, .jqx-icon-arrow-left-selected-metro{background-image:url('images/metro-icon-left-white.png');background-repeat:no-repeat;background-position:center;} .jqx-menu-item-hover-metro .jqx-menu-item-arrow-right-selected-metro, .jqx-menu-item-selected-metro .jqx-menu-item-arrow-right-selected-metro, .jqx-menu-item-arrow-right-selected-metro, .jqx-icon-arrow-right-selected-metro{background-image:url('images/metro-icon-right-white.png');background-repeat:no-repeat;background-position:center;} .jqx-tabs-close-button-metro{background-image:url(images/close.png); background-repeat:no-repeat; background-position:center;} .jqx-tabs-close-button-selected-metro{background-image:url(images/close.png); background-repeat:no-repeat; background-position:center;} .jqx-tabs-close-button-hover-metro{background-image:url(images/close.png); background-repeat:no-repeat; background-position:center;} .jqx-scrollbar-metro .jqx-icon-arrow-up-selected-metro{background-image:url('images/metro-icon-up-white.png'); background-repeat:no-repeat; background-position:center;} .jqx-scrollbar-metro .jqx-icon-arrow-down-selected-metro{background-image:url('images/metro-icon-down-white.png'); background-repeat:no-repeat; background-position:center;} .jqx-scrollbar-metro .jqx-icon-arrow-left-selected-metro{background-image:url('images/metro-icon-left-white.png'); background-repeat:no-repeat; background-position:center;} .jqx-scrollbar-metro .jqx-icon-arrow-right-selected-metro{background-image:url('images/metro-icon-right-white.png');background-repeat:no-repeat; background-position:center;} .jqx-slider-slider-metro { border-color:#cdcdcd; } .jqx-slider-button-metro { -moz-border-radius: 9px; -webkit-border-radius: 9px; border-radius: 9px; border-color: #cdcdcd; } .jqx-input-button-content-metro { font-size: 10px; } .jqx-dropdownlist-state-normal-metro, .jqx-dropdownlist-state-hover-metro, .jqx-dropdownlist-state-selected-metro, .jqx-scrollbar-button-state-hover-metro, .jqx-scrollbar-button-state-normal-metro, .jqx-scrollbar-button-state-pressed-metro, .jqx-scrollbar-thumb-state-normal-horizontal-metro, .jqx-scrollbar-thumb-state-hover-horizontal-metro, .jqx-scrollbar-thumb-state-pressed-horizontal-metro, .jqx-scrollbar-thumb-state-normal-metro, .jqx-scrollbar-thumb-state-pressed-metro, .jqx-button-metro, .jqx-tree-item-hover-metro, .jqx-tree-item-selected-metro, .jqx-tree-item-metro, .jqx-menu-item-metro, .jqx-menu-item-hover-metro, .jqx-menu-item-selected-metro, .jqx-menu-item-top-metro, .jqx-menu-item-top-hover-metro, .jqx-menu-item-top-selected-metro, .jqx-slider-button-metro, .jqx-slider-slider-metro { -webkit-transition: background-color 100ms linear; -moz-transition: background-color 100ms linear; -o-transition: background-color 100ms linear; -ms-transition: background-color 100ms linear; transition: background-color 100ms linear; } .jqx-switchbutton-metro { -moz-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; border: 2px solid #a6a6a6; } .jqx-switchbutton-thumb-metro { width: 12px; background: #000; border: 1px solid #000; } .jqx-switchbutton-label-on-metro { background: #1faeff; color: #1faeff; } .jqx-switchbutton-label-off-metro { background: #a6a6a6; color: #a6a6a6; } .jqx-switchbutton-wrapper-metro { }
0x6a
trunk/libraries/jqwidgets/styles/jqx.metro.css
CSS
asf20
11,586
.jqx-widget-content-fresh{border-color: #8e8e97; background-color: #f7f7f7;} .jqx-fill-state-normal-fresh, .jqx-widget-header-fresh{ border-color: #8e8e97; text-shadow:0 1px 0 #f1f1f5; background: #ffffff; background: -moz-linear-gradient(top, #ffffff 0%, #efeff1 1%, #ededf0 4%, #d2d2d8 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(1%,#efeff1), color-stop(4%,#ededf0), color-stop(100%,#d2d2d8)); background: -webkit-linear-gradient(top, #ffffff 0%,#efeff1 1%,#ededf0 4%,#d2d2d8 100%); background: -o-linear-gradient(top, #ffffff 0%,#efeff1 1%,#ededf0 4%,#d2d2d8 100%); background: -ms-linear-gradient(top, #ffffff 0%,#efeff1 1%,#ededf0 4%,#d2d2d8 100%); background: linear-gradient(top, #ffffff 0%,#efeff1 1%,#ededf0 4%,#d2d2d8 100%); } .jqx-fill-state-hover-fresh{ border-color:#5a5e64; color:#000; text-shadow:0 1px 0 #aaa; background: #cacdd5; background: -moz-linear-gradient(top, #cacdd5 0%, #a3a7b4 93%, #a6aab7 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#cacdd5), color-stop(93%,#a3a7b4), color-stop(100%,#a6aab7)); background: -webkit-linear-gradient(top, #cacdd5 0%,#a3a7b4 93%,#a6aab7 100%); background: -o-linear-gradient(top, #cacdd5 0%,#a3a7b4 93%,#a6aab7 100%); background: -ms-linear-gradient(top, #cacdd5 0%,#a3a7b4 93%,#a6aab7 100%); background: linear-gradient(top, #cacdd5 0%,#a3a7b4 93%,#a6aab7 100%); } .jqx-fill-state-pressed-fresh{ background: #058cf5; background: -moz-linear-gradient(top, #058cf5 0%, #0385f3 19%, #0167e9 72%, #015de6 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#058cf5), color-stop(19%,#0385f3), color-stop(72%,#0167e9), color-stop(100%,#015de6)); background: -webkit-linear-gradient(top, #058cf5 0%,#0385f3 19%,#0167e9 72%,#015de6 100%); background: -o-linear-gradient(top, #058cf5 0%,#0385f3 19%,#0167e9 72%,#015de6 100%); background: -ms-linear-gradient(top, #058cf5 0%,#0385f3 19%,#0167e9 72%,#015de6 100%); background: linear-gradient(top, #058cf5 0%,#0385f3 19%,#0167e9 72%,#015de6 100%); border-color:#014ab8; color:white; text-shadow:0 1px 0 #555; border-image:initial; } .jqx-fill-state-focus-fresh { border-color: #555; } .jqx-fill-state-normal-fresh, .jqx-fill-state-pressed-fresh, .jqx-fill-state-hover-fresh { -webkit-box-shadow: 0 2px 3px rgba(0,0,0,.15); -moz-box-shadow : 0 2px 3px rgba(0,0,0,.15); -o-box-shadow : 0 2px 3px rgba(0,0,0,.15); box-shadow : 0 2px 3px rgba(0,0,0,.15); } .jqx-grid-column-menubutton-fresh{ background-color:transparent} .jqx-calendar-row-header-fresh, .jqx-calendar-top-left-header-fresh{ background-color:#f2f2f2; border:0px solid #f2f2f2} .jqx-calendar-column-header-fresh{ background-color:#FFF; border-top:1px solid #FFF; border-bottom:1px solid #e9e9e9} .jqx-scrollbar-state-normal-fresh{ background-color:#efefef; border:1px solid #efefef} .jqx-scrollbar-button-state-normal-fresh{ border:1px solid #efefef; background-color:#ececed} .jqx-scrollbar-button-state-hover-fresh{ border:1px solid #8e8e97;} .jqx-scrollbar-button-state-pressed-fresh{ border:1px solid #8e8e97;} .jqx-scrollbar-thumb-state-normal-fresh{background: #ffffff; background: -moz-linear-gradient(left, #ffffff 0%, #efeff1 1%, #ededf0 4%, #d2d2d8 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%,#ffffff), color-stop(1%,#efeff1), color-stop(4%,#ededf0), color-stop(100%,#d2d2d8)); background: -webkit-linear-gradient(left, #ffffff 0%,#efeff1 1%,#ededf0 4%,#d2d2d8 100%); background: -o-linear-gradient(left, #ffffff 0%,#efeff1 1%,#ededf0 4%,#d2d2d8 100%); background: -ms-linear-gradient(left, #ffffff 0%,#efeff1 1%,#ededf0 4%,#d2d2d8 100%); background: linear-gradient(left, #ffffff 0%,#efeff1 1%,#ededf0 4%,#d2d2d8 100%); border:1px solid #8e8e97} .jqx-scrollbar-thumb-state-hover-fresh{background: #cacdd5; background: -moz-linear-gradient(left, #cacdd5 0%, #a3a7b4 93%, #a6aab7 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%,#cacdd5), color-stop(93%,#a3a7b4), color-stop(100%,#a6aab7)); background: -webkit-linear-gradient(left, #cacdd5 0%,#a3a7b4 93%,#a6aab7 100%); background: -o-linear-gradient(left, #cacdd5 0%,#a3a7b4 93%,#a6aab7 100%); background: -ms-linear-gradient(left, #cacdd5 0%,#a3a7b4 93%,#a6aab7 100%); background: linear-gradient(left, #cacdd5 0%,#a3a7b4 93%,#a6aab7 100%); border:1px solid #8e8e97} .jqx-scrollbar-thumb-state-pressed-fresh, .jqx-progressbar-value-vertical-fresh{ background: #9cbbed; background: -moz-linear-gradient(left, #9cbbed 0%, #3a78dc 1%, #1543bb 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%,#9cbbed), color-stop(1%,#3a78dc), color-stop(100%,#1543bb)); background: -webkit-linear-gradient(left, #9cbbed 0%,#3a78dc 1%,#1543bb 100%); background: -o-linear-gradient(left, #9cbbed 0%,#3a78dc 1%,#1543bb 100%); background: -ms-linear-gradient(left, #9cbbed 0%,#3a78dc 1%,#1543bb 100%); background: linear-gradient(left, #9cbbed 0%,#3a78dc 1%,#1543bb 100%); border:1px solid #014ab8} .jqx-expander-arrow-expanded-fresh, .jqx-icon-arrow-up-selected-fresh{background-image:url('images/icon-up-white.png'); background-repeat:no-repeat; background-position:center} .jqx-icon-arrow-down-selected-fresh{background-image:url('images/icon-down-white.png'); background-repeat:no-repeat; background-position:center} .jqx-icon-arrow-left-selected-fresh{background-image:url('images/icon-left-white.png'); background-repeat:no-repeat; background-position:center} .jqx-icon-arrow-right-selected-fresh{background-image:url('images/icon-right-white.png');background-repeat:no-repeat; background-position:center} .jqx-slider-track-horizontal-fresh, .jqx-slider-track-vertical-fresh{border-color: #e8e8e8; background: #e8e8e8;} .jqx-grid-column-sortdescbutton-fresh, jqx-grid-column-filterbutton-fresh, .jqx-grid-column-sortascbutton-fresh{ background-color:transparent; border-style:solid; border-width:0px 0px 0px 0px; border-color:#8e8e97} .jqx-menu-item-arrow-right-selected-fresh{background-image:url(images/icon-right-white.png); background-position:100% 50%; background-repeat:no-repeat} .jqx-menu-item-arrow-down-selected-fresh{background-image:url(images/icon-down-white.png); background-position:100% 50%; background-repeat:no-repeat} .jqx-menu-item-arrow-up-selected-fresh{background-image:url(images/icon-up-white.png);background-position:100% 50%; background-repeat:no-repeat} .jqx-menu-item-arrow-left-selected-fresh{background-image:url(images/icon-left-white.png); background-position:0 50%; background-repeat:no-repeat} .jqx-grid-bottomright-fresh, .jqx-panel-bottomright-fresh, .jqx-listbox-bottomright-fresh{background-color: #efefef;} .jqx-tabs-title-selected-top-fresh, .jqx-tabs-selection-tracker-top-fresh {border-color: #8e8e97; border-bottom: 1px solid #f7f7f7; text-shadow:0 1px 0 #f2f2f2; filter: none; color: #222; background: #f7f7f7;} .jqx-tabs-title-selected-bottom-fresh, .jqx-tabs-selection-tracker-bottom-fresh {border-color: #8e8e97; border-top: 1px solid #f7f7f7; text-shadow:0 1px 0 #f2f2f2; filter: none; color: #222; background: #f7f7f7;} .jqx-tabs-title-fresh, .jqx-window-fresh, .jqx-docking-fresh, .jqx-widget-fresh .jqx-window-fresh {-webkit-box-shadow: none;-moz-box-shadow:none;-o-box-shadow: none;box-shadow :none;} .jqx-splitter-splitbar-horizontal-fresh, .jqx-splitter-splitbar-vertical-fresh, .jqx-splitter-splitbar-hover-fresh, .jqx-splitter-splitbar-hover-horizontal-fresh{background: #a5a9b6;} .jqx-splitter-collapse-button-horizontal-fresh, .jqx-splitter-collapse-button-vertical-fresh{background: #1847bd;} .jqx-slider-tick-horizontal-black, .jqx-slider-tick-vertical-black{background: #1847bd; border-color: #1847bd;} .jqx-widget-fresh .jqx-grid-cell-fresh, .jqx-widget-fresh .jqx-grid-column-header-fresh, .jqx-widget-fresh .jqx-grid-group-cell-fresh {border-color: #8e8e97; background-color: #f7f7f7;} .jqx-widget-fresh .jqx-grid-cell-sort-fresh, .jqx-widget-fresh .jqx-grid-cell-filter-fresh, .jqx-widget-fresh .jqx-grid-cell-alt-fresh, .jqx-widget-fresh .jqx-grid-cell-pinned-fresh{background-color:#d7d9df} .jqx-widget-fresh, .jqx-widget-header-fresh, .jqx-widget-content-fresh{-webkit-background-clip: padding-box; background-clip: padding-box;} .jqx-menu-vertical-fresh{ background:#d2d2d8; filter: none;}
0x6a
trunk/libraries/jqwidgets/styles/jqx.fresh.css
CSS
asf20
8,464
.jqx-rc-tl-ui-smoothness{border-top-left-radius:4px; moz-border-radius-topleft:4px; webkit-border-top-left-radius:4px} .jqx-rc-tr-ui-smoothness{border-top-right-radius:4px; moz-border-radius-topright:4px; webkit-border-top-right-radius:4px} .jqx-rc-bl-ui-smoothness{border-bottom-left-radius:4px; moz-border-radius-bottomleft:4px; webkit-border-bottom-left-radius:4px} .jqx-rc-br-ui-smoothness{border-bottom-right-radius:4px; moz-border-radius-bottomright:4px; webkit-border-bottom-right-radius:4px} .jqx-rc-t-ui-smoothness{border-top-left-radius:4px; border-top-right-radius:4px; moz-border-radius-topleft:4px; moz-border-radius-topright:4px; webkit-border-top-left-radius:4px; webkit-border-top-right-radius:4px} .jqx-rc-b-ui-smoothness{border-bottom-left-radius:4px; border-bottom-right-radius:4px; moz-border-radius-bottomleft:4px; moz-border-radius-bottomright:4px; webkit-border-bottom-left-radius:4px; webkit-border-bottom-right-radius:4px} .jqx-rc-r-ui-smoothness{border-bottom-right-radius:4px; border-top-right-radius:4px; moz-border-radius-bottomright:4px; moz-border-radius-topright:4px; webkit-border-bottom-right-radius:4px; webkit-border-top-right-radius:4px} .jqx-rc-l-ui-smoothness{border-bottom-left-radius:4px; border-top-left-radius:4px; moz-border-radius-bottomleft:4px; moz-border-radius-topleft:4px; webkit-border-bottom-left-radius:4px; webkit-border-top-left-radius:4px} .jqx-rc-all-ui-smoothness{border-radius:4px; moz-border-radius:4px; webkit-border-radius:4px} /*Grid*/ .jqx-grid-column-sortascbutton-ui-smoothness{background-position:-96px -192px; background-image:url(images/smoothness/ui-icons_222222_256x240.png); margin-top:5px} .jqx-grid-column-sortdescbutton-ui-smoothness{margin-top:5px; background-position:-64px -192px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-grid-column-menubutton-ui-smoothness{margin-top:5px; background-position:-64px -192px; background-image:url(images/smoothness/ui-icons_454545_256x240.png); border-width:0px} /*Tree*/ .jqx-tree-item-arrow-expand-ui-smoothness, .jqx-tree-item-arrow-expand-hover-ui-smoothness{background-position:-65px -16px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-tree-item-arrow-collapse-ui-smoothness, .jqx-tree-item-arrow-collapse-hover-ui-smoothness{background-position:-32px -16px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-menu-item-arrow-right-ui-smoothness, .jqx-menu-item-arrow-right-selected-ui-smoothness{background-position:-32px -16px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-menu-item-arrow-left-ui-smoothness, .jqx-menu-item-arrow-left-selected-ui-smoothness, .jqx-tree-item-arrow-collapse-rtl-ui-smoothness, .jqx-tree-item-arrow-collapse-hover-rtl-ui-smoothness{background-position:-96px -16px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} /*Tabs*/ .jqx-tabs-title-ui-smoothness{border:1px solid #ccc; background:#E6E6E6 url(images/smoothness/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;} .jqx-tabs-header-ui-smoothness{border-width: 1px; margin:2px; border-radius:4px; moz-border-radius:4px; webkit-border-radius:4px} .jqx-tabs-title-bottom-ui-smoothness{border-bottom-color:#ccc; border-top-color: transparent;} .jqx-tabs-header-bottom-ui-smoothness{margin-top:-2px !important; padding-bottom: 3px; padding-top:1px} /*Radio Button*/ .jqx-radiobutton-ui-smoothness .jqx-fill-state-pressed-ui-smoothness{background:#222; border:1px solid #000} /*Calendar*/ .jqx-calendar-cell-ui-smoothness{font-size: 11px; background: #e6e6e6 url(images/smoothness/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; border-color:#d3d3d3; padding:.2em; text-align:right; text-decoration:none; moz-border-radius:0px !important; webkit-border-radius:0px !important; border-radius:0px !important} .jqx-calendar-cell-today-ui-smoothness{background:#ffe45c url(images/smoothness/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; border:1px solid #fed22f; color:#363636} .jqx-calendar-title-container-ui-smoothness{border: 1px solid #aaa; border-bottom-width: 0px; border-radius:4px; moz-border-radius:4px; webkit-border-radius:4px; font-weight: bold;} .jqx-calendar-month-container-ui-smoothness{border:none !important} .jqx-calendar-ui-smoothness{padding:2px} .jqx-calendar-column-cell-ui-smoothness{font-size: 11px; font-weight: bold;} .jqx-calendar-ui-smoothness .jqx-icon-arrow-left-ui-smoothness{background-image:url(images/smoothness/ui-icons_222222_256x240.png); background-position: -80px -192px; width:16px; height:16px; left:5px; position:relative} .jqx-calendar-ui-smoothness .jqx-icon-arrow-right-ui-smoothness{background-image:url(images/smoothness/ui-icons_222222_256x240.png); background-position: -48px -192px; width:16px; height:16px; right:5px; position:relative} /*Window*/ .jqx-window-ui-smoothness{padding: 2px;} .jqx-window-header-ui-smoothness{border: 1px solid #aaa; font-weight: bold; font-size: 11px; moz-border-radius:4px; border-radius:4px; webkit-border-radius:4px} .jqx-window-content-ui-smoothness{border-width:0px !important} .jqx-window-close-button-ui-smoothness{background-position:-96px -128px; background-image:url(images/smoothness/ui-icons_222222_256x240.png);moz-border-radius:4px; border-radius:4px; webkit-border-radius:4px} .jqx-window-collapse-button-ui-smoothness{background-position:0 -16px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-window-collapse-button-hover-ui-smoothness{background-image:url(images/smoothness/ui-icons_222222_256x240.png); background-color:#fff; border-radius:4px; moz-border-radius:4px; webkit-border-radius:4px} .jqx-window-collapse-button-collapsed-ui-smoothness, .jqx-window-collapse-button-collapsed-hover-ui-smoothness{background-position:-65px -16px} .jqx-window-modal-ui-smoothness{background-image:url(images/smoothness/ui-bg_diagonals-thick_20_666666_40x40.png)} .jqx-window-close-button-hover-ui-smoothness{background-color:#fff; background-position:-96px -128px; background-image:url(images/smoothness/ui-icons_222222_256x240.png); cursor:pointer; width:16px; height:16px} /*Splitter*/ .jqx-splitter-ui-smoothness .jqx-widget-content-ui-smoothness{border-width:0px; background: #fff;} /*Icons*/ .jqx-icon-arrow-up-ui-smoothness{background-position:0 -16px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-icon-arrow-down-ui-smoothness{background-position:-65px -16px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-icon-arrow-left-ui-smoothness{background-position:-96px -17px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-icon-arrow-right-ui-smoothness{background-position:-32px -17px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-icon-arrow-up-hover-ui-smoothness{background-position:0 -16px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-icon-arrow-down-hover-ui-smoothness{background-position:-65px -16px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-icon-arrow-left-selected-ui-smoothness{background-position:-96px -17px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-icon-arrow-right-selected-ui-smoothness{background-position:-32px -17px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-icon-arrow-up-selected-ui-smoothness{background-position:0 -16px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-icon-arrow-down-selected-ui-smoothness{background-position:-65px -16px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-icon-arrow-left-selected-ui-smoothness{background-position:-96px -17px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-icon-arrow-right-selected-ui-smoothness{background-position:-32px -17px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .icon-close-ui-smoothness{background-image:url(images/smoothness/ui-icons_222222_256x240.png); background-position:-80px -128px; cursor:pointer} .icon-close-hover-ui-smoothness{background-image:url(images/smoothness/ui-icons_222222_256x240.png); background-position:-80px -128px; cursor:pointer} /*Common Settings*/ .jqx-widget-ui-smoothness{ font-size:12px; font-style:normal; webkit-tap-highlight-color:rgba(0,0,0,0)} .jqx-widget-content-ui-smoothness{ background: #ffffff url(images/smoothness/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; border-color: #aaa; font-size:12px} .jqx-widget-content-ui-smoothness a{color:#222} .jqx-widget-header-ui-smoothness{ background: #cccccc url(images/smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; border-color: #aaa; color: #222222; font-size:12px} .jqx-widget-header-ui-smoothness a{color:#222} .jqx-fill-state-normal-ui-smoothness{background: #e6e6e6 url(images/smoothness/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; border-color:#d3d3d3; color:#555} .jqx-fill-state-normal-ui-smoothness a, .jqx-fill-state-normal-ui-smoothness a:link, .jqx-fill-state-normal-ui-smoothness a:visited{color:#555; text-decoration:none} .jqx-fill-state-hover-ui-smoothness{border-color: #999999; background: #dadada url(images/smoothness/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121;} .jqx-fill-state-hover-ui-smoothness a, .jqx-fill-state-hover-ui-smoothness a:hover{color:#212121; text-decoration:none} .jqx-fill-state-focus-ui-smoothness {border-color: #aaaaaa; } .jqx-fill-state-pressed-ui-smoothness{border-color: #aaaaaa; background: #ffffff url(images/smoothness/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } .jqx-fill-state-pressed-ui-smoothness a, .jqx-fill-state-pressed-ui-smoothness a:link, .jqx-fill-state-pressed-ui-smoothness a:visited{color:#212121; text-decoration:none} .jqx-input-button-content-ui-smoothness{font-size:10px} .jqx-input-icon-ui-smoothness{margin-left:2px; margin-top:-1px} .jqx-checkbox-check-checked-ui-smoothness{margin-top:1px; background-position:-65px -147px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} /*Progress Bar*/ .jqx-progressbar-ui-smoothness .jqx-fill-state-pressed-ui-smoothness{background: #cccccc; border-bottom: none;} .jqx-progressbar-value-vertical-ui-smoothness{background: #cccccc; border-right: none; border-bottom: 1px solid #aaa;} /*ScrollBar */ .jqx-scrollbar-thumb-state-normal-ui-smoothness, .jqx-scrollbar-thumb-state-normal-horizontal-ui-smoothness{ border: 1px solid #aaa; background: #cccccc;} .jqx-scrollbar-thumb-state-hover-ui-smoothness, .jqx-scrollbar-thumb-state-hover-horizontal-ui-smoothness{ background: #dadada;} .jqx-scrollbar-thumb-state-pressed-ui-smoothness, .jqx-scrollbar-thumb-state-pressed-horizontal-ui-smoothness{ background: #ffffff;} .jqx-tabs-title-selected-top-ui-smoothness { border-color: #aaa; border-bottom: 1px solid #fff; background-color: #fff; } /*applied to the tab's title when the tab is selected and the jqxTab's position property is set to 'bottom' .*/ .jqx-tabs-title-selected-bottom-ui-smoothness { border-color: #aaa; border-top: 1px solid #fff; background-color: #fff; } /*applied to the tab's selection tracker when the jqxTab's position property is set to 'top'.*/ .jqx-tabs-selection-tracker-top-ui-smoothness { border-color: #aaa; border-bottom: 1px solid #fff; } /*applied to the tab's selection tracker when the jqxTab's position property is set to 'bottom'.*/ .jqx-tabs-selection-tracker-bottom-ui-smoothness { border-color: #aaa; border-top: 1px solid #fff; } /*Slider*/ .jqx-slider-ui-smoothness .jqx-fill-state-pressed-ui-smoothness{background:#cccccc;} .jqx-slider-track-ui-smoothness{border: 1px solid #aaa; background: #fff;} /*Grid*/ .jqx-grid-cell-sort-ui-smoothness, .jqx-grid-cell-filter-ui-smoothness, .jqx-grid-cell-pinned-ui-smoothness, .jqx-grid-cell-selected-ui-smoothness{background:#e2e2e2;} .jqx-grid-bottomright-ui-smoothness, .jqx-panel-bottomright-ui-smoothness, .jqx-listbox-bottomright-ui-smoothness, .jqx-scrollbar-state-normal-ui-smoothness{background: #fff;} .jqx-grid-group-expand-ui-smoothness{background-position: 50% 50%; background-repeat: no-repeat;background-image: url(images/icon-down.png);} .jqx-grid-group-collapse-ui-smoothness{background-position: 50% 50%; background-repeat: no-repeat;background-image: url(images/icon-right.png);} /*Menu*/ .jqx-menu-dropdown-ui-smoothness { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; right: -1px; } /*Navigation Bar*/ .jqx-navigationbar-ui-smoothness{overflow: inherit;} .jqx-expander-header-ui-smoothness{margin-bottom:2px; margin-top:2px} .jqx-expander-header-ui-smoothness{background:#e6e6e6 url(images/smoothness/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; border:1px solid #aaa; border-radius:4px !important; moz-border-radius:4px !important; webkit-border-radius:4px !important} .jqx-expander-header-hover-ui-smoothness{border:1px solid #aaa;} .jqx-expander-header-expanded-ui-smoothness{background:#fff url(images/smoothness/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; border:1px solid #aaa; border-bottom-width:0px; border-top-left-radius:4px !important; border-top-right-radius:4px !important; moz-border-radius-topleft:4px !important; moz-border-radius-topright:4px !important; webkit-border-top-left-radius:4px !important; webkit-border-top-right-radius:4px !important; border-bottom-left-radius:0px !important; border-bottom-right-radius:0px !important; moz-border-radius-bottomleft:0px !important; moz-border-radius-bottomright:0px !important; webkit-border-bottom-left-radius:0px !important; webkit-border-bottom-right-radius:0px !important; margin-bottom:0px} .jqx-expander-content-bottom-ui-smoothness{border-bottom-left-radius:4px !important; border-bottom-right-radius:4px !important; moz-border-radius-bottomleft:4px !important; moz-border-radius-bottomright:4px !important; webkit-border-bottom-left-radius:4px !important; webkit-border-bottom-right-radius:4px !important; border-top-width:0px !important} .jqx-expander-arrow-top-ui-smoothness{background-position:-65px -16px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} .jqx-expander-arrow-bottom-ui-smoothness{background-position:0 -16px; background-image:url(images/smoothness/ui-icons_222222_256x240.png)} /*Scroll Bar*/ .jqx-scrollbar-ui-smoothness .jqx-icon-arrow-up-ui-smoothness{width: 16px; height: 16px; margin-left: auto;} .jqx-scrollbar-ui-smoothness .jqx-icon-arrow-down-ui-smoothness{width: 16px; height: 16px; margin-left: auto;} .jqx-scrollbar-ui-smoothness .jqx-icon-arrow-left-ui-smoothness{width: 16px; height: 16px; position: relative; top: 50%; margin-top: -8px;} .jqx-scrollbar-ui-smoothness .jqx-icon-arrow-right-ui-smoothness{width: 16px; height: 16px; position: relative; top: 50%; margin-top: -8px;}
0x6a
trunk/libraries/jqwidgets/styles/jqx.ui-smoothness.css
CSS
asf20
15,374
.jqx-widget-content-highcontrast{border-color: #000; background-color: #fff;} .jqx-fill-state-normal-highcontrast {color: #000;background-color: #fff;} .jqx-widget-header-highcontrast{color: #fff; border-color:#000; background-color:#000} .jqx-fill-state-hover-highcontrast{border-color:#000; color: #fff; background-color:#000} .jqx-fill-state-pressed-highcontrast{border-color:#37006e; color: #fff; background-color:#37006e} .jqx-fill-state-focus-highcontrast { border-color: #37006e; } .jqx-scrollbar-state-normal-highcontrast, .jqx-grid-bottomright-highcontrast, .jqx-panel-bottomright-highcontrast, .jqx-listbox-bottomright-highcontrast{background-color:#000} .jqx-widget-highcontrast .jqx-grid-column-header-highcontrast, .jqx-grid-cell-highcontrast, .jqx-widget-highcontrast .jqx-grid-cell-highcontrast, .jqx-widget-highcontrast .jqx-grid-group-cell-highcontrast, .jqx-grid-group-cell-highcontrast{border-color:#000} .jqx-tabs-title-selected-bottom-highcontrast, .jqx-tabs-selection-tracker-bottom-highcontrast, .jqx-tabs-title-selected-top-highcontrast, .jqx-tabs-selection-tracker-top-highcontrast{color: #000; border-color:#000; border-bottom:1px solid #fff; background:#fff} .jqx-grid-cell-sort-alt-highcontrast, .jqx-grid-cell-filter-alt-highcontrast, .jqx-grid-cell-pinned-highcontrast, .jqx-grid-cell-alt-highcontrast, .jqx-grid-cell-sort-highcontrast{ background-color:#000; color: #fff;} .jqx-grid-cell-selected-highcontrast{ background-color:#37006e; color:#fff} .jqx-grid-cell-hover-highcontrast{ background-color:#000; color: #fff;} .jqx-menu-vertical-highcontrast{background: #000; color: #fff;} .jqx-checkbox-hover-highcontrast { background-color: #fff; } .jqx-radiobutton-hover-highcontrast { background-color: #fff; } .jqx-scrollbar-thumb-state-hover-horizontal-highcontrast, .jqx-scrollbar-thumb-state-hover-highcontrast { background: #fff; } .jqx-scrollbar-thumb-state-pressed-horizontal-highcontrast, .jqx-scrollbar-thumb-state-pressed-highcontrast { background: #fff; }
0x6a
trunk/libraries/jqwidgets/styles/jqx.highcontrast.css
CSS
asf20
2,040
.jqx-rc-tl-ui-start{border-top-left-radius:5px; moz-border-radius-topleft:5px; webkit-border-top-left-radius:5px} .jqx-rc-tr-ui-start{border-top-right-radius:5px; moz-border-radius-topright:5px; webkit-border-top-right-radius:5px} .jqx-rc-bl-ui-start{border-bottom-left-radius:5px; moz-border-radius-bottomleft:5px; webkit-border-bottom-left-radius:5px} .jqx-rc-br-ui-start{border-bottom-right-radius:5px; moz-border-radius-bottomright:5px; webkit-border-bottom-right-radius:5px} .jqx-rc-t-ui-start{border-top-left-radius:5px; border-top-right-radius:5px; moz-border-radius-topleft:5px; moz-border-radius-topright:5px; webkit-border-top-left-radius:5px; webkit-border-top-right-radius:5px} .jqx-rc-b-ui-start{border-bottom-left-radius:5px; border-bottom-right-radius:5px; moz-border-radius-bottomleft:5px; moz-border-radius-bottomright:5px; webkit-border-bottom-left-radius:5px; webkit-border-bottom-right-radius:5px} .jqx-rc-r-ui-start{border-bottom-right-radius:5px; border-top-right-radius:5px; moz-border-radius-bottomright:5px; moz-border-radius-topright:5px; webkit-border-bottom-right-radius:5px; webkit-border-top-right-radius:5px} .jqx-rc-l-ui-start{border-bottom-left-radius:5px; border-top-left-radius:5px; moz-border-radius-bottomleft:5px; moz-border-radius-topleft:5px; webkit-border-bottom-left-radius:5px; webkit-border-top-left-radius:5px} .jqx-rc-all-ui-start{border-radius:5px; moz-border-radius:5px; webkit-border-radius:5px} /*Grid*/ .jqx-grid-column-sortascbutton-ui-start{background-position:-96px -192px; background-image:url(images/start/ui-icons_d8e7f3_256x240.png); margin-top:5px} .jqx-grid-column-sortdescbutton-ui-start{margin-top:5px; background-position:-64px -192px; background-image:url(images/start/ui-icons_d8e7f3_256x240.png)} .jqx-grid-column-menubutton-ui-start{margin-top:5px; background-position:-65px -16px; background-image:url(images/start/ui-icons_d8e7f3_256x240.png); border-width:0px} .jqx-grid-cell-sort-ui-start, .jqx-grid-cell-filter-ui-start, .jqx-grid-cell-pinned-ui-start{background: #ecf2f2; color: #1482b4;} .jqx-grid-cell-sort-alt-ui-start, .jqx-grid-cell-filter-alt-ui-start, .jqx-grid-cell-alt-ui-start{background: #ecf2f2;} /*Tree*/ .jqx-tree-item-arrow-expand-ui-start, .jqx-tree-item-arrow-expand-hover-ui-start{background-position:-65px -16px; background-image:url(images/start/ui-icons_222222_256x240.png)} .jqx-tree-item-arrow-collapse-ui-start, .jqx-tree-item-arrow-collapse-hover-ui-start{background-position:-32px -16px; background-image:url(images/start/ui-icons_222222_256x240.png)} .jqx-menu-item-arrow-right-ui-start, .jqx-menu-item-arrow-right-selected-ui-start{background-position:-32px -16px; background-image:url(images/start/ui-icons_222222_256x240.png)} .jqx-menu-item-arrow-left-ui-start, .jqx-menu-item-arrow-left-selected-ui-start, .jqx-tree-item-arrow-collapse-rtl-ui-start, .jqx-tree-item-arrow-collapse-hover-rtl-ui-start{background-position:-96px -16px; background-image:url(images/start/ui-icons_222222_256x240.png)} /*Tabs*/ .jqx-tabs-title-ui-start{border-color:#77d5f7; border-bottom-color: transparent; background: #0078ae url(images/start/ui-bg_glass_45_0078ae_1x400.png) 50% 50% repeat-x;} .jqx-tabs-header-ui-start{border-width: 1px; padding-bottom: 0px; margin:2px; border-radius:5px; moz-border-radius:5px; webkit-border-radius:5px} .jqx-tabs-title-bottom-ui-start{border-bottom-color:#77d5f7; border-top-color: transparent;} .jqx-tabs-header-bottom-ui-start{margin-top:-2px !important; padding-bottom: 3px; padding-top:1px} /*Radio Button*/ .jqx-radiobutton-ui-start .jqx-fill-state-pressed-ui-start{background:#fdfefe; border:1px solid #fdfefe} /*Calendar*/ .jqx-calendar-cell-ui-start{font-size: 11px; color: #fff; border-color: #77d5f7; background: #0078ae url(images/start/ui-bg_glass_45_0078ae_1x400.png) 50% 50% repeat-x; padding:.2em; text-align:right; text-decoration:none; moz-border-radius:0px !important; webkit-border-radius:0px !important; border-radius:0px !important} .jqx-calendar-cell-today-ui-start{background:#ffe45c url(images/start/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; border:1px solid #fed22f; color:#363636} .jqx-calendar-title-container-ui-start{border: 1px solid #77d5f7; border-bottom-width: 0px; border-radius:5px; moz-border-radius:5px; webkit-border-radius:5px; font-weight: bold;} .jqx-calendar-month-container-ui-start{border:none !important} .jqx-calendar-ui-start{padding:2px} .jqx-calendar-column-cell-ui-start{font-size: 11px; font-weight: bold;} .jqx-calendar-ui-start .jqx-icon-arrow-left-ui-start{background-image:url(images/start/ui-icons_d8e7f3_256x240.png); background-position: -80px -192px; width:16px; height:16px; left:5px; position:relative} .jqx-calendar-ui-start .jqx-icon-arrow-right-ui-start{background-image:url(images/start/ui-icons_d8e7f3_256x240.png); background-position: -48px -192px; width:16px; height:16px; right:5px; position:relative} /*Window*/ .jqx-window-ui-start{padding: 2px;} .jqx-window-header-ui-start{border: 1px solid #77d5f7; font-weight: bold; font-size: 11px; moz-border-radius:5px; border-radius:5px; webkit-border-radius:5px} .jqx-window-content-ui-start{border-width:0px !important} .jqx-window-close-button-ui-start{background-position:-96px -128px; background-image:url(images/start/ui-icons_d8e7f3_256x240.png);moz-border-radius:5px; border-radius:5px; webkit-border-radius:5px} .jqx-window-collapse-button-ui-start{background-position:0 -16px; background-image:url(images/start/ui-icons_d8e7f3_256x240.png)} .jqx-window-collapse-button-hover-ui-start{background-image:url(images/start/ui-icons_d8e7f3_256x240.png); background-color:#fff; border-radius:5px; moz-border-radius:5px; webkit-border-radius:5px} .jqx-window-collapse-button-collapsed-ui-start, .jqx-window-collapse-button-collapsed-hover-ui-start{background-position:-65px -16px} .jqx-window-modal-ui-start{background-image:url(images/start/ui-bg_diagonals-thick_20_666666_40x40.png)} .jqx-window-close-button-hover-ui-start{background-color:#fff; background-position:-96px -128px; background-image:url(images/start/ui-icons_056b93_256x240.png); cursor:pointer; width:16px; height:16px} /*Splitter*/ .jqx-splitter-ui-start .jqx-widget-content-ui-start{border-width:0px; background: #fff;} /*Icons*/ .jqx-icon-arrow-up-ui-start{background-position:0 -16px; background-image:url(images/start/ui-icons_d8e7f3_256x240.png)} .jqx-icon-arrow-down-ui-start{background-position:-65px -16px; background-image:url(images/start/ui-icons_d8e7f3_256x240.png)} .jqx-icon-arrow-left-ui-start{background-position:-96px -17px; background-image:url(images/start/ui-icons_d8e7f3_256x240.png)} .jqx-icon-arrow-right-ui-start{background-position:-32px -17px; background-image:url(images/start/ui-icons_d8e7f3_256x240.png)} .jqx-icon-arrow-up-hover-ui-start{background-position:0 -16px; background-image:url(images/start/ui-icons_0078ae_256x240.png)} .jqx-icon-arrow-down-hover-ui-start{background-position:-65px -16px; background-image:url(images/start/ui-icons_0078ae_256x240.png)} .jqx-icon-arrow-left-selected-ui-start{background-position:-96px -17px; background-image:url(images/start/ui-icons_fcd113_256x240.png)} .jqx-icon-arrow-right-selected-ui-start{background-position:-32px -17px; background-image:url(images/start/ui-icons_fcd113_256x240.png)} .jqx-icon-arrow-up-selected-ui-start{background-position:0 -16px; background-image:url(images/start/ui-icons_fcd113_256x240.png)} .jqx-icon-arrow-down-selected-ui-start{background-position:-65px -16px; background-image:url(images/start/ui-icons_fcd113_256x240.png)} .icon-close-ui-start{background-image:url(images/start/ui-icons_d8e7f3_256x240.png); background-position:-80px -128px; cursor:pointer} .icon-close-hover-ui-start{background-image:url(images/start/ui-icons_0078ae_256x240.png); background-position:-80px -128px; cursor:pointer} /*Common Settings*/ .jqx-widget-ui-start{ border-color: #a6c9e2; font-size:12px; font-style:normal;} .jqx-widget-content-ui-start{border-color: #a6c9e2; background: #fcfdfd url(images/start/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x; color: #222222;} .jqx-widget-content-ui-start a{color:#222} .jqx-widget-header-ui-start{ border-color: #4297d7; background: #2191c0 url(images/start/ui-bg_gloss-wave_75_2191c0_500x100.png) 50% 50% repeat-x; color: #eaf5f7; font-size:12px} .jqx-widget-header-ui-start a{color:#eaf5f7} .jqx-fill-state-normal-ui-start{border-color: #77d5f7; background: #0078ae url(images/start/ui-bg_glass_45_0078ae_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff;} .jqx-fill-state-normal-ui-start a, .jqx-fill-state-normal-ui-start a:link, .jqx-fill-state-normal-ui-start a:visited{color:#ffffff; text-decoration:none} .jqx-fill-state-hover-ui-start{border-color: #448dae; background: #79c9ec url(images/start/ui-bg_glass_75_79c9ec_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #026890;} .jqx-fill-state-hover-ui-start a, .jqx-fill-state-hover-ui-start a:hover{color:#026890; text-decoration:none} .jqx-fill-state-pressed-ui-start{border-color: #acdd4a; background: #6eac2c url(images/start/ui-bg_gloss-wave_50_6eac2c_500x100.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; } .jqx-fill-state-pressed-ui-start a, .jqx-fill-state-pressed-ui-start a:link, .jqx-fill-state-pressed-ui-start a:visited{color:#ffffff; text-decoration:none} .jqx-input-button-content-ui-start{font-size:10px} .jqx-input-icon-ui-start{margin-left:2px; margin-top:-1px} .jqx-checkbox-check-checked-ui-start{margin-top:1px; background-position:-65px -147px; background-image:url(images/start/ui-icons_d8e7f3_256x240.png)} /*Progress Bar*/ .jqx-progressbar-ui-start .jqx-fill-state-pressed-ui-start{background: #7bbdd9; border-bottom: none;} .jqx-progressbar-value-vertical-ui-start{background: #7bbdd9; border-right: none; border-bottom: 1px solid #77d5f7;} /*ScrollBar */ .jqx-scrollbar-thumb-state-normal-ui-start, .jqx-scrollbar-thumb-state-normal-horizontal-ui-start{ border: 1px solid #77d5f7; background: #1482b4;} .jqx-scrollbar-thumb-state-hover-ui-start, .jqx-scrollbar-thumb-state-hover-horizontal-ui-start{ background: #46a3ca;} .jqx-scrollbar-thumb-state-pressed-ui-start, .jqx-scrollbar-thumb-state-pressed-horizontal-ui-start{border: 1px solid #acdd4a; background: #6eac2c;} /*Tabs */ .jqx-tabs-title-ui-start { } .jqx-tabs-selection-tracker-top-ui-start { background: #7cb441; border-bottom: 0px solid transparent; } .jqx-tabs-selection-tracker-bottom-ui-start { background: #7cb441; border-top: 0px solid transparent; } .jqx-tabs-title-selected-top-ui-start { padding-bottom: 5px; border-bottom: 0px solid #7cb441; } .jqx-tabs-title-selected-bottom-ui-start { border-top: 0px solid #7cb441; } /*Slider*/ .jqx-slider-track-ui-start{border: 1px solid #77d5f7; background: #fdfefe} .jqx-slider-rangebar { background: #7bbdd9; } /*Grid*/ .jqx-grid-bottomright-ui-start, .jqx-panel-bottomright-ui-start, .jqx-listbox-bottomright-ui-start, .jqx-scrollbar-state-normal-ui-start{background: #7bbdd9;} .jqx-widget-ui-start .jqx-grid-column-header-ui-start, .jqx-grid-cell-ui-start, .jqx-widget-ui-start .jqx-grid-cell-ui-start, .jqx-widget-ui-start .jqx-grid-group-cell-ui-start, .jqx-grid-group-cell-ui-start{border-color:#77d5f7} .jqx-grid-group-expand-ui-start{background-position: 50% 50%; background-repeat: no-repeat;background-image: url(images/icon-down.png);} .jqx-grid-group-collapse-ui-start{background-position: 50% 50%; background-repeat: no-repeat;background-image: url(images/icon-right.png);} /*Menu*/ .jqx-menu-dropdown-ui-start { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; -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; right: -1px; } /*Navigation Bar*/ .jqx-navigationbar-ui-start{overflow: inherit;} .jqx-expander-header-ui-start{margin-bottom:2px; margin-top:2px} .jqx-expander-header-ui-start{ background: #0078ae url(images/start/ui-bg_glass_45_0078ae_1x400.png) 50% 50% repeat-x; border:1px solid #77d5f7; border-radius:5px !important; moz-border-radius:5px !important; webkit-border-radius:5px !important} .jqx-expander-header-hover-ui-start{background: #79c9ec url(images/start/ui-bg_glass_75_79c9ec_1x400.png) 50% 50% repeat-x; border:1px solid #448dae;} .jqx-expander-header-expanded-ui-start{background: #6eac2c url(images/start/ui-bg_gloss-wave_50_6eac2c_500x100.png) 50% 50% repeat-x; border:1px solid #acdd4a; border-bottom-width:0px; border-top-left-radius:5px !important; border-top-right-radius:5px !important; moz-border-radius-topleft:5px !important; moz-border-radius-topright:5px !important; webkit-border-top-left-radius:5px !important; webkit-border-top-right-radius:5px !important; border-bottom-left-radius:0px !important; border-bottom-right-radius:0px !important; moz-border-radius-bottomleft:0px !important; moz-border-radius-bottomright:0px !important; webkit-border-bottom-left-radius:0px !important; webkit-border-bottom-right-radius:0px !important; margin-bottom:0px} .jqx-expander-content-bottom-ui-start{border-bottom-left-radius:5px !important; border-bottom-right-radius:5px !important; moz-border-radius-bottomleft:5px !important; moz-border-radius-bottomright:5px !important; webkit-border-bottom-left-radius:5px !important; webkit-border-bottom-right-radius:5px !important; border-top-width:0px !important} .jqx-expander-arrow-top-ui-start{width: 16px; height: 16px; position: relative; background-position:-65px -16px; background-image:url(images/start/ui-icons_d8e7f3_256x240.png);} .jqx-expander-arrow-bottom-ui-start{width: 16px; height: 16px; position: relative; background-position:0 -16px; background-image:url(images/start/ui-icons_d8e7f3_256x240.png);} .jqx-tabs-arrow-right-ui-start{background-position:-32px -16px; background-image:url(images/start/ui-icons_d8e7f3_256x240.png)} .jqx-tabs-arrow-left-ui-start{background-position:-96px -16px; background-image:url(images/start/ui-icons_d8e7f3_256x240.png)} /*Scroll Bar*/ .jqx-scrollbar-ui-start .jqx-icon-arrow-up-ui-start{width: 16px; height: 16px; margin-left: auto;} .jqx-scrollbar-ui-start .jqx-icon-arrow-down-ui-start{width: 16px; height: 16px; margin-left: auto;} .jqx-scrollbar-ui-start .jqx-icon-arrow-left-ui-start{width: 16px; height: 16px; position: relative; top: 50%; margin-top: -8px;} .jqx-scrollbar-ui-start .jqx-icon-arrow-right-ui-start{width: 16px; height: 16px; position: relative; top: 50%; margin-top: -8px;}
0x6a
trunk/libraries/jqwidgets/styles/jqx.ui-start.css
CSS
asf20
14,799
<!DOCTYPE html> <html lang="en"> <head> <title>403 Request forbidden</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css"> body{background: #ebebeb;font-family: dotum,tahoma} .error_contain{ padding: 0px; position:relative; } .error_contain div{ width:500px;margin:0 auto; } .error_contain h1{ padding: 40px 0; font-family: arial; text-align: center; margin: 0; font-size: 169px; line-height: normal; color: #ffffff; text-shadow: 0 0 10px #ffffff, 0 4px 3px #ffffff, 0 9px 3px #dddddd, 0 12px 1px #cccccc, 0 14px 5px rgba(0, 0, 0, 0.4), 0 20px 10px rgba(0, 0, 0, 0.1), 0 15px 80px rgba(0, 0, 100, 0.2); } .error_contain h3{color: #777;margin: 0;padding: 8px;padding-top: 20px} .error_contain p{margin: 0;padding: 8px;color: #777;text-align: justify;font-size: 13px} </style> </head> <body> <div class="error_contain"> <h1 style="">403</h1> <div> <h3>Oops! Request forbidden...<span style="float: right">٩(๏̯͡๏)۶</span></h3> <p> Sorry, it appears the page you were looking for is forbidden and not accessible. If the problem persists, please contact our support at example@domain.com. </p> </div> </div> </body> </html>
0x6a
trunk/libraries/jqwidgets/index.html
HTML
asf20
1,319
<!DOCTYPE html> <html lang="en"> <head> <title>403 Request forbidden</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css"> body{background: #ebebeb;font-family: dotum,tahoma} .error_contain{ padding: 0px; position:relative; } .error_contain div{ width:500px;margin:0 auto; } .error_contain h1{ padding: 40px 0; font-family: arial; text-align: center; margin: 0; font-size: 169px; line-height: normal; color: #ffffff; text-shadow: 0 0 10px #ffffff, 0 4px 3px #ffffff, 0 9px 3px #dddddd, 0 12px 1px #cccccc, 0 14px 5px rgba(0, 0, 0, 0.4), 0 20px 10px rgba(0, 0, 0, 0.1), 0 15px 80px rgba(0, 0, 100, 0.2); } .error_contain h3{color: #777;margin: 0;padding: 8px;padding-top: 20px} .error_contain p{margin: 0;padding: 8px;color: #777;text-align: justify;font-size: 13px} </style> </head> <body> <div class="error_contain"> <h1 style="">403</h1> <div> <h3>Oops! Request forbidden...<span style="float: right">٩(๏̯͡๏)۶</span></h3> <p> Sorry, it appears the page you were looking for is forbidden and not accessible. If the problem persists, please contact our support at example@domain.com. </p> </div> </div> </body> </html>
0x6a
trunk/libraries/index.html
HTML
asf20
1,319
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ if (!function_exists("get_data")) { function get_data($url) { $ch = curl_init(); $timeout = 50; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // ignore HTTPS curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); curl_setopt($ch, CURLOPT_HEADER, false); $data = curl_exec($ch); curl_close($ch); return $data; } } if (!function_exists("do_post_request")) { function do_post_request($url, $data) { $query = http_build_query($data); $ch = curl_init(); // Init cURL curl_setopt($ch, CURLOPT_URL, $url); // Post location curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // 1 = Return data, 0 = No return curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // ignore HTTPS curl_setopt($ch, CURLOPT_POST, 1); // This is POST curl_setopt($ch, CURLOPT_POSTFIELDS, $query); // Add the data to the request $response = curl_exec($ch); // Execute the request curl_close($ch); // Finish the request if ($response) { return $response; } else { return NULL; } } } if (!function_exists("decrypt")) { function decrypt($input, $key_seed) { $input = @base64_decode($input); $key = @substr(md5($key_seed), 0, 24); $text = @mcrypt_decrypt(MCRYPT_TRIPLEDES, $key, $input, MCRYPT_MODE_ECB, '12345678'); $block = @mcrypt_get_block_size('tripledes', 'ecb'); $packing = @ord($text{strlen($text) - 1}); if ($packing and ($packing < $block)) { for ($P = @strlen($text) - 1; $P >= @strlen($text) - $packing; $P--) { if (@ord($text{$P}) != $packing) { $packing = 0; } } } $text = @substr($text, 0, strlen($text) - $packing); return $text; } } if (!function_exists("getIP")) { function getIP() { $ip = ''; if (getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP"); else if (getenv("HTTP_X_FORWARDED_FOR")) $ip = getenv("HTTP_X_FORWARDED_FOR"); else if (getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR"); else $ip = "UNKNOWN"; $ip = explode(',', $ip); return $ip[0]; } } if (!function_exists("ascii_to_entities")) { function ascii_to_entities($str) { $count = 1; $out = ''; $temp = array(); for ($i = 0, $s = strlen($str); $i < $s; $i++) { $ordinal = ord($str[$i]); if ($ordinal < 128) { if (count($temp) == 1) { $out .= '&#'.array_shift($temp).';'; $count = 1; } $out .= $str[$i]; } else { if (count($temp) == 0) { $count = ($ordinal < 224) ? 2 : 3; } $temp[] = $ordinal; if (count($temp) == $count) { $number = ($count == 3) ? (($temp['0'] % 16) * 4096) + (($temp['1'] % 64) * 64) + ($temp['2'] % 64) : (($temp['0'] % 32) * 64) + ($temp['1'] % 64); $out .= '&#'.$number.';'; $count = 1; $temp = array(); } } } return $out; } } if (!function_exists("htmlentities_UTF8")) { function htmlentities_UTF8($str) { return htmlentities($str, ENT_QUOTES, 'utf-8'); } } if (!function_exists("htmlentities_decode_UTF8")) { function htmlentities_decode_UTF8($str) { return html_entity_decode($str, ENT_QUOTES, 'utf-8'); } } if (!function_exists("JO_location")) { function JO_location($URL = false) { if ($URL) exit("<script> try { parent.location.replace ( '" . $URL . "' ); } catch ( exception ) { location.replace( '" . $URL . "' ); } </script>"); else exit("<script> try { parent.location.replace ( '" . $_SERVER["HTTP_REFERER"] . "' ); } catch ( exception ) { location.replace( '" . $_SERVER["HTTP_REFERER"] . "' ); } </script>"); } } if (!function_exists("objectToArray")) { function objectToArray($d) { if (is_object($d)) { // Gets the properties of the given object // with get_object_vars function $d = get_object_vars($d); } if (is_array($d)) { /* * Return array converted to object * Using __FUNCTION__ (Magic constant) * for recursive call */ return array_map(__FUNCTION__, $d); } else { // Return array return $d; } } } if (!function_exists("convertUrl")) { function convertUrl($str) { $remove = "~ ` ! @ # $ % ^ & * ( ) _ + | \\ = ' \" ” “ ; : ? / > . , < ] [ { }"; $from = "à á ạ ả ã â ầ ấ ậ ẩ ẫ ă ằ ắ ặ ẳ ẵ è é ẹ ẻ ẽ ê ề ế ệ ể ễ ì í ị ỉ ĩ ò ó ọ ỏ õ ô ồ ố ộ ổ ỗ ơ ờ ớ ợ ở ỡ ù ú ụ ủ ũ ư ừ ứ ự ử ữ ỳ ý ỵ ỷ ỹ đ "; $to = "a a a a a a a a a a a a a a a a a e e e e e e e e e e e i i i i i o o o o o o o o o o o o o o o o o u u u u u u u u u u u y y y y y d "; $from .= " À Á Ạ Ả Ã Â Ầ Ấ Ậ Ẩ Ẫ Ă Ằ Ắ Ặ Ẳ Ẵ È É Ẹ Ẻ Ẽ Ê Ề Ế Ệ Ể Ễ Ì Í Ị Ỉ Ĩ Ò Ó Ọ Ỏ Õ Ô Ồ Ố Ộ Ổ Ỗ Ơ Ờ Ớ Ợ Ở Ỡ Ù Ú Ụ Ủ Ũ Ư Ừ Ứ Ự Ử Ữ Ỳ Ý Ỵ Ỷ Ỹ Đ "; $to .= " a a a a a a a a a a a a a a a a a e e e e e e e e e e e i i i i i o o o o o o o o o o o o o o o o o u u u u u u u u u u u y y y y y d "; $remove = explode(" ", $remove); $from = explode(" ", $from); $to = explode(" ", $to); $str = str_replace($from, $to, $str); $str = str_replace($remove, "", $str); $str = strip_tags($str); $str = iconv("UTF-8", "ISO-8859-1//TRANSLIT//IGNORE", $str); //$str = iconv("ISO-8859-1","UTF-8",$str); $str = str_replace(" ", "-", $str); while (!(strpos($str, "--") === false)) { $str = str_replace("--", "-", $str); } $str = strtolower($str); return $str; } } if (!function_exists("check_url")) { function check_url($url){ $options = array( CURLOPT_RETURNTRANSFER => true, // return web page CURLOPT_HEADER => false, // don't return headers CURLOPT_FOLLOWLOCATION => true, // follow redirects CURLOPT_ENCODING => "", // handle all encodings CURLOPT_USERAGENT => "http://badao.gosu.vn/login", // who am i CURLOPT_AUTOREFERER => true, // set referer on redirect CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect CURLOPT_TIMEOUT => 120, // timeout on response CURLOPT_MAXREDIRS => 10, // stop after 10 redirects CURLOPT_SSL_VERIFYPEER => false, // don't verify ssl ); $ch = curl_init( $url ); curl_setopt_array( $ch, $options ); $content = curl_exec( $ch ); $err = curl_errno( $ch ); $errmsg = curl_error( $ch ); $header = curl_getinfo( $ch ); curl_close( $ch ); $header['errno'] = $err; $header['errmsg'] = $errmsg; $header['content'] = $content; return $header; } } if (!function_exists("get_real_ip")) { function get_real_ip() { $ip = false; if(!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; } if(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ips = explode(", ", $_SERVER['HTTP_X_FORWARDED_FOR']); if($ip) { array_unshift($ips, $ip); $ip = false; } for($i = 0; $i < count($ips); $i++) { if(!preg_match("/^(10|172\.16|192\.168)\./i", $ips[$i])) { if(version_compare(phpversion(), "5.0.0", ">=")) { if(ip2long($ips[$i]) != false) { $ip = $ips[$i]; break; } } else { if(ip2long($ips[$i]) != - 1) { $ip = $ips[$i]; break; } } } } } return ($ip ? $ip : $_SERVER['REMOTE_ADDR']); } } if (!function_exists("baotri")) { function baotri(){ die('<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Hệ thống đang bảo trì.</title> <meta name="keywords" content="MMORPG, RPG, MMO, tiên hiệp, kiếm hiệp, kiem hiep, tien hiep, game, webgame, nhập vai, tien lac"/> <meta name="description" content=" Tiên Lạc - Webgame đáng chơi nhất 2013, chiến trường siêu khủng, đồ họa lung linh, tính năng đặc sắc mới mẻ"/> </head> <body style="background-color: #ccc;"> <div style=" padding: 10px; width: 500px; height: 350px; position: absolute; left: 50%; top: 50%; margin: -180px 0 0 -260px; background: #ccc; background: rgba(0,0,0,.5) "> <img src="http://tienlac.gosu.vn/layout/888.jpg" </div> </body> </html>'); } } ?>
0x6a
trunk/libraries/function.php
PHP
asf20
10,955
if (typeof RedactorPlugins === 'undefined') var RedactorPlugins = {}; RedactorPlugins.fullscreen = { init: function() { this.fullscreen = false; this.addBtn('fullscreen', 'Fullscreen', function(obj) { obj.toggleFullscreen(); }); this.setBtnRight('fullscreen'); }, toggleFullscreen: function() { var html; if (this.fullscreen === false) { this.changeBtnIcon('fullscreen', 'normalscreen'); this.setBtnActive('fullscreen'); this.fullscreen = true; this.fsheight = this.$editor.height(); this.tmpspan = $('<span></span>'); this.$box.addClass('redactor_box_fullscreen').after(this.tmpspan); $('body, html').css('overflow', 'hidden'); $('body').prepend(this.$box); this.fullScreenResize(); $(window).resize($.proxy(this.fullScreenResize, this)); $(document).scrollTop(0,0); this.$editor.focus(); } else { this.removeBtnIcon('fullscreen', 'normalscreen'); this.setBtnInactive('fullscreen'); this.fullscreen = false; $(window).unbind('resize', $.proxy(this.fullScreenResize, this)); $('body, html').css('overflow', ''); this.$box.removeClass('redactor_box_fullscreen').css({ width: 'auto', height: 'auto' }); this.tmpspan.after(this.$box).remove(); this.syncCode(); if (this.opts.autoresize) { this.$el.css('height', 'auto'); this.$editor.css('height', 'auto') } else { this.$el.css('height', this.fsheight); this.$editor.css('height', this.fsheight) } this.$editor.focus(); } }, fullScreenResize: function() { if (this.fullscreen === false) { return false; } var pad = this.$editor.css('padding-top').replace('px', ''); var height = $(window).height() - 34; this.$box.width($(window).width() - 2).height(height+34); this.$editor.height(height-(pad*2)); this.$el.height(height); }, }
0x6a
trunk/libraries/redactor/fullscreen/fullscreen.js
JavaScript
asf20
1,883
<!DOCTYPE html> <html> <head> <title>Redactor is awesome!</title> <meta charset="utf-8"> <link rel="stylesheet" href="http://imperavi.com/js/redactor/redactor.css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> <script src="http://imperavi.com/js/redactor/redactor.js"></script> <!-- Redactor's plugin --> <script src="fullscreen.js"></script> <!-- Call Redactor --> <script type="text/javascript"> $(document).ready( function() { $('#redactor').redactor({ focus: true, plugins: ['fullscreen'] }); } ); </script> <!-- Site styles --> <style type="text/css"> html, body { margin: 0; padding: 0; } body { font-family: Helvetica, Arial, sans-serif; font-size: 14px; } #page { width: 940px; margin: 50px auto; } </style> </head> <body> <div id="page"> <textarea id="redactor" name="content" style="width: 99%; height: 400px;"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </textarea> </div> </body> </html>
0x6a
trunk/libraries/redactor/fullscreen/index.html
HTML
asf20
1,575
if (typeof RedactorPlugins === 'undefined') var RedactorPlugins = {}; RedactorPlugins.advanced = { init: function() { var Redactor=this; this.addBtnBefore('video', 'plugin_img', 'Insert Image', function(obj) { Redactor.saveSelection(); if($("#redactor_advanced_img").length==0){ $('body').append( '<div id="redactor_advanced_img">\ <div class="grid_9">\ <div class="pr20">\ <table class="w100pc">\ <tr>\ <td>Image Url</td>\ <td class="pr"><form name="frmredactor_advanced_img">\ <div class="pr">\ <input type="text" id="redactor_advanced_img_src" class="classic-input w100pc mb8" />\ <div class="pa hover50 icon16 chooseimage chooseimage_icon"\ onclick="redactorBrowse()"\ title="Choose image from my host"\ ></div>\ </div>\ </form>\ </td>\ </tr>\ <tr>\ <td>Width</td>\ <td><input type="number" id="redactor_advanced_img_w" class="classic-input w100pc mb8" /></td>\ </tr>\ <tr>\ <td>Height</td>\ <td><input type="number" id="redactor_advanced_img_h" class="classic-input w100pc mb8" /></td>\ </tr>\ <tr>\ <td>&nbsp;</td>\ <td><input type="checkbox" checked=1 id="redactor_advanced_img_c"/><label for="">Classic Image</label></td>\ </tr>\ </table>\ </div>\ </div>\ </div>'); } $("#redactor_advanced_img_src").val(""); $("#redactor_advanced_img_w").val(""); $("#redactor_advanced_img_w").val(""); ShowConfirmDialogMessage($("#redactor_advanced_img"), "Insert Image ",function(){ try{ var src=$("#redactor_advanced_img_src").val(),str=""; var w=parseInt($("#redactor_advanced_img_w").val()); var h=parseInt($("#redactor_advanced_img_h").val()); if (w>0){ if(w>500) w=500; str+= ' width:'+w+'px;'; } if (h>0){ if(h>500) h=500; str+= ' height:'+h+'px;'; } if ($('#redactor_advanced_img_c').is(':checked')) { str+= ' margin:0 auto;display:block;border:1px solid #ccc;padding:4px;background:#fff'; } Redactor.restoreSelection(); if(src!=""){ obj.insertHtml('<img src="'+src+'" style="max-with:500px;'+str+'"/>'); CloseConfirmDialogMessage($("#redactor_advanced_img")); } }catch(e){} }); $("#redactor_advanced_img_src").focus(); }); //this.addBtnSeparatorBefore('advanced'); }, insertClip: function(html) { this.restoreSelection(); this.execCommand('inserthtml', html); this.modalClose(); } } function redactorBrowse(){ BrowseServer('redactor_advanced_img_src' ); }
0x6a
trunk/libraries/redactor/advanced/advanced.js
JavaScript
asf20
4,705
<!DOCTYPE html> <html> <head> <title>Redactor is awesome!</title> <meta charset="utf-8"> <link rel="stylesheet" href="http://imperavi.com/js/redactor/redactor.css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> <script src="http://imperavi.com/js/redactor/redactor.js"></script> <!-- Redactor's plugin --> <script src="advanced.js"></script> <link rel="stylesheet" href="advanced.css" /> <!-- Call Redactor --> <script type="text/javascript"> $(document).ready( function() { $('#redactor').redactor({ focus: true, plugins: ['advanced'] }); } ); </script> <!-- Site styles --> <style type="text/css"> html, body { margin: 0; padding: 0; } body { font-family: Helvetica, Arial, sans-serif; font-size: 14px; } #page { width: 940px; margin: 50px auto; } </style> </head> <body> <div id="page"> <textarea id="redactor" name="content" style="width: 99%; height: 400px;"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </textarea> </div> </body> </html>
0x6a
trunk/libraries/redactor/advanced/index.html
HTML
asf20
1,605
body .redactor_toolbar li a.redactor_btn_advanced { background: url(advanced.png) no-repeat; }
0x6a
trunk/libraries/redactor/example/advanced.css
CSS
asf20
95
if (typeof RedactorPlugins === 'undefined') var RedactorPlugins = {}; RedactorPlugins.advanced = { init: function() { this.addBtnAfter('link', 'advanced', 'Advanced', function(obj) { obj.insertHtml('<b>It\'s awesome!</b> '); }); this.addBtnSeparatorBefore('advanced'); } }
0x6a
trunk/libraries/redactor/example/advanced.js
JavaScript
asf20
292
<!DOCTYPE html> <html> <head> <title>Redactor is awesome!</title> <meta charset="utf-8"> <link rel="stylesheet" href="http://imperavi.com/js/redactor/redactor.css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> <script src="http://imperavi.com/js/redactor/redactor.js"></script> <!-- Redactor's plugin --> <script src="advanced.js"></script> <link rel="stylesheet" href="advanced.css" /> <!-- Call Redactor --> <script type="text/javascript"> $(document).ready( function() { $('#redactor').redactor({ focus: true, plugins: ['advanced'] }); } ); </script> <!-- Site styles --> <style type="text/css"> html, body { margin: 0; padding: 0; } body { font-family: Helvetica, Arial, sans-serif; font-size: 14px; } #page { width: 940px; margin: 50px auto; } </style> </head> <body> <div id="page"> <textarea id="redactor" name="content" style="width: 99%; height: 400px;"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </textarea> </div> </body> </html>
0x6a
trunk/libraries/redactor/example/index.html
HTML
asf20
1,605
<!DOCTYPE html> <html lang="en"> <head> <title>403 Request forbidden</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css"> body{background: #ebebeb;font-family: dotum,tahoma} .error_contain{ padding: 0px; position:relative; } .error_contain div{ width:500px;margin:0 auto; } .error_contain h1{ padding: 40px 0; font-family: arial; text-align: center; margin: 0; font-size: 169px; line-height: normal; color: #ffffff; text-shadow: 0 0 10px #ffffff, 0 4px 3px #ffffff, 0 9px 3px #dddddd, 0 12px 1px #cccccc, 0 14px 5px rgba(0, 0, 0, 0.4), 0 20px 10px rgba(0, 0, 0, 0.1), 0 15px 80px rgba(0, 0, 100, 0.2); } .error_contain h3{color: #777;margin: 0;padding: 8px;padding-top: 20px} .error_contain p{margin: 0;padding: 8px;color: #777;text-align: justify;font-size: 13px} </style> </head> <body> <div class="error_contain"> <h1 style="">403</h1> <div> <h3>Oops! Request forbidden...<span style="float: right">٩(๏̯͡๏)۶</span></h3> <p> Sorry, it appears the page you were looking for is forbidden and not accessible. If the problem persists, please contact our support at example@domain.com. </p> </div> </div> </body> </html>
0x6a
trunk/libraries/redactor/index.html
HTML
asf20
1,319
.redactor_box { position: relative; border: 1px solid #ddd; overflow: visible; } .redactor_box, .redactor_box textarea { background-color: #fff; } body .redactor_air { position: absolute; border: 1px solid #ddd; border-bottom: none; z-index: 2; } /* Fullscreen */ body .redactor_box_fullscreen { left: 0 ; position: fixed; overflow: hidden; top: 0; width: 100%; z-index: 2000; } .redactor_box textarea { font-family: Menlo, Monaco, monospace, sans-serif; font-size: 13px; overflow: auto; resize: none; margin: 0; padding: 0; display: block; position: relative; z-index: 1004; outline: none; border: none; width: 100%; white-space: normal; } .redactor_editor, .redactor_editor:focus { position: relative; outline: none; box-shadow: none !important; padding: 8px ; margin: 0 !important; background: none; background: #fff ; overflow: auto; font-family: Tahoma,Arial, Helvetica, Verdana, sans-serif ; font-size: 11px; line-height: 16px ; white-space: normal; } .redactor_editor a { color: #15c !important; text-decoration: underline !important; } .redactor_editor object, .redactor_editor embed, .redactor_editor video, .redactor_editor img { width: auto; max-width: 100%; } .redactor_editor video, .redactor_editor img { height: auto; } .redactor_editor div, .redactor_editor p, .redactor_editor ul, .redactor_editor ol, .redactor_editor table, .redactor_editor dl, .redactor_editor blockquote, .redactor_editor pre { box-shadow: none; background: none; margin: 0 !important; line-height: 16px; font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif ; font-size: 11px; border: none; } .redactor_editor iframe, .redactor_editor object, .redactor_editor hr { /* margin-bottom: 15px !important;*/ } .redactor_editor blockquote { margin-left: 3em !important; font-style: italic !important; color: #777; } .redactor_editor ul, .redactor_editor ol { padding-left: 2em !important; } .redactor_editor ul ul, .redactor_editor ol ol, .redactor_editor ul ol, .redactor_editor ol ul { border: none; margin: 2px !important; padding: 0 !important; padding-left: 2em !important; } .redactor_editor dl dt { font-weight: bold; } .redactor_editor dd { margin-left: 1em;} .redactor_editor table { border-collapse: collapse; font-size: 1em !important; } .redactor_editor table td { border: 1px solid #ddd; padding: 5px !important; vertical-align: top; } .redactor_editor table thead td { border-bottom: 2px solid #000 !important; font-weight: bold !important; } .redactor_editor code, .redactor_editor pre { font-family: Menlo, Monaco, monospace, sans-serif !important; } .redactor_editor code { background-color: #d8d7d7 !important; } .redactor_editor pre { font-size: 90% !important; background: #f8f8f8 !important; border: 1px solid #ddd !important; border-radius: 3px !important; padding: 1em !important; white-space: pre; overflow: auto; } .redactor_editor hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; } .redactor_editor h1, .redactor_editor h2, .redactor_editor h3, .redactor_editor h4, .redactor_editor h5 { font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif !important; color: #000; background: none; margin: 0 !important; padding: 0 !important; font-weight: bold; } .redactor_editor h1 { font-size: 36px !important; line-height: 40px !important; margin-bottom: 10px !important; } .redactor_editor h2 { font-size: 30px !important; line-height: 38px !important; margin-bottom: 15px !important; } .redactor_editor h3 { font-size: 24px !important; line-height: 30px !important; margin-bottom: 10px !important; } .redactor_editor h4 { font-size: 18px !important; line-height: 24px !important; margin-bottom: 10px !important; } .redactor_editor h5 { font-size: 1em !important; margin-bottom: 10px !important; } .redactor_editor.redactor_editor_wym { background: #f6f6f6 !important; padding: 5px 15px !important; } .redactor_editor_wym div, .redactor_editor_wym p, .redactor_editor_wym ul, .redactor_editor_wym ol, .redactor_editor_wym table, .redactor_editor_wym dl, .redactor_editor_wym pre, .redactor_editor_wym h1, .redactor_editor_wym h2, .redactor_editor_wym h3, .redactor_editor_wym h4, .redactor_editor_wym h5, .redactor_editor_wym blockquote { background-color: #fff !important; border: 1px solid #e4e4e4 !important; padding: 10px !important; margin: 10px 0 !important; } .redactor_editor_wym ul, .redactor_editor_wym ol { padding-left: 2em !important; } /* TOOLBAR */ .redactor_toolbar { font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif !important; position: relative; left: 0; top: 0; margin: 0 !important; padding: 0 !important; padding-left: 0px !important; line-height: 0 !important; list-style: none !important; font-size: 0; background: #f1f1f1; background: -moz-linear-gradient(top, #f1f1f1 0%, #e2e2e2 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f1f1f1), color-stop(100%,#e2e2e2)); background: -webkit-linear-gradient(top, #f1f1f1 0%,#e2e2e2 100%); background: -o-linear-gradient(top, #f1f1f1 0%,#e2e2e2 100%); background: -ms-linear-gradient(top, #f1f1f1 0%,#e2e2e2 100%); background: linear-gradient(to bottom, #f1f1f1 0%,#e2e2e2 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1f1f1', endColorstr='#e2e2e2',GradientType=0 ); overflow: hidden !important; height: 26px !important; border-bottom: 1px solid #bbb; } body .redactor_air .redactor_toolbar { padding-right: 0px !important; } .redactor_toolbar li { float: left !important; margin: 0 !important; padding: 0px 0px; padding-right: 0; list-style: none !important; } .redactor_toolbar li.redactor_separator { float: left; height: 34px; border-left: 1px solid #d3d3d3; border-right: 1px solid #f1f1f1; padding: 0; margin: 0 2px 0 3px !important; } .redactor_toolbar li a { width: 24px; height: 24px; border: 1px solid transparent; * border: 1px solid #eee; display: block; line-height: 0; font-size: 0; cursor: pointer; zoom: 1; text-decoration: none; } .redactor_toolbar li.redactor_btn_right { float: none; float: right !important; } .redactor_toolbar li a { display: block; text-indent: -9999px; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAooAAAAZCAYAAAC2GQ9IAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAF4BJREFUeNrsXQlYFFe2LpoGgQZtVEARjYrigijuW9xIHNQxLsm4PWNERxhw17glE2OIz2U0xnFl1JeYoFGzqdHEMUHFLcaFuCBk3CKIyoAoNFtAoOn5T3sbO/0a6Oqqbsnk/t93v1q66p6qW/ec859zb1U76HQ6gYODg4ODg4ODg8MUDpwocnBwcHBwcHBwcKLIwcHBwcHBwcHBiSIHBwcHBwcHBwcnihwcHBwcHBwcHJwocnBwcHBwcHD8ZuEaERGxWaPRhIk5Sa1Wf7h169bpWC2y9wUr+TPj4OCoLJCMjo72ycnJaVNWVubl5OSU1qZNm0QYuV9403BwcPxOodiyZUubo0ePJn322Wee2NaIPL+hWJJIwDmTsViGcvv3ThSV06ZNG+js7OxIGyUlJdpNmzbFYbWM902OGgCXqKiolY8ePZplbQX16tVbFxMTswirxVUdl5ycrIyNje1QWFg4oKio6HkQNX/ogx+Rt/Lycnd2WLlCoSDSVlqrVq2fQeRuu7i4JKhUqrjhw4f/1LNnT62Ee3VctWpVjxs3bnwJeWqlUlkE+W4FBQVHGjduHDZ48OCHOEZXE9rqGcJ55syZczIyMlairbvMmTPnEj0TaytDe1s1vLNgwQIHrpocv3OoR48enWO600oiV6WMsLCwPiCJp2gHbVshw8fo+i5bcC7JDTY69zdDFJURERGhW7du/VYmEucaHh6+CU5otFarVZmyb5QMifV7TJgw4YfHjx8HmvvRy8vrbyCkS7D6WMa2rTN27Ng0ONnahh2enp7/QCQyV3gGqWMOWdBACvEhsPP/jpJalX4dOHBgUEpKygEQwXKQwGIET1q1Wl2KbRqCSAdxVKA4/vLLL846nU4B3QksLi4Oys/PH/3gwQPFsWPHhoG8HLZSP5XLli0bnJSUtMfPzy9zypQpR7y9vfMuXrzYCDo/NDExcTyI4maK5WpAWz1L1IW9eo1F+1OxoOstkFtIaGio8Nxzzwloe66BHLL6JFPAvuTt2bOnCVZzrZThNG/evMlpaWn/MOyA/UresWPHH+CDvzP44FGjRvmjpFQTbIrSxZUrV767aNGit032N0W5LJMMqkv46KOPThnvtIIs1jJa/5jsG+rYZ+5A1DuSyQ02c26NJorOiJxfd3Bw6Ij1H1CyJV6DIwxgaG5u7iSTBtqPxhuBVT85iCI66vJt27bNjIuL696mTZu06Ojo/bt37+68b9++3llZWQuXLFmSgX2bKDsjl1JC4d6AcqyFcjiDCH86cOBA6gwuVhDFimgJ7dIM6ymWnmhhB641ffr0v6IdFn366afehs4vs4xKoz6ZZdhSTgORkWBlUWGDashPbRhaGmJwwDnJIHy369SpU+Tm5kbErAzkUMB6KdNfyr47Qn9qgay4nTt3rtkXX3zRLj09PRr7z1ihn0rowZhr165tDQgIuAdCeBmGPgFBzu1evXoFw0iGgqg2x3Fu1RHFStrKJTY2tulrr71G919sZltsWz0rKEDmO7m6uuqdLsj5IHJWtiCKrVq1ElxcXPRk8c6dOzbJvNhABy2SJSHjY+v7sGc72QsNmzRpkgqCltS1a9f0DRs2DDp16lQ79K1S6OBG0uf58+cPYskZa4mi83vvvXfl7Nmz295///1w+NpU2JNVVCd88MqlS5fOX7x4MUU8CrJvMhJFBzMkUf8cZWw/s3WtXr16HdN9a5452cZU9JlJBiJqhFT2+zPXj6qIosO6desaJiYm/gVO4ige/vfYR0NZ9fPy8v4cEhKyg8hQVFTUMEQonlu2bNlUjeOoDO4pKSkRZvYbLtRdhgecj5LOOiZFTeRcb44bN67o8OHDPYqKihyhLD2wL1YG4mtA4d69e/2JJNarV68EJJGGpe4K1g2jGXeg/lacW11E5RYaGloARXbC+nOGdpJZhmBGEWwhw5ZyXEwiQTrODcZ1ETMYK7GobP5esFFU6FLNNfiADLaglQEDBpwk/cMqDfVSxtt16tSpH48ZM+ZtkLgk9qyUIJJuKPVBIF8goojzA7DfW2R/dnrrrbcm//zzz2u7det23c/Pr3Djxo1/xPqZwMDAtC+//HKFu7t74ciRIxMt6CPm2kpP/DIyMsIoMGcBoOm22LZSrFmzJiApKWkD7nkAAthSnU5H+l3u5eW1Gk5qOZyW68GDB1dkZ2eH4/cyFC2OcfDw8PgK97UIgW+qFQ6LSPmwyMjIeMgf8+jRI1/Ykk6DBg26J0gYfjZFhw4dnnbMpk3lIIr20kFLZVmb8bH1fdizneyFslWrVr3PSBr198F6Rw8IT4YzM2DD6LqljBISB3io1WofM19LHCML5d8o9UpLS4uYH8yWkSQSKbr1LBoUZPuYj4/PWQnE2pCV3F4JaWtWE/TcHFF0fOONN/rA8EVpNJrRcFJXnn/+ecocOlO2DQ0zAs6obPz48Vfo4KCgIA8Y4oUgXdF169bdjLITUcNPIoylOyLmAjgn0/13ZHyeRBRvFxcX68lnWVkZkbULa9eubU8kEUTucVhY2HmWnZEL5SDZrWmlXbt2KSy7c9NaJUSH+bvJerCF0Yol0L700kv3QRQNUVOuDWSIvXarZdhJDh17HqTts4cPH/ahHVjP27x58+gqyKKlqFNSUmIgSNRvjrI6SafaghA13blz56YzZ85Mg67tYX2K+q7KGcAyEn2dMn51xGQCFixYMC8tLW0JyOlFBE4OBw4c6Ari802fPn0y33nnnc9r166tnDdv3nZvb+9kMfeINmkKXXiOHBKIpjvshwbk+sUCwHQbBE7Xvn17MYGK+61bt7bQPM7WrVvfadKkySMEsm737t1TFxYW/gm6vRX1+yCYHQSilQ7yq3F1dS2GvfG5ffv2aJzrgTrGMBshBrXxjOq0aNHiLEp/2MvGP/7445/QXkfkzCo2aNBAACEV+vXrp88snjhxQnKd9tJBC2Rdrsn3Yc92shOIrH3LAs76sBH6BI3uyadP6LopmeEm0X7RSEcmVPnfzNeSrDSWqHGHTpIPviZjQkbvs/CsokG2lhh2xMTEpEdFRfnaukFnzJgRAtlRWM2R2JcryyjWCP0wJYpuERER22F0+3bs2PH8kCFD1sP4/os9ZHJS6uTk5L/07t37NHv4uXCOV1BWw2n5I2rvCcM7DRH6cpCwNRZmGEsHDx58/tixYy+j4zraQ1uuX7/uj05FUYDQqFGjgokTJ55s2LAhNVChjGLq3r17txetBAQEXGRtaG2kpsH1zmYPf0Bl0YcZ9Mfx6yzJfhKJxbFTWGRUIU9GGYaOT9mlEzQng5TDwnsRI6Oivdj8Dg2LOPfJLMeNkcQ/GnbQOu1jZFGYNGkSZcmE7du3h4l83k4gNnqyBHL2kD0fQ+BVV680paUe6Mex06dPf37jxo00N46Cn3zwriw989dqFSy4swS15s6d+7/379+fC6JzFrKVcXFxwdCLw506dfoRJG4tzVEcOXJkPEhqAo6/IYgYPUCbUOBI5JIy1uply5aFRUdH7zE8G5NtcjSBx48ft7T6htnZ2X38/f2zUUc86RmcUZ34+PgOGRkZ+StWrPizo6Ojc/fu3a+BRCpDQkIuY5uyGk3gSF5BMBwiPJkgLoYoOuKZ9rtz585Y9Kuxhp0gn0MoayIXUVSr1TT3keyVnijSNpFF2pYAMbotGOmQxkLHJWbIqz/KbCNZYoZsDbbkKxH6LUbHRbWTBFtlTxQa+TjPan6v6TB+85iybpcN09Ww/BrbV7F8JMg7BUBjQr7yUE4yvy5pFMEGGUVZ9dyUKHq2bNnSEdG/J5xGRzyEPDicm4GBgZQq1h44cKAbyJwvTUrF9j3WUDdg1P0uXbo0AI6yo0qlKu/SpQs5KJWFziTPx8fnfGxs7IfffvvtS7t27fIBUbXpW3zBwcHZb7755uE1a9b0RbTut3z58iEwwJeXLl36vVydmBxtfn6+2tXVtWzgwIFxEiMotYSUsiVzNDzQqc7RSnh4eHdcr6cNZAiGTghZlyS2gUXHMjLqKbLNLJXja0wSjckiosy9eqtbWBjKiJIbyONmMf3HsALSpgWxMR6icTTJOPkxo08RvA4RvN5gKRQKnXE9leHGjRuu27Zte4dI4rBhw05169YtBYRr3Ouvv/45dPlnLOeAhKUhcMxElD6ybdu2Py1cuJAyDmKGjchg32XX06CkpIRIbQYrptt0/Q1E1F2PEWrqW/tRbu3YsWMCAs++7PeKZ+Tg4KDLyckhZ0L2qz3OGZyXl6dmdYgZulKlpKS8sGnTplVeXl6UgWmMZzwEz95z9+7dIePGjaMpLFqpRsRACoks0pAzzVFE4C6VKIqds5UqyD/cXNW5l0XYEsOxwTZoA7Ud2tjqeWRWkOtKZcGnO+G3U1bWKwY6Z2fnfEHakLO5N49TDIQKSxrppJLI5GRbK6MS0mYIToz7oeTsqA0yirLquSlR1M6fP5+MbeYnn3zS5uTJk/1Onz49HM7hlcWLFycgSp/es2fPYyybSA2pmDt37uR79+4ta9as2dXx48ef6t+/P6WVz4lg2JSavkoPIDQ0NOuDDz5409ahCJsncRFO8AGuPxzXr7p79y6l4cmZ35dBhNv58+eJoQstWrTIYg8hX2JHsuXQc73IyMj3r127FgSi/gmI4hQbDT2bKqDaQjmXrVUS9kbaABvI8a7sh8zMzFBT8shIjMVQKpU69FOH7OzsWgik/j+z9/DQTZkyJQn6aGy0BDpezyZ/TS4rJaRXrlzpmJ6ePhUk8QT0958nTpzwBjmlQMc/OTl5aKdOna56e3uXov36NW/e/PrLL798UxA5RQMcuQ+Cz+eNhp4F2JkpRkPPFdtWDD070XxD3DdlK2n+Stqrr756HAFaL+xr7uvrm492VOCZqPz8/K6iP1xg+ugOAkZvjDuIyLzq22znzp0dUV8XkMR3maNoHgTAPjaHvZwHoviVHM6D5idSJtEYRBbpxRY4d6m2RPZpJVbUL1mWLe/JDvehroQgiHHuakuJooksz61bt448cuRIY+hf+UcAC+bE1muWENatW9esv8vPz28gUS3012/mzWMDWbxslBmzFpW9Qa0WbDS1wAYZRVl1wpQo5rBUahqcRnMUXziOOkVFRaqvv/6694MHD/qtXbt2CutQNESk7t27dw6i3JWBgYGGrEEK62iWprB1TO4FQd43lCoFm6NIk33qqdXq0UQUnZycyMF6yUQUPdFW3WmFnCsWDwRpE4RtPfRc0L1790sHDx4cuX37dnJ+ZTYaejadS0L3tVZmGabKEs0UcbbMcpxFXoq3iGPL6Q3n3Nxcl7y8PFcQRYVRhkqLbc3s2bOv+Pv7f4btU8LT+TEKOl4fqTx5Q7q6YM0JutARpFIBXafhmuNdunRpDGPeMiEhoTUIz3cIoHwPHTrUq0+fPokTJkzYCwJ2RxD5ZQAbDz1rQZ4e4Dr9pk2b9n8gfrdAotVarbYZiuucOXP2gNS5o/7/gU4GXLhwYWFhYSE5sfY5OTm1AwICxE4J8UR7fIN2U02aNOlv0Jceq1ev7ol66U1wISsrqy0C0PVr1qwJFyR8BouyiTQ3EURev03kMCIiQr8kAkm/SbUlVeiM2OFmU/Ji8ZCwRFnWyKxJQ8+GrKi19y2GEJnKavj48eMX9A5YpyM7QaM8SVbUazYX07Vr19sNGzbUpKam+u3YsaMTbEfqwoULZ8Lf0lQaKSOGVb15THZS6jcGFdBvXxBRW79BbeuMoqx6rjST3aNsIQ0B0VBMI0S0NLSSu3Tp0jlwIscYGcwyGOlXXnmFhmv/xSJoIlm5VpKiEsG+8yPKYMy73bx5sz5t9OjR46bEDlzR0b755pvg7OzsxrQRHBz8gyBxoqtg+6Hnx7NmzXoTBKFZVFTUwpiYmLk2kFFhrIw+faS2gQxjRdgvJRtZ3b2IjNjETBAv8fb21oAoNti/f//Q0tLSWyCA6SCIOSA+j5YvX/42yFCm8ORFl8wVK1YoiouLvRwcHJqCIL5EFdSvXz9XqH7qh7Jly5alCAKd9uzZ4zZ27NhbKpUqZ+jQoTtCQ0ObIygckZiY2Hn48OFnRowY8TWCqZMsayf26wbGQ8/euHbStXQWQJluix16zp48efIBOKOXb9261RPbPR8+fEhD0QU05QNk8Z8gt66wXa3i4+N7wzm2MMrYPcA9fyVSPz127dq1EEt6q5zmHnvOnz+fyPp7KG2EJ1NyDgnWfQarghQicKP+W7GPMog0/EwEkogiEUgrs4qW9O9UCZkTsUPCUmRZK7OmDD1rBPu9/GIqy1+j0ZQyomh4meW0TLKo3vvTp0/fu2HDhpEHDx6MpdK6deuD77777geC9Jf9fgW53jw2BIKm2Up7wAYZRVn1vLr/enZkmRN6e7Kt8GTe4RVGJo1/L2edQ+pnIfqjweINmSDKPFEGjTIdEuv1CAsLS2CfDPl1r/D0LOrbt2/G+PHjN2DzC+Fp+t0a1JoxY8bSzMzM+cY7IyMjg0JCQpIF6+dmkPGbyNap/TuIICgfW9AZ6LtZL1ImR3gyDYAce6jMMow7cH9GeDUW3otYGcFMRirrO01Z+0mVU9E/JUaP1fXp1t9//330+vXrR4P8lTs6OhZiWYSSr1QqH9MHuKG3RSA97lgqy8vLPbB0wdIVRUUf4J46deo+BHl/ZUFcpZwEdfRFYPB2QkJCBy8vr/WdO3f+0NnZucnp06dX5uTkBEFvvkPfPQzZp1i0XiRWl23cVjSXirL3dJyfIYBlffgH5vyc2O9dUWozu0W6SKMfdI0JFjoZi+eU4bpF/1GA4Z9ZZs6cqSeLhNjYWCEjI0M/BE3k0RjoH3qyKPKfWYKr0QWxulZTZMktM9hCm2GPe5IbHpMmTfqxsLCwpfHOoKCgPyxevPiYIMP8WqaXFLj1RnFl+njbKKtpbbbdrF2BvrViyS2pHIRGBugly7cMOwxvUMvERUx5zgDWHv0rySjq/ZfJ8cftrXvVEcUKAiQ8/dRGriDvP5hURYgMNyRV6XzZg+jLSFEBy144s6wqOVNSkOsS743aiD5ETm9SBrEMJWV99kvsxGqjTqRh25ZEDIaUcnXDCO7MyRrmpVD71JdZhun9qM2syyVDbXQvGqP2kyqnx7Zt27bHxcW1traDDBw48Fp4eDgNM5yt4jB6ueLFlJSUMVevXm12/fp196ysLBWIm3tJSQkNFztSAaGjf2rRqVSqYnd39yJE1fmtWrUqROR+r2nTpp+CVNKnMB5WIYcyfM1LS0sHHj58OOTQoUOd4DxcYBNq4VzHWbNmHQwODj7C+nCayEyivdpKwcgf6Xhdps+kZ/mMqD1ix9C0Eh8W7Dqwe6Hf/s36uyW6GWzpi1gw6B3F2i07/YVfdbpgjT7XBFlyy7TUZtjjnuSGL/NR/ZndL2Q6dpj5wBIZZCiYP2zESKP+szlMJ6X8M5kpATK8ebxPkOev7QyJjIk06sWylTQtjkZRj8oUAFgdRIsgirLqnqVE0V4wJUSCIH2+hD6CYgpRX/j1RPxypiQPWJFKgIlQN2DF1YhY07yuHEG+D4xyPBtQ36Qh836CdUNT1I9PsMAhtYrjlIzUtBOeDHH6MGPrzrJjDsLTaRJa4em0jRxmjGl4OImRoOqmgbgKT/8iqhHTD0PfpTrOMeNeWkPbyp6wNMv0W8gqcfx+Yc4fUmB1lwVPkjOKIEK6agiPtdO8zBEgucm5gSx2Fp7Mrb7I7Gi2TDJ6xMTExMbHx7cUc1JISMiNyMjIidUEzjZBTSOKHBw1GS5GgYCLFecbfwamuglmCiaDjDplzNxYIKI0Mu46ZtTLWJDzCzP4Bax+Sw2+EyOilHVTMdmFjGjmWOk47NlW9g5k5c6Ac3Bw1CyQjtMIRS6zgeUy1t3MKIi29E8Rco0C5xR7N8Zviih+/vnnFRc7atQoB96XOTj++2AvPef2hIOD4xklHGgKnI+IIJqC5UwWvNsscK7MJv7mMop0I9yoc3D895NFe+g5tyccHBwcVdtEPvTMwcHBwcHBwcFhFpwocnBwcHBwcHBwmMV/BBgAHTxEUMWGlxEAAAAASUVORK5CYII=); background-repeat: no-repeat; background-position: 0; } @media all and (-webkit-min-device-pixel-ratio: 1.5) { .redactor_toolbar li a { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABRQAAAAyCAYAAAAtK1dkAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAKodJREFUeNrsnQtcVNX2xzfDG+QtiG9QTE0rS4pMSVHDSjHN0Ewty/shzWumluY/zbTuVSz1qper9dcempl6y3c+/4Wamc98hyGCPARF3jA8Bpj/Wsw+eBgHGGBmzjnD+n4+mzmcOTOz93nsvfZvr72XjVarZQRBEARBEARBEARBEARBEMagolNAEARBEARBEARBEARBEISxkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITRkKBIEARBEARBEARBEARBEITR2NEpIAiCIIjmwejRoy36e1u3bqWTThAEQRAEQRBWCAmKBEEQBEEQBEEQBEEQRJ00dXB669atnvAdOXzbC15y6awqFxIUCYIgCIJoKC0g/R1Sb0gOkM5D+jekTDo1BEEQBEEQhqlLkBOLbfWhRDFOv3y4bYFyuEyaNOn7goKCCHP9gJub247169ePg011c7ufSVAkCIIgCKIh9IG0CVIgpOuQiiENhzQFEhpTh8z8+45vv/32rIyMjH9IeRL8/f3fX7Vq1QrYLKNbgiAIgiAIExDQwGPPy60A+h6IsJ2rv1+MBUTFtuYUExH4/hHw0obbxc0KEhQJgiAIc2Btoo/tBx98MDA1NfXj0tLSHpWVlS3MmW+VSlXo6Oh4pU2bNh8tXrz4MOwql8l17QdpH9N5Ij4F6QTf3xXSNkjfQ+rGzOup6Cf1fYVAHpbAy3eQUuhxtz6WLl2qteTvzZ4924bOOkEQBLF169Z/wUsv/i+KcL1qOdRTpkUI0Ns+b4TnZdVxZsqPr4XK7cdIUCSEjvCUKVMWFBUVjSgpKele593p6xsdExOzADZL6bQRBEHca1StSPSxf//99ycnJib+S6vVqiyRbxQsi4uLQxISEvbBb7+9ZMmStbBbI/HpFIuJoZDSRO9dgxQJ6Qqk9yHNMmM+WsvoPm/NSFBskr311ltvfZSdnf3WyJEje40ZMyYJ9mnptBAEQRDNFGwHv4G0k+nExO0KLINY6PSsT0yE9782c34c9H4PhUtTeEPqi70OzfGGJUGxJjYbN27scPjw4f3QketWyw3/ZVRU1Jjc3FxX/D8mJuY3eHFi8hIU3ceNG3dFo9G0M/oD7u4H7ezszqxdu3YRk6c4avvxxx8PvHTp0sG6DlKpVPnff/99B9jMo9uZICTFakSfnJwc/5SUlH9YSkzUB387MTFxV2Bg4E0Jz6FYTBzAdGLiJEhn2b0RZRQVr7J7o+rmwqUBhqHDwYMHW4eHh6ez+r1U7Y8fP+7bt29fLKPGSOPRhR71JuGnVqv/VllZ6R4fHz8V/p/PdFPoCYIgiKYJHTlN+QLoG36/bt06bOfVcs1/586dxyxevPhH7CdOnTp1YWZm5hz9Y5S2PAmfHny+IWspKvlehHLuYDrxNMmCefqGmcYbspcFbF7ZQ4JiTdyOHj36Y21iIqdcpVLZiv7HKSolMiuH+6ZNm97FG3zOnDmvQ0e0lfAGdEhvR0dHb8RKddeuXcHQeeoF7/vl5+eHw77w1157bVSPHj3Gzp49+wL8XymjMtnOnz8/A16nbd68+eXt27f31Wsscl599dUDwcHB++FfD2ZZQdFgRcnXgmDmagzMsdYEXyQYgywcgu/3NqVhYsFySNIAUznuoyGijzmeSVOJPnb79+8frNFo3HhdUzFt2rTELl26oEBVYab8q27duuW3ZMmSLhkZGbb427///vsgqL83MGmmPgtiYjbTiYnJkBYznSfiXD2jzFmC/NVlGHqlpKQ8C6/YNtT3PLknJSWF9u3b9xhs55PxaH4b9PPPPx+lVqtb4j+3b9/G9Y2WMxIUqQ2xYPmUll+yTQgjCRA2hgwZcmbSpEm4dAo6jLhFRUW9KTjG6L2viY+Pb7du3brnse8IoGOKD5NIUIRr/kZWVtbjCxcufBlsIS/hDScnJ82HH364OSgo6CT8Gw/JHpJDTEzMT2inrF+/PvLAgQPBvFxbYN9xSI5MQesdW5GYyOrysORiItpwsRZ+vs9DvmKbcH2oPRcbcyYSIIzJkKMwciBME4bPlkpwQWo9FytXrnwlLy/vsXqOu1FZWSnuROYx+Xn0YUcIp53Zd+/ePVMsKKpUKrzmcZDShw8fjikzOjp6+NmzZ6s6y8XFxV2vX7++HjYHyqzhxnN+G8sVHh7+h76gOGbMmLjg4OCjvNyW9k4MaOB+U/6uqdeaiIKEU0S9LFgWU5cjQKJ7lMrReNHH1JhS9HEA2gj/ODs7F3Xp0gWnH18yo3Fq16ZNmx7wW+gx7s4z0ZobxJYWFFFMRM9wYZqzWEzEqeSf6h0bBGmLhfNYq2EINoZfamoq5uk4HHOnHjvFOykpCcWtX+HYbHMbkcbaT2Y0FKVu1z3i4uLGCf/cvn37gY0bNw6aMGHCd8x8Yr1ZCQkJqUpffPEFKymRfKzZ2toQc5VPafkl24QwSoDAPyNHjkwbO3YstuGneP+ou55jDNMC8PIHpGywb9pBv9Bm5syZkU5OTtg3dJYo/9gHveDj42MH/buwPXv2VPdL2rdvrw4KCkLHl3PYn2W6GQXoBIOzOJwmTZrUCgVFeMV+IR6XyhS0NJkR04OT4P0Apd+gEoqJDTrfBo6XYnBD1vWunYUulM2xY8e65ebmToNOUcl77713iVdQcnq4W6jV6gFW0oigoHgZkrqoqKhGB6q8vBzP+Rmmm5aGD0TcSy+9ZHv27NmXq2vw3NxHv/rqq+def/31rTIy6jEfWJbSTZs2TRC/gQ1L3759v4XN3bxhsXSePRu439y/2+R+Lrs/Squngsoh1QLFVI66Oc+NBpMJKhYSROzs7e2dhH80Gg3WoTjafRryX2Gm/OPU6nz+W1XwPNha+F4QxET0Dsf2UV9MfFVU37ZlusjPKDyulFmb2BBve0naPLSTVq5c6Xft2rU3wRZ5trKyssZzaGNjU+Lo6HjZzc1t67Jly/bDvVdu4DvsZs2a9WxBQcGo0tLSntBHdK1xU6lUuc7Ozj8/8MADa2bMmHGLSbtWoWrXrl0haWlpweKdly9fnsjbckV6Ij3yyCPoPcO6du3KLly4IAtBwYp/17OZ5pdsE8Kods/Dw6Ng7NixXzFdwLRrvN9drOcYg84kKKb8znTCGw5iZjz99NO+f/zxh5+E+cc2AEXOgsLCwleYLtib0JdFL/ZfeX9WaN+xTbzJ7RXUGGZCOsqTNYmJKMIlQXpHyTenXMRETkAjjrf04Ias6107E90UNpMnT/Zeu3ZtNjwEhgxU58OHD78NnSOX/v37XwsICMCRf423tze6UWczeSzA7QqGtpuVNSbl0GjU5s2Cozko0J3u3LmzP5Q9EhqU6s7qrVu3hsHLXlb7tC+pcE5JSanhRcrXFTvPG5EKRjSFLyB1otNAENXYIKL/tdw4rbeuEQxDHM3ka+IY3RHgdbRWnAmmW2LDUvRnumnOxoqJOE0Yl0nA5TMyZXYNtQ04rtLSNgncH/azZs36G7S7n1ZUVLjWdhy00Y/m5uZOeOONN45FRkaOhnQbbS60wTZv3uw3adKk7woKCgbW9VtqtbrPqVOn3pkxY8YHK1asWMOkmwLmcu7cuZeGDh16JTY29sGioqKqezstLe2pkydPdgkJCTnDFBacpWPHjszTU2d7d+vWTQ6CIkEQzRc19LfRKzGW3RMTjbE9qoS8ESNGfA112BsS18NV9ha0izXaKejbVvLyGBosxP3CTDU5ziKs12as431BhEMUKyjKTEwU8iSOql0X5CVtgKYKig6+vr5vT5w4cZRWq8WH+jlmWIBqmZycPAI3Bg8ejGs04HoHdmAc74LPqlxdXX+IiYlZxaRd28AWaI5rShagDc+vX7Wg6OLigusQtmDyExR9MjIyaqxx2bp1a5zCjdOhyyXKU66Biqh6vbgGVFINwZLr0dVWRrmWw1x5pXIQDSUA/zRSVJSShoqJaBT6chsAOzDoGbCXd2LMTnR09Kt+fn59oR3TqFSqct4WYJtWNm/ePGc3NzeHBQsWjGrTpk0BHIP5rrSxsdFCquAdEy18jsExTnCsHbyGt2vXrmq+KhxvozuE2cAxqm+++aaniY1Yh7lz505PSUlZauxnCgsLQ/fs2fMbtNOh8PlbsbGxOL3rV7Va3dmYz6NomZaW9q/33nvP+9NPP/2nRB0un8TExGHTpk3bnZub2+r48eNV6yiWlZU5QXnGh4SE4CwLRa2l2KvXvaoaxUV/f3+MMi9llqy9DTFF+ZSWX7JNCGPJ/OCDD3DZlJuNqOPR2ecCtIWfMGnWT2zWNmMttoJYhFP0Os5gC6MmNEJUNqnXR01i96Jq11v/McsGj1FEvdsYAU0FFUyP27dvT83Ly3sFDNMqr75WrVr9BS/oGp2vbyx/8sknbxcVFXmDgZjctWvXX7j408rd3b0lrpkDRvCTY8eO/dDDw+M7+J6YhQsXXmGWDwhSFhYWdvrYsWPhza32AuO9dUlJib14X3BwcLwMs2oL99NTpaWljsIOZ2fnilGjRu2TQ0Wk0Wh2VT0g0DG1tbXNESocyO9G2LfLlD8IHdw8R0dHS1ZoSQoqh6HrUT3CCvtN7uVlznJgAwf1rCBq4NRXrcLKUevzHBQU9ERWVtYrxcXFA+H+6gK/HY9TMn18fL775z//eaqpU4plgKfIgFKKqCgWE3HNRIzmXJ+Y6M90YuIJSDi9agLvkFhEUJwzZ85ppos2XWkgOa9cuXIIHINCZyHTeTyIExO9Oq1evbrfu+++e5HdC7Zmo/fquHfvXpPkG+4H1VdffdUnMTFxsXj/gw8+WB4YGKhu2bIl5kELz7rdtWvX3CA5FBYWVh0Dz0zgoUOH/jN06NC/7dy5c7VYTHRxccEpt2WQCuGZqhpoy87OdkpKSnK+dOlSdVufnJw875tvvvnltddeO2phm8s+Ojp6XLt27a7Bs37y4Ycf9j1+/HiE8OaNGzdehJel/N5TxoPu6Vk1zVkMTn+WWFA0a1sotEWW6mxB3akSnld4drT65WtsmwfPVPKGDRtqLCdx4sQJ/I1Kc1yP2jqtSrNNrMDGsnbu8D55YxZzxRkSOP35LpNf4FGrBuqdr6Gum6i3r1pMRBsS/hfEJcasQ2gPYBJ7/sF5/aMB18iL2vOaNERQdJg6derbYLS+VFRUFCLsBIOw6LHHHssIDw/fVsvnfBMSEqoejOHDhx9gurX7ivD/+fPnbzt48ODL586d809NTXUDg/dNTK+//vpJMIj/a2GvxcKePXueAwMw88KFC77NqO5y27Fjx3TxjkGDBiWHhoYe550vOeEK91KN6VxBQUE4te4Gk9iT0lBFJFQ4EyZMOGumRseiFZqCyoEV4HmoHMWVq4cg6OD+2gIuyO164H2F3wuNRh4kJhY/oBxeSimHobZr7ty5o+/evft+Xl5etcdXSUnJg5ig8zAA3l8CedkKZdRYS2WrAFFRiObcEDERX3EgTiwmYmCnry2Y70yeV62B5FGii46B5zyP3S8iio2oFmVlZaW87TPU/mGdUmDCfLe4evXq+3C/Vz/cUVFRKYMHD8bp4zd5fvF8Y5RyDMqDwYFa8Dzf5NfKa8WKFZv5sQE8j2hj4RqJ6Xwbvx8HfzvGxsaGrl27tiMOUGi1WtXFixfnwf4XLdyGeiUmJo555plncK3eS2FhYeV79uwZlJKSUhWNPScnp9233347aPz48ZuYQpYxQTHxyJEjVQFZcA1F8T4pg7M0pJPUyLZCkujIFgpoZOry5Yo7zUIZzB3N1Vy2iQRCixcjGkIxa5qXd1M/TzRONNrJ64QR/L6vISaKxSXRthwx1qNODlOIAxpxvMXzLef23BhB0X7mzJmvp6enfyZ4I3p5eRX37t0767nnnktu3749ijk4mo8C1B29zKF34oyioiIf9E7s0qULGo9pcEIq4b07fn5+P4HBmAfpYTAkO+3bt6/D2bNnfcCYDEHREr0WW7du/e7y5cuxk2LuTiW6dF+bPHnyliVLlkTdvHnTwcorrSqBGDpPY4XI1q6urtoXX3wxOSIi4n+ZLoJpkczy7JGbm9tDvMPf3x87VbctcH80piIKsMDvnjdxhYIvN9j9a7UFKKkcekKB2FhXUjkCxCKUgYq+o8Kuh4Dtp59+OjA7O3se1D3dDB2AIqNKpZoHx92Fsh+2Ak9FsUEgV1FRHIClKWIiRn2ea+G834XzmVZLnVZZUlKCnaI8OOZuPfWfFo5FQbGgtusDx5hSUPSF56B6gLZPnz5ZgwcPxnVsf+HXAfOCU6LnJicnj9FoNPrrPL9Rq+Fmb1/Url27/0ZHRy/i34Oe/f4DBgy4euXKlXeOHDlStdh+VlbWE8zA7BIzgsFYgjHozKhRo9AzMgF39uzZMx7swEeEgy5dujQRXnYxhXhfoDfihg0bqjwVcRuRQXAWxdkgEpXD2stnFtvECq6HWYVcc3XcCeuFex/G8vtEuEfQo1ksJgrHyX0tvyRm3DRiqaYQ6z+Xcl9DUdbthDGCopu3t3coehDiPyNHjkwZO3bsSdj8k+kiCSdywzeL3T+S0RIMxDG48fTTT6PhiN6Jwqh/Ac94Cj4o7du3D4yKikJPle6bN28O2b59e3sUMPG3Yd9/mW76lDnBqQ3JPj4+O6ATa7t79+5hkPeWsbGxztZUWd28ebMNVET33TAPPvhgab9+/a5DZwYffvQkTWby8wzwuHXr1gN6+caF2/Mkzpe1RXm29G+Z9bv1DEZFRquuRVT0VOh91eLOnTtTc3JyutV1EL6PxzFd5EGpn3FTG405MutUmFJMnE3dAqPxUqvVHsI/nTp1Ogcv+yFdhHukDKdEgz0UmpCQ8LeGfrFGo3FNTEx87csvv9zyxhtvHERRHr4P7a2Sjh074vV+Ho8rLi5Gj0dvC5bZ9fjx46/26tULvTBvcdvOcejQobv27dtXLSimpaX1UUpwFhQNwbaq8kSMi4urFhQR3JZQULQWG4SiVcvUNlH49QiQqBxN6rg3wu69v+Hx8qrRX8flviDdrEdwISHUhIg9k8WDzCJRMYkfmqSg9bfFdm5uXfc5d2CRC3iu5b6GoqzbCWMERScwcivi4+MrMAowCn0HDx50bdu2bTakvVOmTPkDbppyAzeK3X/+859ROHWlc+fOWY8//jgayVXeifxGQwNRDcehZ2D6mjVrVGBADoI0ENdbxGNwfTz8bcyDhS4Wip1ovBZGRESgh96Db7311iOQ11BrqcD69u2bOX36dJyeng/XJnD//v39Dhw40Prq1auOkHpA52NBhw4dipYsWfKnzLKO6yf20V8/Ecrzm7WJDRJW/vjyOaQovgvFhGiZVfomNaoUdn1yrMCgw3ZhaEZGxjPGHIzH4fF86nM5b1tsoqOjAxITE/8+fvz4F3BfixYtdgYGBv57zpw5SUwBkWGhDAt54y2Hayme5jyA6cTET1j9YqL+monWIiZa8v5xsrOzq6yoqKhaGy49PR07eekoJgrt3qBBgxzB5ioBu6jBdhC0kZohQ4bgdGdMFbh8ANx7GWBnVc/Btbe3R5vM0ULltTlx4sQDqampEfD8usTGxo6r7UAMzrJv374pISEhf2cyDwqAwVh+//33qm0UFnHdRAzIguCrDIKzEARhuC2WIsiBuQmot0Nla2vfyO9VSoTbSldXVxysqpRp/mr0T/RnrtQnxsm5P6WwAITiPpbc11CUd+fOiGNKXnnllV2Q7Hbv3h0KRpNHfHy8919//RWFCf6P8/Hx2d6tW7d/T58+PZ0LhVU335UrV6bgRnh4OHY6UKAqEF0Mm5UrV7aeMmXK39Vq9cji4uJqb5UuXbrkPfnkk3kRERE4go1TXiy1AA3mHcUpvKkSeccJO1hWIyiWlpYW8E7gLS9g7Nixf0FHPGL58uVVDWp5ebnrjRs3YubPn2/38ccfr2HSTiUW0wLup+HiHUFBQXd451fqqdnWEuW5N6RIpvNW6cR04jpOv8thyoryXF/jZ46yWCQCoZ6oqMRyuGZlZT0P9ZCTkfWVEx7PdBGDhYED1/T09I+zs7OrxQjYnunk5NQKNicz+a39qm+I7GDyiViJ011RTMxk96I5o8D4AaQtrG4x8VdI65j1eSbaWPC3Kjp06JANNlXV9ONTp0493bt3b1+M3MxtqUo/P7/sVatWbTh9+nQ42ElGz5hwdHQsCQkJOeTm5pYpdKrQ7rpw4YLXmTNn+gvH+fv75zHLzUZw+vnnn1/p3r17wrx58zBIDrbhZfyc+0L5wz777LNqWzAjIwM9YH2YjAVFnOIM57pKSBS4du1ataCISBicxZxRISk6cvO9TtZyPZKY8V5JJjt3zALeTfVcHxdoX54Q74iMjMyG9Fcd/W2lCIkCGt6nl7IPW8MDUXT/GuyfyHyN7YAGHqu0+yWgEcdbuoyybieMERRRgMKh1+yIiIgzkHokJyc/sH///sBff/3VH4VASHMvXrw4GI7BlI/eiatXrx6dmZnZHb0Tw8LCsLJO1lsHyw0+s6OgoODxKivTyUnTr1+/jGeffTYRDGys1K7wAv7FTLsIujGUcUMXUytmRUAHHTvbaMhjFGfsnFxG8bZ9+/ZdU1JSqjsrsD0f60Cm81qRA9537tzpLd4BBjt2frOY9FOzDRklYqPBHAaLOYwSDLoiTH27YSHDy1zGVYCFjUhLusALDZkSy+Gen5/foMaQH+8OKQ+ngP7www/B6enpY/WPg32vLF68+MTcuXO/kGv9ayBSn6R1Kr93UFAawHRiIiJ4j05jNcVEHOATojkLYuJESMuZxGLi0qVLx/v6+j5pY2OjgYR5Lucdicp58+Y5urm5OXz44Ycvtm7dGm2JSjxGq9XicVqMkgdUCW4fffSRU4sWLRzg9Zm2bdsKU8KqBEb4jAqjrW/YsOEhE2Y9/4knnrgQHx9fdc4LCws9165d+8OPP/74P6Ghofu47ZMA+d/YrVu3hJ07dw7LycnxgbzYYKZ9fHwy33zzzSPr1q3rB+2jv7Afjs8dMWLEXnj9lbf1FfB97vBsPAN22T/gmfIRMtC7d28c7LWECG8TGxsb9Ndff42fPXv2l7y9Ea9p6QTnIh1skbmCLZKdnd122bJlE2fNmrWEyWdwswaGpjTj//37V2u2UgZnMadgYsk2z2qFH4VeJ2u5HnLzArPU9cE2rIaguG3bNu/IyMi1TBfsS+rnoamoDh061NbBwUEtcf8wwIDdXp+nX4Bc70k9MQvLUZst76nEh0YBayjKup0wRlBEI+4WN/ziILXp0KFD56ioqEcg9QAD9+GTJ0968mnKwsLennFxcThNRfBONKR8+oHh7t2qVavskJCQ3BdeeAEDu6CIiJZZAru3tk4ZI8xB1ZRzfq5PwnVIx8A4wptqtbrl/v37n3z22WfRQ1Rql3Gby5cvB2ZlZbUW7xw+fPhPTOc9Jzl1RXk2V1QmM7tc47TnaPH5VVo54Hu/hjxPNPZ6yfx6VJdJ4eVAQbFtQz6Qmpra7c0339weGBi4csGCBerCwsJpGJ32vgpNq7WB99CL+XuZGiuGIvVJCU5pRoEQg4Iki/YLg0g4gINLlXRgOs/E2sTEWVIXZPbs2ehNfYa3VZW8fRO2nVesWBE+Z84cDHRSxAxHghbaRKfVq1f3e/fdd3HQTaz+2IheXfbs2WOqrGeC7fMj2FB9rl+/jmsZsoKCgk6Qvk9ISMB1rWpvFG1stBMmTEDD8nD79u0ZdKDm4zMgvA+ffaq+H4dnSv3SSy/hGtWZZr5EtgsXLgxLTk5eW1FR4Q7PKXZaD+vZhWiP5j7xxBNDwRapDlRz7ty5uZ988knSvHnzMJJ1uZyeaQy6goIivg4ZMqTe4+A6y8I2aUybYKjOsuCASG3Cj0mWNZF6KZHapjeaKvozRXludtQnlFbiGoo5OTn6Hu/Yxz8pw/JoXVxcanip5+bm4iCzqpbj7fPy8nzc3NzuStxmeOpt1/k869v3MkMsZmE5tlvZMyMunzHPV5JctIbGtuembr/tGnBsGe9ooNcejnjj6HIgGMMPQeqYkZGRyTOqAmP7SfROxAorLCxsN9MtKHrfQz137twv/f39fZluRATXLEzkhm0Rk++6B9YGXpcsjUajH1CHQWXsze8RqUVdhyNHjtRYc61t27aFrVq1QhFaDoJiQAP3m/J3zTFSEsXFhNEWKos5yoGV/U5ukI+w0HUx1/UQC1I7RQ2ZEsvhUlhY6NaQD1RUVNiC4dsb0oZ6W/nc3J5MhqOjMhQTEQyYhoLhKb39KDDhGo+omqF42Ie3AUIAFlmJiRzsOOAgpCGh0L0MYLrBzlxWU0BketstSktLcRC1kN3vtSeIdaacMYHt15np06dvXb58+fjExEQHYz6EXpVwH50aNmwYXo+kIUOGnITn5NimTZtCoS03asp2UFBQ6TvvvLPN3t6+agaKOdvvWbNmvZeSkvKJsGPZsmW4nMoakZBjB/bgiwkJCVv0Pwzlcb548eKGyZMnD1+7du1rTEbTn9HzEKc3Hzhw4L73OnbsyMaMGVPjWAkExQATfo8cvWaofNKUL0DC82GNHoWWRqPX/rGhQ4dekXF+S9GTH+rZalu+pKQE28ra1oF0vnz5cgj0EXGmVbFMylCfmKhv38sNQaS2qrXpxShgDUVZt3d2jfhMJTeoMaUynVdhS39/f6ygUGxsceTIkXfwwIEDB6Lgc5kZHvm7A5/5gVcIdxl5I0qJCjoy7cU7vL29S/r27SuX6c5u2dnZj4l3dOrUKZnff3JoLKwpyvMhppvuPNqCZTHHd2OdE8srfqYnKiouOrJYkBLVp0qM8uxgzgciPz8fB6jc5WSEwbWbwY1EOYmJ6JmAnodfG3gPB/XQQwyjPAcx3fqVcyFdZ/IUE5G7cG5v1fLsVKrVarRP8uCYrHqeM4x6XCUo1nat4BiTCYo8SEo8dHy2Llq0qHLXrl3Df/75Z9+srKxaRcHg4OAS6Pxd7NGjBwbMucrtrj+ff/75LYGBgXZ79+599MyZM86VlYbHZL28vLTw+fThw4fv5B0YnPJcasZr47hs2bKjTCdS92A6YTad6daqFgIT2S9evBgHqtF2xOl4bfg9quW25jVe9+E+WQiK6HUYEhJSq5eeoeAsggApA9tETm0ClU955bP2qNvWTiUujSHeAe0e9sHlKhQVPfTQQ3/06dPn1okTJ7BtwOW7HFavXj182rRp2I6Il8OwjYmJCUtNTR0wf/58bHPy5VCAujz6ZDrgbPD5s1YxkSljDUVZt3d2Tfx8GdxcGfAw3OZGIvvtt996lZWVBfTs2fPWmDFjcOrZTUPeidxILGQ1PQkIy+MIle470BGv0QmPiIg4zTuWUk8xsjl58mQgGOFPi3e2adPmGm/86N4xHRiQZTDfFiI9d2b3r6eoFOoSFRVDLWKiYnF3dy/JyspyNVd9wUUHuZAECa9frswMxfrWFcLZAi+LjXQmXzGx3ntCpVLZMOOCreAxKmbZwCzY4Tnp6OhYGBkZeR3So3l5eR2uX7/um5GR0YLnvyIwMDDf19f3jo+PDy4LcxwSttGpGBEa6ggcXPupe/fumZD65ubmPpyenu6fnJzsUV5ejtdO6+fnp+7cuXOmt7c3XlucHo7ep3EW6HCV8ufgJ6E+FtXPwjOBHcJ0Xq4LtXwHCqey8DZBcTA8PLxKVKwLXEtRHJwFp0XjOoriAC4EQRBSA22OUM/KEaz342bMmPFVTk7OjLi4OBfceezYsQ9u3LiBS5r8D8+747Rp0xaVlZUNmTp16ucdO3b8k8lXJL3PvleymAjlwJmoAUp+BhSwhqKssTPBBcAXQRRUPfXUUwWQlvFOHY5KZ9YygktCogWuL1S2XcQ7wJAN2L17d5eIiIgbCxYs6A4dj5nQ8ZgovO/q6qodP3583KBBg76Ff1OYtFPPbb777ruOR48eXQcNRA3LPSUlxZFZLvp3fVhFlGfI57Y6OtJKi/Is7rTG8vIdMeM1MVckxWrvNgPfr8Qozzlr1qzBPOOC4PZN+SIcYLexqXG7okh2jukGq3xMmWl7e/vqEfCCggIXMGTbhIaGXqivfuQGYmPOpwp/o6ioyNlQHkwAzgZIZHoLs9eBICauZMoSE4V7RdWQc2/JvPFozvgs4zIy6Hn/i4eHh2/v3r1bwrYHu7fsCN5HKKqlMd307nwh0B33dMT2GnuFVzw9PdtC8uvevTuORDvyZwPfuyv6jrsW6kCWcVsipY5jcOAyg8knCFyt4FqI4vUSo6J0Y29Lly6t3qc/3VkABUjcj0KjoWnSFrJNGtUmSBxAyuzlk6gDq9TyWXvUbavuF65fvz4U+n41BnUx2OoPP/zQddSoUVL3+wxRyduPnxYtWuT8yy+/jDh16lSrs2fPuqalpc2E9m8mHuTu7n42ICDgz3nz5n3G21KMEVAs1wthRWLiDt5PeUfBz0USk/8airJuz+1M/H1oGKO34kFeAdxhNI1ZCtzHjRt3RaPRtNN/Az0RN27cuAdSjf39+/cvbNmypRqMXfRawGmvuIB9lhzLgPz222/PQ0r19/d/f9WqVSskvs8MVURKjPJsqspWbuUQREVPkUGqhOjI+H07WE1PHnNfE3NfD/SkwuAK2Ju2bcoX6YmJQvuTww1JUwqK5SEhIdc3b95cXlxcbJeXl9di9erVeyCZQkwy6jhnZ+eqPDDTeozjWonvMd16qWfrOO4rdk9MlKXBCOfxl/rOMbwuM/Z61HVdjL1mjRAUSninCZ8RFNvRCwPFQBQ4K/j7mKrXv9L7fAW///EZxunDKEY78ecM7bFS3rkqY5YbzDX5FCmpA2igGKgf1Vkf9EAUC4wK6STJrfNE5ZNv+cxlDyr1OikBx6lTpy7MzMycY+hN2N9qy5YtByCxPn36BM+YMeMPJi9hEZe6wGXUSsLCwq5BegS2WzGdh/1tfn/gtO1Mfp8k8fdk6bhkZWLiN/xfxQqKtQXGaoD91uzbO3MIivlMJmsWNGPcN23a9C7TqdgBkFrya13Jb6Y0fo2ceIWMr0KwHayw43ilrJG4DNjZfRRSRy4Q2Ik6Xjg9CtePOs47XVIKivVVRNbgHp2r8HLoi3LnFZhnRV+TukQfmVPm5eWVNGHChN+/+OKLflJkYNy4cacgDzdNXM8tYTqhEI0TjN58Se99XO8SPRMnMBmLiVaIll/nsiZ8XsOT1LZYgJm+k6YcNY92m8onz/Ll0jOoOJxiYmJ+4n07nLmGzhqCl6IwGIWe7xgXAQOjqpj8PBULuZ2Swvt+Huzeutw42IqzU+4yy3nfN8UexiWYqpdhEiLvyjCrtbbhessx9VLaA9HUPokpB5etod61Y0S9F1DkYooXMhk6legRh1PFrjJ5uuDn80YhnRk3fauUfyaLNyqlMinDZd7A1VYGNS9jKd2mBEGYCTRUEwcPHrzB09PTZefOnQ/dvHnTHtdCM6v17+SEUyc1L7zwwqXg4GA02m4w03oo4mj+MEg/Mt2ael8zXRTnTN7eTWK6wC0LIC2S2TUpHjZs2OU9e/b0lDITeG2YjKdUyQBPhXwnQRCENYMGy03eXzpbT98LBblKmZZDw22UTCu7PgFMpmLR1q1bvx49evREvX01PCzhf0ErQWhpgmYICYr1k8TuuZgKLtXYiTjEK94kGeZZEOOUjDWUgSCaM9Yi+mi58fp/wcHBxZCeYjqhDaekmit4B/4mDpjg9G0U+Y7zPJh6+s4pSN0g4fxM9ESMEr2Hy1+8zI+RGxmvvvrqF5DCYNtLojzg4NvPTDeoRRjG1Gut0TpqBEEQDQeFxJs8KQq+znCTgbbIxsJZN7b9O8/zJ8fTnwRpJ+TNUwhsWct07SR2b+pzkkxvpbLHH388+fTp0x3M9QMhISFJrJk6OdnoRY4nCIIgCFOASxUMhyQH0WcX04lzTQEH4NA7CpeJwKk2uM6dOQVFHInHQBrC+kAm8U6sZ5pGEC8bGrgVpvg9MxnJuMyFP09SRfVGkTqdXx/ykjcMPi8BzHRehcL6PyQqEgRBNAMULCga2/7JvV3D/A+A9AL/Hx2sYhXYDneGNApSKKQWZvh+nHJ/jOlm/SQ0t+eUBEWCIAjCHJDoI0/j3KK/J9NRd4IgCIIgCKJ+BHEUSWLKHNTDWUWtmc4pwMEM3499DIxHcYs1w6VwSFAkCIIgCIIgCIIgCIIgCMJoVHQKCIIgCIIgCIIgCIIgCIIwFgrKYiG2bdtm0BU0MjLShs4OQRAEQVB7TuUgCIIgCIIglGInkoeihTBkoJPRThAEQRDUnlM5CIIgCIIgCKXZiSQoSnRRyGgnCIIgCGrPqRwEQRAEQRCEEu1ECspCEARBEARBEARBEARBEITRkIciQRAEQRAEQRAEQRAEQRBGQ4IiQRAEQRAEQRAEQRAEQRBGQ4IiQRAEQRAEQRAEQRAEQRBG8/8CDACn2Bhs7uzfIwAAAABJRU5ErkJggg==); background-size: auto 25px; } } .redactor_toolbar li a:hover { border-color: #98a6ba; background-color: #dde4ef; } .redactor_toolbar li a:active, .redactor_toolbar li a.redactor_act { border-color: #b5b5b5; background-color: #ddd; } /* BUTTONS step 25px */ body .redactor_toolbar li a.redactor_btn_html { background-position: 0px; } body .redactor_toolbar li a.redactor_btn_formatting { background-position: -25px; } body .redactor_toolbar li a.redactor_btn_bold { background-position: -50px; } body .redactor_toolbar li a.redactor_btn_italic { background-position: -75px; } body .redactor_toolbar li a.redactor_btn_deleted { background-position: -500px; } body .redactor_toolbar li a.redactor_btn_unorderedlist { background-position: -100px; } body .redactor_toolbar li a.redactor_btn_orderedlist { background-position: -125px; } body .redactor_toolbar li a.redactor_btn_outdent { background-position: -150px; } body .redactor_toolbar li a.redactor_btn_indent { background-position: -175px; } body .redactor_toolbar li a.redactor_btn_image { background-position: -200px; } body .redactor_toolbar li a.redactor_btn_video { background-position: -225px; } body .redactor_toolbar li a.redactor_btn_file { background-position: -250px; } body .redactor_toolbar li a.redactor_btn_table { background-position: -275px; } body .redactor_toolbar li a.redactor_btn_link { background-position: -300px; } body .redactor_toolbar li a.redactor_btn_fontcolor { background-position: -325px; } body .redactor_toolbar li a.redactor_btn_backcolor { background-position: -350px; } body .redactor_toolbar li a.redactor_btn_alignleft { background-position: -375px; } body .redactor_toolbar li a.redactor_btn_aligncenter { background-position: -400px; } body .redactor_toolbar li a.redactor_btn_alignright { background-position: -425px; } body .redactor_toolbar li a.redactor_btn_justify { background-position: -450px; } body .redactor_toolbar li a.redactor_btn_horizontalrule { background-position: -475px; } body .redactor_toolbar li a.redactor_btn_underline { background-position: -525px; } body .redactor_toolbar li a.redactor_btn_fullscreen { background-position: -550px; } body .redactor_toolbar li a.redactor_btn_normalscreen { background-position: -575px; } body .redactor_toolbar li a.redactor_btn_clips { background-position: -600px; } body .redactor_toolbar li a.redactor_btn_alignment { background-position: -625px; } /* Toolbar classes */ .redactor_format_blockquote { font-style: italic; color: #666 !important; padding-left: 10px; } .redactor_format_pre { font-family: monospace, sans-serif; } .redactor_format_h1, .redactor_format_h2, .redactor_format_h3, .redactor_format_h4 { font-weight: bold; } .redactor_format_h1 { font-size: 30px; line-height: 36px; } .redactor_format_h2 { font-size: 24px; line-height: 36px; } .redactor_format_h3 { font-size: 20px; line-height: 30px; } .redactor_format_h4 { font-size: 16px; line-height: 26px; } /* DROPDOWN */ .redactor_dropdown { font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif; top: 28px; left: 0; z-index: 2004; position: absolute; width: 200px; background-color: #fff; border: 1px solid #ccc; font-size: 13px; -webkit-box-shadow: 0 2px 4px #ccc; -moz-box-shadow: 0 2px 4px #ccc; box-shadow: 0 2px 4px #ccc; line-height: 21px; padding: 10px; } .redactor_separator_drop { border-top: 1px solid #ddd;; padding: 0 !important; line-height: 0; font-size: 0; } .redactor_dropdown a { display: block; color: #000; padding: 3px 5px; text-decoration: none; } .redactor_dropdown a:hover { color: #444 !important; text-decoration: none; background-color: #dde4ef; } /* ColorPicker */ .redactor_color_link { padding: 0 !important; width: 15px !important; height: 15px !important; box-shadow: 0 1px 2px rgba(0, 0, 0, .2) inset !important; border-radius: 4px !important; float: left !important; border: 2px solid #fff !important; font-size: 0; } .redactor_color_none { font-size: 11px; } /* MODAL */ #redactor_modal_overlay { position: fixed; margin: auto; top: 0; left: 0; width: 100%; height: 100%; z-index: 50000; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; filter:alpha(opacity=50); opacity: 0.50; background-color: #333 !important; } #redactor_modal { background: #f7f7f7; background: -moz-linear-gradient(top, #f7f7f7 0%, #e2e2e2 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7f7f7), color-stop(100%,#e2e2e2)); background: -webkit-linear-gradient(top, #f7f7f7 0%,#e2e2e2 100%); background: -o-linear-gradient(top, #f7f7f7 0%,#e2e2e2 100%); background: -ms-linear-gradient(top, #f7f7f7 0%,#e2e2e2 100%); background: linear-gradient(to bottom, #f7f7f7 0%,#e2e2e2 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7f7f7', endColorstr='#e2e2e2',GradientType=0 ); text-shadow: 0 1px 0 #fff; padding: 0; position: fixed; top: 50%; left: 50%; box-shadow: 0px 5px 60px #000; border-radius: 3px; z-index: 50001; font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif; font-size: 12px !important; color: #000; } #redactor_modal_header { padding: 11px 30px 0 15px; font-size: 12px; border-radius: 3px 3px 0 0; font-weight: bold; } #redactor_modal_content { padding: 20px 30px; } #redactor_modal_close { position: absolute; right: 5px; top: 5px; font-size: 20px; width: 20px; height: 20px; color: #777; cursor: pointer; } #redactor_modal_close:hover { color: #000; } #redactor_modal label { margin: 10px 0 3px 0 !important; padding: 0 !important; float: none !important; display: block !important; } #redactor_modal textarea { margin-top: 4px; display: block; } .redactor_input { width: 99%; font-size: 14px; } .redactor_modal_box { height: 350px; overflow: auto; margin-bottom: 10px; } #redactor_image_box { height: 270px; overflow: auto; margin-bottom: 10px; } #redactor_image_box_select { display: block; width: 200px; margin-bottom: 15px; } #redactor_image_box img { margin-right: 10px; margin-bottom: 10px; cursor: pointer; max-width: 100px; } #redactor_tabs { margin-bottom: 18px; } #redactor_tabs a { display: inline-block; border: 1px solid #d2d2d2; padding: 4px 14px; font-size: 12px; background-color: #fff; text-decoration: none; color: #000; line-height: 1; border-radius: 10px; margin-right: 5px; } #redactor_tabs a:hover, #redactor_tabs a.redactor_tabs_act { background-color: #ddd; padding: 5px 15px; box-shadow: 0 1px 2px rgba(0, 0, 0, .4) inset; border: none; text-shadow: 0 1px 0 #eee; color: #777 !important; text-decoration: none !important; } #redactor_modal_footer { padding: 9px 30px 20px 30px; border-radius: 0 0 3px 3px; text-align: right; } #redactor_modal input[type="radio"], #redactor_modal input[type="checkbox"] { position: relative; top: -1px; } #redactor_modal input[type="text"], #redactor_modal input[type="password"], #redactor_modal input[type="email"], #redactor_modal textarea { position: relative; z-index: 2; font-family: Helvetica, Arial, Tahoma, sans-serif; height: 23px; border: 1px solid #ccc; margin: 0; padding: 1px 2px; background-color: white; color: #333; font-size: 13px; line-height: 1; border-radius: 1px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset; -webkit-transition: border 0.3s ease-in; -moz-transition: border 0.3s ease-in; -ms-transition: border 0.3s ease-in; -o-transition: border 0.3s ease-in; transition: border 0.3s ease-in; } #redactor_modal textarea { line-height: 1.4em; } #redactor_modal input:focus, #redactor_modal textarea:focus { outline: none; border-color: #5ca9e4; box-shadow: 0 0 0 2px rgba(70, 161, 231, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2) inset; } .redactor_modal_btn { margin-left: 8px; position: relative; cursor: pointer; outline: none; display: inline-block; text-align: center; text-decoration: none; font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif; line-height: 1; font-size: 12px; font-weight: normal; padding: 6px 16px 5px 16px; border-radius: 4px; background-color: #f3f3f3; background-image: -moz-linear-gradient(top, #ffffff, #e1e1e1); background-image: -ms-linear-gradient(top, #ffffff, #e1e1e1); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e1e1e1)); background-image: -webkit-linear-gradient(top, #ffffff, #e1e1e1); background-image: -o-linear-gradient(top, #ffffff, #e1e1e1); background-image: linear-gradient(top, #ffffff, #e1e1e1); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e1e1e1', GradientType=0); border: 1px solid #ccc; border-bottom-color: #aaa; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); text-shadow: 0 1px 0px #ffffff; color: #000; } .redactor_modal_btn:hover { color: #555; } .redactor_modal_btn:hover { filter: none; background: none; background: #f3f3f3; text-shadow: 0 1px 0px rgba(255, 255, 255, 0.8); text-decoration: none; } /* Drag and Drop Area */ .redactor_droparea { position: relative; width: 100%; margin: auto; margin-bottom: 5px; } .redactor_droparea .redactor_dropareabox { z-index: 1; position: relative; text-align: center; width: 99%; background-color: #fff; padding: 60px 0; border: 2px dashed #bbb; } .redactor_droparea .redactor_dropareabox, .redactor_dropalternative { color: #555; font-size: 12px; } .redactor_dropalternative { margin: 4px 0 2px 0; } .redactor_dropareabox.hover { background: #efe3b8; border-color: #aaa; } .redactor_dropareabox.error { background: #f7e5e5; border-color: #dcc3c3; } .redactor_dropareabox.drop { background: #f4f4ee; border-color: #e0e5d6; }
0x6a
trunk/libraries/redactor/redactor.css
CSS
asf20
39,205
<html> <head> <title>403 Forbidden</title> </head> <body> <p>Directory access is forbidden.</p> </body> </html>
0x6a
trunk/libraries/images/bg/index.html
HTML
asf20
114
<!DOCTYPE html> <html lang="en"> <head> <title>403 Request forbidden</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css"> body{background: #ebebeb;font-family: dotum,tahoma} .error_contain{ padding: 0px; position:relative; } .error_contain div{ width:500px;margin:0 auto; } .error_contain h1{ padding: 40px 0; font-family: arial; text-align: center; margin: 0; font-size: 169px; line-height: normal; color: #ffffff; text-shadow: 0 0 10px #ffffff, 0 4px 3px #ffffff, 0 9px 3px #dddddd, 0 12px 1px #cccccc, 0 14px 5px rgba(0, 0, 0, 0.4), 0 20px 10px rgba(0, 0, 0, 0.1), 0 15px 80px rgba(0, 0, 100, 0.2); } .error_contain h3{color: #777;margin: 0;padding: 8px;padding-top: 20px} .error_contain p{margin: 0;padding: 8px;color: #777;text-align: justify;font-size: 13px} </style> </head> <body> <div class="error_contain"> <h1 style="">403</h1> <div> <h3>Oops! Request forbidden...<span style="float: right">٩(๏̯͡๏)۶</span></h3> <p> Sorry, it appears the page you were looking for is forbidden and not accessible. If the problem persists, please contact our support at example@domain.com. </p> </div> </div> </body> </html>
0x6a
trunk/libraries/images/index.html
HTML
asf20
1,319
<!doctype html> <html lang="us"> <head> <meta charset="utf-8"> <title>jQuery UI Example Page</title> <link href="themes/base/jquery.ui.all.css" rel="stylesheet"> <script src="../script/jquery-1.9.0.js"></script> <script src="js/jquery-ui-1.9.2.custom.js"></script> <script> $(function() { $( "#accordion" ).accordion(); var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme" ]; $( "#autocomplete" ).autocomplete({ source: availableTags }); $( "#button" ).button(); $( "#radioset" ).buttonset(); $( "#tabs" ).tabs(); $( "#dialog" ).dialog({ autoOpen: false, width: 400, buttons: [ { text: "Ok", click: function() { $( this ).dialog( "close" ); } }, { text: "Cancel", click: function() { $( this ).dialog( "close" ); } } ] }); // Link to open the dialog $( "#dialog-link" ).click(function( event ) { $( "#dialog" ).dialog( "open" ); event.preventDefault(); }); $( "#datepicker" ).datepicker({ inline: true }); $( "#slider" ).slider({ range: true, values: [ 17, 67 ] }); $( "#progressbar" ).progressbar({ value: 20 }); // Hover states on the static widgets $( "#dialog-link, #icons li" ).hover( function() { $( this ).addClass( "ui-state-hover" ); }, function() { $( this ).removeClass( "ui-state-hover" ); } ); }); </script> <style> body{ font: 62.5% "Trebuchet MS", sans-serif; margin: 50px; } .demoHeaders { margin-top: 2em; } #dialog-link { padding: .4em 1em .4em 20px; text-decoration: none; position: relative; } #dialog-link span.ui-icon { margin: 0 5px 0 0; position: absolute; left: .2em; top: 50%; margin-top: -8px; } #icons { margin: 0; padding: 0; } #icons li { margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left; list-style: none; } #icons span.ui-icon { float: left; margin: 0 4px; } .fakewindowcontain .ui-widget-overlay { position: absolute; } </style> </head> <body> <h1>Welcome to jQuery UI!</h1> <div class="ui-widget"> <p>This page demonstrates the widgets you downloaded using the theme you selected in the download builder. We've included and linked to minified versions of <a href="js/jquery-1.8.3.js">jQuery</a>, your personalized copy of <a href="js/jquery-ui-1.9.2.custom.min.js">jQuery UI (js/jquery-ui-1.9.2.custom.min.js)</a>, and <a href="css/ui-lightness/jquery-ui-1.9.2.custom.min.css">css/ui-lightness/jquery-ui-1.9.2.custom.min.css</a> which imports the entire jQuery UI CSS Framework. You can choose to link a subset of the CSS Framework depending on your needs. </p> <p>You've downloaded components and a theme that are compatible with jQuery 1.6+. Please make sure you are using jQuery 1.6+ in your production environment.</p> </div> <h1>YOUR COMPONENTS:</h1> <!-- Accordion --> <h2 class="demoHeaders">Accordion</h2> <div id="accordion"> <h3>First</h3> <div>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div> <h3>Second</h3> <div>Phasellus mattis tincidunt nibh.</div> <h3>Third</h3> <div>Nam dui erat, auctor a, dignissim quis.</div> </div> <!-- Autocomplete --> <h2 class="demoHeaders">Autocomplete</h2> <div> <input id="autocomplete" title="type &quot;a&quot;"> </div> <!-- Button --> <h2 class="demoHeaders">Button</h2> <button id="button">A button element</button> <form style="margin-top: 1em;"> <div id="radioset"> <input type="radio" id="radio1" name="radio"><label for="radio1">Choice 1</label> <input type="radio" id="radio2" name="radio" checked="checked"><label for="radio2">Choice 2</label> <input type="radio" id="radio3" name="radio"><label for="radio3">Choice 3</label> </div> </form> <!-- Tabs --> <h2 class="demoHeaders">Tabs</h2> <div id="tabs"> <ul> <li><a href="#tabs-1">First</a></li> <li><a href="#tabs-2">Second</a></li> <li><a href="#tabs-3">Third</a></li> </ul> <div id="tabs-1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div> <div id="tabs-2">Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum.</div> <div id="tabs-3">Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue.</div> </div> <!-- Dialog NOTE: Dialog is not generated by UI in this demo so it can be visually styled in themeroller--> <h2 class="demoHeaders">Dialog</h2> <p><a href="#" id="dialog-link" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-newwin"></span>Open Dialog</a></p> <h2 class="demoHeaders">Overlay and Shadow Classes <em>(not currently used in UI widgets)</em></h2> <div style="position: relative; width: 96%; height: 200px; padding:1% 2%; overflow:hidden;" class="fakewindowcontain"> <p>Lorem ipsum dolor sit amet, Nulla nec tortor. Donec id elit quis purus consectetur consequat. </p><p>Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. </p><p>Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. </p><p>Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. </p><p>Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. </p><p>Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. </p> <!-- ui-dialog --> <div class="ui-overlay"><div class="ui-widget-overlay"></div><div class="ui-widget-shadow ui-corner-all" style="width: 302px; height: 152px; position: absolute; left: 50px; top: 30px;"></div></div> <div style="position: absolute; width: 280px; height: 130px;left: 50px; top: 30px; padding: 10px;" class="ui-widget ui-widget-content ui-corner-all"> <div class="ui-dialog-content ui-widget-content" style="background: none; border: 0;"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> </div> </div> </div> <!-- ui-dialog --> <div id="dialog" title="Dialog Title"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> </div> <h2 class="demoHeaders">Framework Icons (content color preview)</h2> <ul id="icons" class="ui-widget ui-helper-clearfix"> <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-n"><span class="ui-icon ui-icon-carat-1-n"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-ne"><span class="ui-icon ui-icon-carat-1-ne"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-e"><span class="ui-icon ui-icon-carat-1-e"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-se"><span class="ui-icon ui-icon-carat-1-se"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-s"><span class="ui-icon ui-icon-carat-1-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-sw"><span class="ui-icon ui-icon-carat-1-sw"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-w"><span class="ui-icon ui-icon-carat-1-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-nw"><span class="ui-icon ui-icon-carat-1-nw"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-2-n-s"><span class="ui-icon ui-icon-carat-2-n-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-2-e-w"><span class="ui-icon ui-icon-carat-2-e-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-n"><span class="ui-icon ui-icon-triangle-1-n"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-ne"><span class="ui-icon ui-icon-triangle-1-ne"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-e"><span class="ui-icon ui-icon-triangle-1-e"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-se"><span class="ui-icon ui-icon-triangle-1-se"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-s"><span class="ui-icon ui-icon-triangle-1-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-sw"><span class="ui-icon ui-icon-triangle-1-sw"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-w"><span class="ui-icon ui-icon-triangle-1-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-nw"><span class="ui-icon ui-icon-triangle-1-nw"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-2-n-s"><span class="ui-icon ui-icon-triangle-2-n-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-2-e-w"><span class="ui-icon ui-icon-triangle-2-e-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-n"><span class="ui-icon ui-icon-arrow-1-n"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-ne"><span class="ui-icon ui-icon-arrow-1-ne"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-e"><span class="ui-icon ui-icon-arrow-1-e"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-se"><span class="ui-icon ui-icon-arrow-1-se"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-s"><span class="ui-icon ui-icon-arrow-1-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-sw"><span class="ui-icon ui-icon-arrow-1-sw"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-w"><span class="ui-icon ui-icon-arrow-1-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-nw"><span class="ui-icon ui-icon-arrow-1-nw"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-n-s"><span class="ui-icon ui-icon-arrow-2-n-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-ne-sw"><span class="ui-icon ui-icon-arrow-2-ne-sw"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-e-w"><span class="ui-icon ui-icon-arrow-2-e-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-se-nw"><span class="ui-icon ui-icon-arrow-2-se-nw"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-n"><span class="ui-icon ui-icon-arrowstop-1-n"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-e"><span class="ui-icon ui-icon-arrowstop-1-e"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-s"><span class="ui-icon ui-icon-arrowstop-1-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-w"><span class="ui-icon ui-icon-arrowstop-1-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-n"><span class="ui-icon ui-icon-arrowthick-1-n"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-ne"><span class="ui-icon ui-icon-arrowthick-1-ne"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-e"><span class="ui-icon ui-icon-arrowthick-1-e"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-se"><span class="ui-icon ui-icon-arrowthick-1-se"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-s"><span class="ui-icon ui-icon-arrowthick-1-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-sw"><span class="ui-icon ui-icon-arrowthick-1-sw"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-w"><span class="ui-icon ui-icon-arrowthick-1-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-nw"><span class="ui-icon ui-icon-arrowthick-1-nw"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-n-s"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-ne-sw"><span class="ui-icon ui-icon-arrowthick-2-ne-sw"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-e-w"><span class="ui-icon ui-icon-arrowthick-2-e-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-se-nw"><span class="ui-icon ui-icon-arrowthick-2-se-nw"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-n"><span class="ui-icon ui-icon-arrowthickstop-1-n"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-e"><span class="ui-icon ui-icon-arrowthickstop-1-e"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-s"><span class="ui-icon ui-icon-arrowthickstop-1-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-w"><span class="ui-icon ui-icon-arrowthickstop-1-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-w"><span class="ui-icon ui-icon-arrowreturnthick-1-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-n"><span class="ui-icon ui-icon-arrowreturnthick-1-n"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-e"><span class="ui-icon ui-icon-arrowreturnthick-1-e"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-s"><span class="ui-icon ui-icon-arrowreturnthick-1-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-w"><span class="ui-icon ui-icon-arrowreturn-1-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-n"><span class="ui-icon ui-icon-arrowreturn-1-n"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-e"><span class="ui-icon ui-icon-arrowreturn-1-e"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-s"><span class="ui-icon ui-icon-arrowreturn-1-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-w"><span class="ui-icon ui-icon-arrowrefresh-1-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-n"><span class="ui-icon ui-icon-arrowrefresh-1-n"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-e"><span class="ui-icon ui-icon-arrowrefresh-1-e"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-s"><span class="ui-icon ui-icon-arrowrefresh-1-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-4"><span class="ui-icon ui-icon-arrow-4"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-4-diag"><span class="ui-icon ui-icon-arrow-4-diag"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-extlink"><span class="ui-icon ui-icon-extlink"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-newwin"><span class="ui-icon ui-icon-newwin"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-refresh"><span class="ui-icon ui-icon-refresh"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-shuffle"><span class="ui-icon ui-icon-shuffle"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-transfer-e-w"><span class="ui-icon ui-icon-transfer-e-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-transferthick-e-w"><span class="ui-icon ui-icon-transferthick-e-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-folder-collapsed"><span class="ui-icon ui-icon-folder-collapsed"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-folder-open"><span class="ui-icon ui-icon-folder-open"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-document"><span class="ui-icon ui-icon-document"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-document-b"><span class="ui-icon ui-icon-document-b"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-note"><span class="ui-icon ui-icon-note"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-mail-closed"><span class="ui-icon ui-icon-mail-closed"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-mail-open"><span class="ui-icon ui-icon-mail-open"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-suitcase"><span class="ui-icon ui-icon-suitcase"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-comment"><span class="ui-icon ui-icon-comment"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-person"><span class="ui-icon ui-icon-person"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-print"><span class="ui-icon ui-icon-print"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-trash"><span class="ui-icon ui-icon-trash"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-locked"><span class="ui-icon ui-icon-locked"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-unlocked"><span class="ui-icon ui-icon-unlocked"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-bookmark"><span class="ui-icon ui-icon-bookmark"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-tag"><span class="ui-icon ui-icon-tag"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-home"><span class="ui-icon ui-icon-home"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-flag"><span class="ui-icon ui-icon-flag"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-calculator"><span class="ui-icon ui-icon-calculator"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-cart"><span class="ui-icon ui-icon-cart"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-pencil"><span class="ui-icon ui-icon-pencil"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-clock"><span class="ui-icon ui-icon-clock"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-disk"><span class="ui-icon ui-icon-disk"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-calendar"><span class="ui-icon ui-icon-calendar"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-zoomin"><span class="ui-icon ui-icon-zoomin"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-zoomout"><span class="ui-icon ui-icon-zoomout"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-search"><span class="ui-icon ui-icon-search"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-wrench"><span class="ui-icon ui-icon-wrench"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-gear"><span class="ui-icon ui-icon-gear"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-heart"><span class="ui-icon ui-icon-heart"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-star"><span class="ui-icon ui-icon-star"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-link"><span class="ui-icon ui-icon-link"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-cancel"><span class="ui-icon ui-icon-cancel"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-plus"><span class="ui-icon ui-icon-plus"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-plusthick"><span class="ui-icon ui-icon-plusthick"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-minus"><span class="ui-icon ui-icon-minus"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-minusthick"><span class="ui-icon ui-icon-minusthick"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-close"><span class="ui-icon ui-icon-close"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-closethick"><span class="ui-icon ui-icon-closethick"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-key"><span class="ui-icon ui-icon-key"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-lightbulb"><span class="ui-icon ui-icon-lightbulb"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-scissors"><span class="ui-icon ui-icon-scissors"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-clipboard"><span class="ui-icon ui-icon-clipboard"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-copy"><span class="ui-icon ui-icon-copy"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-contact"><span class="ui-icon ui-icon-contact"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-image"><span class="ui-icon ui-icon-image"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-video"><span class="ui-icon ui-icon-video"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-script"><span class="ui-icon ui-icon-script"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-alert"><span class="ui-icon ui-icon-alert"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-info"><span class="ui-icon ui-icon-info"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-notice"><span class="ui-icon ui-icon-notice"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-help"><span class="ui-icon ui-icon-help"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-check"><span class="ui-icon ui-icon-check"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-bullet"><span class="ui-icon ui-icon-bullet"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-radio-off"><span class="ui-icon ui-icon-radio-off"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-radio-on"><span class="ui-icon ui-icon-radio-on"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-pin-w"><span class="ui-icon ui-icon-pin-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-pin-s"><span class="ui-icon ui-icon-pin-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-play"><span class="ui-icon ui-icon-play"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-pause"><span class="ui-icon ui-icon-pause"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-next"><span class="ui-icon ui-icon-seek-next"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-prev"><span class="ui-icon ui-icon-seek-prev"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-end"><span class="ui-icon ui-icon-seek-end"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-first"><span class="ui-icon ui-icon-seek-first"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-stop"><span class="ui-icon ui-icon-stop"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-eject"><span class="ui-icon ui-icon-eject"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-volume-off"><span class="ui-icon ui-icon-volume-off"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-volume-on"><span class="ui-icon ui-icon-volume-on"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-power"><span class="ui-icon ui-icon-power"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-signal-diag"><span class="ui-icon ui-icon-signal-diag"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-signal"><span class="ui-icon ui-icon-signal"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-0"><span class="ui-icon ui-icon-battery-0"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-1"><span class="ui-icon ui-icon-battery-1"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-2"><span class="ui-icon ui-icon-battery-2"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-3"><span class="ui-icon ui-icon-battery-3"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-plus"><span class="ui-icon ui-icon-circle-plus"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-minus"><span class="ui-icon ui-icon-circle-minus"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-close"><span class="ui-icon ui-icon-circle-close"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-e"><span class="ui-icon ui-icon-circle-triangle-e"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-s"><span class="ui-icon ui-icon-circle-triangle-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-w"><span class="ui-icon ui-icon-circle-triangle-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-n"><span class="ui-icon ui-icon-circle-triangle-n"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-e"><span class="ui-icon ui-icon-circle-arrow-e"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-s"><span class="ui-icon ui-icon-circle-arrow-s"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-w"><span class="ui-icon ui-icon-circle-arrow-w"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-n"><span class="ui-icon ui-icon-circle-arrow-n"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-zoomin"><span class="ui-icon ui-icon-circle-zoomin"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-zoomout"><span class="ui-icon ui-icon-circle-zoomout"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-check"><span class="ui-icon ui-icon-circle-check"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-plus"><span class="ui-icon ui-icon-circlesmall-plus"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-minus"><span class="ui-icon ui-icon-circlesmall-minus"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-close"><span class="ui-icon ui-icon-circlesmall-close"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-plus"><span class="ui-icon ui-icon-squaresmall-plus"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-minus"><span class="ui-icon ui-icon-squaresmall-minus"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-close"><span class="ui-icon ui-icon-squaresmall-close"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-dotted-vertical"><span class="ui-icon ui-icon-grip-dotted-vertical"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-dotted-horizontal"><span class="ui-icon ui-icon-grip-dotted-horizontal"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-solid-vertical"><span class="ui-icon ui-icon-grip-solid-vertical"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-solid-horizontal"><span class="ui-icon ui-icon-grip-solid-horizontal"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-gripsmall-diagonal-se"><span class="ui-icon ui-icon-gripsmall-diagonal-se"></span></li> <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-diagonal-se"><span class="ui-icon ui-icon-grip-diagonal-se"></span></li> </ul> <!-- Slider --> <h2 class="demoHeaders">Slider</h2> <div id="slider"></div> <!-- Datepicker --> <h2 class="demoHeaders">Datepicker</h2> <div id="datepicker"></div> <!-- Progressbar --> <h2 class="demoHeaders">Progressbar</h2> <div id="progressbar"></div> <!-- Highlight / Error --> <h2 class="demoHeaders">Highlight / Error</h2> <div class="ui-widget"> <div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;"> <p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span> <strong>Hey!</strong> Sample ui-state-highlight style.</p> </div> </div> <br> <div class="ui-widget"> <div class="ui-state-error ui-corner-all" style="padding: 0 .7em;"> <p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> <strong>Alert:</strong> Sample ui-state-error style.</p> </div> </div> </body> </html>
0x6a
trunk/libraries/ui/demo.html
HTML
asf20
31,431
/* jshint forin:true, noarg:true, noempty:true, eqeqeq:true, boss:true, undef:true, curly:true, browser:true, jquery:true */ /* * jQuery MultiSelect UI Widget 1.14pre * Copyright (c) 2012 Eric Hynds * * http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ * * Depends: * - jQuery 1.4.2+ * - jQuery UI 1.8 widget factory * * Optional: * - jQuery UI effects * - jQuery UI position utility * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ (function($, undefined) { var multiselectID = 0; var $doc = $(document); $.widget("ech.multiselect", { // default options options: { header: true, height: 175, minWidth: 225, classes: '', checkAllText: 'Check all', uncheckAllText: 'Uncheck all', noneSelectedText: 'Select options', selectedText: '# selected', selectedList: 0, show: null, hide: null, autoOpen: false, multiple: true, position: {} }, _create: function() { var el = this.element.hide(); var o = this.options; this.speed = $.fx.speeds._default; // default speed for effects this._isOpen = false; // assume no // create a unique namespace for events that the widget // factory cannot unbind automatically. Use eventNamespace if on // jQuery UI 1.9+, and otherwise fallback to a custom string. this._namespaceID = this.eventNamespace || ('multiselect' + multiselectID); var button = (this.button = $('<button type="button"><span class="ui-icon ui-icon-triangle-1-s"></span></button>')) .addClass('ui-multiselect ui-widget ui-state-default ui-corner-all') .addClass(o.classes) .attr({ 'title':el.attr('title'), 'aria-haspopup':true, 'tabIndex':el.attr('tabIndex') }) .insertAfter(el), buttonlabel = (this.buttonlabel = $('<span />')) .html(o.noneSelectedText) .appendTo(button), menu = (this.menu = $('<div />')) .addClass('ui-multiselect-menu ui-widget ui-widget-content ui-corner-all') .addClass(o.classes) .appendTo(document.body), header = (this.header = $('<div />')) .addClass('ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix') .appendTo(menu), headerLinkContainer = (this.headerLinkContainer = $('<ul />')) .addClass('ui-helper-reset') .html(function() { if(o.header === true) { return '<li><a class="ui-multiselect-all" href="#"><span class="ui-icon ui-icon-check"></span><span>' + o.checkAllText + '</span></a></li><li><a class="ui-multiselect-none" href="#"><span class="ui-icon ui-icon-closethick"></span><span>' + o.uncheckAllText + '</span></a></li>'; } else if(typeof o.header === "string") { return '<li>' + o.header + '</li>'; } else { return ''; } }) .append('<li class="ui-multiselect-close"><a href="#" class="ui-multiselect-close"><span class="ui-icon ui-icon-circle-close"></span></a></li>') .appendTo(header), checkboxContainer = (this.checkboxContainer = $('<ul />')) .addClass('ui-multiselect-checkboxes ui-helper-reset') .appendTo(menu); // perform event bindings this._bindEvents(); // build menu this.refresh(true); // some addl. logic for single selects if(!o.multiple) { menu.addClass('ui-multiselect-single'); } // bump unique ID multiselectID++; }, _init: function() { if(this.options.header === false) { this.header.hide(); } if(!this.options.multiple) { this.headerLinkContainer.find('.ui-multiselect-all, .ui-multiselect-none').hide(); } if(this.options.autoOpen) { this.open(); } if(this.element.is(':disabled')) { this.disable(); } }, refresh: function(init) { var el = this.element; var o = this.options; var menu = this.menu; var checkboxContainer = this.checkboxContainer; var optgroups = []; var html = ""; var id = el.attr('id') || multiselectID++; // unique ID for the label & option tags // build items el.find('option').each(function(i) { var $this = $(this); var parent = this.parentNode; var title = this.innerHTML; var description = this.title; var value = this.value; var inputID = 'ui-multiselect-' + (this.id || id + '-option-' + i); var isDisabled = this.disabled; var isSelected = this.selected; var labelClasses = [ 'ui-corner-all' ]; var liClasses = (isDisabled ? 'ui-multiselect-disabled ' : ' ') + this.className; var optLabel; // is this an optgroup? if(parent.tagName === 'OPTGROUP') { optLabel = parent.getAttribute('label'); // has this optgroup been added already? if($.inArray(optLabel, optgroups) === -1) { html += '<li class="ui-multiselect-optgroup-label ' + parent.className + '"><a href="#">' + optLabel + '</a></li>'; optgroups.push(optLabel); } } if(isDisabled) { labelClasses.push('ui-state-disabled'); } // browsers automatically select the first option // by default with single selects if(isSelected && !o.multiple) { labelClasses.push('ui-state-active'); } html += '<li class="' + liClasses + '">'; // create the label html += '<label for="' + inputID + '" title="' + description + '" class="' + labelClasses.join(' ') + '">'; html += '<input id="' + inputID + '" name="multiselect_' + id + '" type="' + (o.multiple ? "checkbox" : "radio") + '" value="' + value + '" title="' + title + '"'; // pre-selected? if(isSelected) { html += ' checked="checked"'; html += ' aria-selected="true"'; } // disabled? if(isDisabled) { html += ' disabled="disabled"'; html += ' aria-disabled="true"'; } // add the title and close everything off html += ' /><span>' + title + '</span></label></li>'; }); // insert into the DOM checkboxContainer.html(html); // cache some moar useful elements this.labels = menu.find('label'); this.inputs = this.labels.children('input'); // set widths this._setButtonWidth(); this._setMenuWidth(); // remember default value this.button[0].defaultValue = this.update(); // broadcast refresh event; useful for widgets if(!init) { this._trigger('refresh'); } }, // updates the button text. call refresh() to rebuild update: function() { var o = this.options; var $inputs = this.inputs; var $checked = $inputs.filter(':checked'); var numChecked = $checked.length; var value; if(numChecked === 0) { value = o.noneSelectedText; } else { if($.isFunction(o.selectedText)) { value = o.selectedText.call(this, numChecked, $inputs.length, $checked.get()); } else if(/\d/.test(o.selectedList) && o.selectedList > 0 && numChecked <= o.selectedList) { value = $checked.map(function() { return $(this).next().html(); }).get().join(', '); } else { value = o.selectedText.replace('#', numChecked).replace('#', $inputs.length); } } this._setButtonValue(value); return value; }, // this exists as a separate method so that the developer // can easily override it. _setButtonValue: function(value) { this.buttonlabel.text(value); }, // binds events _bindEvents: function() { var self = this; var button = this.button; function clickHandler() { self[ self._isOpen ? 'close' : 'open' ](); return false; } // webkit doesn't like it when you click on the span :( button .find('span') .bind('click.multiselect', clickHandler); // button events button.bind({ click: clickHandler, keypress: function(e) { switch(e.which) { case 27: // esc case 38: // up case 37: // left self.close(); break; case 39: // right case 40: // down self.open(); break; } }, mouseenter: function() { if(!button.hasClass('ui-state-disabled')) { $(this).addClass('ui-state-hover'); } }, mouseleave: function() { $(this).removeClass('ui-state-hover'); }, focus: function() { if(!button.hasClass('ui-state-disabled')) { $(this).addClass('ui-state-focus'); } }, blur: function() { $(this).removeClass('ui-state-focus'); } }); // header links this.header.delegate('a', 'click.multiselect', function(e) { // close link if($(this).hasClass('ui-multiselect-close')) { self.close(); // check all / uncheck all } else { self[$(this).hasClass('ui-multiselect-all') ? 'checkAll' : 'uncheckAll'](); } e.preventDefault(); }); // optgroup label toggle support this.menu.delegate('li.ui-multiselect-optgroup-label a', 'click.multiselect', function(e) { e.preventDefault(); var $this = $(this); var $inputs = $this.parent().nextUntil('li.ui-multiselect-optgroup-label').find('input:visible:not(:disabled)'); var nodes = $inputs.get(); var label = $this.parent().text(); // trigger event and bail if the return is false if(self._trigger('beforeoptgrouptoggle', e, { inputs:nodes, label:label }) === false) { return; } // toggle inputs self._toggleChecked( $inputs.filter(':checked').length !== $inputs.length, $inputs ); self._trigger('optgrouptoggle', e, { inputs: nodes, label: label, checked: nodes[0].checked }); }) .delegate('label', 'mouseenter.multiselect', function() { if(!$(this).hasClass('ui-state-disabled')) { self.labels.removeClass('ui-state-hover'); $(this).addClass('ui-state-hover').find('input').focus(); } }) .delegate('label', 'keydown.multiselect', function(e) { e.preventDefault(); switch(e.which) { case 9: // tab case 27: // esc self.close(); break; case 38: // up case 40: // down case 37: // left case 39: // right self._traverse(e.which, this); break; case 13: // enter $(this).find('input')[0].click(); break; } }) .delegate('input[type="checkbox"], input[type="radio"]', 'click.multiselect', function(e) { var $this = $(this); var val = this.value; var checked = this.checked; var tags = self.element.find('option'); // bail if this input is disabled or the event is cancelled if(this.disabled || self._trigger('click', e, { value: val, text: this.title, checked: checked }) === false) { e.preventDefault(); return; } // make sure the input has focus. otherwise, the esc key // won't close the menu after clicking an item. $this.focus(); // toggle aria state $this.attr('aria-selected', checked); // change state on the original option tags tags.each(function() { if(this.value === val) { this.selected = checked; } else if(!self.options.multiple) { this.selected = false; } }); // some additional single select-specific logic if(!self.options.multiple) { self.labels.removeClass('ui-state-active'); $this.closest('label').toggleClass('ui-state-active', checked); // close menu self.close(); } // fire change on the select box self.element.trigger("change"); // setTimeout is to fix multiselect issue #14 and #47. caused by jQuery issue #3827 // http://bugs.jquery.com/ticket/3827 setTimeout($.proxy(self.update, self), 10); }); // close each widget when clicking on any other element/anywhere else on the page $doc.bind('mousedown.' + this._namespaceID, function(event) { var target = event.target; if(self._isOpen && !$.contains(self.menu[0], target) && !$.contains(self.button[0], target) && target !== self.button[0] && target !== self.menu[0]) { self.close(); } }); // deal with form resets. the problem here is that buttons aren't // restored to their defaultValue prop on form reset, and the reset // handler fires before the form is actually reset. delaying it a bit // gives the form inputs time to clear. $(this.element[0].form).bind('reset.multiselect', function() { setTimeout($.proxy(self.refresh, self), 10); }); }, // set button width _setButtonWidth: function() { var width = this.element.outerWidth(); var o = this.options; if(/\d/.test(o.minWidth) && width < o.minWidth) { width = o.minWidth; } // set widths this.button.outerWidth(width); }, // set menu width _setMenuWidth: function() { var m = this.menu; m.outerWidth(this.button.outerWidth()); }, // move up or down within the menu _traverse: function(which, start) { var $start = $(start); var moveToLast = which === 38 || which === 37; // select the first li that isn't an optgroup label / disabled $next = $start.parent()[moveToLast ? 'prevAll' : 'nextAll']('li:not(.ui-multiselect-disabled, .ui-multiselect-optgroup-label)')[ moveToLast ? 'last' : 'first'](); // if at the first/last element if(!$next.length) { var $container = this.menu.find('ul').last(); // move to the first/last this.menu.find('label')[ moveToLast ? 'last' : 'first' ]().trigger('mouseover'); // set scroll position $container.scrollTop(moveToLast ? $container.height() : 0); } else { $next.find('label').trigger('mouseover'); } }, // This is an internal function to toggle the checked property and // other related attributes of a checkbox. // // The context of this function should be a checkbox; do not proxy it. _toggleState: function(prop, flag) { return function() { if(!this.disabled) { this[ prop ] = flag; } if(flag) { this.setAttribute('aria-selected', true); } else { this.removeAttribute('aria-selected'); } }; }, _toggleChecked: function(flag, group) { var $inputs = (group && group.length) ? group : this.inputs; var self = this; // toggle state on inputs $inputs.each(this._toggleState('checked', flag)); // give the first input focus $inputs.eq(0).focus(); // update button text this.update(); // gather an array of the values that actually changed var values = $inputs.map(function() { return this.value; }).get(); // toggle state on original option tags this.element .find('option') .each(function() { if(!this.disabled && $.inArray(this.value, values) > -1) { self._toggleState('selected', flag).call(this); } }); // trigger the change event on the select if($inputs.length) { this.element.trigger("change"); } }, _toggleDisabled: function(flag) { this.button.attr({ 'disabled':flag, 'aria-disabled':flag })[ flag ? 'addClass' : 'removeClass' ]('ui-state-disabled'); var inputs = this.menu.find('input'); var key = "ech-multiselect-disabled"; if(flag) { // remember which elements this widget disabled (not pre-disabled) // elements, so that they can be restored if the widget is re-enabled. inputs = inputs.filter(':enabled').data(key, true) } else { inputs = inputs.filter(function() { return $.data(this, key) === true; }).removeData(key); } inputs .attr({ 'disabled':flag, 'arial-disabled':flag }) .parent()[ flag ? 'addClass' : 'removeClass' ]('ui-state-disabled'); this.element.attr({ 'disabled':flag, 'aria-disabled':flag }); }, // open the menu open: function(e) { var self = this; var button = this.button; var menu = this.menu; var speed = this.speed; var o = this.options; var args = []; // bail if the multiselectopen event returns false, this widget is disabled, or is already open if(this._trigger('beforeopen') === false || button.hasClass('ui-state-disabled') || this._isOpen) { return; } var $container = menu.find('ul').last(); var effect = o.show; // figure out opening effects/speeds if($.isArray(o.show)) { effect = o.show[0]; speed = o.show[1] || self.speed; } // if there's an effect, assume jQuery UI is in use // build the arguments to pass to show() if(effect) { args = [ effect, speed ]; } // set the scroll of the checkbox container $container.scrollTop(0).height(o.height); // positon this.position(); // show the menu, maybe with a speed/effect combo $.fn.show.apply(menu, args); // select the first not disabled option // triggering both mouseover and mouseover because 1.4.2+ has a bug where triggering mouseover // will actually trigger mouseenter. the mouseenter trigger is there for when it's eventually fixed this.labels.filter(':not(.ui-state-disabled)').eq(0).trigger('mouseover').trigger('mouseenter').find('input').trigger('focus'); button.addClass('ui-state-active'); this._isOpen = true; this._trigger('open'); }, // close the menu close: function() { if(this._trigger('beforeclose') === false) { return; } var o = this.options; var effect = o.hide; var speed = this.speed; var args = []; // figure out opening effects/speeds if($.isArray(o.hide)) { effect = o.hide[0]; speed = o.hide[1] || this.speed; } if(effect) { args = [ effect, speed ]; } $.fn.hide.apply(this.menu, args); this.button.removeClass('ui-state-active').trigger('blur').trigger('mouseleave'); this._isOpen = false; this._trigger('close'); }, enable: function() { this._toggleDisabled(false); }, disable: function() { this._toggleDisabled(true); }, checkAll: function(e) { this._toggleChecked(true); this._trigger('checkAll'); }, uncheckAll: function() { this._toggleChecked(false); this._trigger('uncheckAll'); }, getChecked: function() { return this.menu.find('input').filter(':checked'); }, destroy: function() { // remove classes + data $.Widget.prototype.destroy.call(this); // unbind events $doc.unbind(this._namespaceID); this.button.remove(); this.menu.remove(); this.element.show(); return this; }, isOpen: function() { return this._isOpen; }, widget: function() { return this.menu; }, getButton: function() { return this.button; }, position: function() { var o = this.options; // use the position utility if it exists and options are specifified if($.ui.position && !$.isEmptyObject(o.position)) { o.position.of = o.position.of || this.button; this.menu .show() .position(o.position) .hide(); // otherwise fallback to custom positioning } else { var pos = this.button.offset(); this.menu.css({ top: pos.top + this.button.outerHeight(), left: pos.left }); } }, // react to option changes after initialization _setOption: function(key, value) { var menu = this.menu; switch(key) { case 'header': menu.find('div.ui-multiselect-header')[value ? 'show' : 'hide'](); break; case 'checkAllText': menu.find('a.ui-multiselect-all span').eq(-1).text(value); break; case 'uncheckAllText': menu.find('a.ui-multiselect-none span').eq(-1).text(value); break; case 'height': menu.find('ul').last().height(parseInt(value, 10)); break; case 'minWidth': this.options[key] = parseInt(value, 10); this._setButtonWidth(); this._setMenuWidth(); break; case 'selectedText': case 'selectedList': case 'noneSelectedText': this.options[key] = value; // these all needs to update immediately for the update() call this.update(); break; case 'classes': menu.add(this.button).removeClass(this.options.classes).addClass(value); break; case 'multiple': menu.toggleClass('ui-multiselect-single', !value); this.options.multiple = value; this.element[0].multiple = value; this.refresh(); break; case 'position': this.position(); } $.Widget.prototype._setOption.apply(this, arguments); } }); })(jQuery);
0x6a
trunk/libraries/ui/ui-multiselect/jquery.multiselect.js
JavaScript
asf20
22,244
/* jshint forin:true, noarg:true, noempty:true, eqeqeq:true, boss:true, undef:true, curly:true, browser:true, jquery:true */ /* * jQuery MultiSelect UI Widget Filtering Plugin 1.5pre * Copyright (c) 2012 Eric Hynds * * http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ * * Depends: * - jQuery UI MultiSelect widget * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ (function($) { var rEscape = /[\-\[\]{}()*+?.,\\\^$|#\s]/g; $.widget('ech.multiselectfilter', { options: { label: 'Filter:', width: null, /* override default width set in css file (px). null will inherit */ placeholder: 'Enter keywords', autoReset: false }, _create: function() { var opts = this.options; var elem = $(this.element); // get the multiselect instance var instance = (this.instance = (elem.data('echMultiselect') || elem.data("multiselect"))); // store header; add filter class so the close/check all/uncheck all links can be positioned correctly var header = (this.header = instance.menu.find('.ui-multiselect-header').addClass('ui-multiselect-hasfilter')); // wrapper elem var wrapper = (this.wrapper = $('<div class="ui-multiselect-filter">' + (opts.label.length ? opts.label : '') + '<input placeholder="'+opts.placeholder+'" type="search"' + (/\d/.test(opts.width) ? 'style="width:'+opts.width+'px"' : '') + ' /></div>').prependTo(this.header)); // reference to the actual inputs this.inputs = instance.menu.find('input[type="checkbox"], input[type="radio"]'); // build the input box this.input = wrapper.find('input').bind({ keydown: function(e) { // prevent the enter key from submitting the form / closing the widget if(e.which === 13) { e.preventDefault(); } }, keyup: $.proxy(this._handler, this), click: $.proxy(this._handler, this) }); // cache input values for searching this.updateCache(); // rewrite internal _toggleChecked fn so that when checkAll/uncheckAll is fired, // only the currently filtered elements are checked instance._toggleChecked = function(flag, group) { var $inputs = (group && group.length) ? group : this.labels.find('input'); var _self = this; // do not include hidden elems if the menu isn't open. var selector = instance._isOpen ? ':disabled, :hidden' : ':disabled'; $inputs = $inputs .not(selector) .each(this._toggleState('checked', flag)); // update text this.update(); // gather an array of the values that actually changed var values = $inputs.map(function() { return this.value; }).get(); // select option tags this.element.find('option').filter(function() { if(!this.disabled && $.inArray(this.value, values) > -1) { _self._toggleState('selected', flag).call(this); } }); // trigger the change event on the select if($inputs.length) { this.element.trigger('change'); } }; // rebuild cache when multiselect is updated var doc = $(document).bind('multiselectrefresh', $.proxy(function() { this.updateCache(); this._handler(); }, this)); // automatically reset the widget on close? if(this.options.autoReset) { doc.bind('multiselectclose', $.proxy(this._reset, this)); } }, // thx for the logic here ben alman _handler: function(e) { var term = $.trim(this.input[0].value.toLowerCase()), // speed up lookups rows = this.rows, inputs = this.inputs, cache = this.cache; if(!term) { rows.show(); } else { rows.hide(); var regex = new RegExp(term.replace(rEscape, "\\$&"), 'gi'); this._trigger("filter", e, $.map(cache, function(v, i) { if(v.search(regex) !== -1) { rows.eq(i).show(); return inputs.get(i); } return null; })); } // show/hide optgroups this.instance.menu.find(".ui-multiselect-optgroup-label").each(function() { var $this = $(this); var isVisible = $this.nextUntil('.ui-multiselect-optgroup-label').filter(function() { return $.css(this, "display") !== 'none'; }).length; $this[isVisible ? 'show' : 'hide'](); }); }, _reset: function() { this.input.val('').trigger('keyup'); }, updateCache: function() { // each list item this.rows = this.instance.menu.find(".ui-multiselect-checkboxes li:not(.ui-multiselect-optgroup-label)"); // cache this.cache = this.element.children().map(function() { var elem = $(this); // account for optgroups if(this.tagName.toLowerCase() === "optgroup") { elem = elem.children(); } return elem.map(function() { return this.innerHTML.toLowerCase(); }).get(); }).get(); }, widget: function() { return this.wrapper; }, destroy: function() { $.Widget.prototype.destroy.call(this); this.input.val('').trigger("keyup"); this.wrapper.remove(); } }); })(jQuery);
0x6a
trunk/libraries/ui/ui-multiselect/jquery.multiselect.filter.js
JavaScript
asf20
5,435
.ui-multiselect-hasfilter ul { position:relative; top:2px } .ui-multiselect-filter { float:left; margin-right:10px; font-size:11px } .ui-multiselect-filter input { width:100px; font-size:10px; margin-left:5px; height:15px; padding:2px; border:1px solid #292929; -webkit-appearance:textfield; -webkit-box-sizing:content-box; }
0x6a
trunk/libraries/ui/ui-multiselect/jquery.multiselect.filter.css
CSS
asf20
326
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Widget Demo</title> <link rel="stylesheet" type="text/css" href="../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="assets/style.css" /> <link rel="stylesheet" type="text/css" href="assets/prettify.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="assets/prettify.js"></script> <script type="text/javascript" src="../src/jquery.multiselect.js"></script> <script type="text/javascript"> $(function(){ var el = $("select").multiselect(), disabled = $('#disabled'), selected = $('#selected'), newItem = $('#newItem'); $("#add").click(function(){ var v = newItem.val(), opt = $('<option />', { value: v, text: v }); if(disabled.is(':checked')){ opt.attr('disabled','disabled'); } if(selected.is(':checked')){ opt.attr('selected','selected'); } opt.appendTo( el ); el.multiselect('refresh'); }); }); </script> </head> <body id="test" onload="prettyPrint();"> <h2>Refresh Method</h2> <p>Calling <code>refresh</code> allows you to re-build the multiselect menu from your original select. This is useful when the contents of the select box changes dynamically (through either AJAX, DOM manipulation, etc.) and you want the multiselect widget to reflect the changes.</p> <pre class="prettyprint"> // once the "add" button is clicked below: $("select").multiselect('refresh'); </pre> <div style="float:left; width:325px"> <h3 style="margin-top:0">Add an item:</h3> <p>Type in the text of a new option tag to add dynamically.</p> <input type="text" id="newItem" /> <input type="button" id="add" value="Add" /> <p> <label style="margin-right:8px"><input type="checkbox" id="selected" /> Selected?</label> <label><input type="checkbox" id="disabled" /> Disabled?</label> </p> </div> <div style="float:left;"> <select title="Refresh Exanmple" name="example-refresh" multiple="multiple" size="5"> <option value="foo">foo</option> <option value="bar">bar</option> <option value="baz">baz</option> </select> </div> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/demos/refresh.htm
HTML
asf20
2,485
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Widget Demo</title> <link rel="stylesheet" type="text/css" href="../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="assets/style.css" /> <link rel="stylesheet" type="text/css" href="assets/prettify.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../src/jquery.multiselect.js"></script> <script type="text/javascript" src="assets/prettify.js"></script> <script type="text/javascript"> $(function(){ var $widget = $("select").multiselect(), state = true; $("#toggle-disabled").click(function(){ state = !state; $widget.multiselect(state ? 'disable' : 'enable'); }); }); </script> </head> <body onload="prettyPrint();"> <h2>Enable/Disable Widget</h2> <p>Programmatically calling the disable and enable methods.</p> <pre class="prettyprint"> var $widget = $("select").multiselect(), state = true; $("#toggle-disabled").click(function(){ state = !state; $widget.multiselect(state ? 'disable' : 'enable'); }); </pre> <select name="example-disabled" disabled="disabled" multiple="multiple" size="5"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> <option value="option5">Option 5</option> </select> <p style="margin-top:5px"><button type="button" name="toggle" id="toggle-disabled">Toggle Disabled</button></p> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/demos/enabledisable.htm
HTML
asf20
1,869
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Widget Demo</title> <link rel="stylesheet" type="text/css" href="../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="assets/style.css" /> <link rel="stylesheet" type="text/css" href="assets/prettify.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="assets/prettify.js"></script> <script type="text/javascript" src="../src/jquery.multiselect.js"></script> <script type="text/javascript"> $(function(){ $("select").multiselect(); }); </script> </head> <body id="test" onload="prettyPrint();"> <h2>Basic Demos</h2> <p>Both multiselects are created with the following one-liner. Optgroup support is built in out of the box:</p> <pre class="prettyprint"> $(function(){ $("select").multiselect(); }); </pre> <h3>Basic</h3> <p> <select title="Basic example" multiple="multiple" name="example-basic" size="5"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> <option value="option5">Option 5</option> <option value="option6">Option 6</option> <option value="option7">Option 7</option> <option value="option8">Option 8</option> <option value="option9">Option 9</option> <option value="option10">Option 10</option> <option value="option11">Option 11</option> <option value="option12">Option 12</option> </select> </p> <h3>With Optgroups</h3> <p>Click on an optgroup's heading to toggle the checked state of the entire group.</p> <p> <select name="example-optgroup" multiple="multiple" size="5"> <optgroup label="Group One"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> </optgroup> <optgroup label="Group Two"> <option value="option4">Option 4</option> <option value="option5">Option 5</option> <option value="option6">Option 6</option> <option value="option7">Option 7</option> </optgroup> </select> </p> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/demos/basic.htm
HTML
asf20
2,455
// Copyright (C) 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. /** * @fileoverview * some functions for browser-side pretty printing of code contained in html. * <p> * * For a fairly comprehensive set of languages see the * <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs">README</a> * file that came with this source. At a minimum, the lexer should work on a * number of languages including C and friends, Java, Python, Bash, SQL, HTML, * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk * and a subset of Perl, but, because of commenting conventions, doesn't work on * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class. * <p> * Usage: <ol> * <li> include this source file in an html page via * {@code <script type="text/javascript" src="/path/to/prettify.js"></script>} * <li> define style rules. See the example page for examples. * <li> mark the {@code <pre>} and {@code <code>} tags in your source with * {@code class=prettyprint.} * You can also use the (html deprecated) {@code <xmp>} tag, but the pretty * printer needs to do more substantial DOM manipulations to support that, so * some css styles may not be preserved. * </ol> * That's it. I wanted to keep the API as simple as possible, so there's no * need to specify which language the code is in, but if you wish, you can add * another class to the {@code <pre>} or {@code <code>} element to specify the * language, as in {@code <pre class="prettyprint lang-java">}. Any class that * starts with "lang-" followed by a file extension, specifies the file type. * See the "lang-*.js" files in this directory for code that implements * per-language file handlers. * <p> * Change log:<br> * cbeust, 2006/08/22 * <blockquote> * Java annotations (start with "@") are now captured as literals ("lit") * </blockquote> * @requires console * @overrides window */ // JSLint declarations /*global console, document, navigator, setTimeout, window */ /** * Split {@code prettyPrint} into multiple timeouts so as not to interfere with * UI events. * If set to {@code false}, {@code prettyPrint()} is synchronous. */ window['PR_SHOULD_USE_CONTINUATION'] = true; /** the number of characters between tab columns */ window['PR_TAB_WIDTH'] = 8; /** Walks the DOM returning a properly escaped version of innerHTML. * @param {Node} node * @param {Array.<string>} out output buffer that receives chunks of HTML. */ window['PR_normalizedHtml'] /** Contains functions for creating and registering new language handlers. * @type {Object} */ = window['PR'] /** Pretty print a chunk of code. * * @param {string} sourceCodeHtml code as html * @return {string} code as html, but prettier */ = window['prettyPrintOne'] /** Find all the {@code <pre>} and {@code <code>} tags in the DOM with * {@code class=prettyprint} and prettify them. * @param {Function?} opt_whenDone if specified, called when the last entry * has been finished. */ = window['prettyPrint'] = void 0; /** browser detection. @extern @returns false if not IE, otherwise the major version. */ window['_pr_isIE6'] = function () { var ieVersion = navigator && navigator.userAgent && navigator.userAgent.match(/\bMSIE ([678])\./); ieVersion = ieVersion ? +ieVersion[1] : false; window['_pr_isIE6'] = function () { return ieVersion; }; return ieVersion; }; (function () { // Keyword lists for various languages. var FLOW_CONTROL_KEYWORDS = "break continue do else for if return while "; var C_KEYWORDS = FLOW_CONTROL_KEYWORDS + "auto case char const default " + "double enum extern float goto int long register short signed sizeof " + "static struct switch typedef union unsigned void volatile "; var COMMON_KEYWORDS = C_KEYWORDS + "catch class delete false import " + "new operator private protected public this throw true try typeof "; var CPP_KEYWORDS = COMMON_KEYWORDS + "alignof align_union asm axiom bool " + "concept concept_map const_cast constexpr decltype " + "dynamic_cast explicit export friend inline late_check " + "mutable namespace nullptr reinterpret_cast static_assert static_cast " + "template typeid typename using virtual wchar_t where "; var JAVA_KEYWORDS = COMMON_KEYWORDS + "abstract boolean byte extends final finally implements import " + "instanceof null native package strictfp super synchronized throws " + "transient "; var CSHARP_KEYWORDS = JAVA_KEYWORDS + "as base by checked decimal delegate descending event " + "fixed foreach from group implicit in interface internal into is lock " + "object out override orderby params partial readonly ref sbyte sealed " + "stackalloc string select uint ulong unchecked unsafe ushort var "; var JSCRIPT_KEYWORDS = COMMON_KEYWORDS + "debugger eval export function get null set undefined var with " + "Infinity NaN "; var PERL_KEYWORDS = "caller delete die do dump elsif eval exit foreach for " + "goto if import last local my next no our print package redo require " + "sub undef unless until use wantarray while BEGIN END "; var PYTHON_KEYWORDS = FLOW_CONTROL_KEYWORDS + "and as assert class def del " + "elif except exec finally from global import in is lambda " + "nonlocal not or pass print raise try with yield " + "False True None "; var RUBY_KEYWORDS = FLOW_CONTROL_KEYWORDS + "alias and begin case class def" + " defined elsif end ensure false in module next nil not or redo rescue " + "retry self super then true undef unless until when yield BEGIN END "; var SH_KEYWORDS = FLOW_CONTROL_KEYWORDS + "case done elif esac eval fi " + "function in local set then until "; var ALL_KEYWORDS = ( CPP_KEYWORDS + CSHARP_KEYWORDS + JSCRIPT_KEYWORDS + PERL_KEYWORDS + PYTHON_KEYWORDS + RUBY_KEYWORDS + SH_KEYWORDS); // token style names. correspond to css classes /** token style for a string literal */ var PR_STRING = 'str'; /** token style for a keyword */ var PR_KEYWORD = 'kwd'; /** token style for a comment */ var PR_COMMENT = 'com'; /** token style for a type */ var PR_TYPE = 'typ'; /** token style for a literal value. e.g. 1, null, true. */ var PR_LITERAL = 'lit'; /** token style for a punctuation string. */ var PR_PUNCTUATION = 'pun'; /** token style for a punctuation string. */ var PR_PLAIN = 'pln'; /** token style for an sgml tag. */ var PR_TAG = 'tag'; /** token style for a markup declaration such as a DOCTYPE. */ var PR_DECLARATION = 'dec'; /** token style for embedded source. */ var PR_SOURCE = 'src'; /** token style for an sgml attribute name. */ var PR_ATTRIB_NAME = 'atn'; /** token style for an sgml attribute value. */ var PR_ATTRIB_VALUE = 'atv'; /** * A class that indicates a section of markup that is not code, e.g. to allow * embedding of line numbers within code listings. */ var PR_NOCODE = 'nocode'; /** A set of tokens that can precede a regular expression literal in * javascript. * http://www.mozilla.org/js/language/js20/rationale/syntax.html has the full * list, but I've removed ones that might be problematic when seen in * languages that don't support regular expression literals. * * <p>Specifically, I've removed any keywords that can't precede a regexp * literal in a syntactically legal javascript program, and I've removed the * "in" keyword since it's not a keyword in many languages, and might be used * as a count of inches. * * <p>The link a above does not accurately describe EcmaScript rules since * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works * very well in practice. * * @private */ var REGEXP_PRECEDER_PATTERN = function () { var preceders = [ "!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=", "&=", "(", "*", "*=", /* "+", */ "+=", ",", /* "-", */ "-=", "->", /*".", "..", "...", handled below */ "/", "/=", ":", "::", ";", "<", "<<", "<<=", "<=", "=", "==", "===", ">", ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[", "^", "^=", "^^", "^^=", "{", "|", "|=", "||", "||=", "~" /* handles =~ and !~ */, "break", "case", "continue", "delete", "do", "else", "finally", "instanceof", "return", "throw", "try", "typeof" ]; var pattern = '(?:^^|[+-]'; for (var i = 0; i < preceders.length; ++i) { pattern += '|' + preceders[i].replace(/([^=<>:&a-z])/g, '\\$1'); } pattern += ')\\s*'; // matches at end, and matches empty string return pattern; // CAVEAT: this does not properly handle the case where a regular // expression immediately follows another since a regular expression may // have flags for case-sensitivity and the like. Having regexp tokens // adjacent is not valid in any language I'm aware of, so I'm punting. // TODO: maybe style special characters inside a regexp as punctuation. }(); // Define regexps here so that the interpreter doesn't have to create an // object each time the function containing them is called. // The language spec requires a new object created even if you don't access // the $1 members. var pr_amp = /&/g; var pr_lt = /</g; var pr_gt = />/g; var pr_quot = /\"/g; /** like textToHtml but escapes double quotes to be attribute safe. */ function attribToHtml(str) { return str.replace(pr_amp, '&amp;') .replace(pr_lt, '&lt;') .replace(pr_gt, '&gt;') .replace(pr_quot, '&quot;'); } /** escapest html special characters to html. */ function textToHtml(str) { return str.replace(pr_amp, '&amp;') .replace(pr_lt, '&lt;') .replace(pr_gt, '&gt;'); } var pr_ltEnt = /&lt;/g; var pr_gtEnt = /&gt;/g; var pr_aposEnt = /&apos;/g; var pr_quotEnt = /&quot;/g; var pr_ampEnt = /&amp;/g; var pr_nbspEnt = /&nbsp;/g; /** unescapes html to plain text. */ function htmlToText(html) { var pos = html.indexOf('&'); if (pos < 0) { return html; } // Handle numeric entities specially. We can't use functional substitution // since that doesn't work in older versions of Safari. // These should be rare since most browsers convert them to normal chars. for (--pos; (pos = html.indexOf('&#', pos + 1)) >= 0;) { var end = html.indexOf(';', pos); if (end >= 0) { var num = html.substring(pos + 3, end); var radix = 10; if (num && num.charAt(0) === 'x') { num = num.substring(1); radix = 16; } var codePoint = parseInt(num, radix); if (!isNaN(codePoint)) { html = (html.substring(0, pos) + String.fromCharCode(codePoint) + html.substring(end + 1)); } } } return html.replace(pr_ltEnt, '<') .replace(pr_gtEnt, '>') .replace(pr_aposEnt, "'") .replace(pr_quotEnt, '"') .replace(pr_nbspEnt, ' ') .replace(pr_ampEnt, '&'); } /** is the given node's innerHTML normally unescaped? */ function isRawContent(node) { return 'XMP' === node.tagName; } var newlineRe = /[\r\n]/g; /** * Are newlines and adjacent spaces significant in the given node's innerHTML? */ function isPreformatted(node, content) { // PRE means preformatted, and is a very common case, so don't create // unnecessary computed style objects. if ('PRE' === node.tagName) { return true; } if (!newlineRe.test(content)) { return true; } // Don't care var whitespace = ''; // For disconnected nodes, IE has no currentStyle. if (node.currentStyle) { whitespace = node.currentStyle.whiteSpace; } else if (window.getComputedStyle) { // Firefox makes a best guess if node is disconnected whereas Safari // returns the empty string. whitespace = window.getComputedStyle(node, null).whiteSpace; } return !whitespace || whitespace === 'pre'; } function normalizedHtml(node, out) { switch (node.nodeType) { case 1: // an element var name = node.tagName.toLowerCase(); out.push('<', name); for (var i = 0; i < node.attributes.length; ++i) { var attr = node.attributes[i]; if (!attr.specified) { continue; } out.push(' '); normalizedHtml(attr, out); } out.push('>'); for (var child = node.firstChild; child; child = child.nextSibling) { normalizedHtml(child, out); } if (node.firstChild || !/^(?:br|link|img)$/.test(name)) { out.push('<\/', name, '>'); } break; case 2: // an attribute out.push(node.name.toLowerCase(), '="', attribToHtml(node.value), '"'); break; case 3: case 4: // text out.push(textToHtml(node.nodeValue)); break; } } /** * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally * matches the union o the sets o strings matched d by the input RegExp. * Since it matches globally, if the input strings have a start-of-input * anchor (/^.../), it is ignored for the purposes of unioning. * @param {Array.<RegExp>} regexs non multiline, non-global regexs. * @return {RegExp} a global regex. */ function combinePrefixPatterns(regexs) { var capturedGroupIndex = 0; var needToFoldCase = false; var ignoreCase = false; for (var i = 0, n = regexs.length; i < n; ++i) { var regex = regexs[i]; if (regex.ignoreCase) { ignoreCase = true; } else if (/[a-z]/i.test(regex.source.replace( /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) { needToFoldCase = true; ignoreCase = false; break; } } function decodeEscape(charsetPart) { if (charsetPart.charAt(0) !== '\\') { return charsetPart.charCodeAt(0); } switch (charsetPart.charAt(1)) { case 'b': return 8; case 't': return 9; case 'n': return 0xa; case 'v': return 0xb; case 'f': return 0xc; case 'r': return 0xd; case 'u': case 'x': return parseInt(charsetPart.substring(2), 16) || charsetPart.charCodeAt(1); case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': return parseInt(charsetPart.substring(1), 8); default: return charsetPart.charCodeAt(1); } } function encodeEscape(charCode) { if (charCode < 0x20) { return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16); } var ch = String.fromCharCode(charCode); if (ch === '\\' || ch === '-' || ch === '[' || ch === ']') { ch = '\\' + ch; } return ch; } function caseFoldCharset(charSet) { var charsetParts = charSet.substring(1, charSet.length - 1).match( new RegExp( '\\\\u[0-9A-Fa-f]{4}' + '|\\\\x[0-9A-Fa-f]{2}' + '|\\\\[0-3][0-7]{0,2}' + '|\\\\[0-7]{1,2}' + '|\\\\[\\s\\S]' + '|-' + '|[^-\\\\]', 'g')); var groups = []; var ranges = []; var inverse = charsetParts[0] === '^'; for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) { var p = charsetParts[i]; switch (p) { case '\\B': case '\\b': case '\\D': case '\\d': case '\\S': case '\\s': case '\\W': case '\\w': groups.push(p); continue; } var start = decodeEscape(p); var end; if (i + 2 < n && '-' === charsetParts[i + 1]) { end = decodeEscape(charsetParts[i + 2]); i += 2; } else { end = start; } ranges.push([start, end]); // If the range might intersect letters, then expand it. if (!(end < 65 || start > 122)) { if (!(end < 65 || start > 90)) { ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]); } if (!(end < 97 || start > 122)) { ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]); } } } // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]] // -> [[1, 12], [14, 14], [16, 17]] ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1] - a[1]); }); var consolidatedRanges = []; var lastRange = [NaN, NaN]; for (var i = 0; i < ranges.length; ++i) { var range = ranges[i]; if (range[0] <= lastRange[1] + 1) { lastRange[1] = Math.max(lastRange[1], range[1]); } else { consolidatedRanges.push(lastRange = range); } } var out = ['[']; if (inverse) { out.push('^'); } out.push.apply(out, groups); for (var i = 0; i < consolidatedRanges.length; ++i) { var range = consolidatedRanges[i]; out.push(encodeEscape(range[0])); if (range[1] > range[0]) { if (range[1] + 1 > range[0]) { out.push('-'); } out.push(encodeEscape(range[1])); } } out.push(']'); return out.join(''); } function allowAnywhereFoldCaseAndRenumberGroups(regex) { // Split into character sets, escape sequences, punctuation strings // like ('(', '(?:', ')', '^'), and runs of characters that do not // include any of the above. var parts = regex.source.match( new RegExp( '(?:' + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]' // a character set + '|\\\\u[A-Fa-f0-9]{4}' // a unicode escape + '|\\\\x[A-Fa-f0-9]{2}' // a hex escape + '|\\\\[0-9]+' // a back-reference or octal escape + '|\\\\[^ux0-9]' // other escape sequence + '|\\(\\?[:!=]' // start of a non-capturing group + '|[\\(\\)\\^]' // start/emd of a group, or line start + '|[^\\x5B\\x5C\\(\\)\\^]+' // run of other characters + ')', 'g')); var n = parts.length; // Maps captured group numbers to the number they will occupy in // the output or to -1 if that has not been determined, or to // undefined if they need not be capturing in the output. var capturedGroups = []; // Walk over and identify back references to build the capturedGroups // mapping. for (var i = 0, groupIndex = 0; i < n; ++i) { var p = parts[i]; if (p === '(') { // groups are 1-indexed, so max group index is count of '(' ++groupIndex; } else if ('\\' === p.charAt(0)) { var decimalValue = +p.substring(1); if (decimalValue && decimalValue <= groupIndex) { capturedGroups[decimalValue] = -1; } } } // Renumber groups and reduce capturing groups to non-capturing groups // where possible. for (var i = 1; i < capturedGroups.length; ++i) { if (-1 === capturedGroups[i]) { capturedGroups[i] = ++capturedGroupIndex; } } for (var i = 0, groupIndex = 0; i < n; ++i) { var p = parts[i]; if (p === '(') { ++groupIndex; if (capturedGroups[groupIndex] === undefined) { parts[i] = '(?:'; } } else if ('\\' === p.charAt(0)) { var decimalValue = +p.substring(1); if (decimalValue && decimalValue <= groupIndex) { parts[i] = '\\' + capturedGroups[groupIndex]; } } } // Remove any prefix anchors so that the output will match anywhere. // ^^ really does mean an anchored match though. for (var i = 0, groupIndex = 0; i < n; ++i) { if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; } } // Expand letters to groupts to handle mixing of case-sensitive and // case-insensitive patterns if necessary. if (regex.ignoreCase && needToFoldCase) { for (var i = 0; i < n; ++i) { var p = parts[i]; var ch0 = p.charAt(0); if (p.length >= 2 && ch0 === '[') { parts[i] = caseFoldCharset(p); } else if (ch0 !== '\\') { // TODO: handle letters in numeric escapes. parts[i] = p.replace( /[a-zA-Z]/g, function (ch) { var cc = ch.charCodeAt(0); return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']'; }); } } } return parts.join(''); } var rewritten = []; for (var i = 0, n = regexs.length; i < n; ++i) { var regex = regexs[i]; if (regex.global || regex.multiline) { throw new Error('' + regex); } rewritten.push( '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')'); } return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g'); } var PR_innerHtmlWorks = null; function getInnerHtml(node) { // inner html is hopelessly broken in Safari 2.0.4 when the content is // an html description of well formed XML and the containing tag is a PRE // tag, so we detect that case and emulate innerHTML. if (null === PR_innerHtmlWorks) { var testNode = document.createElement('PRE'); testNode.appendChild( document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />')); PR_innerHtmlWorks = !/</.test(testNode.innerHTML); } if (PR_innerHtmlWorks) { var content = node.innerHTML; // XMP tags contain unescaped entities so require special handling. if (isRawContent(node)) { content = textToHtml(content); } else if (!isPreformatted(node, content)) { content = content.replace(/(<br\s*\/?>)[\r\n]+/g, '$1') .replace(/(?:[\r\n]+[ \t]*)+/g, ' '); } return content; } var out = []; for (var child = node.firstChild; child; child = child.nextSibling) { normalizedHtml(child, out); } return out.join(''); } /** returns a function that expand tabs to spaces. This function can be fed * successive chunks of text, and will maintain its own internal state to * keep track of how tabs are expanded. * @return {function (string) : string} a function that takes * plain text and return the text with tabs expanded. * @private */ function makeTabExpander(tabWidth) { var SPACES = ' '; var charInLine = 0; return function (plainText) { // walk over each character looking for tabs and newlines. // On tabs, expand them. On newlines, reset charInLine. // Otherwise increment charInLine var out = null; var pos = 0; for (var i = 0, n = plainText.length; i < n; ++i) { var ch = plainText.charAt(i); switch (ch) { case '\t': if (!out) { out = []; } out.push(plainText.substring(pos, i)); // calculate how much space we need in front of this part // nSpaces is the amount of padding -- the number of spaces needed // to move us to the next column, where columns occur at factors of // tabWidth. var nSpaces = tabWidth - (charInLine % tabWidth); charInLine += nSpaces; for (; nSpaces >= 0; nSpaces -= SPACES.length) { out.push(SPACES.substring(0, nSpaces)); } pos = i + 1; break; case '\n': charInLine = 0; break; default: ++charInLine; } } if (!out) { return plainText; } out.push(plainText.substring(pos)); return out.join(''); }; } var pr_chunkPattern = new RegExp( '[^<]+' // A run of characters other than '<' + '|<\!--[\\s\\S]*?--\>' // an HTML comment + '|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>' // a CDATA section // a probable tag that should not be highlighted + '|<\/?[a-zA-Z](?:[^>\"\']|\'[^\']*\'|\"[^\"]*\")*>' + '|<', // A '<' that does not begin a larger chunk 'g'); var pr_commentPrefix = /^<\!--/; var pr_cdataPrefix = /^<!\[CDATA\[/; var pr_brPrefix = /^<br\b/i; var pr_tagNameRe = /^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/; /** split markup into chunks of html tags (style null) and * plain text (style {@link #PR_PLAIN}), converting tags which are * significant for tokenization (<br>) into their textual equivalent. * * @param {string} s html where whitespace is considered significant. * @return {Object} source code and extracted tags. * @private */ function extractTags(s) { // since the pattern has the 'g' modifier and defines no capturing groups, // this will return a list of all chunks which we then classify and wrap as // PR_Tokens var matches = s.match(pr_chunkPattern); var sourceBuf = []; var sourceBufLen = 0; var extractedTags = []; if (matches) { for (var i = 0, n = matches.length; i < n; ++i) { var match = matches[i]; if (match.length > 1 && match.charAt(0) === '<') { if (pr_commentPrefix.test(match)) { continue; } if (pr_cdataPrefix.test(match)) { // strip CDATA prefix and suffix. Don't unescape since it's CDATA sourceBuf.push(match.substring(9, match.length - 3)); sourceBufLen += match.length - 12; } else if (pr_brPrefix.test(match)) { // <br> tags are lexically significant so convert them to text. // This is undone later. sourceBuf.push('\n'); ++sourceBufLen; } else { if (match.indexOf(PR_NOCODE) >= 0 && isNoCodeTag(match)) { // A <span class="nocode"> will start a section that should be // ignored. Continue walking the list until we see a matching end // tag. var name = match.match(pr_tagNameRe)[2]; var depth = 1; var j; end_tag_loop: for (j = i + 1; j < n; ++j) { var name2 = matches[j].match(pr_tagNameRe); if (name2 && name2[2] === name) { if (name2[1] === '/') { if (--depth === 0) { break end_tag_loop; } } else { ++depth; } } } if (j < n) { extractedTags.push( sourceBufLen, matches.slice(i, j + 1).join('')); i = j; } else { // Ignore unclosed sections. extractedTags.push(sourceBufLen, match); } } else { extractedTags.push(sourceBufLen, match); } } } else { var literalText = htmlToText(match); sourceBuf.push(literalText); sourceBufLen += literalText.length; } } } return { source: sourceBuf.join(''), tags: extractedTags }; } /** True if the given tag contains a class attribute with the nocode class. */ function isNoCodeTag(tag) { return !!tag // First canonicalize the representation of attributes .replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g, ' $1="$2$3$4"') // Then look for the attribute we want. .match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/); } /** * Apply the given language handler to sourceCode and add the resulting * decorations to out. * @param {number} basePos the index of sourceCode within the chunk of source * whose decorations are already present on out. */ function appendDecorations(basePos, sourceCode, langHandler, out) { if (!sourceCode) { return; } var job = { source: sourceCode, basePos: basePos }; langHandler(job); out.push.apply(out, job.decorations); } /** Given triples of [style, pattern, context] returns a lexing function, * The lexing function interprets the patterns to find token boundaries and * returns a decoration list of the form * [index_0, style_0, index_1, style_1, ..., index_n, style_n] * where index_n is an index into the sourceCode, and style_n is a style * constant like PR_PLAIN. index_n-1 <= index_n, and style_n-1 applies to * all characters in sourceCode[index_n-1:index_n]. * * The stylePatterns is a list whose elements have the form * [style : string, pattern : RegExp, DEPRECATED, shortcut : string]. * * Style is a style constant like PR_PLAIN, or can be a string of the * form 'lang-FOO', where FOO is a language extension describing the * language of the portion of the token in $1 after pattern executes. * E.g., if style is 'lang-lisp', and group 1 contains the text * '(hello (world))', then that portion of the token will be passed to the * registered lisp handler for formatting. * The text before and after group 1 will be restyled using this decorator * so decorators should take care that this doesn't result in infinite * recursion. For example, the HTML lexer rule for SCRIPT elements looks * something like ['lang-js', /<[s]cript>(.+?)<\/script>/]. This may match * '<script>foo()<\/script>', which would cause the current decorator to * be called with '<script>' which would not match the same rule since * group 1 must not be empty, so it would be instead styled as PR_TAG by * the generic tag rule. The handler registered for the 'js' extension would * then be called with 'foo()', and finally, the current decorator would * be called with '<\/script>' which would not match the original rule and * so the generic tag rule would identify it as a tag. * * Pattern must only match prefixes, and if it matches a prefix, then that * match is considered a token with the same style. * * Context is applied to the last non-whitespace, non-comment token * recognized. * * Shortcut is an optional string of characters, any of which, if the first * character, gurantee that this pattern and only this pattern matches. * * @param {Array} shortcutStylePatterns patterns that always start with * a known character. Must have a shortcut string. * @param {Array} fallthroughStylePatterns patterns that will be tried in * order if the shortcut ones fail. May have shortcuts. * * @return {function (Object)} a * function that takes source code and returns a list of decorations. */ function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) { var shortcuts = {}; var tokenizer; (function () { var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns); var allRegexs = []; var regexKeys = {}; for (var i = 0, n = allPatterns.length; i < n; ++i) { var patternParts = allPatterns[i]; var shortcutChars = patternParts[3]; if (shortcutChars) { for (var c = shortcutChars.length; --c >= 0;) { shortcuts[shortcutChars.charAt(c)] = patternParts; } } var regex = patternParts[1]; var k = '' + regex; if (!regexKeys.hasOwnProperty(k)) { allRegexs.push(regex); regexKeys[k] = null; } } allRegexs.push(/[\0-\uffff]/); tokenizer = combinePrefixPatterns(allRegexs); })(); var nPatterns = fallthroughStylePatterns.length; var notWs = /\S/; /** * Lexes job.source and produces an output array job.decorations of style * classes preceded by the position at which they start in job.source in * order. * * @param {Object} job an object like {@code * source: {string} sourceText plain text, * basePos: {int} position of job.source in the larger chunk of * sourceCode. * } */ var decorate = function (job) { var sourceCode = job.source, basePos = job.basePos; /** Even entries are positions in source in ascending order. Odd enties * are style markers (e.g., PR_COMMENT) that run from that position until * the end. * @type {Array.<number|string>} */ var decorations = [basePos, PR_PLAIN]; var pos = 0; // index into sourceCode var tokens = sourceCode.match(tokenizer) || []; var styleCache = {}; for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) { var token = tokens[ti]; var style = styleCache[token]; var match = void 0; var isEmbedded; if (typeof style === 'string') { isEmbedded = false; } else { var patternParts = shortcuts[token.charAt(0)]; if (patternParts) { match = token.match(patternParts[1]); style = patternParts[0]; } else { for (var i = 0; i < nPatterns; ++i) { patternParts = fallthroughStylePatterns[i]; match = token.match(patternParts[1]); if (match) { style = patternParts[0]; break; } } if (!match) { // make sure that we make progress style = PR_PLAIN; } } isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5); if (isEmbedded && !(match && typeof match[1] === 'string')) { isEmbedded = false; style = PR_SOURCE; } if (!isEmbedded) { styleCache[token] = style; } } var tokenStart = pos; pos += token.length; if (!isEmbedded) { decorations.push(basePos + tokenStart, style); } else { // Treat group 1 as an embedded block of source code. var embeddedSource = match[1]; var embeddedSourceStart = token.indexOf(embeddedSource); var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length; if (match[2]) { // If embeddedSource can be blank, then it would match at the // beginning which would cause us to infinitely recurse on the // entire token, so we catch the right context in match[2]. embeddedSourceEnd = token.length - match[2].length; embeddedSourceStart = embeddedSourceEnd - embeddedSource.length; } var lang = style.substring(5); // Decorate the left of the embedded source appendDecorations( basePos + tokenStart, token.substring(0, embeddedSourceStart), decorate, decorations); // Decorate the embedded source appendDecorations( basePos + tokenStart + embeddedSourceStart, embeddedSource, langHandlerForExtension(lang, embeddedSource), decorations); // Decorate the right of the embedded section appendDecorations( basePos + tokenStart + embeddedSourceEnd, token.substring(embeddedSourceEnd), decorate, decorations); } } job.decorations = decorations; }; return decorate; } /** returns a function that produces a list of decorations from source text. * * This code treats ", ', and ` as string delimiters, and \ as a string * escape. It does not recognize perl's qq() style strings. * It has no special handling for double delimiter escapes as in basic, or * the tripled delimiters used in python, but should work on those regardless * although in those cases a single string literal may be broken up into * multiple adjacent string literals. * * It recognizes C, C++, and shell style comments. * * @param {Object} options a set of optional parameters. * @return {function (Object)} a function that examines the source code * in the input job and builds the decoration list. */ function sourceDecorator(options) { var shortcutStylePatterns = [], fallthroughStylePatterns = []; if (options['tripleQuotedStrings']) { // '''multi-line-string''', 'single-line-string', and double-quoted shortcutStylePatterns.push( [PR_STRING, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, '\'"']); } else if (options['multiLineStrings']) { // 'multi-line-string', "multi-line-string" shortcutStylePatterns.push( [PR_STRING, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, '\'"`']); } else { // 'single-line-string', "single-line-string" shortcutStylePatterns.push( [PR_STRING, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, '"\'']); } if (options['verbatimStrings']) { // verbatim-string-literal production from the C# grammar. See issue 93. fallthroughStylePatterns.push( [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]); } if (options['hashComments']) { if (options['cStyleComments']) { // Stop C preprocessor declarations at an unclosed open comment shortcutStylePatterns.push( [PR_COMMENT, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/, null, '#']); fallthroughStylePatterns.push( [PR_STRING, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/, null]); } else { shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']); } } if (options['cStyleComments']) { fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]); fallthroughStylePatterns.push( [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]); } if (options['regexLiterals']) { var REGEX_LITERAL = ( // A regular expression literal starts with a slash that is // not followed by * or / so that it is not confused with // comments. '/(?=[^/*])' // and then contains any number of raw characters, + '(?:[^/\\x5B\\x5C]' // escape sequences (\x5C), + '|\\x5C[\\s\\S]' // or non-nesting character sets (\x5B\x5D); + '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+' // finally closed by a /. + '/'); fallthroughStylePatterns.push( ['lang-regex', new RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')') ]); } var keywords = options['keywords'].replace(/^\s+|\s+$/g, ''); if (keywords.length) { fallthroughStylePatterns.push( [PR_KEYWORD, new RegExp('^(?:' + keywords.replace(/\s+/g, '|') + ')\\b'), null]); } shortcutStylePatterns.push([PR_PLAIN, /^\s+/, null, ' \r\n\t\xA0']); fallthroughStylePatterns.push( // TODO(mikesamuel): recognize non-latin letters and numerals in idents [PR_LITERAL, /^@[a-z_$][a-z_$@0-9]*/i, null], [PR_TYPE, /^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/, null], [PR_PLAIN, /^[a-z_$][a-z_$@0-9]*/i, null], [PR_LITERAL, new RegExp( '^(?:' // A hex number + '0x[a-f0-9]+' // or an octal or decimal number, + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)' // possibly in scientific notation + '(?:e[+\\-]?\\d+)?' + ')' // with an optional modifier like UL for unsigned long + '[a-z]*', 'i'), null, '0123456789'], [PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#]*/, null]); return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns); } var decorateSource = sourceDecorator({ 'keywords': ALL_KEYWORDS, 'hashComments': true, 'cStyleComments': true, 'multiLineStrings': true, 'regexLiterals': true }); /** Breaks {@code job.source} around style boundaries in * {@code job.decorations} while re-interleaving {@code job.extractedTags}, * and leaves the result in {@code job.prettyPrintedHtml}. * @param {Object} job like { * source: {string} source as plain text, * extractedTags: {Array.<number|string>} extractedTags chunks of raw * html preceded by their position in {@code job.source} * in order * decorations: {Array.<number|string} an array of style classes preceded * by the position at which they start in job.source in order * } * @private */ function recombineTagsAndDecorations(job) { var sourceText = job.source; var extractedTags = job.extractedTags; var decorations = job.decorations; var html = []; // index past the last char in sourceText written to html var outputIdx = 0; var openDecoration = null; var currentDecoration = null; var tagPos = 0; // index into extractedTags var decPos = 0; // index into decorations var tabExpander = makeTabExpander(window['PR_TAB_WIDTH']); var adjacentSpaceRe = /([\r\n ]) /g; var startOrSpaceRe = /(^| ) /gm; var newlineRe = /\r\n?|\n/g; var trailingSpaceRe = /[ \r\n]$/; var lastWasSpace = true; // the last text chunk emitted ended with a space. // A helper function that is responsible for opening sections of decoration // and outputing properly escaped chunks of source function emitTextUpTo(sourceIdx) { if (sourceIdx > outputIdx) { if (openDecoration && openDecoration !== currentDecoration) { // Close the current decoration html.push('</span>'); openDecoration = null; } if (!openDecoration && currentDecoration) { openDecoration = currentDecoration; html.push('<span class="', openDecoration, '">'); } // This interacts badly with some wikis which introduces paragraph tags // into pre blocks for some strange reason. // It's necessary for IE though which seems to lose the preformattedness // of <pre> tags when their innerHTML is assigned. // http://stud3.tuwien.ac.at/~e0226430/innerHtmlQuirk.html // and it serves to undo the conversion of <br>s to newlines done in // chunkify. var htmlChunk = textToHtml( tabExpander(sourceText.substring(outputIdx, sourceIdx))) .replace(lastWasSpace ? startOrSpaceRe : adjacentSpaceRe, '$1&nbsp;'); // Keep track of whether we need to escape space at the beginning of the // next chunk. lastWasSpace = trailingSpaceRe.test(htmlChunk); // IE collapses multiple adjacient <br>s into 1 line break. // Prefix every <br> with '&nbsp;' can prevent such IE's behavior. var lineBreakHtml = window['_pr_isIE6']() ? '&nbsp;<br />' : '<br />'; html.push(htmlChunk.replace(newlineRe, lineBreakHtml)); outputIdx = sourceIdx; } } while (true) { // Determine if we're going to consume a tag this time around. Otherwise // we consume a decoration or exit. var outputTag; if (tagPos < extractedTags.length) { if (decPos < decorations.length) { // Pick one giving preference to extractedTags since we shouldn't open // a new style that we're going to have to immediately close in order // to output a tag. outputTag = extractedTags[tagPos] <= decorations[decPos]; } else { outputTag = true; } } else { outputTag = false; } // Consume either a decoration or a tag or exit. if (outputTag) { emitTextUpTo(extractedTags[tagPos]); if (openDecoration) { // Close the current decoration html.push('</span>'); openDecoration = null; } html.push(extractedTags[tagPos + 1]); tagPos += 2; } else if (decPos < decorations.length) { emitTextUpTo(decorations[decPos]); currentDecoration = decorations[decPos + 1]; decPos += 2; } else { break; } } emitTextUpTo(sourceText.length); if (openDecoration) { html.push('</span>'); } job.prettyPrintedHtml = html.join(''); } /** Maps language-specific file extensions to handlers. */ var langHandlerRegistry = {}; /** Register a language handler for the given file extensions. * @param {function (Object)} handler a function from source code to a list * of decorations. Takes a single argument job which describes the * state of the computation. The single parameter has the form * {@code { * source: {string} as plain text. * decorations: {Array.<number|string>} an array of style classes * preceded by the position at which they start in * job.source in order. * The language handler should assigned this field. * basePos: {int} the position of source in the larger source chunk. * All positions in the output decorations array are relative * to the larger source chunk. * } } * @param {Array.<string>} fileExtensions */ function registerLangHandler(handler, fileExtensions) { for (var i = fileExtensions.length; --i >= 0;) { var ext = fileExtensions[i]; if (!langHandlerRegistry.hasOwnProperty(ext)) { langHandlerRegistry[ext] = handler; } else if ('console' in window) { console.warn('cannot override language handler %s', ext); } } } function langHandlerForExtension(extension, source) { if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) { // Treat it as markup if the first non whitespace character is a < and // the last non-whitespace character is a >. extension = /^\s*</.test(source) ? 'default-markup' : 'default-code'; } return langHandlerRegistry[extension]; } registerLangHandler(decorateSource, ['default-code']); registerLangHandler( createSimpleLexer( [], [ [PR_PLAIN, /^[^<?]+/], [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/], [PR_COMMENT, /^<\!--[\s\S]*?(?:-\->|$)/], // Unescaped content in an unknown language ['lang-', /^<\?([\s\S]+?)(?:\?>|$)/], ['lang-', /^<%([\s\S]+?)(?:%>|$)/], [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/], ['lang-', /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i], // Unescaped content in javascript. (Or possibly vbscript). ['lang-js', /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i], // Contains unescaped stylesheet content ['lang-css', /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i], ['lang-in.tag', /^(<\/?[a-z][^<>]*>)/i] ]), ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']); registerLangHandler( createSimpleLexer( [ [PR_PLAIN, /^[\s]+/, null, ' \t\r\n'], [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\''] ], [ [PR_TAG, /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i], [PR_ATTRIB_NAME, /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i], ['lang-uq.val', /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/], [PR_PUNCTUATION, /^[=<>\/]+/], ['lang-js', /^on\w+\s*=\s*\"([^\"]+)\"/i], ['lang-js', /^on\w+\s*=\s*\'([^\']+)\'/i], ['lang-js', /^on\w+\s*=\s*([^\"\'>\s]+)/i], ['lang-css', /^style\s*=\s*\"([^\"]+)\"/i], ['lang-css', /^style\s*=\s*\'([^\']+)\'/i], ['lang-css', /^style\s*=\s*([^\"\'>\s]+)/i] ]), ['in.tag']); registerLangHandler( createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']); registerLangHandler(sourceDecorator({ 'keywords': CPP_KEYWORDS, 'hashComments': true, 'cStyleComments': true }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']); registerLangHandler(sourceDecorator({ 'keywords': 'null true false' }), ['json']); registerLangHandler(sourceDecorator({ 'keywords': CSHARP_KEYWORDS, 'hashComments': true, 'cStyleComments': true, 'verbatimStrings': true }), ['cs']); registerLangHandler(sourceDecorator({ 'keywords': JAVA_KEYWORDS, 'cStyleComments': true }), ['java']); registerLangHandler(sourceDecorator({ 'keywords': SH_KEYWORDS, 'hashComments': true, 'multiLineStrings': true }), ['bsh', 'csh', 'sh']); registerLangHandler(sourceDecorator({ 'keywords': PYTHON_KEYWORDS, 'hashComments': true, 'multiLineStrings': true, 'tripleQuotedStrings': true }), ['cv', 'py']); registerLangHandler(sourceDecorator({ 'keywords': PERL_KEYWORDS, 'hashComments': true, 'multiLineStrings': true, 'regexLiterals': true }), ['perl', 'pl', 'pm']); registerLangHandler(sourceDecorator({ 'keywords': RUBY_KEYWORDS, 'hashComments': true, 'multiLineStrings': true, 'regexLiterals': true }), ['rb']); registerLangHandler(sourceDecorator({ 'keywords': JSCRIPT_KEYWORDS, 'cStyleComments': true, 'regexLiterals': true }), ['js']); registerLangHandler( createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']); function applyDecorator(job) { var sourceCodeHtml = job.sourceCodeHtml; var opt_langExtension = job.langExtension; // Prepopulate output in case processing fails with an exception. job.prettyPrintedHtml = sourceCodeHtml; try { // Extract tags, and convert the source code to plain text. var sourceAndExtractedTags = extractTags(sourceCodeHtml); /** Plain text. @type {string} */ var source = sourceAndExtractedTags.source; job.source = source; job.basePos = 0; /** Even entries are positions in source in ascending order. Odd entries * are tags that were extracted at that position. * @type {Array.<number|string>} */ job.extractedTags = sourceAndExtractedTags.tags; // Apply the appropriate language handler langHandlerForExtension(opt_langExtension, source)(job); // Integrate the decorations and tags back into the source code to produce // a decorated html string which is left in job.prettyPrintedHtml. recombineTagsAndDecorations(job); } catch (e) { if ('console' in window) { console.log(e); console.trace(); } } } function prettyPrintOne(sourceCodeHtml, opt_langExtension) { var job = { sourceCodeHtml: sourceCodeHtml, langExtension: opt_langExtension }; applyDecorator(job); return job.prettyPrintedHtml; } function prettyPrint(opt_whenDone) { var isIE678 = window['_pr_isIE6'](); var ieNewline = isIE678 === 6 ? '\r\n' : '\r'; // See bug 71 and http://stackoverflow.com/questions/136443/why-doesnt-ie7- // fetch a list of nodes to rewrite var codeSegments = [ document.getElementsByTagName('pre'), document.getElementsByTagName('code'), document.getElementsByTagName('xmp') ]; var elements = []; for (var i = 0; i < codeSegments.length; ++i) { for (var j = 0, n = codeSegments[i].length; j < n; ++j) { elements.push(codeSegments[i][j]); } } codeSegments = null; var clock = Date; if (!clock['now']) { clock = { 'now': function () { return (new Date).getTime(); } }; } // The loop is broken into a series of continuations to make sure that we // don't make the browser unresponsive when rewriting a large page. var k = 0; var prettyPrintingJob; function doWork() { var endTime = (window['PR_SHOULD_USE_CONTINUATION'] ? clock.now() + 250 /* ms */ : Infinity); for (; k < elements.length && clock.now() < endTime; k++) { var cs = elements[k]; if (cs.className && cs.className.indexOf('prettyprint') >= 0) { // If the classes includes a language extensions, use it. // Language extensions can be specified like // <pre class="prettyprint lang-cpp"> // the language extension "cpp" is used to find a language handler as // passed to PR_registerLangHandler. var langExtension = cs.className.match(/\blang-(\w+)\b/); if (langExtension) { langExtension = langExtension[1]; } // make sure this is not nested in an already prettified element var nested = false; for (var p = cs.parentNode; p; p = p.parentNode) { if ((p.tagName === 'pre' || p.tagName === 'code' || p.tagName === 'xmp') && p.className && p.className.indexOf('prettyprint') >= 0) { nested = true; break; } } if (!nested) { // fetch the content as a snippet of properly escaped HTML. // Firefox adds newlines at the end. var content = getInnerHtml(cs); content = content.replace(/(?:\r\n?|\n)$/, ''); // do the pretty printing prettyPrintingJob = { sourceCodeHtml: content, langExtension: langExtension, sourceNode: cs }; applyDecorator(prettyPrintingJob); replaceWithPrettyPrintedHtml(); } } } if (k < elements.length) { // finish up in a continuation setTimeout(doWork, 250); } else if (opt_whenDone) { opt_whenDone(); } } function replaceWithPrettyPrintedHtml() { var newContent = prettyPrintingJob.prettyPrintedHtml; if (!newContent) { return; } var cs = prettyPrintingJob.sourceNode; // push the prettified html back into the tag. if (!isRawContent(cs)) { // just replace the old html with the new cs.innerHTML = newContent; } else { // we need to change the tag to a <pre> since <xmp>s do not allow // embedded tags such as the span tags used to attach styles to // sections of source code. var pre = document.createElement('PRE'); for (var i = 0; i < cs.attributes.length; ++i) { var a = cs.attributes[i]; if (a.specified) { var aname = a.name.toLowerCase(); if (aname === 'class') { pre.className = a.value; // For IE 6 } else { pre.setAttribute(a.name, a.value); } } } pre.innerHTML = newContent; // remove the old cs.parentNode.replaceChild(pre, cs); cs = pre; } // Replace <br>s with line-feeds so that copying and pasting works // on IE 6. // Doing this on other browsers breaks lots of stuff since \r\n is // treated as two newlines on Firefox, and doing this also slows // down rendering. if (isIE678 && cs.tagName === 'PRE') { var lineBreaks = cs.getElementsByTagName('br'); for (var j = lineBreaks.length; --j >= 0;) { var lineBreak = lineBreaks[j]; lineBreak.parentNode.replaceChild( document.createTextNode(ieNewline), lineBreak); } } } doWork(); } window['PR_normalizedHtml'] = normalizedHtml; window['prettyPrintOne'] = prettyPrintOne; window['prettyPrint'] = prettyPrint; window['PR'] = { 'combinePrefixPatterns': combinePrefixPatterns, 'createSimpleLexer': createSimpleLexer, 'registerLangHandler': registerLangHandler, 'sourceDecorator': sourceDecorator, 'PR_ATTRIB_NAME': PR_ATTRIB_NAME, 'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE, 'PR_COMMENT': PR_COMMENT, 'PR_DECLARATION': PR_DECLARATION, 'PR_KEYWORD': PR_KEYWORD, 'PR_LITERAL': PR_LITERAL, 'PR_NOCODE': PR_NOCODE, 'PR_PLAIN': PR_PLAIN, 'PR_PUNCTUATION': PR_PUNCTUATION, 'PR_SOURCE': PR_SOURCE, 'PR_STRING': PR_STRING, 'PR_TAG': PR_TAG, 'PR_TYPE': PR_TYPE }; })();
0x6a
trunk/libraries/ui/ui-multiselect/demos/assets/prettify.js
JavaScript
asf20
57,685
/* Pretty printing styles. Used with prettify.js. */ .str { color: #080; } .kwd { color: #008; } .com { color: #800; } .typ { color: #606; } .lit { color: #066; } .pun { color: #660; } .pln { color: #000; } .tag { color: #008; } .atn { color: #606; } .atv { color: #080; } .dec { color: #606; } pre.prettyprint { padding: 5px; border:1px solid #d2d2d2; background:#f5f5f5 } @media print { .str { color: #060; } .kwd { color: #006; font-weight: bold; } .com { color: #600; font-style: italic; } .typ { color: #404; font-weight: bold; } .lit { color: #044; } .pun { color: #440; } .pln { color: #000; } .tag { color: #006; font-weight: bold; } .atn { color: #404; } .atv { color: #060; } }
0x6a
trunk/libraries/ui/ui-multiselect/demos/assets/prettify.css
CSS
asf20
710
body { font:12px Helvetica, arial, sans-serif } h1, h2, p { margin:10px 0 } .hidden { visibility:hidden } .message { padding:10px; margin:15px 0; display:block; text-align:left } .message-title { font-weight:bold; font-size:1.25em } .message-body { margin-top:4px } .error, .notice, .success { padding:.8em; margin-bottom:1em; border:2px solid #ddd } .error { background:#FBE3E4; color:#8a1f11; border-color:#FBC2C4 } .notice { background:#FFF6BF; color:#514721; border-color:#FFD324 } .success { background:#E6EFC2; color:#264409; border-color:#C6D880 } .error a { color:#8a1f11 } .notice a { color:#514721 } .success a { color:#264409 }
0x6a
trunk/libraries/ui/ui-multiselect/demos/assets/style.css
CSS
asf20
642
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Plugin Demo</title> <link rel="stylesheet" type="text/css" href="../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="assets/style.css" /> <link rel="stylesheet" type="text/css" href="assets/prettify.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../src/jquery.multiselect.js"></script> <script type="text/javascript" src="assets/prettify.js"></script> <script type="text/javascript"> $(function(){ var warning = $(".message"); $("select").multiselect({ header: "Choose only TWO items!", click: function(e){ if( $(this).multiselect("widget").find("input:checked").length > 2 ){ warning.addClass("error").removeClass("success").html("You can only check two checkboxes!"); return false; } else { warning.addClass("success").removeClass("error").html("Check a few boxes."); } } }); }); </script> </head> <body onload="prettyPrint();"> <h2>Max Checked Test</h2> <p>Logic to impose a maximum number of checked inputs (two in this demo).</p> <p class="message success">Check a few boxes.</p> <form> <select multiple="multiple"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> <option value="option5">Option 5</option> <option value="option6">Option 6</option> <option value="option7">Option 7</option> </select> </form> <pre class="prettyprint"> var warning = $(".message"); $("select").multiselect({ header: "Choose only TWO items!", click: function(e){ if( $(this).multiselect("widget").find("input:checked").length > 2 ){ warning.addClass("error").removeClass("success").html("You can only check two checkboxes!"); return false; } else { warning.addClass("success").removeClass("error").html("Check a few boxes."); } } }); </pre> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/demos/maxchecked.htm
HTML
asf20
2,383
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Widget Demo</title> <link rel="stylesheet" type="text/css" href="../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="assets/style.css" /> <link rel="stylesheet" type="text/css" href="assets/prettify.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../src/jquery.multiselect.js"></script> <script type="text/javascript" src="assets/prettify.js"></script> <script type="text/javascript"> $(function(){ $("select").multiselect({ multiple: false, header: "Select an option", noneSelectedText: "Select an Option", selectedList: 1 }); }); </script> </head> <body onload="prettyPrint();"> <h2>Single Select</h2> <p>Setting the <code>multiple</code> parameter to false will force the widget to use radio buttons instead of checkboxes. I advise using the <code>header</code> parameter along with <code>multiple</code> in order to hide/change the &quot;check all&quot;/&quot;uncheck all&quot; links.</p> <pre class="prettyprint"> $("select").multiselect({ multiple: false, header: "Select an option", noneSelectedText: "Select an Option", selectedList: 1 }); </pre> <form> <p> <select name="demo"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> <option value="option5">Option 5</option> <option value="option6">Option 6</option> <option value="option7">Option 7</option> </select> </p> </form> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/demos/single.htm
HTML
asf20
1,973
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Widget Demo</title> <link rel="stylesheet" type="text/css" href="../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="assets/style.css" /> <link rel="stylesheet" type="text/css" href="assets/prettify.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../src/jquery.multiselect.js"></script> <script type="text/javascript" src="assets/prettify.js"></script> <script type="text/javascript"> $(function(){ $("select") .eq(0) .multiselect({ position: { my: 'center', at: 'center' } }).end() .eq(1) .multiselect({ position: { my: 'left bottom', at: 'left top' } }); }); </script> </head> <body onload="prettyPrint();"> <h2>Position Utility</h2> <p>Using the jQuery UI <a href="http://jqueryui.com/demos/position/">position utility</a> to position the menu above the input. This is especially useful when you want collision detection with the bottom of the window, and automatically open the menu above the button.</p> <p><strong>Please use jQuery 1.4.3 with the positioning option. Bugs in jQuery 1.4.2 prevent the menu from being positioned correctly the first time multiselect is opened in Webkit/IE.</strong></p> <form> <h3>Center the menu over the button</h3> <pre class="prettyprint"> $("select").multiselect({ position: { my: 'center', at: 'center' // only include the "of" property if you want to position // the menu against an element other than the button. // multiselect automatically sets "of" unless you explictly // pass in a value. } }); </pre> <p> <select name="demo" multiple="multiple" size="5"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> </select> </p> <h3>Open the menu upwards</h3> <pre class="prettyprint"> $("select").multiselect({ position: { my: 'left bottom', at: 'left top' } }); </pre> <p> <select name="demo" multiple="multiple" size="5"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> </select> </p> </form> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/demos/position.htm
HTML
asf20
2,651
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Widget Demo</title> <link rel="stylesheet" type="text/css" href="../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="assets/style.css" /> <link rel="stylesheet" type="text/css" href="assets/prettify.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../src/jquery.multiselect.js"></script> <script type="text/javascript" src="assets/prettify.js"></script> <script type="text/javascript"> $(function(){ $("#test-1").multiselect({ show: ["bounce", 200], hide: ["explode", 1000] }); $("#test-2").multiselect({ show: "bounce", hide: "explode" }); }); </script> </head> <body onload="prettyPrint();"> <h2>Show/hide with Animation</h2> <p>Using animations with the show and hide parameters. Either pass an array with the effect name and the speed, or just specify the name of an effect. If you don't specify a speed, the default of 400ms will be used.</p> <h3>Specifying different show and hide speeds</h3> <pre class="prettyprint"> $("#test-1").multiselect({ show: ["bounce", 200], hide: ["explode", 1000] }); </pre> <select id="test-1" multiple="multiple" size="5"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> <option value="option5">Option 5</option> </select> <h3>Only passing the name of an effect</h3> <pre class="prettyprint"> $("#test-2").multiselect({ show: "bounce", hide: "explode" }); </pre> <select id="test-2" multiple="multiple" size="5"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> <option value="option5">Option 5</option> </select> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/demos/animations.htm
HTML
asf20
2,240
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Widget Demo</title> <link rel="stylesheet" type="text/css" href="../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="assets/style.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../src/jquery.multiselect.js"></script> <script type="text/javascript"> $(function(){ // default $("#test-1").multiselect({ header: true }); // off $("#test-2").multiselect({ header: false }); // custom text $("#test-3").multiselect({ header: "Choose options below" }); }); </script> </head> <body> <h2>Headers</h2> <p>The header option can be used in three ways:</p> <form> <h3><code>header: true</code> (default)</h3> <select id="test-1" multiple="multiple" size="5"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> <option value="option5">Option 5</option> <option value="option6">Option 6</option> <option value="option7">Option 7</option> </select> <h3><code>header: false</code></h3> <select id="test-2" multiple="multiple" size="5"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> <option value="option5">Option 5</option> <option value="option6">Option 6</option> <option value="option7">Option 7</option> </select> <h3><code>header: "Choose options below"</code></h3> <select id="test-3" multiple="multiple" size="5"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> <option value="option5">Option 5</option> <option value="option6">Option 6</option> <option value="option7">Option 7</option> </select> </form> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/demos/headers.htm
HTML
asf20
2,336
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Widget Demo</title> <link rel="stylesheet" type="text/css" href="../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="assets/style.css" /> <link rel="stylesheet" type="text/css" href="assets/prettify.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../src/jquery.multiselect.js"></script> <script type="text/javascript" src="assets/prettify.js"></script> </head> <body onload="prettyPrint();"> <h2>Pre-selected &amp; pre-disabled options</h2> <p>Options one, three, and four have the <code class="prettyprint">selected="selected"</code> attribute and are checked by default. Options five and six have the <code class="prettyprint">disabled="disabled"</code> attribute. When the widget is initialized on the select, both attribute types are honored.</p> <form> <p> <select name="example-presets" multiple="multiple" size="5"> <option value="option1" selected="selected">Option 1</option> <option value="option2">Option 2</option> <option value="option3" selected="selected">Option 3</option> <option value="option4" selected="selected">Option 4</option> <option value="option5" disabled="disabled">Option 5</option> <option value="option6" disabled="disabled">Option 6</option> <option value="option7">Option 7</option> <option value="option8">Option 8</option> <option value="option9">Option 9</option> </select> </p> </form> <script type="text/javascript">$("select").multiselect();</script> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/demos/preselected.htm
HTML
asf20
1,936
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Widget Demo</title> <link rel="stylesheet" type="text/css" href="../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="../jquery.multiselect.filter.css" /> <link rel="stylesheet" type="text/css" href="assets/style.css" /> <link rel="stylesheet" type="text/css" href="assets/prettify.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../src/jquery.multiselect.js"></script> <script type="text/javascript" src="../src/jquery.multiselect.filter.js"></script> <script type="text/javascript" src="assets/prettify.js"></script> </head> <body onload="prettyPrint();"> <h2>Filter Plugin</h2> <p>Filtering is available by including the <a href="http://github.com/ehynds/jquery-ui-multiselect-widget/raw/master/src/jquery.multiselect.filter.js">jquery.multiselect.filter.js</a> plugin and the <a href="http://github.com/ehynds/jquery-ui-multiselect-widget/raw/master/jquery.multiselect.filter.css">jquery.multiselect.filter.css</a> CSS file. Initialize filtering on any of your multiselects by calling <code class="prettyprint">multiselectfilter()</code> on the widget.</p> <pre class="prettyprint"> $("select").multiselect().multiselectfilter(); </pre> <form style="margin:20px 0"> <p> <select multiple="multiple" style="width:370px"> <option value="red">Red</option> <option value="green">Green</option> <option value="blue">Blue</option> <option value="orange">Orange</option> <option value="purple">Purple</option> <option value="yellow">Yellow</option> <option value="brown">Brown</option> <option value="black">Black</option> </select> </p> <p> <select multiple="multiple" style="width:370px"> <optgroup label="test"> <option value="red">Red</option> <option value="green">Green</option> <option value="blue">Blue</option> </optgroup> <optgroup label="foo"> <option value="orange">Orange</option> <option value="purple">Purple</option> <option value="yellow">Yellow</option> <option value="brown">Brown</option> <option value="black">Black</option> </optgroup> </select> </p> </form> <h3>Options:</h3> <p>Pass any of these as a configuration object when you initialize <code>multiselectfilter()</code>:</p> <ul> <li><code><strong>label</strong></code><p>The text to appear left of the input. Defaults to &quot;Filter:&quot;</p></li> <li><code><strong>width</strong></code><p>The width of the input in pixels. Defaults to 100px in the style sheet, but you can override this for each instance.</p></li> <li><code><strong>placeholder</strong></code><p>The HTML5 placeholder attribute value of the input. Only supported in webkit as of this writing. Defaults to &quot;Enter keywords&quot;</p></li> <li><code><strong>autoReset</strong></code><p>A boolean value denoting whether or not to reset the search box &amp; any filtered options when the widget closes. Defaults to false.</p></li> </ul> <h3>Events:</h3> <ul> <li><code><strong>filter</strong></code> <p>A callback function that fires after filtering is complete. Accepts two arguments: the original event and an array of matches.</p> <p>To do something when no matches are found:</p> <pre class="prettyprint"> $("select").multiselect().multiselectfilter({ filter: function(event, matches){ if( !matches.length ){ // do something } } }); </pre> <p>To do something with a match:</p> <pre class="prettyprint"> $("select").multiselect().multiselectfilter({ filter: function(event, matches){ // find the first matching checkbox var first_match = $( matches[0] ); } }); </pre> <p>You can also bind to the event after a multiselect has been initialized, like such: <pre class="prettyprint"> $("select").bind("multiselectfilterfilter", function(event, matches){ // do something }); </pre> </li> </ul> <h3>Methods</h3> <p>Syntax: <code class="prettyprint">$("select").multiselectfilter("method_name");</code></p> <ul> <li><code><strong>updateCache</strong></code><p>Reloads the cache of values to search against. Make sure you call this after dynamically adding or removing any inputs to the multiselect.</p></li> <li><code><strong>destroy</strong></code><p>Destroys the widget.</p></li> <li><code><strong>widget</strong></code><p>Returns the wrapper div with the input and label text inside. This is a quick and easy way to access the HTML created by the plugin.</p></li> </ul> <script type="text/javascript"> $("select").multiselect().multiselectfilter(); </script> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/demos/filter.htm
HTML
asf20
4,981
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery UI MultiSelect Widget by Eric Hynds</title> <link type="text/css" rel="stylesheet" href="http://www.erichynds.com/examples/style.css" /> <style type="text/css"> h1 { margin-bottom:10px } h2 { font-size:14px; padding:0; margin:25px 0 5px 0 } p { margin:5px 0; padding:0 } #callback { color:green; font-weight:bold } #switcher { margin:0 0 20px 0 } #menu { float:left; width:200px; background:#f1f1f1; padding:0; list-style:none; margin:0 10px 0 0 } #menu a { display:block; padding:10px 6px; border-bottom:1px solid #ccc } #menu a:hover, #menu a.active { background:#C3D3DA; text-decoration:none } #menu a.active { color:#252823 } #body { border:4px solid #f1f1f1; float:left } #body #footer { display:block; width:710px; padding:5px; text-align:right; background:#f1f1f1; color:#000; font-size:11px; } #body #footer a { margin:0; padding:0; color:#000 } </style> </head> <body> <div id="bar"> <h1><a href="http://www.erichynds.com">eric<span>hynds</span></a></h1> <div><a href="http://www.erichynds.com/jquery/jquery-ui-multiselect-widget">&laquo; Return to Blog Post</a></div> </div> <div id="content"> <h1>jQuery UI MultiSelect Widget Demos</h1> <p style="margin:10px 0 15px 0"><a href="http://github.com/ehynds/jquery-ui-multiselect-widget">Download</a> &nbsp;|&nbsp; <a href="http://www.erichynds.com/jquery/jquery-ui-multiselect-widget">Return to Blog Post &amp; Documentation</a></p> <ul id="menu"> <li><a href="#basic" class="active">Basic</a></li> <li><a href="#animations">Open/Close Animations</a></li> <li><a href="#callbacks">Callbacks &amp; Events</a></li> <li><a href="#headers">Customize the Header</a></li> <li><a href="#selectedlist">Using selectedText/selectedList</a></li> <li><a href="#maxchecked">Max Checked</a></li> <li><a href="#preselected">Pre-selected/disabled Options</a></li> <li><a href="#single">Single Select</a></li> <li><a href="#enabledisable">Enable/Disable</a></li> <li><a href="#refresh">Using the Refresh Method</a></li> <li><a href="#position">Using the Position Utility</a></li> <li><a href="#filter" class="last">Filter Plugin</a></li> </ul> <div id="body"> <iframe id="placeholder" frameborder="0" src="basic.htm" marginwidth="10" marginheight="10" width="710" height="550"></iframe> <div id="footer"><a href="basic.htm">Open Demo in New Window &raquo;</a></div> </div> </div> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script> <script src="assets/ba.hashchange.js" type="text/javascript"></script> <script type="text/javascript"> (function($){ // cache some objs var $placeholder = $("#placeholder"), $demo = $("#footer a"), $links = $("#menu a"); $(window).bind("hashchange", function(){ var hash = location.hash || "#basic", url = hash.replace("#", "")+'.htm'; // load in demo $placeholder.attr("src", url); $demo.attr("href", url); // set active link $links.each(function(){ var $this = $(this); $this[ $this.attr('href') === hash ? 'addClass' : 'removeClass' ]('active'); }); }); $(window).trigger("hashchange"); })(jQuery); </script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-17093650-1']); _gaq.push(['_trackPageview']); (function(){ var ga = document.createElement('script'); ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ga.setAttribute('async', 'true'); document.documentElement.firstChild.appendChild(ga); })(); </script> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/demos/index.htm
HTML
asf20
3,655
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Widget Demo</title> <link rel="stylesheet" type="text/css" href="../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="assets/style.css" /> <link rel="stylesheet" type="text/css" href="assets/prettify.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../src/jquery.multiselect.js"></script> <script type="text/javascript" src="assets/prettify.js"></script> <script type="text/javascript"> $(function(){ var $callback = $("#callback"); $("select").multiselect({ click: function(event, ui){ $callback.text(ui.value + ' ' + (ui.checked ? 'checked' : 'unchecked') ); }, beforeopen: function(){ $callback.text("Select about to be opened..."); }, open: function(){ $callback.text("Select opened!"); }, beforeclose: function(){ $callback.text("Select about to be closed..."); }, close: function(){ $callback.text("Select closed!"); }, checkAll: function(){ $callback.text("Check all clicked!"); }, uncheckAll: function(){ $callback.text("Uncheck all clicked!"); }, optgrouptoggle: function(event, ui){ var values = $.map(ui.inputs, function(checkbox){ return checkbox.value; }).join(", "); $callback.html("<strong>Checkboxes " + (ui.checked ? "checked" : "unchecked") + ":</strong> " + values); } }); }); </script> </head> <body onload="prettyPrint();"> <h2>Callbacks &amp; Events</h2> <p>Demonstrating beforeopen, open, beforeclose, close, click, checkall, uncheckall, and optgrouptoggle callbacks/events. Note that you can either pass in an event handler in the options object upon initialization, or bind to the event (including the multiselect prefix). For example, to add an "open" handler, you can also use <code class="prettyprint">$("select").bind("multiselectopen", fn);</code></p> <p class="message success" id="callback">Callback target</p> <select multiple="multiple" size="5"> <optgroup label="Group One"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> </optgroup> <optgroup label="Group Two"> <option value="option4">Option 4</option> <option value="option5">Option 5</option> <option value="option6">Option 6</option> <option value="option7">Option 7</option> </optgroup> </select> <pre class="prettyprint"> var $callback = $("#callback"); $("select").multiselect({ click: function(event, ui){ $callback.text(ui.value + ' ' + (ui.checked ? 'checked' : 'unchecked') ); }, beforeopen: function(){ $callback.text("Select about to be opened..."); }, open: function(){ $callback.text("Select opened!"); }, beforeclose: function(){ $callback.text("Select about to be closed..."); }, close: function(){ $callback.text("Select closed!"); }, checkAll: function(){ $callback.text("Check all clicked!"); }, uncheckAll: function(){ $callback.text("Uncheck all clicked!"); }, optgrouptoggle: function(event, ui){ var values = $.map(ui.inputs, function(checkbox){ return checkbox.value; }).join(", "); $callback.html("<strong>Checkboxes " + (ui.checked ? "checked" : "unchecked") + ":</strong> " + values); } }); </pre> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/demos/callbacks.htm
HTML
asf20
3,723
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Widget Demo</title> <link rel="stylesheet" type="text/css" href="../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="assets/style.css" /> <link rel="stylesheet" type="text/css" href="assets/prettify.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../src/jquery.multiselect.js"></script> <script type="text/javascript" src="assets/prettify.js"></script> <script type="text/javascript"> $(function(){ $("select").multiselect({ selectedList: 4 }); }); </script> </head> <body onload="prettyPrint();"> <h2>Displaying options in a list</h2> <h3>Using the <code>selectedList</code> Parameter</h3> <p>The selectedList parameter is a boolean/numeric value denoting whether or not to display the checked opens in a list, and how many. A number greater than 0 denotes the maximum number of list items to display before switching over to the selectedText parameter.</p> <pre class="prettyprint"> $("select").multiselect({ selectedList: 4 // 0-based index }); </pre> <form> <p> <select name="example-list" multiple="multiple" style="width:400px"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> <option value="option5">Option 5</option> <option value="option6">Option 6</option> <option value="option7">Option 7</option> </select> </p> </form> <h3>Passing a Function to <code>selectedText</code></h3> <p>Passing a function to the <code>selectedText</code> option gives you low-level control of what the widget displays. The function receives three arguments: the number of checkboxes checked, the total number of checkboxes, and an array of the checkboxes (DOM elements) that were checked. Example usage:</p> <pre class="prettyprint"> $("select").multiselect({ selectedText: function(numChecked, numTotal, checkedItems){ return numChecked + ' of ' + numTotal + ' checked'; } }); </pre> <p>The <code>selectedList</code> option is simply a convenience method for the <code>selectedText</code> option.</p> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/demos/selectedlist.htm
HTML
asf20
2,581
/* jshint forin:true, noarg:true, noempty:true, eqeqeq:true, boss:true, undef:true, curly:true, browser:true, jquery:true */ /* * jQuery MultiSelect UI Widget 1.14pre * Copyright (c) 2012 Eric Hynds * * http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ * * Depends: * - jQuery 1.4.2+ * - jQuery UI 1.8 widget factory * * Optional: * - jQuery UI effects * - jQuery UI position utility * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ (function($, undefined) { var multiselectID = 0; var $doc = $(document); $.widget("ech.multiselect", { // default options options: { header: true, height: 175, minWidth: 225, classes: '', checkAllText: 'Check all', uncheckAllText: 'Uncheck all', noneSelectedText: 'Select options', selectedText: '# selected', selectedList: 0, show: null, hide: null, autoOpen: false, multiple: true, position: {} }, _create: function() { var el = this.element.hide(); var o = this.options; this.speed = $.fx.speeds._default; // default speed for effects this._isOpen = false; // assume no // create a unique namespace for events that the widget // factory cannot unbind automatically. Use eventNamespace if on // jQuery UI 1.9+, and otherwise fallback to a custom string. this._namespaceID = this.eventNamespace || ('multiselect' + multiselectID); var button = (this.button = $('<button type="button"><span class="ui-icon ui-icon-triangle-1-s"></span></button>')) .addClass('ui-multiselect ui-widget ui-state-default ui-corner-all') .addClass(o.classes) .attr({ 'title':el.attr('title'), 'aria-haspopup':true, 'tabIndex':el.attr('tabIndex') }) .insertAfter(el), buttonlabel = (this.buttonlabel = $('<span />')) .html(o.noneSelectedText) .appendTo(button), menu = (this.menu = $('<div />')) .addClass('ui-multiselect-menu ui-widget ui-widget-content ui-corner-all') .addClass(o.classes) .appendTo(document.body), header = (this.header = $('<div />')) .addClass('ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix') .appendTo(menu), headerLinkContainer = (this.headerLinkContainer = $('<ul />')) .addClass('ui-helper-reset') .html(function() { if(o.header === true) { return '<li><a class="ui-multiselect-all" href="#"><span class="ui-icon ui-icon-check"></span><span>' + o.checkAllText + '</span></a></li><li><a class="ui-multiselect-none" href="#"><span class="ui-icon ui-icon-closethick"></span><span>' + o.uncheckAllText + '</span></a></li>'; } else if(typeof o.header === "string") { return '<li>' + o.header + '</li>'; } else { return ''; } }) .append('<li class="ui-multiselect-close"><a href="#" class="ui-multiselect-close"><span class="ui-icon ui-icon-circle-close"></span></a></li>') .appendTo(header), checkboxContainer = (this.checkboxContainer = $('<ul />')) .addClass('ui-multiselect-checkboxes ui-helper-reset') .appendTo(menu); // perform event bindings this._bindEvents(); // build menu this.refresh(true); // some addl. logic for single selects if(!o.multiple) { menu.addClass('ui-multiselect-single'); } // bump unique ID multiselectID++; }, _init: function() { if(this.options.header === false) { this.header.hide(); } if(!this.options.multiple) { this.headerLinkContainer.find('.ui-multiselect-all, .ui-multiselect-none').hide(); } if(this.options.autoOpen) { this.open(); } if(this.element.is(':disabled')) { this.disable(); } }, refresh: function(init) { var el = this.element; var o = this.options; var menu = this.menu; var checkboxContainer = this.checkboxContainer; var optgroups = []; var html = ""; var id = el.attr('id') || multiselectID++; // unique ID for the label & option tags // build items el.find('option').each(function(i) { var $this = $(this); var parent = this.parentNode; var title = this.innerHTML; var description = this.title; var value = this.value; var inputID = 'ui-multiselect-' + (this.id || id + '-option-' + i); var isDisabled = this.disabled; var isSelected = this.selected; var labelClasses = [ 'ui-corner-all' ]; var liClasses = (isDisabled ? 'ui-multiselect-disabled ' : ' ') + this.className; var optLabel; // is this an optgroup? if(parent.tagName === 'OPTGROUP') { optLabel = parent.getAttribute('label'); // has this optgroup been added already? if($.inArray(optLabel, optgroups) === -1) { html += '<li class="ui-multiselect-optgroup-label ' + parent.className + '"><a href="#">' + optLabel + '</a></li>'; optgroups.push(optLabel); } } if(isDisabled) { labelClasses.push('ui-state-disabled'); } // browsers automatically select the first option // by default with single selects if(isSelected && !o.multiple) { labelClasses.push('ui-state-active'); } html += '<li class="' + liClasses + '">'; // create the label html += '<label for="' + inputID + '" title="' + description + '" class="' + labelClasses.join(' ') + '">'; html += '<input id="' + inputID + '" name="multiselect_' + id + '" type="' + (o.multiple ? "checkbox" : "radio") + '" value="' + value + '" title="' + title + '"'; // pre-selected? if(isSelected) { html += ' checked="checked"'; html += ' aria-selected="true"'; } // disabled? if(isDisabled) { html += ' disabled="disabled"'; html += ' aria-disabled="true"'; } // add the title and close everything off html += ' /><span>' + title + '</span></label></li>'; }); // insert into the DOM checkboxContainer.html(html); // cache some moar useful elements this.labels = menu.find('label'); this.inputs = this.labels.children('input'); // set widths this._setButtonWidth(); this._setMenuWidth(); // remember default value this.button[0].defaultValue = this.update(); // broadcast refresh event; useful for widgets if(!init) { this._trigger('refresh'); } }, // updates the button text. call refresh() to rebuild update: function() { var o = this.options; var $inputs = this.inputs; var $checked = $inputs.filter(':checked'); var numChecked = $checked.length; var value; if(numChecked === 0) { value = o.noneSelectedText; } else { if($.isFunction(o.selectedText)) { value = o.selectedText.call(this, numChecked, $inputs.length, $checked.get()); } else if(/\d/.test(o.selectedList) && o.selectedList > 0 && numChecked <= o.selectedList) { value = $checked.map(function() { return $(this).next().html(); }).get().join(', '); } else { value = o.selectedText.replace('#', numChecked).replace('#', $inputs.length); } } this._setButtonValue(value); return value; }, // this exists as a separate method so that the developer // can easily override it. _setButtonValue: function(value) { this.buttonlabel.text(value); }, // binds events _bindEvents: function() { var self = this; var button = this.button; function clickHandler() { self[ self._isOpen ? 'close' : 'open' ](); return false; } // webkit doesn't like it when you click on the span :( button .find('span') .bind('click.multiselect', clickHandler); // button events button.bind({ click: clickHandler, keypress: function(e) { switch(e.which) { case 27: // esc case 38: // up case 37: // left self.close(); break; case 39: // right case 40: // down self.open(); break; } }, mouseenter: function() { if(!button.hasClass('ui-state-disabled')) { $(this).addClass('ui-state-hover'); } }, mouseleave: function() { $(this).removeClass('ui-state-hover'); }, focus: function() { if(!button.hasClass('ui-state-disabled')) { $(this).addClass('ui-state-focus'); } }, blur: function() { $(this).removeClass('ui-state-focus'); } }); // header links this.header.delegate('a', 'click.multiselect', function(e) { // close link if($(this).hasClass('ui-multiselect-close')) { self.close(); // check all / uncheck all } else { self[$(this).hasClass('ui-multiselect-all') ? 'checkAll' : 'uncheckAll'](); } e.preventDefault(); }); // optgroup label toggle support this.menu.delegate('li.ui-multiselect-optgroup-label a', 'click.multiselect', function(e) { e.preventDefault(); var $this = $(this); var $inputs = $this.parent().nextUntil('li.ui-multiselect-optgroup-label').find('input:visible:not(:disabled)'); var nodes = $inputs.get(); var label = $this.parent().text(); // trigger event and bail if the return is false if(self._trigger('beforeoptgrouptoggle', e, { inputs:nodes, label:label }) === false) { return; } // toggle inputs self._toggleChecked( $inputs.filter(':checked').length !== $inputs.length, $inputs ); self._trigger('optgrouptoggle', e, { inputs: nodes, label: label, checked: nodes[0].checked }); }) .delegate('label', 'mouseenter.multiselect', function() { if(!$(this).hasClass('ui-state-disabled')) { self.labels.removeClass('ui-state-hover'); $(this).addClass('ui-state-hover').find('input').focus(); } }) .delegate('label', 'keydown.multiselect', function(e) { e.preventDefault(); switch(e.which) { case 9: // tab case 27: // esc self.close(); break; case 38: // up case 40: // down case 37: // left case 39: // right self._traverse(e.which, this); break; case 13: // enter $(this).find('input')[0].click(); break; } }) .delegate('input[type="checkbox"], input[type="radio"]', 'click.multiselect', function(e) { var $this = $(this); var val = this.value; var checked = this.checked; var tags = self.element.find('option'); // bail if this input is disabled or the event is cancelled if(this.disabled || self._trigger('click', e, { value: val, text: this.title, checked: checked }) === false) { e.preventDefault(); return; } // make sure the input has focus. otherwise, the esc key // won't close the menu after clicking an item. $this.focus(); // toggle aria state $this.attr('aria-selected', checked); // change state on the original option tags tags.each(function() { if(this.value === val) { this.selected = checked; } else if(!self.options.multiple) { this.selected = false; } }); // some additional single select-specific logic if(!self.options.multiple) { self.labels.removeClass('ui-state-active'); $this.closest('label').toggleClass('ui-state-active', checked); // close menu self.close(); } // fire change on the select box self.element.trigger("change"); // setTimeout is to fix multiselect issue #14 and #47. caused by jQuery issue #3827 // http://bugs.jquery.com/ticket/3827 setTimeout($.proxy(self.update, self), 10); }); // close each widget when clicking on any other element/anywhere else on the page $doc.bind('mousedown.' + this._namespaceID, function(event) { var target = event.target; if(self._isOpen && !$.contains(self.menu[0], target) && !$.contains(self.button[0], target) && target !== self.button[0] && target !== self.menu[0]) { self.close(); } }); // deal with form resets. the problem here is that buttons aren't // restored to their defaultValue prop on form reset, and the reset // handler fires before the form is actually reset. delaying it a bit // gives the form inputs time to clear. $(this.element[0].form).bind('reset.multiselect', function() { setTimeout($.proxy(self.refresh, self), 10); }); }, // set button width _setButtonWidth: function() { var width = this.element.outerWidth(); var o = this.options; if(/\d/.test(o.minWidth) && width < o.minWidth) { width = o.minWidth; } // set widths this.button.outerWidth(width); }, // set menu width _setMenuWidth: function() { var m = this.menu; m.outerWidth(this.button.outerWidth()); }, // move up or down within the menu _traverse: function(which, start) { var $start = $(start); var moveToLast = which === 38 || which === 37; // select the first li that isn't an optgroup label / disabled $next = $start.parent()[moveToLast ? 'prevAll' : 'nextAll']('li:not(.ui-multiselect-disabled, .ui-multiselect-optgroup-label)')[ moveToLast ? 'last' : 'first'](); // if at the first/last element if(!$next.length) { var $container = this.menu.find('ul').last(); // move to the first/last this.menu.find('label')[ moveToLast ? 'last' : 'first' ]().trigger('mouseover'); // set scroll position $container.scrollTop(moveToLast ? $container.height() : 0); } else { $next.find('label').trigger('mouseover'); } }, // This is an internal function to toggle the checked property and // other related attributes of a checkbox. // // The context of this function should be a checkbox; do not proxy it. _toggleState: function(prop, flag) { return function() { if(!this.disabled) { this[ prop ] = flag; } if(flag) { this.setAttribute('aria-selected', true); } else { this.removeAttribute('aria-selected'); } }; }, _toggleChecked: function(flag, group) { var $inputs = (group && group.length) ? group : this.inputs; var self = this; // toggle state on inputs $inputs.each(this._toggleState('checked', flag)); // give the first input focus $inputs.eq(0).focus(); // update button text this.update(); // gather an array of the values that actually changed var values = $inputs.map(function() { return this.value; }).get(); // toggle state on original option tags this.element .find('option') .each(function() { if(!this.disabled && $.inArray(this.value, values) > -1) { self._toggleState('selected', flag).call(this); } }); // trigger the change event on the select if($inputs.length) { this.element.trigger("change"); } }, _toggleDisabled: function(flag) { this.button.attr({ 'disabled':flag, 'aria-disabled':flag })[ flag ? 'addClass' : 'removeClass' ]('ui-state-disabled'); var inputs = this.menu.find('input'); var key = "ech-multiselect-disabled"; if(flag) { // remember which elements this widget disabled (not pre-disabled) // elements, so that they can be restored if the widget is re-enabled. inputs = inputs.filter(':enabled').data(key, true) } else { inputs = inputs.filter(function() { return $.data(this, key) === true; }).removeData(key); } inputs .attr({ 'disabled':flag, 'arial-disabled':flag }) .parent()[ flag ? 'addClass' : 'removeClass' ]('ui-state-disabled'); this.element.attr({ 'disabled':flag, 'aria-disabled':flag }); }, // open the menu open: function(e) { var self = this; var button = this.button; var menu = this.menu; var speed = this.speed; var o = this.options; var args = []; // bail if the multiselectopen event returns false, this widget is disabled, or is already open if(this._trigger('beforeopen') === false || button.hasClass('ui-state-disabled') || this._isOpen) { return; } var $container = menu.find('ul').last(); var effect = o.show; // figure out opening effects/speeds if($.isArray(o.show)) { effect = o.show[0]; speed = o.show[1] || self.speed; } // if there's an effect, assume jQuery UI is in use // build the arguments to pass to show() if(effect) { args = [ effect, speed ]; } // set the scroll of the checkbox container $container.scrollTop(0).height(o.height); // positon this.position(); // show the menu, maybe with a speed/effect combo $.fn.show.apply(menu, args); // select the first not disabled option // triggering both mouseover and mouseover because 1.4.2+ has a bug where triggering mouseover // will actually trigger mouseenter. the mouseenter trigger is there for when it's eventually fixed this.labels.filter(':not(.ui-state-disabled)').eq(0).trigger('mouseover').trigger('mouseenter').find('input').trigger('focus'); button.addClass('ui-state-active'); this._isOpen = true; this._trigger('open'); }, // close the menu close: function() { if(this._trigger('beforeclose') === false) { return; } var o = this.options; var effect = o.hide; var speed = this.speed; var args = []; // figure out opening effects/speeds if($.isArray(o.hide)) { effect = o.hide[0]; speed = o.hide[1] || this.speed; } if(effect) { args = [ effect, speed ]; } $.fn.hide.apply(this.menu, args); this.button.removeClass('ui-state-active').trigger('blur').trigger('mouseleave'); this._isOpen = false; this._trigger('close'); }, enable: function() { this._toggleDisabled(false); }, disable: function() { this._toggleDisabled(true); }, checkAll: function(e) { this._toggleChecked(true); this._trigger('checkAll'); }, uncheckAll: function() { this._toggleChecked(false); this._trigger('uncheckAll'); }, getChecked: function() { return this.menu.find('input').filter(':checked'); }, destroy: function() { // remove classes + data $.Widget.prototype.destroy.call(this); // unbind events $doc.unbind(this._namespaceID); this.button.remove(); this.menu.remove(); this.element.show(); return this; }, isOpen: function() { return this._isOpen; }, widget: function() { return this.menu; }, getButton: function() { return this.button; }, position: function() { var o = this.options; // use the position utility if it exists and options are specifified if($.ui.position && !$.isEmptyObject(o.position)) { o.position.of = o.position.of || this.button; this.menu .show() .position(o.position) .hide(); // otherwise fallback to custom positioning } else { var pos = this.button.offset(); this.menu.css({ top: pos.top + this.button.outerHeight(), left: pos.left }); } }, // react to option changes after initialization _setOption: function(key, value) { var menu = this.menu; switch(key) { case 'header': menu.find('div.ui-multiselect-header')[value ? 'show' : 'hide'](); break; case 'checkAllText': menu.find('a.ui-multiselect-all span').eq(-1).text(value); break; case 'uncheckAllText': menu.find('a.ui-multiselect-none span').eq(-1).text(value); break; case 'height': menu.find('ul').last().height(parseInt(value, 10)); break; case 'minWidth': this.options[key] = parseInt(value, 10); this._setButtonWidth(); this._setMenuWidth(); break; case 'selectedText': case 'selectedList': case 'noneSelectedText': this.options[key] = value; // these all needs to update immediately for the update() call this.update(); break; case 'classes': menu.add(this.button).removeClass(this.options.classes).addClass(value); break; case 'multiple': menu.toggleClass('ui-multiselect-single', !value); this.options.multiple = value; this.element[0].multiple = value; this.refresh(); break; case 'position': this.position(); } $.Widget.prototype._setOption.apply(this, arguments); } }); })(jQuery);
0x6a
trunk/libraries/ui/ui-multiselect/src/jquery.multiselect.js
JavaScript
asf20
22,244
/* jshint forin:true, noarg:true, noempty:true, eqeqeq:true, boss:true, undef:true, curly:true, browser:true, jquery:true */ /* * jQuery MultiSelect UI Widget Filtering Plugin 1.5pre * Copyright (c) 2012 Eric Hynds * * http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ * * Depends: * - jQuery UI MultiSelect widget * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ (function($) { var rEscape = /[\-\[\]{}()*+?.,\\\^$|#\s]/g; $.widget('ech.multiselectfilter', { options: { label: 'Filter:', width: null, /* override default width set in css file (px). null will inherit */ placeholder: 'Enter keywords', autoReset: false }, _create: function() { var opts = this.options; var elem = $(this.element); // get the multiselect instance var instance = (this.instance = (elem.data('echMultiselect') || elem.data("multiselect"))); // store header; add filter class so the close/check all/uncheck all links can be positioned correctly var header = (this.header = instance.menu.find('.ui-multiselect-header').addClass('ui-multiselect-hasfilter')); // wrapper elem var wrapper = (this.wrapper = $('<div class="ui-multiselect-filter">' + (opts.label.length ? opts.label : '') + '<input placeholder="'+opts.placeholder+'" type="search"' + (/\d/.test(opts.width) ? 'style="width:'+opts.width+'px"' : '') + ' /></div>').prependTo(this.header)); // reference to the actual inputs this.inputs = instance.menu.find('input[type="checkbox"], input[type="radio"]'); // build the input box this.input = wrapper.find('input').bind({ keydown: function(e) { // prevent the enter key from submitting the form / closing the widget if(e.which === 13) { e.preventDefault(); } }, keyup: $.proxy(this._handler, this), click: $.proxy(this._handler, this) }); // cache input values for searching this.updateCache(); // rewrite internal _toggleChecked fn so that when checkAll/uncheckAll is fired, // only the currently filtered elements are checked instance._toggleChecked = function(flag, group) { var $inputs = (group && group.length) ? group : this.labels.find('input'); var _self = this; // do not include hidden elems if the menu isn't open. var selector = instance._isOpen ? ':disabled, :hidden' : ':disabled'; $inputs = $inputs .not(selector) .each(this._toggleState('checked', flag)); // update text this.update(); // gather an array of the values that actually changed var values = $inputs.map(function() { return this.value; }).get(); // select option tags this.element.find('option').filter(function() { if(!this.disabled && $.inArray(this.value, values) > -1) { _self._toggleState('selected', flag).call(this); } }); // trigger the change event on the select if($inputs.length) { this.element.trigger('change'); } }; // rebuild cache when multiselect is updated var doc = $(document).bind('multiselectrefresh', $.proxy(function() { this.updateCache(); this._handler(); }, this)); // automatically reset the widget on close? if(this.options.autoReset) { doc.bind('multiselectclose', $.proxy(this._reset, this)); } }, // thx for the logic here ben alman _handler: function(e) { var term = $.trim(this.input[0].value.toLowerCase()), // speed up lookups rows = this.rows, inputs = this.inputs, cache = this.cache; if(!term) { rows.show(); } else { rows.hide(); var regex = new RegExp(term.replace(rEscape, "\\$&"), 'gi'); this._trigger("filter", e, $.map(cache, function(v, i) { if(v.search(regex) !== -1) { rows.eq(i).show(); return inputs.get(i); } return null; })); } // show/hide optgroups this.instance.menu.find(".ui-multiselect-optgroup-label").each(function() { var $this = $(this); var isVisible = $this.nextUntil('.ui-multiselect-optgroup-label').filter(function() { return $.css(this, "display") !== 'none'; }).length; $this[isVisible ? 'show' : 'hide'](); }); }, _reset: function() { this.input.val('').trigger('keyup'); }, updateCache: function() { // each list item this.rows = this.instance.menu.find(".ui-multiselect-checkboxes li:not(.ui-multiselect-optgroup-label)"); // cache this.cache = this.element.children().map(function() { var elem = $(this); // account for optgroups if(this.tagName.toLowerCase() === "optgroup") { elem = elem.children(); } return elem.map(function() { return this.innerHTML.toLowerCase(); }).get(); }).get(); }, widget: function() { return this.wrapper; }, destroy: function() { $.Widget.prototype.destroy.call(this); this.input.val('').trigger("keyup"); this.wrapper.remove(); } }); })(jQuery);
0x6a
trunk/libraries/ui/ui-multiselect/src/jquery.multiselect.filter.js
JavaScript
asf20
5,435
(function($){ var el, widget, button, input; function getVisible() { return widget.find(".ui-multiselect-checkboxes input:visible"); } function getChecked() { return el.multiselect("getChecked"); } function getSelected() { return el.children(":selected"); } function searchFor(term) { input.val(term).trigger("keyup"); } function triggerClick() { this.click(); } function searchTest( term, expected, message ) { message || (message = "searching for '#'"); message = message.replace("#", term); searchFor(term); equals( getVisible().length, expected, message ); } module("filter widget - multiple select", { setup: function() { el = $('<select multiple>' + '<option></option>' + '<option value="foo">testffoooo</option>' + '<option value="bar">testbbaarr</option>' + '<option value=" baz ">testbbaazz</option>' + '<option value="qux">testquxtest</option>' + '<option value="10">ten</option>' + '<option value="100">one hundred</option>' + '<option value="5">five</option>' + '<option>a test with word boundaries</option>' + '<option>special regex !^$()//-|{}/: characters</option>' + '</option>'); el.appendTo(document.body); el.multiselect(); el.multiselectfilter(); el.multiselect("open"); widget = el.multiselect("widget"); input = widget.find(".ui-multiselect-filter input"); button = el.next(); }, teardown: function() { el.multiselectfilter("destroy"); el.multiselect("destroy"); el.remove(); } }); test("defaults", function(){ expect(1); ok( input.is(":visible"), "Filter input box is visible" ); }); test("filtering by node text", function(){ searchTest( "bbaa", 2); searchTest( "bbaarr", 1); searchTest( " bbaa ", 2, "searching for '#' with whitespace"); searchTest( " ", el.children().length, "searching for an empty string"); searchTest( "test", 5); searchTest( "one hundred", 1); searchTest( "with wor", 1); searchTest( " with wor ", 1); $.each("$ ^ / : // { } | -".split(" "), function( i, char ){ searchTest( char, 1 ); }); }); test("filtering by node value", function(){ // searchTest( "100", 1); // searchTest( "baz", 1); }); test("filtering & checking", function(){ searchFor("ba"); getVisible().each(triggerClick); equals(getChecked().length, 2, "Two checkboxes are selected"); equals(getSelected().length, 2, "Two option tags are selected"); getVisible().each(triggerClick); equals(getChecked().length, 0, "After clicking again, no checkboxes are selected"); equals(getSelected().length, 0, "After clicking again, no tags are selected"); }); test("checkAll / uncheckAll", function(){ searchFor("ba"); el.multiselect("checkAll"); equals(getChecked().length, 2, "checkAll: two checkboxes are selected"); equals(getSelected().length, 2, "checkAll: two option tags are selected"); el.multiselect("uncheckAll"); equals(getChecked().length, 0, "uncheckAll: no checkboxes are selected"); equals(getSelected().length, 0, "uncheckAll: no option tags are selected"); }); test("combination of filtering/methods/click events", function(){ searchFor("ba"); getVisible().first().each(triggerClick); equals(getChecked().length, 1, "selecting 1 of multiple results (checked)"); equals(getSelected().length, 1, "selecting 1 of multiple results (selected)"); searchFor(" "); equals(getChecked().length, 1, "clearing search, only 1 is still selected"); el.multiselect("uncheckAll"); equals(getChecked().length, 0, "uncheckAll, nothing is selected (checked)"); equals(getSelected().length, 0, "uncheckedAll, nothing is selected (selected)"); searchFor("one hundred") el.multiselect("checkAll"); equals(getChecked().length, 1, "checkAll on one matching result (checked)"); equals(getSelected().length, 1, "checkAll on one matching result (selected)"); searchFor("foo"); el.multiselect("checkAll"); equals(getChecked().length, 2, "checkAll on one matching result (checked)"); equals(getSelected().length, 2, "checkAll on one matching result (selected)"); }); })(jQuery);
0x6a
trunk/libraries/ui/ui-multiselect/tests/unit/filter.js
JavaScript
asf20
4,351
(function($){ module("methods"); test("open", function(){ expect(2); el = $("select").multiselect().multiselect("open"); ok( el.multiselect("isOpen"), "isOpen parameter true" ); equals( menu().css("display"), "block", "Test display CSS property" ); el.multiselect("destroy"); }); test("close", function(){ expect(2); el = $("select").multiselect().multiselect("open").multiselect("close"); ok( !el.multiselect("isOpen"), "isOpen parameter false" ); equals( menu().css("display"), "none", "Test display CSS property" ); el.multiselect("destroy"); }); test("enable", function(){ expect(2); el = $("select").multiselect().multiselect("disable").multiselect("enable"); ok( button().is(":disabled") === false, "Button is enabled" ); ok( el.is(":disabled") === false, "Original select is enabled" ); el.multiselect("destroy"); }); test("disable", function(){ expect(2); // clone this one so the original is not affected el = $("select").clone(true).appendTo(body).multiselect().multiselect("disable"); ok( button().is(":disabled"), 'Button is disabled'); ok( el.is(":disabled"), 'Original select is disabled'); el.multiselect("destroy").remove(); }); test("enabling w/ pre-disabled tags (#216)", function(){ expect(5); el = $('<select><option disabled value="foo">foo</option><option value="bar">bar</option>') .appendTo(document.body) .multiselect(); var boxes = menu().find("input") var disabled = boxes.first(); var enabled = boxes.last(); var key = "ech-multiselect-disabled"; equals(disabled.is(":disabled"), true, "The first option is disabled"); el.multiselect("disable"); equals(disabled.data(key), undefined, "After disabling the widget, the pre-disabled option is not flagged to re-enable"); equals(enabled.data(key), true, "and the enabled option is flagged to be re-enable"); el.multiselect("enable"); equals(disabled.is(":disabled"), true, "After enabling, the first option is still disabled"); equals(disabled.data(key), undefined, "and the option no longer has the stored data flag"); el.multiselect("destroy").remove(); }); test("widget", function(){ expect(1); el = $("select").multiselect(); ok( menu().is("div.ui-multiselect-menu"), 'Widget is the menu element'); el.multiselect("destroy"); }); test("getButton", function(){ expect(1); el = $("select").multiselect(); var button = el.multiselect("getButton"); ok( button.is("button.ui-multiselect"), 'Button is the button element'); el.multiselect("destroy"); }); test("checkAll", function(){ expect(1); el = $("select").multiselect().multiselect("checkAll"); var inputs = menu().find("input"); ok( inputs.filter(":checked").length === inputs.length, 'All inputs selected on the widget?'); el.multiselect("destroy"); }); test("uncheckAll", function(){ expect(1); el = $("select").multiselect().multiselect("checkAll").multiselect("uncheckAll"); ok( menu().find("input:checked").length === 0, 'All inputs unchecked on the widget?'); el.multiselect("destroy"); }); test("isOpen", function(){ expect(2); el = $("select").multiselect().multiselect("open"); ok( el.multiselect("isOpen"), 'Testing isOpen method after calling open method'); el = $("select").multiselect("close"); ok( !el.multiselect("isOpen"), 'Testing isOpen method after calling close method'); el.multiselect("destroy"); }); test("destroy", function(){ expect(2); el = $("select").multiselect().multiselect("destroy"); ok( !$(".ui-multiselect").length , 'button.ui-multiselect removed from the DOM'); ok( !el.data("multiselect") , 'no more multiselect obj attached to elem'); }); test("getChecked", function(){ expect(2); el = $("select").multiselect().multiselect("checkAll"); equals( el.multiselect("getChecked").length, 9, 'number of checkboxes returned after checking all and calling getChecked'); el.multiselect("uncheckAll"); equals( el.multiselect("getChecked").length, 0, 'number of checkboxes returned after unchecking all and calling getChecked'); el.multiselect("destroy"); }); test("refresh", function(){ expect(4); el = $("select").clone().appendTo(body).multiselect(); el.empty().html('<option value="foo">foo</option><option value="bar">bar</option>'); el.multiselect('refresh'); var checkboxes, getCheckboxes = (function hai(){ checkboxes = menu().find('input[type="checkbox"]'); return hai; })(); equals( checkboxes.length, 2, "After clearing the select, adding 2 options, and refresh(), only 2 checkboxes exist"); equals( checkboxes.eq(0).val(), 'foo', 'first is foo' ); equals( checkboxes.eq(1).val(), 'bar', 'second is foo' ); // add one more w/ append, just for safety's sake el.append('<option value="baz">baz</option>'); el.multiselect('refresh'); getCheckboxes(); equals( checkboxes.eq(2).val(), 'baz', 'after an append() call, the third option is now' ); el.multiselect("destroy").remove(); }); test("position", function() { expect(2); var left = "500px"; el = $("select").clone().appendTo(body).multiselect(); // move the button button().css({ position: "absolute", left: left }); // sanity check the fact that the menu and button are out of sync notEqual(menu().css("left"), left, "After moving the button, the menu remains in its old position"); // update the menu position el.multiselect("position"); // make sure the new position is accurate equals(menu().css("left"), left, "After calling position(), the menu has updated to the same left value as the button"); el.multiselect("destroy").remove(); }); })(jQuery);
0x6a
trunk/libraries/ui/ui-multiselect/tests/unit/methods.js
JavaScript
asf20
5,732
/** Font Family and Sizes */ #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; } #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } #qunit-tests { font-size: smaller; } /** Resets */ #qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult { margin: 0; padding: 0; } /** Header */ #qunit-header { padding: 0.5em 0 0.5em 1em; color: #8699a4; background-color: #0d3349; font-size: 1.5em; line-height: 1em; font-weight: normal; border-radius: 15px 15px 0 0; -moz-border-radius: 15px 15px 0 0; -webkit-border-top-right-radius: 15px; -webkit-border-top-left-radius: 15px; } #qunit-header a { text-decoration: none; color: #c2ccd1; } #qunit-header a:hover, #qunit-header a:focus { color: #fff; } #qunit-banner { height: 5px; } #qunit-testrunner-toolbar { padding: 0em 0 0.5em 2em; } #qunit-userAgent { padding: 0.5em 0 0.5em 2.5em; background-color: #2b81af; color: #fff; text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; } /** Tests: Pass/Fail */ #qunit-tests { list-style-position: inside; } #qunit-tests li { padding: 0.4em 0.5em 0.4em 2.5em; border-bottom: 1px solid #fff; list-style-position: inside; } #qunit-tests li strong { cursor: pointer; } #qunit-tests ol { margin-top: 0.5em; padding: 0.5em; background-color: #fff; border-radius: 15px; -moz-border-radius: 15px; -webkit-border-radius: 15px; box-shadow: inset 0px 2px 13px #999; -moz-box-shadow: inset 0px 2px 13px #999; -webkit-box-shadow: inset 0px 2px 13px #999; } #qunit-tests table { border-collapse: collapse; margin-top: .2em; } #qunit-tests th { text-align: right; vertical-align: top; padding: 0 .5em 0 0; } #qunit-tests td { vertical-align: top; } #qunit-tests pre { margin: 0; white-space: pre-wrap; word-wrap: break-word; } #qunit-tests del { background-color: #e0f2be; color: #374e0c; text-decoration: none; } #qunit-tests ins { background-color: #ffcaca; color: #500; text-decoration: none; } /*** Test Counts */ #qunit-tests b.counts { color: black; } #qunit-tests b.passed { color: #5E740B; } #qunit-tests b.failed { color: #710909; } #qunit-tests li li { margin: 0.5em; padding: 0.4em 0.5em 0.4em 0.5em; background-color: #fff; border-bottom: none; list-style-position: inside; } /*** Passing Styles */ #qunit-tests li li.pass { color: #5E740B; background-color: #fff; border-left: 26px solid #C6E746; } #qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; } #qunit-tests .pass .test-name { color: #366097; } #qunit-tests .pass .test-actual, #qunit-tests .pass .test-expected { color: #999999; } #qunit-banner.qunit-pass { background-color: #C6E746; } /*** Failing Styles */ #qunit-tests li li.fail { color: #710909; background-color: #fff; border-left: 26px solid #EE5757; } #qunit-tests .fail { color: #000000; background-color: #EE5757; } #qunit-tests .fail .test-name, #qunit-tests .fail .module-name { color: #000000; } #qunit-tests .fail .test-actual { color: #EE5757; } #qunit-tests .fail .test-expected { color: green; } #qunit-banner.qunit-fail, #qunit-testrunner-toolbar { background-color: #EE5757; } /** Footer */ #qunit-testresult { padding: 0.5em 0.5em 0.5em 2.5em; color: #2b81af; background-color: #D2E0E6; border-radius: 0 0 15px 15px; -moz-border-radius: 0 0 15px 15px; -webkit-border-bottom-right-radius: 15px; -webkit-border-bottom-left-radius: 15px; } /** Fixture */ #qunit-fixture { position: absolute; top: -10000px; left: -10000px; }
0x6a
trunk/libraries/ui/ui-multiselect/tests/unit/qunit.css
CSS
asf20
3,934
(function($){ var el, widget, elems; module("html", { setup: function() { el = $("select").multiselect(); widget = el.multiselect("widget"); } }); test("pull in optgroup's class", function(){ expect(5); elems = widget.find('.ui-multiselect-optgroup-label'); equals( elems.length, 3, 'There are three labels' ); elems.filter(":not(:last)").each( function() { equals($(this).hasClass('ui-multiselect-optgroup-label'),true,'Default class is present when no extra class is defined'); }); elems.filter(":last").each( function() { equals($(this).hasClass('ui-multiselect-optgroup-label'),true,'Default class is present when extra class is defined'); equals($(this).hasClass('optgroupClass'),true,'Extra class is present'); }); }); test("pull in options's class", function(){ expect(1); equals(widget.find('input[value="9"]').parents('li:first').hasClass('optionClass'),true,'Extra class is present'); }); })(jQuery);
0x6a
trunk/libraries/ui/ui-multiselect/tests/unit/html.js
JavaScript
asf20
963
/* * QUnit - A JavaScript Unit Testing Framework * * http://docs.jquery.com/QUnit * * Copyright (c) 2009 John Resig, Jörn Zaefferer * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. */ (function(window) { var defined = { setTimeout: typeof window.setTimeout !== "undefined", sessionStorage: (function() { try { return !!sessionStorage.getItem; } catch(e){ return false; } })() } var testId = 0; var Test = function(name, testName, expected, testEnvironmentArg, async, callback) { this.name = name; this.testName = testName; this.expected = expected; this.testEnvironmentArg = testEnvironmentArg; this.async = async; this.callback = callback; this.assertions = []; }; Test.prototype = { init: function() { var tests = id("qunit-tests"); if (tests) { var b = document.createElement("strong"); b.innerHTML = "Running " + this.name; var li = document.createElement("li"); li.appendChild( b ); li.id = this.id = "test-output" + testId++; tests.appendChild( li ); } }, setup: function() { if (this.module != config.previousModule) { if ( this.previousModule ) { QUnit.moduleDone( this.module, config.moduleStats.bad, config.moduleStats.all ); } config.previousModule = this.module; config.moduleStats = { all: 0, bad: 0 }; QUnit.moduleStart( this.module, this.moduleTestEnvironment ); } config.current = this; this.testEnvironment = extend({ setup: function() {}, teardown: function() {} }, this.moduleTestEnvironment); if (this.testEnvironmentArg) { extend(this.testEnvironment, this.testEnvironmentArg); } QUnit.testStart( this.testName, this.testEnvironment ); // allow utility functions to access the current test environment // TODO why?? QUnit.current_testEnvironment = this.testEnvironment; try { if ( !config.pollution ) { saveGlobal(); } this.testEnvironment.setup.call(this.testEnvironment); } catch(e) { // TODO use testName instead of name for no-markup message? QUnit.ok( false, "Setup failed on " + this.name + ": " + e.message ); } }, run: function() { if ( this.async ) { QUnit.stop(); } try { this.callback.call(this.testEnvironment); } catch(e) { // TODO use testName instead of name for no-markup message? fail("Test " + this.name + " died, exception and test follows", e, this.callback); QUnit.ok( false, "Died on test #" + (this.assertions.length + 1) + ": " + e.message + " - " + QUnit.jsDump.parse(e) ); // else next test will carry the responsibility saveGlobal(); // Restart the tests if they're blocking if ( config.blocking ) { start(); } } }, teardown: function() { try { checkPollution(); this.testEnvironment.teardown.call(this.testEnvironment); } catch(e) { // TODO use testName instead of name for no-markup message? QUnit.ok( false, "Teardown failed on " + this.name + ": " + e.message ); } }, finish: function() { if ( this.expected && this.expected != this.assertions.length ) { QUnit.ok( false, "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" ); } var good = 0, bad = 0, tests = id("qunit-tests"); config.stats.all += this.assertions.length; config.moduleStats.all += this.assertions.length; if ( tests ) { var ol = document.createElement("ol"); for ( var i = 0; i < this.assertions.length; i++ ) { var assertion = this.assertions[i]; var li = document.createElement("li"); li.className = assertion.result ? "pass" : "fail"; li.innerHTML = assertion.message || (assertion.result ? "okay" : "failed"); ol.appendChild( li ); if ( assertion.result ) { good++; } else { bad++; config.stats.bad++; config.moduleStats.bad++; } } // store result when possible defined.sessionStorage && sessionStorage.setItem("qunit-" + this.testName, bad); if (bad == 0) { ol.style.display = "none"; } var b = document.createElement("strong"); b.innerHTML = this.name + " <b class='counts'>(<b class='failed'>" + bad + "</b>, <b class='passed'>" + good + "</b>, " + this.assertions.length + ")</b>"; addEvent(b, "click", function() { var next = b.nextSibling, display = next.style.display; next.style.display = display === "none" ? "block" : "none"; }); addEvent(b, "dblclick", function(e) { var target = e && e.target ? e.target : window.event.srcElement; if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) { target = target.parentNode; } if ( window.location && target.nodeName.toLowerCase() === "strong" ) { window.location.search = "?" + encodeURIComponent(getText([target]).replace(/\(.+\)$/, "").replace(/(^\s*|\s*$)/g, "")); } }); var li = id(this.id); li.className = bad ? "fail" : "pass"; li.style.display = resultDisplayStyle(!bad); li.removeChild( li.firstChild ); li.appendChild( b ); li.appendChild( ol ); if ( bad ) { var toolbar = id("qunit-testrunner-toolbar"); if ( toolbar ) { toolbar.style.display = "block"; id("qunit-filter-pass").disabled = null; } } } else { for ( var i = 0; i < this.assertions.length; i++ ) { if ( !this.assertions[i].result ) { bad++; config.stats.bad++; config.moduleStats.bad++; } } } try { QUnit.reset(); } catch(e) { // TODO use testName instead of name for no-markup message? fail("reset() failed, following Test " + this.name + ", exception and reset fn follows", e, QUnit.reset); } QUnit.testDone( this.testName, bad, this.assertions.length ); }, queue: function() { var test = this; synchronize(function() { test.init(); }); function run() { // each of these can by async synchronize(function() { test.setup(); }); synchronize(function() { test.run(); }); synchronize(function() { test.teardown(); }); synchronize(function() { test.finish(); }); } // defer when previous test run passed, if storage is available var bad = defined.sessionStorage && +sessionStorage.getItem("qunit-" + this.testName); if (bad) { run(); } else { synchronize(run); }; } } var QUnit = { // call on start of module test to prepend name to all tests module: function(name, testEnvironment) { config.previousModule = config.currentModule; config.currentModule = name; config.currentModuleTestEnviroment = testEnvironment; }, asyncTest: function(testName, expected, callback) { if ( arguments.length === 2 ) { callback = expected; expected = 0; } QUnit.test(testName, expected, callback, true); }, test: function(testName, expected, callback, async) { var name = '<span class="test-name">' + testName + '</span>', testEnvironmentArg; if ( arguments.length === 2 ) { callback = expected; expected = null; } // is 2nd argument a testEnvironment? if ( expected && typeof expected === 'object') { testEnvironmentArg = expected; expected = null; } if ( config.currentModule ) { name = '<span class="module-name">' + config.currentModule + "</span>: " + name; } if ( !validTest(config.currentModule + ": " + testName) ) { return; } var test = new Test(name, testName, expected, testEnvironmentArg, async, callback); test.previousModule = config.previousModule; test.module = config.currentModule; test.moduleTestEnvironment = config.currentModuleTestEnviroment; test.queue(); }, /** * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. */ expect: function(asserts) { config.current.expected = asserts; }, /** * Asserts true. * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" ); */ ok: function(a, msg) { a = !!a; var details = { result: a, message: msg }; msg = escapeHtml(msg); QUnit.log(a, msg, details); config.current.assertions.push({ result: a, message: msg }); }, /** * Checks that the first two arguments are equal, with an optional message. * Prints out both actual and expected values. * * Prefered to ok( actual == expected, message ) * * @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." ); * * @param Object actual * @param Object expected * @param String message (optional) */ equal: function(actual, expected, message) { QUnit.push(expected == actual, actual, expected, message); }, notEqual: function(actual, expected, message) { QUnit.push(expected != actual, actual, expected, message); }, deepEqual: function(actual, expected, message) { QUnit.push(QUnit.equiv(actual, expected), actual, expected, message); }, notDeepEqual: function(actual, expected, message) { QUnit.push(!QUnit.equiv(actual, expected), actual, expected, message); }, strictEqual: function(actual, expected, message) { QUnit.push(expected === actual, actual, expected, message); }, notStrictEqual: function(actual, expected, message) { QUnit.push(expected !== actual, actual, expected, message); }, raises: function(fn, message) { try { fn(); QUnit.ok( false, message ); } catch (e) { QUnit.ok( true, message ); } }, start: function() { // A slight delay, to avoid any current callbacks if ( defined.setTimeout ) { window.setTimeout(function() { if ( config.timeout ) { clearTimeout(config.timeout); } config.blocking = false; process(); }, 13); } else { config.blocking = false; process(); } }, stop: function(timeout) { config.blocking = true; if ( timeout && defined.setTimeout ) { config.timeout = window.setTimeout(function() { QUnit.ok( false, "Test timed out" ); QUnit.start(); }, timeout); } } }; // Backwards compatibility, deprecated QUnit.equals = QUnit.equal; QUnit.same = QUnit.deepEqual; // Maintain internal state var config = { // The queue of tests to run queue: [], // block until document ready blocking: true }; // Load paramaters (function() { var location = window.location || { search: "", protocol: "file:" }, GETParams = location.search.slice(1).split('&'); for ( var i = 0; i < GETParams.length; i++ ) { GETParams[i] = decodeURIComponent( GETParams[i] ); if ( GETParams[i] === "noglobals" ) { GETParams.splice( i, 1 ); i--; config.noglobals = true; } else if ( GETParams[i].search('=') > -1 ) { GETParams.splice( i, 1 ); i--; } } // restrict modules/tests by get parameters config.filters = GETParams; // Figure out if we're running the tests from a server or not QUnit.isLocal = !!(location.protocol === 'file:'); })(); // Expose the API as global variables, unless an 'exports' // object exists, in that case we assume we're in CommonJS if ( typeof exports === "undefined" || typeof require === "undefined" ) { extend(window, QUnit); window.QUnit = QUnit; } else { extend(exports, QUnit); exports.QUnit = QUnit; } // define these after exposing globals to keep them in these QUnit namespace only extend(QUnit, { config: config, // Initialize the configuration options init: function() { extend(config, { stats: { all: 0, bad: 0 }, moduleStats: { all: 0, bad: 0 }, started: +new Date, updateRate: 1000, blocking: false, autostart: true, autorun: false, filters: [], queue: [] }); var tests = id("qunit-tests"), banner = id("qunit-banner"), result = id("qunit-testresult"); if ( tests ) { tests.innerHTML = ""; } if ( banner ) { banner.className = ""; } if ( result ) { result.parentNode.removeChild( result ); } }, /** * Resets the test setup. Useful for tests that modify the DOM. * * If jQuery is available, uses jQuery's html(), otherwise just innerHTML. */ reset: function() { if ( window.jQuery ) { jQuery( "#main, #qunit-fixture" ).html( config.fixture ); } else { var main = id( 'main' ) || id( 'qunit-fixture' ); if ( main ) { main.innerHTML = config.fixture; } } }, /** * Trigger an event on an element. * * @example triggerEvent( document.body, "click" ); * * @param DOMElement elem * @param String type */ triggerEvent: function( elem, type, event ) { if ( document.createEvent ) { event = document.createEvent("MouseEvents"); event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView, 0, 0, 0, 0, 0, false, false, false, false, 0, null); elem.dispatchEvent( event ); } else if ( elem.fireEvent ) { elem.fireEvent("on"+type); } }, // Safe object type checking is: function( type, obj ) { return QUnit.objectType( obj ) == type; }, objectType: function( obj ) { if (typeof obj === "undefined") { return "undefined"; // consider: typeof null === object } if (obj === null) { return "null"; } var type = Object.prototype.toString.call( obj ) .match(/^\[object\s(.*)\]$/)[1] || ''; switch (type) { case 'Number': if (isNaN(obj)) { return "nan"; } else { return "number"; } case 'String': case 'Boolean': case 'Array': case 'Date': case 'RegExp': case 'Function': return type.toLowerCase(); } if (typeof obj === "object") { return "object"; } return undefined; }, push: function(result, actual, expected, message) { var details = { result: result, message: message, actual: actual, expected: expected }; message = escapeHtml(message) || (result ? "okay" : "failed"); message = '<span class="test-message">' + message + "</span>"; expected = escapeHtml(QUnit.jsDump.parse(expected)); actual = escapeHtml(QUnit.jsDump.parse(actual)); var output = message + '<table><tr class="test-expected"><th>Expected: </th><td><pre>' + expected + '</pre></td></tr>'; if (actual != expected) { output += '<tr class="test-actual"><th>Result: </th><td><pre>' + actual + '</pre></td></tr>'; output += '<tr class="test-diff"><th>Diff: </th><td><pre>' + QUnit.diff(expected, actual) +'</pre></td></tr>'; } if (!result) { var source = sourceFromStacktrace(); if (source) { details.source = source; output += '<tr class="test-source"><th>Source: </th><td><pre>' + source +'</pre></td></tr>'; } } output += "</table>"; QUnit.log(result, message, details); config.current.assertions.push({ result: !!result, message: output }); }, // Logging callbacks begin: function() {}, done: function(failures, total) {}, log: function(result, message) {}, testStart: function(name, testEnvironment) {}, testDone: function(name, failures, total) {}, moduleStart: function(name, testEnvironment) {}, moduleDone: function(name, failures, total) {} }); if ( typeof document === "undefined" || document.readyState === "complete" ) { config.autorun = true; } addEvent(window, "load", function() { QUnit.begin(); // Initialize the config, saving the execution queue var oldconfig = extend({}, config); QUnit.init(); extend(config, oldconfig); config.blocking = false; var userAgent = id("qunit-userAgent"); if ( userAgent ) { userAgent.innerHTML = navigator.userAgent; } var banner = id("qunit-header"); if ( banner ) { var paramsIndex = location.href.lastIndexOf(location.search); if ( paramsIndex > -1 ) { var mainPageLocation = location.href.slice(0, paramsIndex); if ( mainPageLocation == location.href ) { banner.innerHTML = '<a href=""> ' + banner.innerHTML + '</a> '; } else { var testName = decodeURIComponent(location.search.slice(1)); banner.innerHTML = '<a href="' + mainPageLocation + '">' + banner.innerHTML + '</a> &#8250; <a href="">' + testName + '</a>'; } } } var toolbar = id("qunit-testrunner-toolbar"); if ( toolbar ) { toolbar.style.display = "none"; var filter = document.createElement("input"); filter.type = "checkbox"; filter.id = "qunit-filter-pass"; filter.disabled = true; addEvent( filter, "click", function() { var li = document.getElementsByTagName("li"); for ( var i = 0; i < li.length; i++ ) { if ( li[i].className.indexOf("pass") > -1 ) { li[i].style.display = filter.checked ? "none" : ""; } } }); toolbar.appendChild( filter ); var label = document.createElement("label"); label.setAttribute("for", "qunit-filter-pass"); label.innerHTML = "Hide passed tests"; toolbar.appendChild( label ); } var main = id('main') || id('qunit-fixture'); if ( main ) { config.fixture = main.innerHTML; } if (config.autostart) { QUnit.start(); } }); function done() { config.autorun = true; // Log the last module results if ( config.currentModule ) { QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all ); } var banner = id("qunit-banner"), tests = id("qunit-tests"), html = ['Tests completed in ', +new Date - config.started, ' milliseconds.<br/>', '<span class="passed">', config.stats.all - config.stats.bad, '</span> tests of <span class="total">', config.stats.all, '</span> passed, <span class="failed">', config.stats.bad,'</span> failed.'].join(''); if ( banner ) { banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass"); } if ( tests ) { var result = id("qunit-testresult"); if ( !result ) { result = document.createElement("p"); result.id = "qunit-testresult"; result.className = "result"; tests.parentNode.insertBefore( result, tests.nextSibling ); } result.innerHTML = html; } QUnit.done( config.stats.bad, config.stats.all ); } function validTest( name ) { var i = config.filters.length, run = false; if ( !i ) { return true; } while ( i-- ) { var filter = config.filters[i], not = filter.charAt(0) == '!'; if ( not ) { filter = filter.slice(1); } if ( name.indexOf(filter) !== -1 ) { return !not; } if ( not ) { run = true; } } return run; } // so far supports only Firefox, Chrome and Opera (buggy) // could be extended in the future to use something like https://github.com/csnover/TraceKit function sourceFromStacktrace() { try { throw new Error(); } catch ( e ) { if (e.stacktrace) { // Opera return e.stacktrace.split("\n")[6]; } else if (e.stack) { // Firefox, Chrome return e.stack.split("\n")[4]; } } } function resultDisplayStyle(passed) { return passed && id("qunit-filter-pass") && id("qunit-filter-pass").checked ? 'none' : ''; } function escapeHtml(s) { if (!s) { return ""; } s = s + ""; return s.replace(/[\&"<>\\]/g, function(s) { switch(s) { case "&": return "&amp;"; case "\\": return "\\\\"; case '"': return '\"'; case "<": return "&lt;"; case ">": return "&gt;"; default: return s; } }); } function synchronize( callback ) { config.queue.push( callback ); if ( config.autorun && !config.blocking ) { process(); } } function process() { var start = (new Date()).getTime(); while ( config.queue.length && !config.blocking ) { if ( config.updateRate <= 0 || (((new Date()).getTime() - start) < config.updateRate) ) { config.queue.shift()(); } else { window.setTimeout( process, 13 ); break; } } if (!config.blocking && !config.queue.length) { done(); } } function saveGlobal() { config.pollution = []; if ( config.noglobals ) { for ( var key in window ) { config.pollution.push( key ); } } } function checkPollution( name ) { var old = config.pollution; saveGlobal(); var newGlobals = diff( old, config.pollution ); if ( newGlobals.length > 0 ) { ok( false, "Introduced global variable(s): " + newGlobals.join(", ") ); config.current.expected++; } var deletedGlobals = diff( config.pollution, old ); if ( deletedGlobals.length > 0 ) { ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") ); config.current.expected++; } } // returns a new Array with the elements that are in a but not in b function diff( a, b ) { var result = a.slice(); for ( var i = 0; i < result.length; i++ ) { for ( var j = 0; j < b.length; j++ ) { if ( result[i] === b[j] ) { result.splice(i, 1); i--; break; } } } return result; } function fail(message, exception, callback) { if ( typeof console !== "undefined" && console.error && console.warn ) { console.error(message); console.error(exception); console.warn(callback.toString()); } else if ( window.opera && opera.postError ) { opera.postError(message, exception, callback.toString); } } function extend(a, b) { for ( var prop in b ) { a[prop] = b[prop]; } return a; } function addEvent(elem, type, fn) { if ( elem.addEventListener ) { elem.addEventListener( type, fn, false ); } else if ( elem.attachEvent ) { elem.attachEvent( "on" + type, fn ); } else { fn(); } } function id(name) { return !!(typeof document !== "undefined" && document && document.getElementById) && document.getElementById( name ); } // Test for equality any JavaScript type. // Discussions and reference: http://philrathe.com/articles/equiv // Test suites: http://philrathe.com/tests/equiv // Author: Philippe Rathé <prathe@gmail.com> QUnit.equiv = function () { var innerEquiv; // the real equiv function var callers = []; // stack to decide between skip/abort functions var parents = []; // stack to avoiding loops from circular referencing // Call the o related callback with the given arguments. function bindCallbacks(o, callbacks, args) { var prop = QUnit.objectType(o); if (prop) { if (QUnit.objectType(callbacks[prop]) === "function") { return callbacks[prop].apply(callbacks, args); } else { return callbacks[prop]; // or undefined } } } var callbacks = function () { // for string, boolean, number and null function useStrictEquality(b, a) { if (b instanceof a.constructor || a instanceof b.constructor) { // to catch short annotaion VS 'new' annotation of a declaration // e.g. var i = 1; // var j = new Number(1); return a == b; } else { return a === b; } } return { "string": useStrictEquality, "boolean": useStrictEquality, "number": useStrictEquality, "null": useStrictEquality, "undefined": useStrictEquality, "nan": function (b) { return isNaN(b); }, "date": function (b, a) { return QUnit.objectType(b) === "date" && a.valueOf() === b.valueOf(); }, "regexp": function (b, a) { return QUnit.objectType(b) === "regexp" && a.source === b.source && // the regex itself a.global === b.global && // and its modifers (gmi) ... a.ignoreCase === b.ignoreCase && a.multiline === b.multiline; }, // - skip when the property is a method of an instance (OOP) // - abort otherwise, // initial === would have catch identical references anyway "function": function () { var caller = callers[callers.length - 1]; return caller !== Object && typeof caller !== "undefined"; }, "array": function (b, a) { var i, j, loop; var len; // b could be an object literal here if ( ! (QUnit.objectType(b) === "array")) { return false; } len = a.length; if (len !== b.length) { // safe and faster return false; } //track reference to avoid circular references parents.push(a); for (i = 0; i < len; i++) { loop = false; for(j=0;j<parents.length;j++){ if(parents[j] === a[i]){ loop = true;//dont rewalk array } } if (!loop && ! innerEquiv(a[i], b[i])) { parents.pop(); return false; } } parents.pop(); return true; }, "object": function (b, a) { var i, j, loop; var eq = true; // unless we can proove it var aProperties = [], bProperties = []; // collection of strings // comparing constructors is more strict than using instanceof if ( a.constructor !== b.constructor) { return false; } // stack constructor before traversing properties callers.push(a.constructor); //track reference to avoid circular references parents.push(a); for (i in a) { // be strict: don't ensures hasOwnProperty and go deep loop = false; for(j=0;j<parents.length;j++){ if(parents[j] === a[i]) loop = true; //don't go down the same path twice } aProperties.push(i); // collect a's properties if (!loop && ! innerEquiv(a[i], b[i])) { eq = false; break; } } callers.pop(); // unstack, we are done parents.pop(); for (i in b) { bProperties.push(i); // collect b's properties } // Ensures identical properties name return eq && innerEquiv(aProperties.sort(), bProperties.sort()); } }; }(); innerEquiv = function () { // can take multiple arguments var args = Array.prototype.slice.apply(arguments); if (args.length < 2) { return true; // end transition } return (function (a, b) { if (a === b) { return true; // catch the most you can } else if (a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || QUnit.objectType(a) !== QUnit.objectType(b)) { return false; // don't lose time with error prone cases } else { return bindCallbacks(a, callbacks, [b, a]); } // apply transition with (1..n) arguments })(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length -1)); }; return innerEquiv; }(); /** * jsDump * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com * Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php) * Date: 5/15/2008 * @projectDescription Advanced and extensible data dumping for Javascript. * @version 1.0.0 * @author Ariel Flesler * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html} */ QUnit.jsDump = (function() { function quote( str ) { return '"' + str.toString().replace(/"/g, '\\"') + '"'; }; function literal( o ) { return o + ''; }; function join( pre, arr, post ) { var s = jsDump.separator(), base = jsDump.indent(), inner = jsDump.indent(1); if ( arr.join ) arr = arr.join( ',' + s + inner ); if ( !arr ) return pre + post; return [ pre, inner + arr, base + post ].join(s); }; function array( arr ) { var i = arr.length, ret = Array(i); this.up(); while ( i-- ) ret[i] = this.parse( arr[i] ); this.down(); return join( '[', ret, ']' ); }; var reName = /^function (\w+)/; var jsDump = { parse:function( obj, type ) { //type is used mostly internally, you can fix a (custom)type in advance var parser = this.parsers[ type || this.typeOf(obj) ]; type = typeof parser; return type == 'function' ? parser.call( this, obj ) : type == 'string' ? parser : this.parsers.error; }, typeOf:function( obj ) { var type; if ( obj === null ) { type = "null"; } else if (typeof obj === "undefined") { type = "undefined"; } else if (QUnit.is("RegExp", obj)) { type = "regexp"; } else if (QUnit.is("Date", obj)) { type = "date"; } else if (QUnit.is("Function", obj)) { type = "function"; } else if (typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined") { type = "window"; } else if (obj.nodeType === 9) { type = "document"; } else if (obj.nodeType) { type = "node"; } else if (typeof obj === "object" && typeof obj.length === "number" && obj.length >= 0) { type = "array"; } else { type = typeof obj; } return type; }, separator:function() { return this.multiline ? this.HTML ? '<br />' : '\n' : this.HTML ? '&nbsp;' : ' '; }, indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing if ( !this.multiline ) return ''; var chr = this.indentChar; if ( this.HTML ) chr = chr.replace(/\t/g,' ').replace(/ /g,'&nbsp;'); return Array( this._depth_ + (extra||0) ).join(chr); }, up:function( a ) { this._depth_ += a || 1; }, down:function( a ) { this._depth_ -= a || 1; }, setParser:function( name, parser ) { this.parsers[name] = parser; }, // The next 3 are exposed so you can use them quote:quote, literal:literal, join:join, // _depth_: 1, // This is the list of parsers, to modify them, use jsDump.setParser parsers:{ window: '[Window]', document: '[Document]', error:'[ERROR]', //when no parser is found, shouldn't happen unknown: '[Unknown]', 'null':'null', undefined:'undefined', 'function':function( fn ) { var ret = 'function', name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE if ( name ) ret += ' ' + name; ret += '('; ret = [ ret, QUnit.jsDump.parse( fn, 'functionArgs' ), '){'].join(''); return join( ret, QUnit.jsDump.parse(fn,'functionCode'), '}' ); }, array: array, nodelist: array, arguments: array, object:function( map ) { var ret = [ ]; QUnit.jsDump.up(); for ( var key in map ) ret.push( QUnit.jsDump.parse(key,'key') + ': ' + QUnit.jsDump.parse(map[key]) ); QUnit.jsDump.down(); return join( '{', ret, '}' ); }, node:function( node ) { var open = QUnit.jsDump.HTML ? '&lt;' : '<', close = QUnit.jsDump.HTML ? '&gt;' : '>'; var tag = node.nodeName.toLowerCase(), ret = open + tag; for ( var a in QUnit.jsDump.DOMAttrs ) { var val = node[QUnit.jsDump.DOMAttrs[a]]; if ( val ) ret += ' ' + a + '=' + QUnit.jsDump.parse( val, 'attribute' ); } return ret + close + open + '/' + tag + close; }, functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function var l = fn.length; if ( !l ) return ''; var args = Array(l); while ( l-- ) args[l] = String.fromCharCode(97+l);//97 is 'a' return ' ' + args.join(', ') + ' '; }, key:quote, //object calls it internally, the key part of an item in a map functionCode:'[code]', //function calls it internally, it's the content of the function attribute:quote, //node calls it internally, it's an html attribute value string:quote, date:quote, regexp:literal, //regex number:literal, 'boolean':literal }, DOMAttrs:{//attributes to dump from nodes, name=>realName id:'id', name:'name', 'class':'className' }, HTML:false,//if true, entities are escaped ( <, >, \t, space and \n ) indentChar:' ',//indentation unit multiline:true //if true, items in a collection, are separated by a \n, else just a space. }; return jsDump; })(); // from Sizzle.js function getText( elems ) { var ret = "", elem; for ( var i = 0; elems[i]; i++ ) { elem = elems[i]; // Get the text from text nodes and CDATA nodes if ( elem.nodeType === 3 || elem.nodeType === 4 ) { ret += elem.nodeValue; // Traverse everything else, except comment nodes } else if ( elem.nodeType !== 8 ) { ret += getText( elem.childNodes ); } } return ret; }; /* * Javascript Diff Algorithm * By John Resig (http://ejohn.org/) * Modified by Chu Alan "sprite" * * Released under the MIT license. * * More Info: * http://ejohn.org/projects/javascript-diff-algorithm/ * * Usage: QUnit.diff(expected, actual) * * QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over" */ QUnit.diff = (function() { function diff(o, n){ var ns = new Object(); var os = new Object(); for (var i = 0; i < n.length; i++) { if (ns[n[i]] == null) ns[n[i]] = { rows: new Array(), o: null }; ns[n[i]].rows.push(i); } for (var i = 0; i < o.length; i++) { if (os[o[i]] == null) os[o[i]] = { rows: new Array(), n: null }; os[o[i]].rows.push(i); } for (var i in ns) { if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) { n[ns[i].rows[0]] = { text: n[ns[i].rows[0]], row: os[i].rows[0] }; o[os[i].rows[0]] = { text: o[os[i].rows[0]], row: ns[i].rows[0] }; } } for (var i = 0; i < n.length - 1; i++) { if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null && n[i + 1] == o[n[i].row + 1]) { n[i + 1] = { text: n[i + 1], row: n[i].row + 1 }; o[n[i].row + 1] = { text: o[n[i].row + 1], row: i + 1 }; } } for (var i = n.length - 1; i > 0; i--) { if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null && n[i - 1] == o[n[i].row - 1]) { n[i - 1] = { text: n[i - 1], row: n[i].row - 1 }; o[n[i].row - 1] = { text: o[n[i].row - 1], row: i - 1 }; } } return { o: o, n: n }; } return function(o, n){ o = o.replace(/\s+$/, ''); n = n.replace(/\s+$/, ''); var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/)); var str = ""; var oSpace = o.match(/\s+/g); if (oSpace == null) { oSpace = [" "]; } else { oSpace.push(" "); } var nSpace = n.match(/\s+/g); if (nSpace == null) { nSpace = [" "]; } else { nSpace.push(" "); } if (out.n.length == 0) { for (var i = 0; i < out.o.length; i++) { str += '<del>' + out.o[i] + oSpace[i] + "</del>"; } } else { if (out.n[0].text == null) { for (n = 0; n < out.o.length && out.o[n].text == null; n++) { str += '<del>' + out.o[n] + oSpace[n] + "</del>"; } } for (var i = 0; i < out.n.length; i++) { if (out.n[i].text == null) { str += '<ins>' + out.n[i] + nSpace[i] + "</ins>"; } else { var pre = ""; for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) { pre += '<del>' + out.o[n] + oSpace[n] + "</del>"; } str += " " + out.n[i].text + nSpace[i] + pre; } } } return str; }; })(); })(this);
0x6a
trunk/libraries/ui/ui-multiselect/tests/unit/qunit.js
JavaScript
asf20
35,697
(function($){ module("events"); test("multiselectopen", function(){ expect(27); // inject widget el = $("<select multiple><option value='foo'>foo</option></select>").appendTo(body); el.multiselect({ open: function(e,ui){ ok( true, 'option: multiselect("open") fires open callback' ); equals(this, el[0], "option: context of callback"); equals(e.type, 'multiselectopen', 'option: event type in callback'); equals(menu().css("display"), 'block', 'menu display css property equals block'); same(ui, {}, 'option: ui hash in callback'); } }) .bind("multiselectopen", function(e,ui){ ok(true, 'event: multiselect("open") fires multiselectopen event'); equals(this, el[0], 'event: context of event'); same(ui, {}, 'event: ui hash'); }); // now try to open it.. el.multiselect("open") // make sure the width of the menu and button are equivalent equals( button().outerWidth(), menu().outerWidth(), 'button and menu widths are equivalent'); // close el.multiselect("close"); // make sure a click event on the button opens the menu as well. button().trigger("click"); el.multiselect("close"); // make sure a click event on a span inside the button opens the menu as well. button().find("span:first").trigger("click"); // reset for next test el.multiselect("destroy").remove(); // now try returning false prevent opening el = $("<select></select>") .appendTo(body) .multiselect() .bind("multiselectbeforeopen", function(){ ok( true, "event: binding multiselectbeforeopen to return false (prevent from opening)" ); return false; }) .multiselect("open"); ok( !el.multiselect("isOpen"), "multiselect is not open after multiselect('open')" ); el.multiselect("destroy").remove(); }); test("multiselectclose", function(){ expect(25); // inject widget el = $("<select multiple><option>foo</option></select>").appendTo(body); el.multiselect({ close: function(e,ui){ ok( true, 'option: multiselect("close") fires close callback' ); equals(this, el[0], "option: context of callback"); equals(e.type, 'multiselectclose', 'option: event type in callback'); equals(menu().css("display"), 'none', 'menu display css property equals none'); same(ui, {}, 'option: ui hash'); } }) .bind("multiselectclose", function(e,ui){ ok(true, 'multiselect("close") fires multiselectclose event'); equals(this, el[0], 'event: context of event'); same(ui, {}, 'event: ui hash'); }) .multiselect("open") .multiselect("close") .multiselect("open"); // make sure a click event on the button closes the menu as well. button().click(); el.multiselect("open"); // make sure a click event on a span inside the button closes the menu as well. button().find("span:first").click(); // make sure that the menu is actually closed. see issue #68 ok( el.multiselect('isOpen') === false, 'menu is indeed closed' ); el.multiselect("destroy").remove(); }); test("multiselectbeforeclose", function(){ expect(8); // inject widget el = $("<select multiple></select>").appendTo(body); el.multiselect({ beforeclose: function(e,ui){ ok( true, 'option: multiselect("beforeclose") fires close callback' ); equals(this, el[0], "option: context of callback"); equals(e.type, 'multiselectbeforeclose', 'option: event type in callback'); same(ui, {}, 'option: ui hash'); } }) .bind("multiselectbeforeclose", function(e,ui){ ok(true, 'multiselect("beforeclose") fires multiselectclose event'); equals(this, el[0], 'event: context of event'); same(ui, {}, 'event: ui hash'); }) .multiselect("open") .multiselect("close"); el.multiselect("destroy").remove(); // test 'return false' functionality el = $("<select multiple></select>").appendTo(body); el.multiselect({ beforeclose: function(){ return false; } }); el.multiselect('open').multiselect('close'); ok( menu().is(':visible') && el.multiselect("isOpen"), "returning false inside callback prevents menu from closing" ); el.multiselect("destroy").remove(); }); test("multiselectclick", function(){ expect(28); var times = 0; // inject widget el = $("<select multiple><option value='1'>Option 1</option><option value='2'>Option 2</option></select>") .appendTo(body); el.multiselect({ click: function(e,ui){ ok(true, 'option: triggering the click event on the second checkbox fires the click callback' ); equals(this, el[0], "option: context of callback"); equals(e.type, 'multiselectclick', 'option: event type in callback'); equals(ui.value, "2", "option: ui.value equals"); equals(ui.text, "Option 2", "option: ui.title equals"); if(times === 0) { equals(ui.checked, true, "option: ui.checked equals"); } else if(times === 1) { equals(ui.checked, false, "option: ui.checked equals"); } } }) .bind("multiselectclick", function(e,ui){ ok(true, 'event: triggering the click event on the second checkbox triggers multiselectclick'); equals(this, el[0], 'event: context of event'); equals(ui.value, "2", "event: ui.value equals"); equals(ui.text, "Option 2", "event: ui.title equals"); if(times === 0) { equals(ui.checked, true, "option: ui.checked equals"); } else if(times === 1) { equals(ui.checked, false, "option: ui.checked equals"); } }) .bind("change", function(e){ if(++times === 1){ equals(el.val().join(), "2", "event: select element val() within the change event is correct" ); } else { equals(el.val(), null, "event: select element val() within the change event is correct" ); } ok(true, "event: the select's change event fires"); }) .multiselect("open"); // trigger a click event on the input var lastInput = menu().find("input").last(); lastInput[0].click(); // trigger once more. lastInput[0].click(); // make sure it has focus equals(true, lastInput.is(":focus"), "The input has focus"); // make sure menu isn't closed automatically equals( true, el.multiselect('isOpen'), 'menu stays open' ); el.multiselect("destroy").remove(); }); test("multiselectcheckall", function(){ expect(10); // inject widget el = $('<select multiple><option value="1">Option 1</option><option value="2">Option 2</option></select>').appendTo(body); el.multiselect({ checkAll: function(e,ui){ ok( true, 'option: multiselect("checkAll") fires checkall callback' ); equals(this, el[0], "option: context of callback"); equals(e.type, 'multiselectcheckall', 'option: event type in callback'); same(ui, {}, 'option: ui hash in callback'); } }) .bind("multiselectcheckall", function(e,ui){ ok( true, 'event: multiselect("checkall") fires multiselectcheckall event' ); equals(this, el[0], 'event: context of event'); same(ui, {}, 'event: ui hash'); }) .bind("change", function(){ ok(true, "event: the select's change event fires"); equals( el.val().join(), "1,2", "event: select element val() within the change event is correct" ); }) .multiselect("open") .multiselect("checkAll"); equals(menu().find("input").first().is(":focus"), true, "The first input has focus"); el.multiselect("destroy").remove(); }); test("multiselectuncheckall", function(){ expect(10); // inject widget el = $('<select multiple><option value="1">Option 1</option><option value="2">Option 2</option></select>').appendTo(body); el.multiselect({ uncheckAll: function(e,ui){ ok( true, 'option: multiselect("uncheckAll") fires uncheckall callback' ); equals(this, el[0], "option: context of callback"); equals(e.type, 'multiselectuncheckall', 'option: event type in callback'); same(ui, {}, 'option: ui hash in callback'); } }) .bind("multiselectuncheckall", function(e,ui){ ok( true, 'event: multiselect("uncheckall") fires multiselectuncheckall event' ); equals(this, el[0], 'event: context of event'); same(ui, {}, 'event: ui hash'); }) .bind("change", function(){ ok(true, "event: the select's change event fires"); equals( el.val(), null, "event: select element val() within the change event is correct" ); }) .multiselect("open") .multiselect("uncheckAll"); equals(menu().find("input").first().is(":focus"), true, "The first input has focus"); el.multiselect("destroy").remove(); }); test("multiselectbeforeoptgrouptoggle", function(){ expect(10); // inject widget el = $('<select multiple><optgroup label="Set One"><option value="1">Option 1</option><option value="2">Option 2</option></optgroup></select>') .appendTo(body); el.bind("change", function(){ ok(true, "the select's change event fires"); }) .multiselect({ beforeoptgrouptoggle: function(e,ui){ equals(this, el[0], "option: context of callback"); equals(e.type, 'multiselectbeforeoptgrouptoggle', 'option: event type in callback'); equals(ui.label, "Set One", 'option: ui.label equals'); equals(ui.inputs.length, 2, 'option: number of inputs in the ui.inputs key'); } }) .bind("multiselectbeforeoptgrouptoggle", function(e,ui){ ok( true, 'option: multiselect("uncheckall") fires multiselectuncheckall event' ); equals(this, el[0], 'event: context of event'); equals(ui.label, "Set One", 'event: ui.label equals'); equals(ui.inputs.length, 2, 'event: number of inputs in the ui.inputs key'); }) .multiselect("open"); menu().find("li.ui-multiselect-optgroup-label a").click(); el.multiselect("destroy").remove(); el = el.clone(); // test return false preventing checkboxes from activating el.bind("change", function(){ ok( true ); // should not fire }).multiselect({ beforeoptgrouptoggle: function(){ return false; }, // if this fires the expected count will be off. just a redundant way of checking that return false worked optgrouptoggle: function(){ ok( true ); } }).appendTo( body ); var label = menu().find("li.ui-multiselect-optgroup-label a").click(); equals( menu().find(":input:checked").length, 0, "when returning false inside the optgrouptoggle handler, no checkboxes are checked" ); el.multiselect("destroy").remove(); }); test("multiselectoptgrouptoggle", function(){ expect(12); // inject widget el = $('<select multiple><optgroup label="Set One"><option value="1">Option 1</option><option value="2">Option 2</option></optgroup></select>').appendTo(body); el.multiselect({ optgrouptoggle: function(e,ui){ equals(this, el[0], "option: context of callback"); equals(e.type, 'multiselectoptgrouptoggle', 'option: event type in callback'); equals(ui.label, "Set One", 'option: ui.label equals'); equals(ui.inputs.length, 2, 'option: number of inputs in the ui.inputs key'); equals(ui.checked, true, 'option: ui.checked equals true'); } }) .bind("multiselectoptgrouptoggle", function(e,ui){ ok( true, 'option: multiselect("uncheckall") fires multiselectuncheckall event' ); equals(this, el[0], 'event: context of event'); equals(ui.label, "Set One", 'event: ui.label equals'); equals(ui.inputs.length, 2, 'event: number of inputs in the ui.inputs key'); equals(ui.checked, true, 'event: ui.checked equals true'); }) .multiselect("open"); // trigger native click event on optgroup menu().find("li.ui-multiselect-optgroup-label a").click(); equals(menu().find(":input:checked").length, 2, "both checkboxes are actually checked" ); equals(menu().find("input").first().is(":focus"), true, "The first input has focus"); el.multiselect("destroy").remove(); }); })(jQuery);
0x6a
trunk/libraries/ui/ui-multiselect/tests/unit/events.js
JavaScript
asf20
11,800
var el; var body = document.body; function button(){ return el.next(); } function menu(){ return el.multiselect("widget"); } function header(){ return menu().find('.ui-multiselect-header'); } QUnit.done = function(){ $("select").hide(); }; (function($){ module("core"); test("init", function(){ expect(6); el = $("select").multiselect(), $header = header(); ok( $header.find('a.ui-multiselect-all').css('display') !== 'none', 'select all is visible' ); ok( $header.find('a.ui-multiselect-none').css('display') !== 'none', 'select none is visible' ); ok( $header.find('a.ui-multiselect-close').css('display') !== 'none', 'close link is visible' ); ok( menu().is(':hidden'), 'menu is hidden'); ok( el.is(":hidden"), 'the original select is hidden'); ok( el.attr('tabIndex') == 2, 'button inherited the correct tab index'); el.multiselect("destroy"); }); test("form submission", function(){ expect(3); var form = $('<form></form>').appendTo(body), data; el = $('<select id="test" name="test" multiple="multiple"><option value="foo" selected="selected">foo</option><option value="bar">bar</option></select>') .appendTo(form) .multiselect() .multiselect("checkAll"); data = form.serialize(); equals( data, 'test=foo&test=bar', 'after checking all and serializing the form, the correct keys were serialized'); el.multiselect("uncheckAll"); data = form.serialize(); equals( data.length, 0, 'after unchecking all and serializing the form, nothing was serialized'); // re-check all and destroy, exposing original select el.multiselect("checkAll").multiselect("destroy"); data = form.serialize(); equals( data, 'test=foo&test=bar', 'after checking all, destroying the widget, and serializing the form, the correct keys were serialized'); form.remove(); }); test("form submission, optgroups", function(){ expect(4); var form = $('<form></form>').appendTo(body), data; el = $('<select id="test" name="test" multiple="multiple"><optgroup label="foo"><option value="foo">foo</option><option value="bar">bar</option></optgroup><optgroup label="bar"><option value="baz">baz</option><option value="bax">bax</option></optgroup></select>') .appendTo(form) .multiselect() .multiselect("checkAll"); data = form.serialize(); equals( data, 'test=foo&test=bar&test=baz&test=bax', 'after checking all and serializing the form, the correct keys were serialized'); el.multiselect("uncheckAll"); data = form.serialize(); equals( data.length, 0, 'after unchecking all and serializing the form, nothing was serialized'); // re-check all and destroy, exposing original select el.multiselect("checkAll").multiselect("destroy"); data = form.serialize(); equals( data, 'test=foo&test=bar&test=baz&test=bax', 'after checking all, destroying the widget, and serializing the form, the correct keys were serialized'); // reset option tags el.find("option").each(function(){ this.selected = false; }); // test checking one option in both optgroups el.multiselect(); // finds the first input in each optgroup (assumes 2 options per optgroup) el.multiselect("widget").find('.ui-multiselect-checkboxes li:not(.ui-multiselect-optgroup-label) input:even').each(function( i ){ this.click(); }); data = form.serialize(); equals( data, 'test=foo&test=baz', 'after manually checking one input in each group, the correct two are serialized'); el.multiselect('destroy'); form.remove(); }); test("form submission, single select", function(){ expect(7); var form = $('<form></form>').appendTo("body"), radios, data; el = $('<select id="test" name="test" multiple="multiple"><option value="foo">foo</option><option value="bar">bar</option><option value="baz">baz</option></select>') .appendTo(form) .multiselect({ multiple: false }); // select multiple radios to ensure that, in the underlying select, only one // will remain selected radios = menu().find(":radio"); radios[0].click(); radios[2].click(); radios[1].click(); data = form.serialize(); equals( data, 'test=bar', 'the form serializes correctly after clicking on multiple radio buttons'); equals( radios.filter(":checked").length, 1, 'Only one radio button is selected'); // uncheckAll method el.multiselect("uncheckAll"); data = form.serialize(); equals( data.length, 0, 'After unchecking all, nothing was serialized'); equals( radios.filter(":checked").length, 0, 'No radio buttons are selected'); // checkAll method el.multiselect("checkAll"); data = form.serialize(); equals( el.multiselect("getChecked").length, 1, 'After checkAll, only one radio is selected'); equals( radios.filter(":checked").length, 1, 'One radio is selected'); // expose original el.multiselect("destroy"); data = form.serialize(); equals( data, 'test=foo&test=bar&test=baz', 'after destroying the widget and serializing the form, the correct key was serialized: ' + data); form.remove(); }); asyncTest("form reset, nothing pre-selected", function(){ expect(2); var form = $('<form></form>').appendTo(body), noneSelected = 'Please check something'; el = $('<select name="test" multiple="multiple"><option value="foo">foo</option><option value="bar">bar</option></select>') .appendTo(form) .multiselect({ noneSelectedText: noneSelected }) .multiselect("checkAll"); // trigger reset form.trigger("reset"); setTimeout(function(){ equals( menu().find(":checked").length, 0, "no checked checkboxes" ); equals( button().text(), noneSelected, "none selected text"); el.multiselect('destroy'); form.remove(); start(); }, 10); }); asyncTest("form reset, pre-selected options", function(){ expect(2); var form = $('<form></form>').appendTo(body); el = $('<select name="test" multiple="multiple"><option value="foo" selected="selected">foo</option><option value="bar" selected="selected">bar</option></select>') .appendTo(form) .multiselect({ selectedText: '# of # selected' }) .multiselect("uncheckAll"); // trigger reset form.trigger("reset"); setTimeout(function(){ equals( menu().find(":checked").length, 2, "two checked checkboxes" ); equals( button().text(), "2 of 2 selected", "selected text" ); el.multiselect('destroy'); form.remove(); start(); }, 10); }); })(jQuery);
0x6a
trunk/libraries/ui/ui-multiselect/tests/unit/core.js
JavaScript
asf20
6,456
(function($){ module("options"); test("noneSelectedText", function(){ expect(7); var text; el = $("select").multiselect({ noneSelectedText: 'None Selected' }); // read from widget text = el.multiselect("option", "noneSelectedText"); equals( button().text(), text, 'on init, button reads "None Selected"'); el.multiselect("checkAll"); ok( button().text() !== text, 'after checkAll, button no longer reads "None Selected"'); el.multiselect("uncheckAll"); equals( button().text(), text, 'after uncheckAll, button text restored to "None Selected"'); // change the option value el.multiselect("option", "noneSelectedText", "No Checkboxes Checked"); equals( el.multiselect("option", "noneSelectedText"), "No Checkboxes Checked", "new noneSelectedText value set correctly"); // read updated value from widget text = el.multiselect("option", "noneSelectedText"); // test against the new value equals( button().text(), text, 'after changing the option value, button now reads "No Checkboxes Checked"'); el.multiselect("checkAll"); ok( button().text() !== text, 'after checkAll, button no longer reads "No Checkboxes Checked"'); el.multiselect("uncheckAll"); equals( button().text(), text, 'after uncheckAll, button text restored to "No Checkboxes Checked"'); el.multiselect("destroy"); }); test("selectedText", function(){ expect(3); var numOptions = $("select option").length; el = $("select").multiselect({ selectedText: '# of # selected' }); el.multiselect("checkAll"); equals( button().text(), numOptions+' of '+numOptions+' selected', 'after checkAll, button reflects the total number of checked boxes'); // change option value el.multiselect("option", "selectedText", function( numChecked ){ return numChecked + ' options selected'; }); equals( button().text(), numOptions+' options selected', 'after changing the option to a function value, button reflects the new text'); // uncheck all el.multiselect("uncheckAll"); equals( button().text(), el.multiselect("option","noneSelectedText"), 'after unchecking all, button text now reflects noneSelectedText option value'); el.multiselect("destroy"); }); test("selectedList", function(){ expect(2); var html = '<select multiple><option value="foo">foo &quot;with quotes&quot;</option><option value="bar">bar</option><option value="baz">baz</option></select>'; el = $(html).appendTo("body").multiselect({ selectedList: 3 }); el.multiselect("checkAll"); equals( button().text(), 'foo "with quotes", bar, baz', 'after checkAll, button text is a list of all options in the select'); el.multiselect("destroy").remove(); el = $(html).appendTo("body").multiselect({ selectedList: 2 }); el.multiselect("checkAll"); equals( button().text(), '3 selected', 'after checkAll with a limited selectedList value, button value displays number of checked'); el.multiselect("destroy").remove(); }); function asyncSelectedList( useTrigger, message ){ expect(1); stop(); var html = '<select multiple><option value="foo">foo</option><option value="bar">bar</option><option value="baz">baz</option></select>', checkboxes; el = $(html).appendTo(body).multiselect({ selectedList: 2 }); checkboxes = el.multiselect("widget").find(":checkbox"); if( useTrigger ){ checkboxes.eq(0).trigger('click'); checkboxes.eq(1).trigger('click'); } else { checkboxes.eq(0)[0].click(); checkboxes.eq(1)[0].click(); } setTimeout(function(){ equals( button().text(), 'foo, bar', message); el.multiselect("destroy").remove(); start(); }, 10); } test("selectedList - manual trigger - jQuery", function(){ asyncSelectedList( true, 'manually checking items with trigger()' ); }); test("selectedList - manual trigger - native", function(){ asyncSelectedList( false, 'manually checking items with element.click()' ); }); test("selectedList - encoding", function() { expect(1); el = $('<select><option value="A&amp;E">A&amp;E</option></select>') .appendTo("body") .multiselect({ selectedList: 1 }); equals(button().text(), 'A&amp;E'); el.multiselect("destroy").remove(); }); test("height", function(){ expect(2); var height = 234; el = $("select").multiselect({ height: height }).multiselect("open"); equals( height, menu().find("ul.ui-multiselect-checkboxes").height(), 'height after opening propertly set to '+height ); // change height and re-test height = 333; el.multiselect("option", "height", height); equals( height, menu().find("ul.ui-multiselect-checkboxes").height(), 'changing value through api to '+height ); el.multiselect("destroy"); }); test("minWidth", function(){ expect(3); var minWidth = 321; el = $("select").multiselect({ minWidth:minWidth }).multiselect("open"); equals( minWidth, button().outerWidth(), 'outerWidth of button is ' + minWidth ); // change height and re-test minWidth = 351; el.multiselect("option", "minWidth", minWidth); equals( minWidth, button().outerWidth(), 'changing value through api to '+minWidth); // change height to something that should fail. minWidth = 10; el.multiselect("option", "minWidth", minWidth); var outerWidth = button().outerWidth(); ok( minWidth !== outerWidth, 'changing value through api to '+minWidth+' (too small), outerWidth is actually ' + outerWidth); el.multiselect("destroy"); }); test("checkAllText", function(){ expect(2); var text = "foo"; el = $("select").multiselect({ checkAllText:text }); equals( text, menu().find(".ui-multiselect-all").text(), 'check all link reads '+text ); // set through option text = "bar"; el.multiselect("option","checkAllText","bar"); equals( text, menu().find(".ui-multiselect-all").text(), 'check all link reads '+text ); el.multiselect("destroy"); }); test("uncheckAllText", function(){ expect(2); var text = "foo"; el = $("select").multiselect({ uncheckAllText:text }); equals( text, menu().find(".ui-multiselect-none").text(), 'check all link reads '+text ); // set through option text = "bar"; el.multiselect("option","uncheckAllText","bar"); equals( text, menu().find(".ui-multiselect-none").text(), 'changing value through api to '+text ); el.multiselect("destroy"); }); test("autoOpen", function(){ expect(2); el = $("select").multiselect({ autoOpen:false }); ok( menu().is(":hidden"), 'menu is hidden with autoOpen off'); el.multiselect("destroy"); el = $("select").multiselect({ autoOpen:true }); ok( menu().is(":visible"), 'menu is visible with autoOpen on'); el.multiselect("destroy"); // no built in support for change on the fly; not testing it. }); test("multiple (false - single select)", function(){ expect(10); el = $("select").multiselect({ multiple:false }); // get some references var $menu = menu(), $header = header(); ok( $header.find('a.ui-multiselect-all').is(':hidden'), 'select all link is hidden' ); ok( $header.find('a.ui-multiselect-none').is(':hidden'), 'select none link is hidden' ); ok( $header.find('a.ui-multiselect-close').css('display') !== 'hidden', 'close link is visible' ); ok( !$menu.find(":checkbox").length, 'no checkboxes are present'); ok( $menu.find(":radio").length > 0, 'but radio boxes are'); // simulate click on ALL radios var radios = $menu.find(":radio").trigger("click"); // at the end of that, only one radio should be checked and the menu closed equals( radios.filter(":checked").length, 1, 'After checking all radios, only one is actually checked'); equals( false, el.multiselect('isOpen'), 'Menu is closed' ); // uncheck boxes... should only be one radios.filter(":checked").trigger("click"); // method calls el.multiselect("checkAll"); equals( $menu.find("input:radio:checked").length, 1, 'After checkAll method call only one is actually checked'); el.multiselect("uncheckAll"); equals( $menu.find("input:radio:checked").length, 0, 'After uncheckAll method nothing is checked'); // check/uncheck all links equals( $menu.find(".ui-multiselect-all, ui-multiselect-none").filter(":visible").length, 0, "Check/uncheck all links don't exist"); el.multiselect("destroy"); }); test("multiple (changing dynamically)", function(){ expect(6); el = $('<select multiple><option value="foo">foo</option></select>') .appendTo("body") .multiselect(); el.multiselect("option", "multiple", false); equals(el[0].multiple, false, "When changing a multiple select to a single select, the select element no longer has the multiple property"); equals(menu().hasClass("ui-multiselect-single"), true, "...and the menu now has the single select class"); equals(menu().find('input[type="radio"]').length, 1, "...and the checkbox is now a radio button"); el.multiselect("option", "multiple", true); equals(el[0].multiple, true, "When changing a single select to a multiple select, the select element has the multiple property"); equals(menu().hasClass("ui-multiselect-single"), false, "...and the menu doesn't have the single select class"); equals(menu().find('input[type="checkbox"]').length, 1, "...and the radio button is now a checkbox"); el.multiselect("destroy").remove(); }); test("classes", function(){ expect(6); var classname = 'foo'; el = $("select").multiselect({ classes:classname }); var $button = button(), $widget = menu(); equals( $widget.hasClass(classname), true, 'menu has the class ' + classname); equals( $button.hasClass(classname), true, 'button has the class ' + classname); // change it up var newclass = 'bar'; el.multiselect("option", "classes", newclass); equals( $widget.hasClass(newclass), true, 'menu has the new class ' + newclass); equals( $button.hasClass(newclass), true, 'button has the new class ' + newclass); equals( $button.hasClass(classname), false, 'menu no longer has the class ' + classname); equals( $button.hasClass(classname), false, 'button no longer has the class ' + classname); el.multiselect("destroy"); }); test("header", function(){ expect(7); function countLinks(){ return header().find("a").length; } // default el = $("select").multiselect({ autoOpen:true }); ok(header().is(':visible'), "default config: header is visible" ); el.multiselect("option", "header", false); ok(header().is(':hidden'), "after changing header option on default config: header is no longer visible" ); // test for all links within the default header equals(countLinks(), 3, "number of links in the default header config"); el.multiselect("destroy"); // create again, this time header false el = $("select").multiselect({ header:false, autoOpen:true }); ok(header().is(':hidden'), "init with header false: header is not visible" ); el.multiselect("option", "header", true); ok(header().is(':visible'), "after changing header option: header is visible" ); el.multiselect("destroy"); // create again, this time custom header el = $("select").multiselect({ header:"hai guyz", autoOpen:true }); equals(header().text(), "hai guyz", "header equals custom text"); equals(countLinks(), 1, "number of links in the custom header config (should be close button)"); el.multiselect("destroy"); }); })(jQuery);
0x6a
trunk/libraries/ui/ui-multiselect/tests/unit/options.js
JavaScript
asf20
11,451
<!DOCTYPE html> <html> <head> <title>jQuery UI MultiSelect Widget Unit Tests</title> <link rel="stylesheet" href="qunit.css" type="text/css" media="screen" /> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" type="text/css" media="screen" /> <link rel="stylesheet" href="../../jquery.multiselect.css" type="text/css" media="screen" /> <link rel="stylesheet" href="../../jquery.multiselect.filter.css" type="text/css" media="screen" /> </head> <body> <h1 id="qunit-header">UI MultiSelect Unit Tests</h1> <h2 id="qunit-banner"></h2> <h2 id="qunit-userAgent"></h2> <ol id="qunit-tests"></ol> <select title="MultiSelect" multiple="multiple" tabindex="2"> <optgroup label="Optgroup One"> <option value="1">One</option> <option value="2">Two</option> <option value="3">Three</option> </optgroup> <optgroup label="Optgroup two"> <option value="4">Four</option> <option value="5">Five</option> <option value="6">Six</option> <option value="7">Seven</option> </optgroup> <optgroup label="Optgroup three" class="optgroupClass"> <option value="8">Eight</option> <option value="9" class="optionClass">Nine</option> </optgroup> </select> <script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.js"></script> <script src="../../src/jquery.multiselect.js"></script> <script src="../../src/jquery.multiselect.filter.js"></script> <script src="qunit.js"></script> <script src="core.js"></script> <script src="options.js"></script> <script src="events.js"></script> <script src="methods.js"></script> <script src="html.js"></script> <script src="filter.js"></script> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/tests/unit/index.htm
HTML
asf20
1,722
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Plugin Tests</title> <link rel="stylesheet" type="text/css" href="../../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/redmond/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../../src/jquery.multiselect.js"></script> <script type="text/javascript"> $(function(){ $("select").multiselect(); $("#dialog").dialog({ title: "Inside a dialog", height: 300 }); $("#tabs").tabs(); $("#accordion").accordion(); $("#datepicker").datepicker(); }); </script> </head> <body> <h1>Widget Container Tests</h1> <p>Testing the MultiSelect when placed inside other UI widgets.</p> <h2>Default</h2> <p>Rendered outside a widget (for comparison):</p> <form> <select multiple> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> </select> </form> <h2>Widgets</h2> <p>Inside widgets:</p> <!-- dialog --> <div id="dialog"> <form> <select multiple> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> </select> <!-- date picker --> <p>Datepicker: <input type="date" id="datepicker" /></p> </form> </div> <!-- tabs --> <div id="tabs" class="clear"> <ul> <li><a href="#fragment-1">Inside tabs</a></li> <li><a href="#fragment-2">Tab 2</a></li> </ul> <div id="fragment-1"> <form> <select multiple> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> </select> </form> </div> <div id="fragment-2"> Select the first tab to view the test. </div> </div> <!-- accordion --> <div id="accordion" style="clear:both; margin-top:50px"> <h3><a href="#">Inside an accordion</a></h3> <div> <form> <select multiple> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> </select> </form> </div> <h3><a href="">test</a></h3> <div>Click on the first item to view the test.</div> </div> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/tests/visual/widget-containers.htm
HTML
asf20
2,703
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Plugin Tests</title> <link rel="stylesheet" type="text/css" href="../../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/redmond/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../../src/jquery.multiselect.js"></script> </head> <body> <h1>Form Submission Test</h1> <p>Testing to ensure the correct values are actually passed when the form is submitted.</p> <form action="#" method="post" style="margin-top:20px"> <select id="foo" name="foo" multiple="multiple" size="5"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> </select> <select id="bar" name="bar" size="5"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> </select> <div><input type="submit" value="Submit" /></div> </form> <script type="text/javascript"> $("#foo").multiselect(); $("#bar").multiselect({ multiple:false }); $("form").bind("submit", function(){ alert( $(this).serialize() ); return false; }); </script> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/tests/visual/formsubmission.htm
HTML
asf20
1,637
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Plugin Tests</title> <link rel="stylesheet" type="text/css" href="../../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/redmond/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../../src/jquery.multiselect.js"></script> </head> <body> <h1>Form Submission Test</h1> <p>Testing to ensure the correct values are actually passed when the form is submitted.</p> <pre> <?php var_dump( $_POST['foo'], $_POST['bar'] ); ?> </pre> <form action="formsubmission.php" method="post" style="margin-top:20px"> <select name="foo[]" multiple="multiple" size="5"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> </select> <select name="bar[]" multiple="multiple" size="5"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> </select> <div><input type="submit" value="Submit" /></div> </form> <script type="text/javascript"> $("select").multiselect(); $("form").bind("submit", function(){ alert( $(this).serialize() ); }); </script> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/tests/visual/formsubmission.php
PHP
asf20
1,669
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Plugin Tests</title> <link rel="stylesheet" type="text/css" href="../../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/redmond/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../../src/jquery.multiselect.js"></script> <script type="text/javascript"> $(function(){ $("select") .filter(".single") .multiselect({ multiple: false, noneSelectedText: 'Please select a radio', header: false }) .end() .not(".single") .multiselect({ noneSelectedText: 'Please select a checkbox' })}); </script> </head> <body> <h1>Form Reset Tests</h1> <p>None selected text</p> <form> <select multiple="multiple"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> </select> <p>Selected text - pre-selected values</p> <select multiple="multiple"> <option value="option1">Option 1</option> <option value="option2" selected="selected">Option 2</option> <option value="option3" selected="selected">Option 3</option> <option value="option4">Option 4</option> </select> <p>Single select - none selected text</p> <select class="single"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> </select> <p>Single select - pre-selected value</p> <select class="single"> <option value="option1">Option 1</option> <option value="option2" selected="selected">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> </select> <p><input type="reset" value="Reset" /></p> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/tests/visual/form-reset.htm
HTML
asf20
2,157
body { font:12px Helvetica, arial, sans-serif } h1, h2, p { margin:10px 0 } .hidden { visibility:hidden } .message { padding:10px; margin:15px 0; display:block; text-align:left } .message-title { font-weight:bold; font-size:1.25em } .message-body { margin-top:4px } .error, .notice, .success { padding:.8em; margin-bottom:1em; border:2px solid #ddd } .error { background:#FBE3E4; color:#8a1f11; border-color:#FBC2C4 } .notice { background:#FFF6BF; color:#514721; border-color:#FFD324 } .success { background:#E6EFC2; color:#264409; border-color:#C6D880 } .error a { color:#8a1f11 } .notice a { color:#514721 } .success a { color:#264409 }
0x6a
trunk/libraries/ui/ui-multiselect/tests/visual/style.css
CSS
asf20
642
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Plugin Tests</title> <link rel="stylesheet" type="text/css" href="../../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/redmond/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../../src/jquery.multiselect.js"></script> </head> <body> <h1>Form Submission Test (Single Select)</h1> <p>Testing to ensure the correct values are actually passed when the form is submitted.</p> <pre> <?php var_dump( $_POST['foo'], $_POST['bar'] ); ?> </pre> <form action="formsubmission-single.php" method="post" style="margin-top:20px"> <select name="foo" size="5"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> </select> <select name="bar" size="5"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> </select> <div><input type="submit" value="Submit" /></div> </form> <script type="text/javascript"> $("select").multiselect({ multiple: false }); $("form").bind("submit", function(){ alert( $(this).serialize() ); }); </script> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/tests/visual/formsubmission-single.php
PHP
asf20
1,667
<cfparam name="form.foo" default=""> <cfparam name="form.bar" default=""> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery MultiSelect Plugin Tests</title> <link rel="stylesheet" type="text/css" href="../../jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/redmond/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="../../src/jquery.multiselect.js"></script> </head> <body> <h1>Form Submission Test</h1> <p>Testing to ensure the correct values are actually passed when the form is submitted.</p> <cfdump var="#form#" label="form scope"> <form action="formsubmission.cfm" method="post" style="margin-top:20px"> <select name="foo" multiple="multiple" size="5"> <option value="option1"<cfif listcontains(form.foo, "option1")> selected="selected"</cfif>>Option 1</option> <option value="option2"<cfif listcontains(form.foo, "option2")> selected="selected"</cfif>>Option 2</option> <option value="option3"<cfif listcontains(form.foo, "option3")> selected="selected"</cfif>>Option 3</option> <option value="option4"<cfif listcontains(form.foo, "option4")> selected="selected"</cfif>>Option 4</option> </select> <select name="bar" multiple="multiple" size="5"> <option value="option1"<cfif listcontains(form.bar, "option1")> selected="selected"</cfif>>Option 1</option> <option value="option2"<cfif listcontains(form.bar, "option2")> selected="selected"</cfif>>Option 2</option> <option value="option3"<cfif listcontains(form.bar, "option3")> selected="selected"</cfif>>Option 3</option> <option value="option4"<cfif listcontains(form.bar, "option4")> selected="selected"</cfif>>Option 4</option> </select> <div><input type="submit" value="Submit" /></div> </form> <script type="text/javascript"> $("select").multiselect(); $("form").bind("submit", function(){ alert( $(this).serialize() ); }); </script> </body> </html>
0x6a
trunk/libraries/ui/ui-multiselect/tests/visual/formsubmission.cfm
ColdFusion
asf20
2,253
.ui-multiselect { padding:2px 0 2px 4px; text-align:left } .ui-multiselect span.ui-icon { float:right } .ui-multiselect-single .ui-multiselect-checkboxes input { position:absolute !important; top: auto !important; left:-9999px; } .ui-multiselect-single .ui-multiselect-checkboxes label { padding:5px !important } .ui-multiselect-header { margin-bottom:3px; padding:3px 0 3px 4px } .ui-multiselect-header ul { font-size:0.9em } .ui-multiselect-header ul li { float:left; padding:0 10px 0 0 } .ui-multiselect-header a { text-decoration:none } .ui-multiselect-header a:hover { text-decoration:underline } .ui-multiselect-header span.ui-icon { float:left } .ui-multiselect-header li.ui-multiselect-close { float:right; text-align:right; padding-right:0 } .ui-multiselect-menu { display:none; padding:3px; position:absolute; z-index:10000; text-align: left } .ui-multiselect-checkboxes { position:relative /* fixes bug in IE6/7 */; overflow-y:auto } .ui-multiselect-checkboxes label { cursor:default; display:block; border:1px solid transparent; padding:3px 1px } .ui-multiselect-checkboxes label input { position:relative; top:1px } .ui-multiselect-checkboxes li { clear:both; font-size:0.9em; padding-right:3px } .ui-multiselect-checkboxes li.ui-multiselect-optgroup-label { text-align:center; font-weight:bold; border-bottom:1px solid } .ui-multiselect-checkboxes li.ui-multiselect-optgroup-label a { display:block; padding:3px; margin:1px 0; text-decoration:none } /* remove label borders in IE6 because IE6 does not support transparency */ * html .ui-multiselect-checkboxes label { border:none }
0x6a
trunk/libraries/ui/ui-multiselect/jquery.multiselect.css
CSS
asf20
1,599
/* Simplified Chinese initialisation for the jQuery UI multiselect plugin. */ /* Written by Ben (ben@zfben.com). */ (function ( $ ) { $.extend($.ech.multiselect.prototype.options, { checkAllText: '全選', uncheckAllText: '清空', noneSelectedText: '請選擇', selectedText: '# 已選擇' }); })( jQuery );
0x6a
trunk/libraries/ui/ui-multiselect/i18n/jquery.multiselect.zh-tw.js
JavaScript
asf20
316
/* Simplified Chinese initialisation for the jQuery UI multiselect plugin. */ /* Written by Ben (ben@zfben.com). */ (function ( $ ) { $.extend($.ech.multiselect.prototype.options, { checkAllText: '全选', uncheckAllText: '清空', noneSelectedText: '请选择', selectedText: '# 已选择' }); })( jQuery );
0x6a
trunk/libraries/ui/ui-multiselect/i18n/jquery.multiselect.zh-cn.js
JavaScript
asf20
316
/* Brazilian initialisation for the jQuery UI multiselect plugin. */ /* Written by Vinícius Fontoura Corrêa (vinusfc@gmail.com). */ (function ( $ ) { $.extend($.ech.multiselect.prototype.options, { checkAllText: 'Marcar todos', uncheckAllText: 'Desmarcar todos', noneSelectedText: 'Selecione as opções', selectedText: '# selecionado' }); })( jQuery );
0x6a
trunk/libraries/ui/ui-multiselect/i18n/jquery.multiselect.br.js
JavaScript
asf20
364
/* Japanese initialisation for the jQuery UI multiselect plugin. */ /* Written by Daisuke (daisuketaniwaki@gmail.com). */ (function ( $ ) { $.extend($.ech.multiselect.prototype.options, { checkAllText: 'すべて選択', uncheckAllText: '選択解除', noneSelectedText: '選択してください', selectedText: '#つ選択中' }); })( jQuery );
0x6a
trunk/libraries/ui/ui-multiselect/i18n/jquery.multiselect.ja.js
JavaScript
asf20
370
/* Italian initialization for the jQuery UI multiselect plugin. */ /* Written by Vincenzo Farruggia(mastropinguino@networky.net). */ (function ( $ ) { $.extend($.ech.multiselect.prototype.options, { checkAllText: 'Seleziona tutto', uncheckAllText: 'Deseleziona tutto', noneSelectedText: 'Seleziona le opzioni', selectedText: '# selezionati' }); })( jQuery );
0x6a
trunk/libraries/ui/ui-multiselect/i18n/jquery.multiselect.it.js
JavaScript
asf20
367
/* Spanish initialisation for the jQuery UI multiselect plugin. */ /* Written by Vinícius Fontoura Corrêa (vinusfc@gmail.com). */ (function ( $ ) { $.extend($.ech.multiselectfilter.prototype.options, { label: "Filtro:", placeholder: "Introduzca una palabra" }); })( jQuery );
0x6a
trunk/libraries/ui/ui-multiselect/i18n/jquery.multiselect.filter.es.js
JavaScript
asf20
283
/* Japanese initialisation for the jQuery UI multiselect plugin. */ /* Written by Daisuke (daisuketaniwaki@gmail.com). */ (function ( $ ) { $.extend($.ech.multiselectfilter.prototype.options, { label: '絞込み:', placeholder: 'キーワードを入力してください' }); })( jQuery );
0x6a
trunk/libraries/ui/ui-multiselect/i18n/jquery.multiselect.filter.ja.js
JavaScript
asf20
298
/* Polish initialisation for the jQuery UI multiselect plugin. */ /* Written by Tomasz Mazur (contact@tomaszmazur.eu). */ (function ( $ ) { $.extend($.ech.multiselectfilter.prototype.options, { label: "Filtruj:", placeholder: "Wprowadź słowa kluczowe" }); })( jQuery );
0x6a
trunk/libraries/ui/ui-multiselect/i18n/jquery.multiselect.filter.pl.js
JavaScript
asf20
277
/* French initialisation for the jQuery UI multiselect plugin. */ /* Written by Charles SANQUER (charles.sanquer@spyrit.net). */ (function ( $ ) { $.extend($.ech.multiselect.prototype.options, { checkAllText: 'Tout cocher', uncheckAllText: 'Tout décocher', noneSelectedText: 'Selectionner les options', selectedText: '# selectionnés' }); })( jQuery );
0x6a
trunk/libraries/ui/ui-multiselect/i18n/jquery.multiselect.fr.js
JavaScript
asf20
361
/* Brazilian initialisation for the jQuery UI multiselect plugin. */ /* Written by Yusuf Özer (realsby@gmail.com). */ (function ( $ ) { $.extend($.ech.multiselectfilter.prototype.options, { label: "Filtre:", placeholder: "Bir kelime yazın" }); })( jQuery );
0x6a
trunk/libraries/ui/ui-multiselect/i18n/jquery.multiselect.filter.tr.js
JavaScript
asf20
267
/* Italian initialization for the jQuery UI multiselect plugin. */ /* Written by Vincenzo Farruggia(mastropinguino@networky.net). */ (function ( $ ) { $.extend($.ech.multiselectfilter.prototype.options, { label: "Filtro:", placeholder: "Digita una parola chiave" }); })( jQuery );
0x6a
trunk/libraries/ui/ui-multiselect/i18n/jquery.multiselect.filter.it.js
JavaScript
asf20
287
/* Czech initialisation for the jQuery UI multiselect plugin. */ /* Written by Michi (michi.m@gmail.com). */ (function ( $ ) { $.extend($.ech.multiselectfilter.prototype.options, { label: "Filtrovat:", placeholder: "Napište výraz" }); })( jQuery );
0x6a
trunk/libraries/ui/ui-multiselect/i18n/jquery.multiselect.filter.cs.js
JavaScript
asf20
258
/* Russian initialisation for the jQuery UI multiselect plugin. */ /* Written by Artem Packhomov (gorblnu4@gmail.com). */ (function ( $ ) { $.extend($.ech.multiselect.prototype.options, { checkAllText: 'Отметить все', uncheckAllText: 'Снять отметку со всех', noneSelectedText: 'Выберите из списка', selectedText: 'Выбрано #' }); })( jQuery );
0x6a
trunk/libraries/ui/ui-multiselect/i18n/jquery.multiselect.ru.js
JavaScript
asf20
403
/* Brazilian initialisation for the jQuery UI multiselect plugin. */ /* Written by Vinícius Fontoura Corrêa (vinusfc@gmail.com). */ (function ( $ ) { $.extend($.ech.multiselectfilter.prototype.options, { label: "Filtro:", placeholder: "Entre com a palavra" }); })( jQuery );
0x6a
trunk/libraries/ui/ui-multiselect/i18n/jquery.multiselect.filter.br.js
JavaScript
asf20
282
/* Spanish initialisation for the jQuery UI multiselect plugin. */ /* Written by Vinius Fontoura Correa(vinusfc@gmail.com). */ (function ( $ ) { $.extend($.ech.multiselect.prototype.options, { checkAllText: 'Marca todas', uncheckAllText: 'Desmarque todas', noneSelectedText: 'Seleccione las opciones', selectedText: '# seleccionado' }); })( jQuery );
0x6a
trunk/libraries/ui/ui-multiselect/i18n/jquery.multiselect.es.js
JavaScript
asf20
359