diff --git a/capturas/Originales/candidato.png b/capturas/Originales/candidato.png new file mode 100644 index 0000000..c8666c1 Binary files /dev/null and b/capturas/Originales/candidato.png differ diff --git a/capturas/Originales/candidatos.png b/capturas/Originales/candidatos.png new file mode 100644 index 0000000..b179d9a Binary files /dev/null and b/capturas/Originales/candidatos.png differ diff --git a/capturas/Originales/elements.png b/capturas/Originales/elements.png new file mode 100644 index 0000000..8e45374 Binary files /dev/null and b/capturas/Originales/elements.png differ diff --git a/capturas/Originales/login.png b/capturas/Originales/login.png new file mode 100644 index 0000000..5e9930d Binary files /dev/null and b/capturas/Originales/login.png differ diff --git a/capturas/Originales/reports.png b/capturas/Originales/reports.png new file mode 100644 index 0000000..8845e89 Binary files /dev/null and b/capturas/Originales/reports.png differ diff --git a/capturas/Originales/tablero.png b/capturas/Originales/tablero.png new file mode 100644 index 0000000..2369396 Binary files /dev/null and b/capturas/Originales/tablero.png differ diff --git a/capturas/candidato.png b/capturas/candidato.png new file mode 100644 index 0000000..d3910bd Binary files /dev/null and b/capturas/candidato.png differ diff --git a/capturas/candidato.psd b/capturas/candidato.psd new file mode 100644 index 0000000..f67a376 Binary files /dev/null and b/capturas/candidato.psd differ diff --git a/capturas/candidatos.png b/capturas/candidatos.png new file mode 100644 index 0000000..189ecf9 Binary files /dev/null and b/capturas/candidatos.png differ diff --git a/capturas/candidatos.psd b/capturas/candidatos.psd new file mode 100644 index 0000000..b6af15d Binary files /dev/null and b/capturas/candidatos.psd differ diff --git a/capturas/elements.png b/capturas/elements.png new file mode 100644 index 0000000..8e45374 Binary files /dev/null and b/capturas/elements.png differ diff --git a/capturas/login.png b/capturas/login.png new file mode 100644 index 0000000..81ba276 Binary files /dev/null and b/capturas/login.png differ diff --git a/capturas/login.psd b/capturas/login.psd new file mode 100644 index 0000000..cab32bc Binary files /dev/null and b/capturas/login.psd differ diff --git a/capturas/reports.png b/capturas/reports.png new file mode 100644 index 0000000..8845e89 Binary files /dev/null and b/capturas/reports.png differ diff --git a/capturas/tablero.png b/capturas/tablero.png new file mode 100644 index 0000000..1ea9112 Binary files /dev/null and b/capturas/tablero.png differ diff --git a/capturas/tablero.psd b/capturas/tablero.psd new file mode 100644 index 0000000..3c16f33 Binary files /dev/null and b/capturas/tablero.psd differ diff --git a/referencia/Droid-Sans.zip b/referencia/Droid-Sans.zip new file mode 100644 index 0000000..f485774 Binary files /dev/null and b/referencia/Droid-Sans.zip differ diff --git a/referencia/Iconos/iconSweets.psd b/referencia/Iconos/iconSweets.psd new file mode 100644 index 0000000..cc09203 Binary files /dev/null and b/referencia/Iconos/iconSweets.psd differ diff --git a/referencia/Iconos/iconsweets.zip b/referencia/Iconos/iconsweets.zip new file mode 100644 index 0000000..2e1791e Binary files /dev/null and b/referencia/Iconos/iconsweets.zip differ diff --git a/referencia/Iconos/iconsweets2.zip b/referencia/Iconos/iconsweets2.zip new file mode 100644 index 0000000..c523e49 Binary files /dev/null and b/referencia/Iconos/iconsweets2.zip differ diff --git a/referencia/Iconos/users.psd b/referencia/Iconos/users.psd new file mode 100644 index 0000000..67443f5 Binary files /dev/null and b/referencia/Iconos/users.psd differ diff --git a/referencia/PSD/buscar.psd b/referencia/PSD/buscar.psd new file mode 100644 index 0000000..3def172 Binary files /dev/null and b/referencia/PSD/buscar.psd differ diff --git a/referencia/PSD/contraseña.psd b/referencia/PSD/contraseña.psd new file mode 100644 index 0000000..3138f0e Binary files /dev/null and b/referencia/PSD/contraseña.psd differ diff --git a/referencia/PSD/usuario.psd b/referencia/PSD/usuario.psd new file mode 100644 index 0000000..e874eae Binary files /dev/null and b/referencia/PSD/usuario.psd differ diff --git a/referencia/documentation.html b/referencia/documentation.html new file mode 100644 index 0000000..d6ab9ff --- /dev/null +++ b/referencia/documentation.html @@ -0,0 +1,550 @@ + + + + +Documentation | Mandy Lane Premium Admin Template by Mienard Lumaad (mlumaad) + + + + + +
+
+

"Mandy Lane Premium Admin Template" Documentation v1.0

+

HighFive Landing Page Template

+

Created: 11/29/2011 By: Mienard Lumaad (mlumaad)

+ +

Thank you for downloading my theme. If you have any questions that are beyond the scope of this help file, please feel free to email via our contact page here. Thanks so much!

+ +

Table of Contents

+ +
    +
  1. HTML Structure
  2. +
  3. CSS Files & Structure
  4. +
  5. Javascript + +
  6. +
  7. PHP Code Explanation
  8. +
  9. Sources & Credits
  10. +
+ +
+ +

1. HTML Structure

+ +

This theme is a flexible layout with up to six columns. All of the information within the header area is nested within a div with a class of "header".

+
+<div class="header">
+  
+  <form id="search" action="" method="POST">
+  	<input type="text" name="keyword" /> <button class="searchbutton"></button>
+  </form>
+  
+  <div class="topheader">
+  	<ul class="notebutton">
+  		<li class="note"> ... </li>
+	</ul>
+  </div><!--topheader-->
+  
+  <!---logo--->
+  <a href=""><img src="images/logo2.png" alt="Logo" /></a>
+  
+  <div class="tabmenu">
+	...
+  </div><!--tabmenu-->
+  
+  <div class="accountinfo">
+  	...
+  </div><!--accountinfo-->
+  
+</div><!--header-->
+        
+ +

All of the information within the left area is nested within a div with a class of "sidebar".

+ +
+<div class="sidebar">
+   <div id="accordion">
+      <h3 class="open">Main Navigation</h3>
+      <div class="content" style="display: block;">
+         <ul class="leftmenu">
+            <li> ... </li>
+         </ul>
+      </div>
+   </div>
+   //// additional content here
+</div><!--sidebar-->
+
+
+

Grid

+ +

File: grid.html

+ +

All of the information within the main area is nested within a div with a class of "maincontent". You can divide it by columns if you like by using the following tags listed below

+ +

Two Columns

+
<div class="one_half"> content here... </div>
+<div class="one_half last> content here ... </div>
+ +

Three Columns

+
<div class="one_third"> content here ... </div>
+<div class="one_third"> content here ... </div>
+<div class="one_third last"> content here ... </div>
+ +

This theme also allows up to 6 columns by using a class of two_third, one_fourth, three_fourth, one_fifth, four_fifth, one_sixth and five_sixth. You can also create 2 columns using a combination of two_third and one_third. Make sure to add a class name of "last" to prevent your page messed up

+ +
+ +

Widget Box

+ +

Files: dashboard.html, elements.html

+ +

This theme have 2 widget box styles by using a class name of widgetbox and widgetbox2. The html code for widget box should be like in below:

+ +
+<div class="widgetbox">
+   <h3><span>Title goes here ... </span></h3>
+   <div class="content">
+      content goes here ...
+   </div><!-- content -->
+</div><!-- widgetbox -->
+ +
+ +

Sub Menu

+

Files: users.html, gallery.html

+

You can use submenu anywhere in the page by using the following code below:

+
+<ul class="submenu">
+   <li class="current"><a href="">All (2430)</a></li>
+   <li><a href="">Active (2000)</a></li>
+   <li><a href="">Inactive (430)</a></li>
+</ul>
+ +
+ +

Progress Bars

+

Files: dashboard.html, reports.html

+

This template have two types of progress bar by using the class name "bar" and "bar2" inside a class name of progress.

+ +
+<div class="progress">
+   Storage
+   <div class="bar2">
+      <div class="value bluebar" style="width: 60%;"><small>60%</small></div>
+   </div>
+</div><!--progress-->
+ +
+ +

2. CSS Files & Structure

+ +

This template contains some general styling, such as anchor tag colors, font-sizes, etc. Keep in mind, that these values might be overridden somewhere else in the file. Below is what css styles are arranged in style.css. CSS files are located in folder /css.

+ +
+1. General Styles
+2. Notification messages
+3. Login Page
+4. Top Header
+5. Tab Menu
+6. Side Bar
+7. Columns
+8. Main content styles
+9. Buttons
+10. Widget Box
+11. Progress Bar
+12. Sub Menu
+13. Form Styling
+14. Standard Table
+15. Pagination
+16. Gallery
+17. Elements
+18. Icons
+19. Invoice
+20. Custom Styles
+
+ +
+ +

3. Javascript

+ +

This theme imports a total of 25 Javascript files.

+ +

Custom

+

Folder: js/custom/ - 6 scripts for doing the animation, effects, functionality, etc.

+ + +

Plugins

+

Folder: js/plugins/ - 19 scripts used for the plugins

+ + +

Before using any of the plugins above in your page, make sure to add the jQuery in your head.

+ +
<script type="text/javascript" src="js/plugins/jquery-1.7.min.js"></script>
+
+ +

Calendar

+ +

This template uses FullCalendar v1.5.2 by Adam Shaw. You can read the full documentation for this calendar to http://arshaw.com/fullcalendar/docs/

+

To add the calendar in your page, simply add the following code below into your head tag.

+
<script type="text/javascript" src="js/plugins/fullcalendar.min.js"></script>
<script type="text/javascript" src="js/custom/calendar.js"></script> +
+

Add the code below anywhere you want the calendar to appear.

+
<div id="calendar"></div>
+
<div id='external-events'>
<div class='external-event'>My friend's birthday event</div>
<div class='external-event'>My wedding</div>
<div class='external-event'>Company party</div>
<div class='external-event'>Island hopping event</div>
<div class='external-event'>Fun run event</div>
</div>
+ +
+

Color Picker

+ +

This template uses ColorPicker by Stefan Petre. You can visit www.eyecon.ro to use more of the options and methods for this plugin. +

To add colorpicker in your page, simply add the below code into your head tag

+
<script type="text/javascript" src="js/plugins/jquery.colorbox-min.js"></script>
+<script type="text/javascript">
+jQuery(document).ready(function(){
+	jQuery('#colorpicker').ColorPicker({
+       onSubmit: function(hsb, hex, rgb, el) {
+          jQuery(el).val(hex);
+             jQuery(el).ColorPickerHide();
+          },
+       onBeforeShow: function () {
+          jQuery(this).ColorPickerSetColor(this.value);
+       }
+    }).bind('keyup', function(){ jQuery(this).ColorPickerSetColor(this.value);});
+});
+</script>
+ +

After you add the above code in your head, simply add the html code below anywhere you like the colopicker to display.

+ +
<input id="colorpicker" type="text" />
+ +
+ +

Datepicker

+ +

Datepicker is part of the jQuery UI plugin. To add this in your page a below code is added in the head.

+
<script type="text/javascript" src="js/plugins/jquery-ui-1.8.16.custom.min.js"></script>
+<script type="text/javascript">
+jQuery(document).ready(function(){
+	jQuery( "#datepicker" ).datepicker();
+});
+</script>
+
+//add this anywhere in your page
+<input id="datepicker" type="text" class="width50" />
+ +
+

Growl Notification

+

This template uses growl notification (jGrowl) by Stan Lemon. You can use growl in any events of your scripts to display notification. You can use growl by adding the code below.

+
<script type="text/javascript" src="js/plugins/jquery.jgrowl.js"></script>
+<script type="text/javascript">
+jQuery(document).ready(function(){
+	//you can insert the below code in any events like click, hover,submit, focus, etc.
+	jQuery.jGrowl("Hello world!");
+});
+</script>
+ + +
+ +

Tabs

+ +

Tabs is part of the jQuery UI plugin. To add this in your page a below code is added in the head.

+
<script type="text/javascript" src="js/plugins/jquery-ui-1.8.16.custom.min.js"></script>
+<script type="text/javascript">
+jQuery(document).ready(function(){
+	jQuery( "#tabs" ).tabs();
+});
+</script>
+
+//add this anywhere in your page
+<div id="tabs">
+	<ul>
+		<li><a href="#tabs-1">Sample Tab A</a></li>
+		<li><a href="#tabs-2">Sample Tab B</a></li>
+		<li><a href="#tabs-3">Sample Tab C</a></li>
+	</ul>
+	<div id="tabs-1"> ... </div>
+	<div id="tabs-2"> ... </div>
+	<div id="tabs-3"> ... </div>
+</div><!-- #tabs -->
+ +
+ +

Accordion

+ +

Accordion is part of the jQuery UI plugin. To add this in your page a below code is added in the head.

+
<script type="text/javascript" src="js/plugins/jquery-ui-1.8.16.custom.min.js"></script>
+<script type="text/javascript">
+jQuery(document).ready(function(){
+	jQuery( ".accordion" ).accordion();
+});
+</script>
+
+//add this anywhere in your page
+<div class="accordion">
+	<h3>Title here</h3>
+	<div> content goes here... </div>
+	<h3>Title here</h3>
+	<div> content goes here... </div>
+	<h3>Title here</h3>
+	<div> content goes here... </div>
+</div><!-- accordion -->
+ + +
+ +

Custom Alert Box

+ +

This template uses custom alert boxes by Cory S.N. LaViska. To use this plugin, simply add the line of code below into your head.

+

Usage:

+

jAlert( message, [title, callback] )
+ jConfirm( message, [title, callback] )
+ jPrompt( message, [value, title, callback] )

+
<script type="text/javascript" src="js/plugins/jquery.alerts.js"></script>
+<script type="text/javascript">
+jQuery(document).ready(function(){
+	jQuery('button').click(function(){
jAlert('This is a custom alert box', 'Alert Dialog');
}); +}); +</script> + +//add this anywhere on your page +<button>Click me to view custom alert</button>
+ +
+ +

Slider

+ +

Slider is part of the jQuery UI plugin. More options available in jQuery UI website. To add this in your page a below code is added in the head.

+
<script type="text/javascript" src="js/plugins/jquery-ui-1.8.16.custom.min.js"></script>
+<script type="text/javascript">
+jQuery(document).ready(function(){
+	jQuery("#slider").slider({value: 40});
+});
+</script>
+
+//add this anywhere in your page
+<div id="slider"></div>
+ +
+ + + +

You can add sub menu anywhere in your page by adding the javascript code below

+
<script type="text/javascript">
+jQuery(document).ready(function(){
+	jQuery('.submenu a').click(function(){
+		var id = jQuery(this).attr('href');
+		jQuery('.submenu a').each(function(){
+			jQuery(this).parent().removeClass('current');
+			jQuery(jQuery(this).attr('href')).hide();
+		});
+		jQuery(this).parent().addClass('current');
+		jQuery(id).fadeIn();
+	});
+});
+</script>
+
+//add this anywhere in your page
+<ul class="submenu">
+	<li class="current"><a href="#gridview">Grid View</a></li>
+	<li><a href="#listview">List View</a></li>
+</ul>
+<div id="gridview"> ... </div>
+<div id="listview"> .. </div>
+ +
+

Drop Down Menu

+

+ This theme supports drop down menu to top menu of header by using this javascript code below. +

+ +
+jQuery(".subnav").css({display: "none"}); // Opera Fix
jQuery(".tabmenu li").hover(function(){
jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
},function(){
jQuery(this).find('ul:first').css({visibility: "hidden"});
});
+ +

Drop menu is using a line of styles below.

+ +
.tabmenu ul li .subnav { 
position: absolute; min-width: 200px; top: 39px; left: 0; display: none; z-index: 100; border: 1px solid #6785b0; border-bottom: 0; }
.tabmenu ul li .subnav li { display: block; float: none; background: none; }
.tabmenu ul li .subnav li a { display: block; background: #83a3ca; border-bottom: 1px solid #6785b0; color: #fff; }
.tabmenu ul li .subnav li:last-child a { background: #83a3ca; }
.tabmenu ul li .subnav li a:hover { background: #7293c1; color: #fff; }
.tabmenu ul li .subnav a span { padding: 5px 15px; text-transform: capitalize; text-shadow: 1px 1px #6785b0; }
.tabmenu ul li.current .subnav { border-color: #ccc; border-top: 0; }
.tabmenu ul li.current .subnav li a { background: #eee; border-bottom: 1px solid #ccc; color: #333; }
.tabmenu ul li.current .subnav li a:hover { background: #c8d9ed; }
.tabmenu ul li.current .subnav li a span { text-shadow: 1px 1px #f7f7f7; } +
+ + +
+

ColorBox

+

This theme uses ColorBox by Jack Moore to view images in lightbox. You can use colorbox by adding the code below.

+
<script type="text/javascript" src="js/plugins/jquery.colorbox-min.js"></script>
+<script type="text/javascript">
+	jQuery(".thumb").colorbox();
+</script>
+
+//sample
+<div class="thumb">
+	<a href="images/assets/thumb/large/thumb1.png" class="view">View Image</a>
+</div>
+ +
+ +

Charts

+ +

This template uses Flot to create chart for your reports or anywhere on your page. To use this plugin just add the line of code below.

+ +
<script type="text/javascript" src="js/plugins/jquery.flot.min.js"></script>
+<script type="text/javascript" src="js/plugins/jquery.flot.pie.min.js"></script>
+ +

To know how this theme implemented the flot you can open the file reports.js at js/custom/ folder.

+

To know more how to use this plugin you can visit the page at http://code.google.com/p/flot/

+ +
+

File Manager

+

This theme uses ElFinder File Manager to create a file manager anywhere in the page, simply by adding a line of code below in your head tag.

+
<script type="text/javascript" src="js/plugins/elfinder.min.js"></script>
+<script type="text/javascript">
+jQuery(document).ready(function() {
+	jQuery('#fileManager').elfinder({
+		url : 'php/connector.php',
+	})
+});
+</script>
+ +

You can browse other custom scripts in users.js and general.js for the left menu top header, etc.

+ +
+ +

Form Validation

+ +

This template uses form validation by Jörn Zaefferer. To use this plugin, simply add the line of code below

+
<script type="text/javascript" src="js/plugins/jquery.validate.min.js"></script>
+<script type="text/javascript">
+jQuery(document).ready(function(){
+	jQuery("#form").validate({
+		rules: {
+			name: "required",
+			email: {
+				required: true,
+				email: true,
+			},
+			occupation: "required"
+		},
+		messages: {
+			name: "Please enter your name",
+			email: "Please enter a valid email address",
+			occupation: "Please select your occupation"
+		}
+	});
+});
+</script>
+
+<form id="form" action="" method="post"> ... </form>
+ +
+ +

WYSIWYG Editor

+

This template uses WYSIWYG Editor by https://github.com/akzhan/jwysiwyg. We use this plugin by adding the line of code below.

+
<script type="text/javascript" src="js/plugins/wysiwyg/jquery.wysiwyg.js"></script>
+<script type="text/javascript" src="js/plugins/wysiwyg/wysiwyg.image.js"></script>
+<script type="text/javascript" src="js/plugins/wysiwyg/wysiwyg.link.js"></script>
+<script type="text/javascript" src="js/plugins/wysiwyg/wysiwyg.table.js"></script>
+<script type="text/javascript">
+jQuery(document).ready(function() {
+	jQuery('#wysiwyg').wysiwyg();
+});
+</script>
+
+<textarea id="wysiwyg" cols="130" rows="15"></textarea> 
+ +
+ +

PHP Code Explanation

+ +

I am using PHP files required in order to use the ElFinder File Manager. Open the file php/connector.php. Go to line 30 and change the following line of code below

+
$opts = array(
+	'root'            => '../files',			// path to root directory
+	'URL'             => 'http://yourdomain/files/',	// root directory URL
+	'rootAlias'       => 'Home',				// display this instead of root directory name
+ +
+ +

Sources & Credits

+ +

I've used the following images, icons or other files as listed.

+ + + + +

Once again, thank you so much for purchasing this theme. As I said at the beginning, I'd be glad to help you if you have any questions relating to this theme. No guarantees, but I'll do my best to assist. If you have a more general question relating to the themes on ThemeForest, you might consider visiting the forums and asking your question in the "Item Discussion" section.

+ + Mienard Lumaad (mlumaad) + +

+
+
+ + diff --git a/referencia/mandy-lane-premium-admin-template.zip b/referencia/mandy-lane-premium-admin-template.zip new file mode 100644 index 0000000..47c9900 Binary files /dev/null and b/referencia/mandy-lane-premium-admin-template.zip differ diff --git a/referencia/template/404.html b/referencia/template/404.html new file mode 100644 index 0000000..3434298 --- /dev/null +++ b/referencia/template/404.html @@ -0,0 +1,104 @@ + + + + +404 Page Not Found | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ + + + Logo + +
+ +
+ +
+ Avatar +
+

John Doe

+ youremail@domain.com +

+ Account Settings Logout +

+
+
+
+ +
+

Page Not Found

+
+

The page you are looking for is not found.

+
+ +
+ + + + diff --git a/referencia/template/buttons.html b/referencia/template/buttons.html new file mode 100644 index 0000000..82c5a87 --- /dev/null +++ b/referencia/template/buttons.html @@ -0,0 +1,255 @@ + + + + +Buttons & Icons | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ + + + Logo + +
+ +
+ +
+ Avatar +
+

John Doe

+ youremail@domain.com +

+ Account Settings Logout +

+
+
+
+ + + + + +
+ + + +
+ +

Buttons & Icons

+ +
+
+

Small Icons

+
+ + + + + + + + + + + + + + + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ + + + + +
+ +
+ +
+ +
+ + + + + diff --git a/referencia/template/calendar.html b/referencia/template/calendar.html new file mode 100644 index 0000000..42dbfcb --- /dev/null +++ b/referencia/template/calendar.html @@ -0,0 +1,165 @@ + + + + +Calendar | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ + + + Logo + +
+ +
+ +
+ Avatar +
+

John Doe

+ youremail@domain.com +

+ Account Settings Logout +

+
+
+
+ + + + + +
+ + + +
+ +
+
+
+
+
+
+ +
+
+
+

Draggable Events

+
+ +
+
My friend's birthday event
+
My wedding
+
Company party
+
Island hopping event
+
Fun run event
+
+

Drag the events to the calendar to set a schedule.

+
+
+
+
+ +
+ +
+ +
+ + + + diff --git a/referencia/template/css/ie7.css b/referencia/template/css/ie7.css new file mode 100644 index 0000000..9105ce7 --- /dev/null +++ b/referencia/template/css/ie7.css @@ -0,0 +1,7 @@ +.header { z-index: 10; } +.tabmenu { top: 52px; z-index: -1; } +.topheader ul li { position: relative; } +.loginbox button { padding: 5px 8px; } +#search input { padding-top: 6px; } +.dropbox ul { position: relative; z-index: 100; } +.notification { position: relative; z-index: 100; } \ No newline at end of file diff --git a/referencia/template/css/ie8.css b/referencia/template/css/ie8.css new file mode 100644 index 0000000..b2f7746 --- /dev/null +++ b/referencia/template/css/ie8.css @@ -0,0 +1,2 @@ +.loginbox button { padding: 7px 14px; } +#search input { padding-top: 6px; } diff --git a/referencia/template/css/ie9.css b/referencia/template/css/ie9.css new file mode 100644 index 0000000..2d30423 --- /dev/null +++ b/referencia/template/css/ie9.css @@ -0,0 +1 @@ +.loginbox button { padding: 7px 14px; } diff --git a/referencia/template/css/plugins/colorbox.css b/referencia/template/css/plugins/colorbox.css new file mode 100644 index 0000000..7edc339 --- /dev/null +++ b/referencia/template/css/plugins/colorbox.css @@ -0,0 +1,37 @@ +/* + ColorBox Core Style: + The following CSS is consistent between example themes and should not be altered. +*/ +#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} +#cboxOverlay{position:fixed; width:100%; height:100%;} +#cboxMiddleLeft, #cboxBottomLeft{clear:left;} +#cboxContent{position:relative;} +#cboxLoadedContent{overflow:auto;} +#cboxTitle{margin:0;} +#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;} +#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} +.cboxPhoto{float:left; margin:auto; border:0; display:block;} +.cboxIframe{width:100%; height:100%; display:block; border:0;} + +/* + User Style: + Change the following styles to modify the appearance of ColorBox. They are + ordered & tabbed in a way that represents the nesting of the generated HTML. +*/ +#cboxOverlay{background:#000;} +#colorbox{} + #cboxContent{margin-top:20px;} + .cboxIframe{background:#fff;} + #cboxError{padding:50px; border:1px solid #ccc;} + #cboxLoadedContent{border:5px solid #000; background:#fff;} + #cboxTitle{position:absolute; top:-20px; left:0; color:#ccc;} + #cboxCurrent{position:absolute; top:-20px; right:0px; color:#ccc;} + #cboxSlideshow{position:absolute; top:-20px; right:90px; color:#fff;} + #cboxPrevious{position:absolute; top:50%; left:5px; margin-top:-32px; background:url(../../images/colorbox/controls.png) no-repeat top left; width:28px; height:65px; text-indent:-9999px;} + #cboxPrevious:hover{background-position:bottom left;} + #cboxNext{position:absolute; top:50%; right:5px; margin-top:-32px; background:url(../../images/colorbox/controls.png) no-repeat top right; width:28px; height:65px; text-indent:-9999px;} + #cboxNext:hover{background-position:bottom right;} + #cboxLoadingOverlay{background:#000;} + #cboxLoadingGraphic{background:url(../../images/colorbox/loading.gif) no-repeat center center;} + #cboxClose{position:absolute; top:5px; right:5px; display:block; background:url(../../images/colorbox/controls.png) no-repeat top center; width:38px; height:19px; text-indent:-9999px;} + #cboxClose:hover{background-position:bottom center;} \ No newline at end of file diff --git a/referencia/template/css/plugins/colorpicker.css b/referencia/template/css/plugins/colorpicker.css new file mode 100644 index 0000000..268db0e --- /dev/null +++ b/referencia/template/css/plugins/colorpicker.css @@ -0,0 +1,161 @@ +.colorpicker { + width: 356px; + height: 176px; + overflow: hidden; + position: absolute; + background: url(../../images/colorpicker/colorpicker_background.png); + font-family: Arial, Helvetica, sans-serif; + display: none; +} +.colorpicker_color { + width: 150px; + height: 150px; + left: 14px; + top: 13px; + position: absolute; + background: #f00; + overflow: hidden; + cursor: crosshair; +} +.colorpicker_color div { + position: absolute; + top: 0; + left: 0; + width: 150px; + height: 150px; + background: url(../../images/colorpicker/colorpicker_overlay.png); +} +.colorpicker_color div div { + position: absolute; + top: 0; + left: 0; + width: 11px; + height: 11px; + overflow: hidden; + background: url(../../images/colorpicker/colorpicker_select.gif); + margin: -5px 0 0 -5px; +} +.colorpicker_hue { + position: absolute; + top: 13px; + left: 171px; + width: 35px; + height: 150px; + cursor: n-resize; +} +.colorpicker_hue div { + position: absolute; + width: 35px; + height: 9px; + overflow: hidden; + background: url(../../images/colorpicker/colorpicker_indic.gif) left top; + margin: -4px 0 0 0; + left: 0px; +} +.colorpicker_new_color { + position: absolute; + width: 60px; + height: 30px; + left: 213px; + top: 13px; + background: #f00; +} +.colorpicker_current_color { + position: absolute; + width: 60px; + height: 30px; + left: 283px; + top: 13px; + background: #f00; +} +.colorpicker input { + background-color: transparent; + border: 1px solid transparent; + position: absolute; + font-size: 10px; + font-family: Arial, Helvetica, sans-serif; + color: #898989; + top: 4px; + right: 11px; + text-align: right; + margin: 0; + padding: 0; + height: 11px; +} +.colorpicker_hex { + position: absolute; + width: 72px; + height: 22px; + background: url(../../images/colorpicker/colorpicker_hex.png) top; + left: 212px; + top: 142px; +} +.colorpicker_hex input { + right: 6px; +} +.colorpicker_field { + height: 22px; + width: 62px; + background-position: top; + position: absolute; +} +.colorpicker_field span { + position: absolute; + width: 12px; + height: 22px; + overflow: hidden; + top: 0; + right: 0; + cursor: n-resize; +} +.colorpicker_rgb_r { + background-image: url(../../images/colorpicker/colorpicker_rgb_r.png); + top: 52px; + left: 212px; +} +.colorpicker_rgb_g { + background-image: url(../../images/colorpicker/colorpicker_rgb_g.png); + top: 82px; + left: 212px; +} +.colorpicker_rgb_b { + background-image: url(../../images/colorpicker/colorpicker_rgb_b.png); + top: 112px; + left: 212px; +} +.colorpicker_hsb_h { + background-image: url(../../images/colorpicker/colorpicker_hsb_h.png); + top: 52px; + left: 282px; +} +.colorpicker_hsb_s { + background-image: url(../../images/colorpicker/colorpicker_hsb_s.png); + top: 82px; + left: 282px; +} +.colorpicker_hsb_b { + background-image: url(../../images/colorpicker/colorpicker_hsb_b.png); + top: 112px; + left: 282px; +} +.colorpicker_submit { + position: absolute; + width: 22px; + height: 22px; + background: url(../../images/colorpicker/colorpicker_submit.png) top; + left: 322px; + top: 142px; + overflow: hidden; +} +.colorpicker_focus { + background-position: center; +} +.colorpicker_hex.colorpicker_focus { + background-position: bottom; +} +.colorpicker_submit.colorpicker_focus { + background-position: bottom; +} +.colorpicker_slider { + background-position: bottom; +} diff --git a/referencia/template/css/plugins/elfinder.css b/referencia/template/css/plugins/elfinder.css new file mode 100644 index 0000000..6b5cb18 --- /dev/null +++ b/referencia/template/css/plugins/elfinder.css @@ -0,0 +1,834 @@ + +/* file manager window */ + +.el-finder { + width:100%; + min-width:400px; + background-color:#eee; + font-size: 12px; + font-family: DroidSansRegular, Arial, Helvetica, sans-serif; +} + +.el-finder-undocked { + position:absolute; + min-width:400px; + border:1px solid #ccc; + padding:5px; +} + +/* error messages */ +.el-finder-err { + padding: 15px; + text-align:center; + background: #fee; + color: #cc0509; + border: 2px #844 solid; + border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px; +} + +/* disabled */ +.el-finder-disabled .el-finder-toolbar li, +.el-finder-disabled .el-finder-nav, +.el-finder-disabled .el-finder-cwd { + opacity:0.35; filter:Alpha(Opacity=35); +} + +.el-finder .el-finder-droppable { + background-color:#99ccff; +} +.el-finder .ui-selected { + background-color:#ccc; +/* background-color:#c5e4f9;*/ +} + +.el-finder input { + margin:0; + padding:0; + outline:none; + border:1px solid #ccc; +} + +/************************************/ +/* toolbar */ +/************************************/ + +.el-finder-toolbar ul { + padding:5px 7px; + margin:0; + list-style:none; +} + +.el-finder-toolbar ul li { + display: -moz-inline-stack; + display: inline-block; + zoom: 1; + *display: inline; + vertical-align: top; + height:22px; + width:23px; + margin:0 2px; + padding:0; + background:url('../../images/filemanager/toolbar.png') no-repeat; + border:1px solid #ccc; + border-radius:3px; + -moz-border-radius:3px; + -webkit-border-radius:3px; +} +.el-finder-toolbar ul li.delim { + border:none; + width:3px; + background-position: 1px -610px; +} + +.el-finder-toolbar ul li.el-finder-tb-hover { + border:1px solid #fff; + background-color:#ccc; +} + +.el-finder-toolbar ul li.disabled { opacity:0.35; filter:Alpha(Opacity=35); } + +.el-finder-toolbar ul li.back { background-position: 3px -171px; } +.el-finder-toolbar ul li.reload { background-position: 3px -192px; } +.el-finder-toolbar ul li.select { background-position: 3px -214px; } +.el-finder-toolbar ul li.open { background-position: 4px -235px; } +.el-finder-toolbar ul li.mkdir { background-position: 4px -258px; } +.el-finder-toolbar ul li.mkfile { background-position: 4px -280px; } +.el-finder-toolbar ul li.upload { background-position: 3px -305px; } +.el-finder-toolbar ul li.rm { background-position: 3px -330px; } +.el-finder-toolbar ul li.copy { background-position: 3px -356px; } +.el-finder-toolbar ul li.paste { background-position: 3px -381px; } +.el-finder-toolbar ul li.rename { background-position: 3px -407px; } +.el-finder-toolbar ul li.edit { background-position: 4px -435px; } +.el-finder-toolbar ul li.info { background-position: 3px -462px; } +.el-finder-toolbar ul li.help { background-position: 3px -487px; } +.el-finder-toolbar ul li.icons { background-position: 3px -537px; } +.el-finder-toolbar ul li.list { background-position: 3px -557px; } +.el-finder-toolbar ul li.uncompress { background-position: 3px -583px; } +.el-finder-toolbar ul li.resize { background-position: 3px -656px; } +.el-finder-toolbar ul li.quicklook { background-position: 3px -726px; } + +.el-finder-dock-button { + width:19px; + height:19px; + float:right; + margin: 2px; + border:1px solid #ccc; + border-radius:3px; + -moz-border-radius:3px; + -webkit-border-radius:3px; + background:url('../../images/filemanager/toolbar.png') 2px -705px no-repeat; +} + +.ui-dialog .el-finder-dock-button { + background-position:2px -681px; +} + +.el-finder-dock-button-hover { + background-color:#ccc; + border:1px solid #fff; +} + +/**********************************************************/ +/* workzone, container for navigation and current folder */ +/**********************************************************/ + +.el-finder-workzone { + background-color:#f7f7f7; + border-top:1px solid #ccc; + border-bottom:1px solid #ccc; + position:relative; +} + +.el-finder-spinner { + position:absolute; + top:37%; + left:37%; + width:250px; + height:50px; + background:transparent url(../../images/filemanager/spinner.gif) 50% 50% no-repeat; + display:none; +} + +/* error in workzone */ +.el-finder-workzone p.el-finder-err { + display:none; + position:absolute; + left:37%; + top:20px; +} + +/* navigation and current directory */ +.el-finder-nav, .el-finder-cwd { + height:350px; + overflow:auto; +} + +/************************************/ +/* navigation */ +/************************************/ + +.el-finder-nav { + float:left; + width : 200px; + background:#fff; +} + +.el-finder-nav .ui-resizable-e { + right:0; +} + +/* folders tree */ +.el-finder-nav ul { + list-style:none; + margin:0; + padding:0; +} + +.el-finder-nav ul li { + clear:both; +} + +ul.el-finder-tree, ul.el-finder-places { + margin-bottom:1em; +} + +.el-finder-nav ul li ul { + margin-left:12px; +} + +.el-finder-nav ul div { + width:12px; + height:20px; + float:left; + margin-right:23px; +} + +.el-finder-nav a, .el-finder-nav div.collapsed { + background-image:url(../../images/filemanager/toolbar.png); + background-repeat:no-repeat; +} +.el-finder-nav div.collapsed { + background-position: -1px 7px; +} +.el-finder-nav div.expanded { + background-position: -1px -9px; +} + +.el-finder-nav a { + display: block; + white-space:nowrap; + line-height:20px; + color:#444; + cursor:default; + text-decoration:none; + outline:none; + background-position: 15px -56px; + font-size: 11px; +} + +.el-finder-nav a.dropbox { + background-position: 15px -80px; +} +.el-finder-nav a.readonly { + background-position: 15px -104px; +} +.el-finder-nav a.noaccess { + background-position: 15px -750px; +} + +.el-finder-nav a.selected { +/* background-color:#ccc;*/ + background-color:#c5e4f9; + background-position: 15px -128px; +} + +.el-finder-nav a.el-finder-tree-root { + background-position: 15px -30px; + font-weight:bold; + font-size: 11px; +} + +.el-finder-nav a.el-finder-places-root { + background-position: 15px -152px; + font-weight:bold; + font-size: 11px; + margin-top: 5px; +} + +.el-finder-nav ul.el-finder-tree .el-finder-droppable { + background-position: 15px -237px; +} + + +/***********************************/ +/* current working directory */ +/************************************/ + +.el-finder-cwd { + border-left:1px solid #ddd; + padding:10px; +} + +/********** view: icons ************/ +.el-finder-cwd div { + width: 81px; + display: -moz-inline-stack; + display: inline-block; + vertical-align: top; + zoom: 1; + *display: inline; + margin:0 3px 3px 0; + padding:1px 0; + text-align:center; + border-radius:2px; + -moz-border-radius:2px; + -webkit-border-radius:2px; + color:#333; + background-color:transparent; +} + + +.el-finder-cwd p, +.el-finder-ql p { + width:48px; + height:48px; + margin:1px auto; + padding:0; + border-radius:5px; + -moz-border-radius:5px; + -webkit-border-radius:5px; + background: url('../../images/filemanager/icons-big.png') -1px 1px no-repeat; +} + +/* mimetypes */ + +.directory p { background-position: 0 -50px; } +.application p,.x-java p { background-position: -1px -150px; } +.audio p { background-position: -1px -300px; } +.image p { background-position: -1px -250px; } +.text p, .x-empty p { background-position: -1px -200px; } +.video p { background-position: -1px -350px; } +.vnd-adobe-photoshop p, .postscript p { background-position: 0 -250px; } +/* texts */ +.rtf p, .rtfd p { background-position: 0 -400px; } +.html p { background-position: 0 -550px; } +.css p { background-position: 0 -600px; } +.javascript p, .x-javascript p { background-position: 0 -650px; } +.x-perl p { background-position: 0 -700px; } +.x-python p { background-position: 0 -750px; } +.x-ruby p { background-position: 0 -800px; } +.x-sh p, .x-shellscript p { background-position: 0 -850px; } +.x-c p, .x-java-source p { background-position: 0 -900px; } +.x-php p { background-position: 0 -950px; } +.xml p { background-position: 0 -1000px; } +/* applications */ +.vnd-ms-office p, +.msword p, +.vnd-ms-word p, +.vnd-oasis-opendocument-text p, +.ms-excel p, +.vnd-ms-excel p, +.vnd-oasis-opendocument-spreadsheet p, +.vnd-ms-powerpoint p, +.vnd-oasis-opendocument-presentation p { background-position: 0 -500px; } +.pdf p { background-position: 0 -450px; } +.x-shockwave-flash p { background-position: 0 -1250px; } +/* archives */ +.zip p, .x-7z-compressed p { background-position: 0 -1050px; } +.x-gzip p, .x-tar p { background-position: 0 -1100px; } +.x-bzip p, .x-bzip2 p { background-position: 0 -1150px; } +.x-rar p, .x-rar-compressed p { background-position: 0 -1200px; } + + +.el-finder-cwd div.el-finder-droppable p { + background-position: 0 -98px; +} + +.el-finder-cwd label { + display:block; + font-size:11px; + line-height:13px; + padding:0 1px; + margin:0; + height:25px; + overflow:hidden; + cursor:default; +} + +.el-finder-cwd div input { + background:#fff; + color:#000; + width:81px; + margin-left:-2px; + outline:none; + border:1px solid #ccc; + text-align:center; +} + +.el-finder-cwd div em { + float:left; + margin-top:-40px; + margin-left:9px; + width:15px; + height:16px; + background:url(../../images/filemanager/icons-big.png) -17px -1310px no-repeat; +} + +.el-finder-cwd div em.dropbox { + float:right; + margin-right:9px; + background-position: 0 -1308px; +} +.el-finder-cwd div em.noread { + float:right; + margin-right:9px; + background-position: 0 -1310px; +} +.el-finder-cwd div em.readonly { + float:right; + margin-right:9px; + background-position: -34px -1306px; +} + +.el-finder-cwd div em.noaccess { + float:right; + margin-right:9px; + background-position: 0 -1430px; +} + +/********** view: list ************/ + +.el-finder-cwd table { + width:100%; +/* *width:99%;*/ + border-collapse: collapse; + border-spacing: 0; + border:1px solid #ccc; + border-top:0 solid; + border-left:0 solid; + margin:-3px -3px; +} + +.el-finder-cwd table tr { + background:transparent; +} + +.el-finder-cwd table tr.el-finder-row-odd { + background-color:#eee; +} + +.el-finder-cwd table tr.ui-selected { + background-color:#ccc; +} + +.el-finder-cwd table th, +.el-finder-cwd table td { + padding:3px 5px; + border-left:1px solid #ccc; + cursor:default; + white-space:nowrap; + color:#000; + +} + +.el-finder-cwd table th { + text-align:left; + background:#fbf9ee; + font-size:.86em; +} + +.el-finder-cwd table td.icon { + width:24px; +} + +.el-finder-cwd table p { + width:24px; + height:16px; + margin:0; + padding:0; + background:url(../../images/filemanager/icons-small.png) 4px 0 no-repeat; +} + +.el-finder-cwd table .size { + text-align:right; +} + +tr.directory p { background-position:4px -16px; } +tr.text p { background-position:5px -34px; } +tr.image p { background-position:4px -51px; } +tr.audio p { background-position:4px -70px; } +tr.video p { background-position:5px -89px; } +tr.application p { background-position:4px -108px; } +/* text */ +tr.html p { background-position:5px -188px; } +tr.javascript p, +tr.x-javascript p, +tr.css p, +tr.x-sql p, +tr.xml p, +tr.x-python p, +tr.x-java-source p, +tr.x-perl p, +tr.x-ruby p { background-position:5px -228px; } +tr.x-php p { background-position:5px -247px; } +tr.x-c p { background-position:5px -208px; } +tr.x-shellscript p, +tr.x-sh p { background-position:5px -168px; } +tr.rtf p, tr.rtfd p { background-position:5px -148px; } +/* application */ +tr.x-shockwave-flash p { background-position:4px -266px; } +tr.pdf p { background-position:4px -285px; } +tr.vnd-ms-office p { background-position:4px -325px; } +tr.msword p, +tr.vnd-oasis-opendocument-text p, +tr.vnd-ms-word p { background-position:4px -346px; } +tr.vnd-ms-excel p, +tr.ms-excel p, +tr.vnd-oasis-opendocument-spreadsheet { background-position:4px -365px; } +tr.vnd-ms-powerpoint p, +tr.vnd-oasis-opendocument-presentation { background-position:4px -385px; } +/* archives */ +tr.x-tar p, +tr.x-gzip p, +tr.x-bzip p, +tr.x-bzip2 p, +tr.zip p, +tr.x-rar p, +tr.x-rar-compressed p, +tr.x-7z-compressed p { background-position:4px -305px; } + +tr.el-finder-droppable td.icon p { background-position:5px -450px; } + +.el-finder-cwd table td p em { + float:left; + width:10px; + height:12px; + margin-top:5px; + background:url(../../images/filemanager/icons-small.png) 0px -405px no-repeat; +} + +.el-finder-cwd table p em.readonly { background-position:0px -433px; } +.el-finder-cwd table p em.dropbox { background-position:0px -418px; } +.el-finder-cwd table p em.noread, +.el-finder-cwd table p em.noaccess { background-position:0px -470px; } + +/************************************/ +/* statusbar */ +/************************************/ + +.el-finder-statusbar { + height:25px; +} + +.el-finder-stat, +.el-finder-path, +.el-finder-sel { + padding:3px 9px 1px 9px; + font-size:11px; + color:#555; +} +/* current directory path */ +.el-finder-path { + float:left; +} +/* number folders/files in current directory and size */ +.el-finder-stat { + float:right; +} +/* info about selected files */ +.el-finder-sel { + text-align:center; +} + +/************************************/ +/* dialog window */ +/************************************/ +.el-finder-dialog { + font-size:.84em; +} +.el-finder-dialog form p, .el-finder-dialog .ui-tabs p { + margin:.5em; +} +.el-finder-dialog .ui-dialog-titlebar { + padding: .2em .1em .1em .8em; +} +.el-finder-dialog .ui-dialog-buttonpane { + padding: .1em 1em .1em .4em; + font-size:.9em; +} +.el-finder-dialog .ui-dialog-content { + padding:5px; +} + +.el-finder-dialog hr { + border:0; + border-bottom: 1px #ccc solid; + clear:both +} +.el-finder-dialog ul { + margin-top:0; +} + +.el-finder-dialog kbd { font-size:1.2em;} +.el-finder-dialog a { outline: none;} + +.el-finder-dialog textarea { + width:98.9%; + height:400px; + outline:none; + border:1px solid #ccc; + font-family: Arial, Helvetica, sans-serif; +} + +.ui-state-error { + margin: 5px 0; + padding:.5em; + clear:both; +} + +.el-finder-dialog .ui-state-error .ui-icon { + float: left; + margin-right: .3em; +} + +.el-finder-add-field { + cursor:pointer; +} + +.el-finder-add-field span { + float:left; + margin-right:.7em; +} + +.el-finder-dialog table { + width : 100%; +} + +.el-finder-dialog table td { + padding:2px 5px; + +} + +.el-finder-dialog .ui-tabs { + font-size:.98em; +} + +.el-finder-dialog .ui-tabs div { + padding:0 .5em; +} +.el-finder-dialog .ui-tabs-nav li a { + padding:.2em 1em; +} + +/************************************/ +/* contextmenu */ +/************************************/ + +.el-finder-contextmenu { + position:absolute; + width:200px; + background:#fff; + color:#000; + cursor:default; + border:1px solid #ccc; + padding:5px 0; + +} + +.el-finder-contextmenu div { + position:relative; + display:block; + margin:0; + padding:2px 29px; + white-space:nowrap; + font-size:11px; + font-family: Arial, Helvetica, sans-serif; + background:url('../../images/filemanager/toolbar.png') 0 0 no-repeat; +} + +.el-finder-contextmenu span { + float:right; + width:9px; + height:18px; + margin-right:-27px; + background:url(../../images/filemanager/toolbar.png) -4px 5px no-repeat; +} + +.el-finder-contextmenu div.el-finder-contextmenu-sub { + position:absolute; + top:0; + display:none; + margin:0; + padding:5px 0; + background:#fff; + border:1px solid #ccc; + border-radius:5px; + -moz-border-radius:5px; + -webkit-border-radius:5px; +} + + +.el-finder-contextmenu div.reload { background-position: 5px -192px; } +.el-finder-contextmenu div.select { background-position: 5px -214px; } +.el-finder-contextmenu div.open { background-position: 6px -235px; } +.el-finder-contextmenu div.mkdir { background-position: 6px -258px; } +.el-finder-contextmenu div.mkfile { background-position: 6px -280px; } +.el-finder-contextmenu div.upload { background-position: 5px -305px; } +.el-finder-contextmenu div.rm { background-position: 5px -330px; } +.el-finder-contextmenu div.copy { background-position: 5px -356px; } +.el-finder-contextmenu div.cut { background-position: 5px -631px; } +.el-finder-contextmenu div.duplicate { background-position: 5px -356px; } +.el-finder-contextmenu div.paste { background-position: 5px -381px; } +.el-finder-contextmenu div.rename { background-position: 5px -407px; } +.el-finder-contextmenu div.edit { background-position: 6px -435px; } +.el-finder-contextmenu div.info { background-position: 5px -462px; } +.el-finder-contextmenu div.help { background-position: 5px -487px; } +.el-finder-contextmenu div.icons { background-position: 5px -537px; } +.el-finder-contextmenu div.list { background-position: 5px -557px; } +.el-finder-contextmenu div.archive { background-position: 5px -583px; } +.el-finder-contextmenu div.extract { background-position: 5px -583px; } +.el-finder-contextmenu div.resize { background-position: 5px -655px; } +.el-finder-contextmenu div.quicklook { background-position: 5px -727px; } + +.el-finder-contextmenu div.delim { + margin:0; + padding:0; + height:1px; + border-top:1px solid #eee; + background:transparent; + display:block; +} +.el-finder-contextmenu div.hover { background-color:#99ccff; } + +.el-finder-places { + margin-top:.5em; +} + + +.el-finder-drag-helper { + padding:0; + cursor:move; + zoom:1; +} + +.el-finder-drag-helper div { + border:0 solid; + margin-left:-57px; + +} + +.el-finder-drag-copy { + background:url('../../images/filemanager/toolbar.png') 0 -771px no-repeat; +} + +.el-finder-drag-helper label { + border:1px solid #ccc; + background-color:#eee; + border-radius:5px; + -moz-border-radius:5px; + -webkit-border-radius:5px; +} + + +/************************************/ +/* QuickLook */ +/************************************/ + +.el-finder-ql { + position:absolute; + width:420px; + height:auto; + padding:12px 9px; + text-align:center; + border-radius:9px; + -moz-border-radius:9px; + -webkit-border-radius:9px; + background:url(../../images/filemanager/ql.png); + overflow: inherit !important; +} + +.el-finder-ql.directory p { background-position: 0 -50px; } + +/* toolbar */ +.el-finder-ql div.el-finder-ql-drag-handle { + height:18px; + font-size:14px; + background-color:#777; + margin:-12px -9px 12px -9px; + padding:3px 0 0 19px; + opacity:.8; + text-align:center; + white-space: nowrap; + overflow:hidden; + -moz-border-radius-topleft:9px; + -moz-border-radius-topright:9px; + -webkit-border-top-left-radius: 9px; + -webkit-border-top-right-radius: 9px; + border-top-left-radius: 9px; + border-top-right-radius: 9px; +} +/* close button */ +.el-finder-ql div.el-finder-ql-drag-handle span { + float:left; + margin:0 19px 0 -15px; +} +/* title in tolbar */ +.el-finder-ql div.el-finder-ql-drag-handle strong { + line-height:18px; + margin-left:-17px; + color:#fff; +} + +.el-finder-ql div.el-finder-ql-media { + width:100%; + padding:0; +} + +.el-finder-ql div.el-finder-ql-content { + width:100%; + font-size:.82em/1.3em; + font-family: Arial, Helvetica, sans-serif; + padding:5px 0; + overflow:hidden; +} + +.el-finder-ql div.el-finder-ql-content span, +.el-finder-ql div.el-finder-ql-content a { + display:block; + color: #fff; +} + +/* text files preview */ +.el-finder-ql iframe { + background:#fff; + width:100%; + height:315px; + padding:0; + margin:0; + border:none; + outline:none; +} + + +/* images preview */ +.el-finder-ql img { + margin:0 auto; + border:1px solid #fff; +} + +/* button help */ +.el-finder-help-std { + background: url(../../images/filemanager/icons-big.png) 0 -1380px no-repeat; + width:48px; + height:48px; + float:right; +} + +.el-finder-logo { + background: url(../../images/filemanager/icons-big.png) 0 -1329px no-repeat; + width:48px; + height:48px; + float:left; +} + +.el-finder-ql .ui-resizable-e, .el-finder-ql .ui-resizable-s { background:transparent !important;} diff --git a/referencia/template/css/plugins/fullcalendar.css b/referencia/template/css/plugins/fullcalendar.css new file mode 100644 index 0000000..dde5014 --- /dev/null +++ b/referencia/template/css/plugins/fullcalendar.css @@ -0,0 +1,578 @@ +/* + * FullCalendar v1.5.2 Stylesheet + * + * Copyright (c) 2011 Adam Shaw + * Dual licensed under the MIT and GPL licenses, located in + * MIT-LICENSE.txt and GPL-LICENSE.txt respectively. + * + * Date: Sun Aug 21 22:06:09 2011 -0700 + * + */ + + +.fc { + direction: ltr; + text-align: left; + } + +.fc table { + border-collapse: collapse; + border-spacing: 0; + } + +html .fc, +.fc table { + font-size: 1em; + } + +.fc td, +.fc th { + padding: 0; + vertical-align: top; + } + + + +/* Header +------------------------------------------------------------------------*/ + +.fc-header td { + white-space: nowrap; + } + +.fc-header-left { + width: 25%; + text-align: left; + } + +.fc-header-center { + text-align: center; + } + +.fc-header-right { + width: 25%; + text-align: right; + } + +.fc-header-title { + display: inline-block; + vertical-align: top; + } + +.fc-header-title h2 { + margin-top: 5px; + white-space: nowrap; + } + +.fc .fc-header-space { + padding-left: 10px; + display: none; + } + +.fc-header .fc-button { + margin-bottom: 1em; + vertical-align: top; + } + +/* buttons edges butting together */ + +.fc-header .fc-button { + margin-right: -1px; + } + +.fc-header .fc-corner-right { + margin-right: 1px; /* back to normal */ + } + +.fc-header .ui-corner-right { + margin-right: 0; /* back to normal */ + } + +/* button layering (for border precedence) */ + +.fc-header .fc-state-hover, +.fc-header .ui-state-hover { + z-index: 2; + } + +.fc-header .fc-state-down { + z-index: 3; + } + +.fc-header .fc-state-active, +.fc-header .ui-state-active { + z-index: 4; + } + + + +/* Content +------------------------------------------------------------------------*/ + +.fc-content { + clear: both; + background: #fcfcfc; + } + +.fc-view { + width: 100%; /* needed for view switching (when view is absolute) */ + overflow: hidden; + } + + + +/* Cell Styles +------------------------------------------------------------------------*/ + +.fc-widget-header, /* , usually */ +.fc-widget-content { /* , usually */ + border: 1px solid #ccc; + } + +.fc-state-highlight { /* today cell */ /* TODO: add .fc-today to */ + background: #ffc; + } + +.fc-cell-overlay { /* semi-transparent rectangle while dragging */ + background: #9cf; + opacity: .2; + filter: alpha(opacity=20); /* for IE */ + } + + + +/* Buttons +------------------------------------------------------------------------*/ + +.fc-button { + position: relative; + display: inline-block; + cursor: pointer; + } + + +.fc-button-inner { + position: relative; + float: left; + overflow: hidden; + } +/* +.fc-state-default .fc-button-inner { + border-style: solid; + border-width: 0 1px; + } */ + +.fc-button-content { + position: relative; + float: left; + height: 1.9em; + line-height: 1.9em; + padding: 0 .6em; + white-space: nowrap; + display: none; + } + +/* icon (for jquery ui) */ + +.fc-button-content .fc-icon-wrap { + position: relative; + float: left; + top: 50%; + } + +.fc-button-content .ui-icon { + position: relative; + float: left; + margin-top: -50%; + *margin-top: 0; + *top: -50%; + } + +/* gloss effect */ + +.fc-state-default .fc-button-effect { + display: none; + } + + + +/* Global Event Styles +------------------------------------------------------------------------*/ + +.fc-event { + font-size: .85em; + cursor: default; + background: url(../../images/blacktrans1.png) !important; /* default BACKGROUND color */ + } + +a.fc-event, +.fc-event-draggable { + cursor: pointer; + } + +a.fc-event { + text-decoration: none; + } + +.fc-rtl .fc-event { + text-align: right; + } + +.fc-event-skin { + color: #fff; /* default TEXT color */ + border: 0; + } + +.fc-event-inner { + position: relative; + width: 100%; + height: 100%; + border-style: solid; + border-width: 0; + overflow: hidden; + } + +.fc-event-time, +.fc-event-title { + padding: 0 5px; + display: inline-block; + } + +.fc .ui-resizable-handle { /*** TODO: don't use ui-resizable anymore, change class ***/ + display: block; + position: absolute; + z-index: 99999; + overflow: hidden; /* hacky spaces (IE6/7) */ + font-size: 300%; /* */ + line-height: 50%; /* */ + } + + + +/* Horizontal Events +------------------------------------------------------------------------*/ + +.fc-event-hori { + border-width: 1px 0; + margin-bottom: 1px; + } + +/* resizable */ + +.fc-event-hori .ui-resizable-e { + top: 0 !important; /* importants override pre jquery ui 1.7 styles */ + right: -3px !important; + width: 7px !important; + height: 100% !important; + cursor: e-resize; + } + +.fc-event-hori .ui-resizable-w { + top: 0 !important; + left: -3px !important; + width: 7px !important; + height: 100% !important; + cursor: w-resize; + } + +.fc-event-hori .ui-resizable-handle { + _padding-bottom: 14px; /* IE6 had 0 height */ + } + + + +/* Fake Rounded Corners (for buttons and events) +------------------------------------------------------------*/ + +.fc-corner-left { + margin-left: 1px; + } + +.fc-corner-left .fc-button-inner, +.fc-corner-left .fc-event-inner { + margin-left: -1px; + } + +.fc-corner-right { + margin-right: 1px; + } + +.fc-corner-right .fc-button-inner, +.fc-corner-right .fc-event-inner { + margin-right: -1px; + } + +.fc-corner-top { + margin-top: 1px; + } + +.fc-corner-top .fc-event-inner { + margin-top: -1px; + } + +.fc-corner-bottom { + margin-bottom: 1px; + } + +.fc-corner-bottom .fc-event-inner { + margin-bottom: -1px; + } + + + +/* Fake Rounded Corners SPECIFICALLY FOR EVENTS +-----------------------------------------------------------------*/ + +.fc-corner-left .fc-event-inner { + border-left-width: 1px; + } + +.fc-corner-right .fc-event-inner { + border-right-width: 1px; + } + +.fc-corner-top .fc-event-inner { + border-top-width: 1px; + } + +.fc-corner-bottom .fc-event-inner { + border-bottom-width: 1px; + } + + + +/* Reusable Separate-border Table +------------------------------------------------------------*/ + +table.fc-border-separate { + border-collapse: separate; + } + +.fc-border-separate th { text-transform: uppercase; font-weight: normal; background: url(../../images/thead.png) repeat-x top left; } + +.fc-border-separate th, +.fc-border-separate td { + border-width: 1px 0 0 1px; + padding: 5px; + } + +.fc-border-separate th.fc-last, +.fc-border-separate td.fc-last { + border-right-width: 1px; + } + +.fc-border-separate tr.fc-last th, +.fc-border-separate tr.fc-last td { + border-bottom-width: 1px; + } + +.fc-border-separate tbody tr.fc-first td, +.fc-border-separate tbody tr.fc-first th { + border-top-width: 0; + } + + + +/* Month View, Basic Week View, Basic Day View +------------------------------------------------------------------------*/ + +.fc-grid th { + text-align: center; + } + +.fc-grid .fc-day-number { + float: right; + padding: 0 2px; + } + +.fc-grid .fc-other-month .fc-day-number { + opacity: 0.3; + filter: alpha(opacity=30); /* for IE */ + /* opacity with small font can sometimes look too faded + might want to set the 'color' property instead + making day-numbers bold also fixes the problem */ + } + +.fc-grid .fc-day-content { + clear: both; + padding: 2px 2px 1px; /* distance between events and day edges */ + } + +/* event styles */ + +.fc-grid .fc-event-time { + font-weight: bold; + } + +/* right-to-left */ + +.fc-rtl .fc-grid .fc-day-number { + float: left; + } + +.fc-rtl .fc-grid .fc-event-time { + float: right; + } + + + +/* Agenda Week View, Agenda Day View +------------------------------------------------------------------------*/ + +.fc-agenda table { + border-collapse: separate; + } + +.fc-agenda-days th { + text-align: center; + } + +.fc-agenda .fc-agenda-axis { + width: 50px; + padding: 0 4px; + vertical-align: middle; + text-align: right; + white-space: nowrap; + font-weight: normal; + } + +.fc-agenda .fc-day-content { + padding: 2px 2px 1px; + } + +/* make axis border take precedence */ + +.fc-agenda-days .fc-agenda-axis { + border-right-width: 1px; + } + +.fc-agenda-days .fc-col0 { + border-left-width: 0; + } + +/* all-day area */ + +.fc-agenda-allday th { + border-width: 0 1px; + } + +.fc-agenda-allday .fc-day-content { + min-height: 34px; /* TODO: doesnt work well in quirksmode */ + _height: 34px; + } + +/* divider (between all-day and slots) */ + +.fc-agenda-divider-inner { + height: 2px; + overflow: hidden; + } + +.fc-widget-header .fc-agenda-divider-inner { + background: #eee; + } + +/* slot rows */ + +.fc-agenda-slots th { + border-width: 1px 1px 0; + } + +.fc-agenda-slots td { + border-width: 1px 0 0; + background: none; + } + +.fc-agenda-slots td div { + height: 20px; + } + +.fc-agenda-slots tr.fc-slot0 th, +.fc-agenda-slots tr.fc-slot0 td { + border-top-width: 0; + } + +.fc-agenda-slots tr.fc-minor th, +.fc-agenda-slots tr.fc-minor td { + border-top-style: dotted; + } + +.fc-agenda-slots tr.fc-minor th.ui-widget-header { + *border-top-style: solid; /* doesn't work with background in IE6/7 */ + } + + + +/* Vertical Events +------------------------------------------------------------------------*/ + +.fc-event-vert { + border-width: 0 1px; + } + +.fc-event-vert .fc-event-head, +.fc-event-vert .fc-event-content { + position: relative; + z-index: 2; + width: 100%; + overflow: hidden; + } + +.fc-event-vert .fc-event-time { + white-space: nowrap; + font-size: 10px; + } + +.fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */ + position: absolute; + z-index: 1; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: #fff; + opacity: .3; + filter: alpha(opacity=30); + } + +.fc .ui-draggable-dragging .fc-event-bg, /* TODO: something nicer like .fc-opacity */ +.fc-select-helper .fc-event-bg { + display: none\9; /* for IE6/7/8. nested opacity filters while dragging don't work */ + } + +/* resizable */ + +.fc-event-vert .ui-resizable-s { + bottom: 0 !important; /* importants override pre jquery ui 1.7 styles */ + width: 100% !important; + height: 8px !important; + overflow: hidden !important; + line-height: 8px !important; + font-size: 11px !important; + font-family: monospace; + text-align: center; + cursor: s-resize; + } + +.fc-agenda .ui-resizable-resizing { /* TODO: better selector */ + _overflow: hidden; + } + +/** custom **/ +.fc-button { border: 1px solid #ccc; height: 30px; display: inline-block; background: url(../../images/buttonbg6.png) repeat-x 0 -30px; } +.fc-button-prev { width: 30px; background: url(../../images/prevnext.png) no-repeat 0 -30px; } +.fc-button-next { width: 30px; background: url(../../images/prevnext.png) no-repeat -30px -30px; } +.fc-button-prev:active { background-position: 0 0; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } +.fc-button-next:active { background-position: -30px 0; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } + +.fc-button-month .fc-button-content, .fc-button-agendaWeek .fc-button-content, +.fc-button-agendaDay .fc-button-content, .fc-button-today .fc-button-content { display: block; padding: 3px 10px; } +.fc-button-today { margin-left: 10px; } + +.fc-button-prev:hover, .fc-button-next:hover, .fc-button-month:hover, +.fc-button-agendaWeek:hover, .fc-button-agendaDay:hover, +.fc-button-today:hover { -moz-box-shadow: 0 0 1px #849ebd; -webkit-box-shadow: 0 0 1px #849ebd; box-shadow: 0 0 1px #849ebd; } + +.fc-button-month:active, +.fc-button-agendaWeek:active, .fc-button-agendaDay:active, +.fc-button-today:active { background-position: 0 0; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } diff --git a/referencia/template/css/plugins/jquery.alerts.css b/referencia/template/css/plugins/jquery.alerts.css new file mode 100644 index 0000000..64bf2cb --- /dev/null +++ b/referencia/template/css/plugins/jquery.alerts.css @@ -0,0 +1,71 @@ +#popup_container { + font-family: DroidSansRegular, Arial, sans-serif; + font-size: 12px; + min-width: 300px; /* Dialog will be no smaller than this */ + max-width: 600px; /* Dialog will wrap after this width */ + background: url(../../images/blacktrans1.png); + padding: 5px !important; + color: #666; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +#popup_title { + font-size: 14px; + line-height: 21px; + font-weight: normal; + color: #333; + background: #eee url(../../images/thead.png) repeat-x top left; + border-bottom: solid 1px #ccc; + cursor: default; + padding: 10px; + margin: 0em; +} + +#popup_content { + /*background: 16px 16px no-repeat url(../../images/info.gif);*/ + padding: 10px; + margin: 0em; + background: #fcfcfc; +} +/* +#popup_content.alert { + background-image: url(../../images/info.gif); +} + +#popup_content.confirm { + background-image: url(../../images/important.gif); +} + +#popup_content.prompt { + background-image: url(../../images/help.gif); +} + +#popup_message { + padding-left: 48px; +}*/ + +#popup_panel { + text-align: center; + margin: 1em 0em 0em 1em; +} + +#popup_prompt { + margin: .5em 0em; +} + +#popup_overlay { background: #000 !important; opacity: 0.5 !important; } + +#popup_ok, #popup_cancel { padding: 5px 15px; font-size: 12px; display: inline-block; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +#popup_ok, #popup_cancel { -moz-box-shadow: 1px 1px 2px #eee; -webkit-box-shadow: 1px 1px 2px #eee; box-shadow: 1px 1px 2px #eee; cursor: pointer; } +#popup_ok:hover, #popup_ok:active, #popup_cancel:hover, #popup_cancel:active { background-position: 0 -39px; } + +#popup_ok { border: 1px solid #39537f; background: #eee url(../../images/buttons/button_blue.png) repeat-x top left; text-shadow: 1px 1px #39537f; color: #fff; } +#popup_ok:active { -moz-box-shadow: inset 2px 2px 2px #12274c; -webkit-box-shadow: inset 2px 2px 2px #12274c; box-shadow: inset 2px 2px 2px #12274c; } + +#popup_cancel { border: 1px solid #ccc; background: #eee url(../../images/buttons/button_white.png) repeat-x top left; text-shadow: 1px 1px #f7f7f7; color: #333; } +#popup_cancel:active { -moz-box-shadow: inset 2px 2px 2px #ccc; -webkit-box-shadow: inset 2px 2px 2px #ccc; box-shadow: inset 2px 2px 2px #ccc; } + + +#popup_prompt { width: 270px !important; } \ No newline at end of file diff --git a/referencia/template/css/plugins/jquery.jgrowl.css b/referencia/template/css/plugins/jquery.jgrowl.css new file mode 100644 index 0000000..d82ebf6 --- /dev/null +++ b/referencia/template/css/plugins/jquery.jgrowl.css @@ -0,0 +1,141 @@ + +div.jGrowl { + z-index: 9999; + color: #fff; + font-size: 12px; +} + +/** Special IE6 Style Positioning **/ +div.ie6 { + position: absolute; +} + +div.ie6.top-right { + right: auto; + bottom: auto; + left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.top-left { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.bottom-right { + left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.bottom-left { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.center { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); + width: 100%; +} + +/** Normal Style Positions **/ +div.jGrowl { + position: absolute; +} + +body > div.jGrowl { + position: fixed; +} + +div.jGrowl.top-left { + left: 0px; + top: 0px; +} + +div.jGrowl.top-right { + right: 0px; + top: 0px; +} + +div.jGrowl.customtop-right { + right: 0; + top: 100px; +} + +div.jGrowl.bottom-left { + left: 0px; + bottom: 0px; +} + +div.jGrowl.bottom-right { + right: 0px; + bottom: 0px; +} + +div.jGrowl.center { + top: 0px; + width: 50%; + left: 25%; +} + +/** Cross Browser Styling **/ +div.center div.jGrowl-notification, div.center div.jGrowl-closer { + margin-left: auto; + margin-right: auto; +} + +div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer { + background-color: #000; + opacity: .85; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85); + zoom: 1; + width: 235px; + padding: 10px; + margin-top: 5px; + margin-bottom: 5px; + font-family: Tahoma, Arial, Helvetica, sans-serif; + font-size: 1em; + text-align: left; + display: none; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; +} + +div.jGrowl div.jGrowl-notification { + min-height: 40px; +} + +div.jGrowl div.jGrowl-notification, +div.jGrowl div.jGrowl-closer { + margin: 10px; +} + +div.jGrowl div.jGrowl-notification div.jGrowl-header { + font-weight: bold; + font-size: .85em; +} + +div.jGrowl div.jGrowl-notification div.jGrowl-close { + z-index: 99; + float: right; + font-weight: bold; + font-size: 1em; + cursor: pointer; +} + +div.jGrowl div.jGrowl-closer { + padding-top: 4px; + padding-bottom: 4px; + cursor: pointer; + font-size: .9em; + font-weight: bold; + text-align: center; +} + +/** Hide jGrowl when printing **/ +@media print { + div.jGrowl { + display: none; + } +} \ No newline at end of file diff --git a/referencia/template/css/plugins/jquery.ui.css b/referencia/template/css/plugins/jquery.ui.css new file mode 100644 index 0000000..50007c3 --- /dev/null +++ b/referencia/template/css/plugins/jquery.ui.css @@ -0,0 +1,95 @@ +/** DATE PICKER **/ +.ui-datepicker { background: url(../../images/blacktrans.png); -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px;} +.ui-datepicker { z-index: 100 !important; display: none; padding: 5px; } +.ui-datepicker-header { position: relative; text-align: center; background: url(../../images/blacktrans1.png); padding: 5px; color: #fff; } +.ui-datepicker-calendar { border-collapse: collapse; border: 1px solid #ccc; border-top: 0; } +.ui-datepicker-calendar thead th { font-weight: normal; font-size: 10px; text-transform: uppercase; color: #666; } +.ui-datepicker-calendar thead th { background: url(../../images/thead.png) repeat-x top left; border-bottom: 1px solid #ccc; } +.ui-datepicker-calendar td { border-left: 1px solid #ccc; border-top: 1px solid #ccc; text-align: right; } +.ui-datepicker-calendar td { padding: 1px; background: url(../../images/thead.png) repeat-x top left; } +.ui-datepicker-calendar td a { display: block; padding: 2px 8px; color: #666; text-shadow: 1px 1px #f7f7f7; } +.ui-datepicker-calendar td a:hover { background: #c8d9ed; text-decoration: none; color: #333; } +.ui-datepicker-calendar td:first-child { border-left: 1px solid #ccc; } +.ui-datepicker-prev, .ui-datepicker-next { display: inline-block; width: 14px; height: 14px; } +.ui-datepicker-prev span, .ui-datepicker-next span { display: none; } +.ui-datepicker-prev { position: absolute; top: 9px; left: 5px; background: url(../../images/icons/calarrow.png) no-repeat 3px -39px; } +.ui-datepicker-next { position: absolute; top: 9px; right: 5px; background: url(../../images/icons/calarrow.png) no-repeat 3px 1px; } + +/** TABS **/ +.ui-tabs { border: 1px solid #ccc; background: #fcfcfc; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +.ui-tabs { -moz-box-shadow: 1px 1px 2px #ddd; -webkit-box-shadow: 1px 1px 2px #ddd; box-shadow: 1px 1px 2px #ddd; } +.ui-tabs-nav { list-style: none; background: #eee url(../../images/thead.png) repeat-x top left; border-bottom: 1px solid #ccc; } +.ui-tabs-nav { position: relative; height: 41px; -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; } +.ui-tabs-nav li { display: inline-block; float: left; } +.ui-tabs-nav li:first-child a { -moz-border-radius: 3px 0 0 0; -webkit-border-radius: 3px 0 0 0; border-radius: 3px 0 0 0; } +.ui-tabs-nav li a { display: block; padding: 10px 20px; background: #eee; color: #333; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; } +.ui-tabs-nav li a:hover { text-decoration: none; background: #e7e7e7; } +.ui-tabs-nav li.ui-state-active a { background: #fcfcfc; color: #069; border-bottom: 1px solid #fcfcfc; } +.ui-tabs-hide { display: none; } +.ui-tabs-panel { padding: 15px; } + +/* +.tabs2 { border: 0; } +.tabs2 .ui-tabs-nav { padding: 5px 0 0 5px; border: 1px solid #6082AD; background: #688AB5 url(../../images/titlebg.png) repeat-x top left; } +.tabs2 .ui-tabs-nav li:last-child a { -moz-border-radius: 0 3px 0 0; -webkit-border-radius: 0 3px 0 0; border-radius: 0 3px 0 0; } +.tabs2 .ui-tabs-panel { border: 1px solid #ccc; border-top: 0; } +.tabs2 .ui-tabs-nav li a { background: #a8c0df; border: 0; color: #fff; margin-right: 1px; } +.tabs2 .ui-tabs-nav li.ui-state-active a { background: #fcfcfc; color: #688AB5; border-bottom: 1px solid #fcfcfc; } +*/ + +/** ACCORDION **/ +.accordion { border: 1px solid #ccc; background: #fcfcfc; overflow: hidden; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +.accordion { -moz-box-shadow: 1px 1px 3px #ddd; -webkit-box-shadow: 1px 1px 3px #ddd; box-shadow: 1px 1px 3px #ddd; } +.ui-accordion-header { background: #eee url(../../images/thead.png) repeat-x top left; border-top: 1px solid #ccc; position: relative; } +.ui-accordion-header { font-size: 12px; text-shadow: 1px 1px #f7f7f7; text-transform: uppercase; font-weight: normal; cursor: pointer; } +.ui-accordion-header:first-child { border-top: 0; } +.ui-accordion-header a { color: #333; padding: 10px; display: block; } +.ui-accordion-header a:hover { color: #069; text-decoration: none; } +.ui-accordion-content { padding: 10px; border-top: 1px solid #ccc; color: #666; overflow: hidden; } +.ui-accordion-header .ui-icon { position: absolute; display: inline-block; background: url(../../images/arrow.png) no-repeat 0 0; top: 18px; right: 10px; width: 10px; height: 10px; } +.ui-state-active .ui-icon { position: absolute; display: inline-block; background: url(../../images/arrow.png) no-repeat 0 -45px; top: 18px; right: 10px; width: 10px; height: 5px; } + + +/** SLIDER **/ +.ui-slider { border: 1px solid #ccc; background: #eee; position: relative; margin: 10px 0; } +.ui-slider { -moz-box-shadow: inset 1px 1px 2px #ccc; -webit-box-shadow: inset 1px 1px 2px #ccc; box-shadow: inset 1px 1px 2px #ccc; } +.ui-slider { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } +.ui-slider a { display: inline-block; z-index: 2; } +.ui-slider-range { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } + +.ui-slider-horizontal { display: block; height: 4px; } +.ui-slider-horizontal a { position: absolute; top: -4px; } +.ui-slider-horizontal a { width: 15px; height: 12px; background: url(../../images/icons/hbutton.png) no-repeat 0 0; } +.ui-slider-horizontal a.ui-slider-handle { margin-left: -8px; } +.ui-slider-horizontal a.ui-state-active { -moz-box-shadow: 0 0 2px #09f; -webkit-box-shadow: 0 0 2px #09f; box-shadow: 0 0 2px #09f; } + +.ui-slider-horizontal .ui-slider-range { background: #39f; height: 5px; position: absolute; } +.ui-slider-horizontal .ui-slider-range { -moz-box-shadow: inset 1px 1px 2px #069; -webkit-box-shadow: inset 1px 1px 2px #069; box-shadow: inset 1px 1px 2px #069; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: 5px; } +.ui-slider-vertical a { position: absolute; left: -3px; } +.ui-slider-vertical a { width: 11px; height: 15px; background: url(../../images/icons/vbutton.png) no-repeat 0 0; } +.ui-slider-vertical a.ui-slider-handle { margin-bottom: -8px; } +.ui-slider-vertical a.ui-state-active { -moz-box-shadow: 0 0 2px #09f; -webkit-box-shadow: 0 0 2px #09f; box-shadow: 0 0 2px #09f; } + +.ui-slider-vertical .ui-slider-range { background: #39f; width: 7px; position: absolute; left: -1px; } +.ui-slider-vertical .ui-slider-range { -moz-box-shadow: inset 1px 1px 2px #069; -webkit-box-shadow: inset 1px 1px 2px #069; box-shadow: inset 1px 1px 2px #069; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { right: 0; } + + +/**DIALOG**/ +.ui-dialog { background: url(../../images/blacktrans1.png); padding: 5px; } +.ui-dialog { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; position: relative; } +.ui-dialog-titlebar { padding: 8px 10px; color: #fff; background: #eee url(../../images/thead.png) repeat-x top left; border-bottom: 1px solid #ccc; } +.ui-dialog-content { background: #fff; padding: 10px; } +.ui-dialog-titlebar { color: #069; font-weight: bold; } +.ui-dialog-titlebar-close { position: absolute; top: 12px; right: 15px; font-size: 11px; font-weight: normal; color: #666; } +.ui-dialog-titlebar-close:hover { text-decoration: none; color: #333; } + +.ui-dialog .wysiwyg legend { position: absolute; top: 13px; left: 15px; font-size: 11px; text-transform: uppercase; } +.ui-dialog .wysiwyg p { margin: 8px 0; } +.ui-dialog .wysiwyg input.submit { background: url(../../images/buttonbg3.png) repeat-x top left; border: 1px solid #314a78; color: #fff; font-size: 11px; } +.ui-dialog .wysiwyg input.reset { background: url(../../images/thead.png) repeat-x top left; border: 1px solid #bbb; color: #333; font-size: 11px; } +.ui-dialog .wysiwyg label { float: left; width: 100px; } diff --git a/referencia/template/css/plugins/jquery.wysiwyg.css b/referencia/template/css/plugins/jquery.wysiwyg.css new file mode 100644 index 0000000..10a2eed --- /dev/null +++ b/referencia/template/css/plugins/jquery.wysiwyg.css @@ -0,0 +1,96 @@ +div.wysiwyg { background: #f7f7f7; } +div.wysiwyg * { margin: 0; padding: 0; } + +div.wysiwyg ul.toolbar li.jwysiwyg-custom-command { overflow: hidden; } + +div.wysiwyg ul.toolbar { border-bottom: 1px solid #ccc; float: left; width: 100%; padding: 10px; background: #eee url(../../images/thead.png) repeat-x top left; } +div.wysiwyg ul.toolbar li { list-style: none; float: left; margin: 1px 2px 3px 0; background: rgb(240, 240, 240); -moz-user-select: none; -webkit-user-select: none; user-select: none; clear: none; padding: 0 } +div.wysiwyg ul.toolbar li.separator { width: 1px; height: 16px; margin: 0 4px; border-left: 1px solid #ccc; } +div.wysiwyg ul.toolbar li { text-indent: -5000px; opacity: 0.85; filter: alpha(opacity=85); display: block; width: 16px; height: 16px; background: url('../../images/jquery.wysiwyg.gif') no-repeat -64px -80px; border: 1px dotted rgb(240, 240, 240); cursor: pointer; margin: 0px; } +div.wysiwyg ul.toolbar li.wysiwyg-button-hover, div.wysiwyg ul.toolbar li.active { opacity: 1.00; filter:alpha(opacity=100); border: 1px solid #ccc; background-color: #fcfcfc; } +div.wysiwyg ul.toolbar li.active { background-color: #c8d9ed; border: 1px solid #86aad4; margin: 0; } + +div.wysiwyg ul.toolbar li.disabled, div.wysiwyg ul.toolbar li.wysiwyg-button-hover.disabled, div.wysiwyg ul.toolbar li.active.disabled { opacity: 0.5; filter:alpha(opacity=50); border: 0px none transparent; padding: 1px; cursor: auto; } + + +div.wysiwyg ul.toolbar li.bold { background-position: 0 -16px; } +div.wysiwyg ul.toolbar li.italic { background-position: -16px -16px; } +div.wysiwyg ul.toolbar li.strikeThrough { background-position: -32px -16px; } +div.wysiwyg ul.toolbar li.underline { background-position: -48px -16px; } +div.wysiwyg ul.toolbar li.highlight { background-position: -48px -96px; } + +div.wysiwyg ul.toolbar li.justifyLeft { background-position: 0 0; } +div.wysiwyg ul.toolbar li.justifyCenter { background-position: -16px 0; } +div.wysiwyg ul.toolbar li.justifyRight { background-position: -32px 0; } +div.wysiwyg ul.toolbar li.justifyFull { background-position: -48px 0; } + +div.wysiwyg ul.toolbar li.indent { background-position: -64px 0; } +div.wysiwyg ul.toolbar li.outdent { background-position: -80px 0; } + +div.wysiwyg ul.toolbar li.subscript { background-position: -64px -16px; } +div.wysiwyg ul.toolbar li.superscript { background-position: -80px -16px; } + +div.wysiwyg ul.toolbar li.undo { background-position: 0 -64px; } +div.wysiwyg ul.toolbar li.redo { background-position: -16px -64px; } + +div.wysiwyg ul.toolbar li.insertOrderedList { background-position: -32px -48px; } +div.wysiwyg ul.toolbar li.insertUnorderedList { background-position: -16px -48px; } +div.wysiwyg ul.toolbar li.insertHorizontalRule { background-position: 0 -48px; } + +div.wysiwyg ul.toolbar li.h1 { background-position: 0 -32px; } +div.wysiwyg ul.toolbar li.h2 { background-position: -16px -32px; } +div.wysiwyg ul.toolbar li.h3 { background-position: -32px -32px; } +div.wysiwyg ul.toolbar li.h4 { background-position: -48px -32px; } +div.wysiwyg ul.toolbar li.h5 { background-position: -64px -32px; } +div.wysiwyg ul.toolbar li.h6 { background-position: -80px -32px; } + +div.wysiwyg ul.toolbar li.paragraph { background-position: 0px -96px; } +div.wysiwyg ul.toolbar li.colorpicker { background-position: -16px -96px; } +div.wysiwyg ul.toolbar li.fullscreen { background-position: -32px -96px; } + +div.wysiwyg ul.toolbar li.cut { background-position: -32px -64px; } +div.wysiwyg ul.toolbar li.copy { background-position: -48px -64px; } +div.wysiwyg ul.toolbar li.paste { background-position: -64px -64px; } +div.wysiwyg ul.toolbar li.insertTable { background-position: -64px -48px; } + +div.wysiwyg ul.toolbar li.increaseFontSize { background-position: -16px -80px; } +div.wysiwyg ul.toolbar li.decreaseFontSize { background-position: -32px -80px; } + +div.wysiwyg ul.toolbar li.createLink { background-position: -80px -48px; } +div.wysiwyg ul.toolbar li.insertImage { background-position: -80px -80px; } + +div.wysiwyg ul.toolbar li.html { background-position: -48px -48px; } +div.wysiwyg ul.toolbar li.removeFormat { background-position: -80px -64px; } + +div.wysiwyg ul.toolbar li.empty { background-position: -64px -80px; } + +div.wysiwyg ul.toolbar li.code { background-position: -64px -96px; } +div.wysiwyg ul.toolbar li.cssWrap { background-position: -80px -96px; } + +div.wysiwyg-dialogRow { float:left; width:100%; font-size: 16px; } + +div.wysiwyg iframe { clear: left; +background-color:#f7f7f7; padding:0; margin:5px; display:block; width: 90%; } + +/* dialog */ +.wysiwyg-dialog { position:fixed; top:50px; left:50px; width:450px; height:300px; background:transparent; font:12px "Helvetic Neue", Helvetica,Arial,sans-serif; } +.wysiwyg-dialog .wysiwyg-dialog-topbar { background:#333; color:white; padding: 7px 10px; position:relative; } +.wysiwyg-dialog .wysiwyg-dialog-topbar { -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; } +.wysiwyg-dialog .wysiwyg-dialog-topbar .wysiwyg-dialog-close-wrapper .wysiwyg-dialog-close-button { color:white; text-decoration:none; display:block; padding:2px 2px; position:absolute; right:12px; top:50%; font-size: 10px; paddding: 0 5px; margin-top:-12px; } +.wysiwyg-dialog .wysiwyg-dialog-topbar .wysiwyg-dialog-close-wrapper a.wysiwyg-dialog-close-button:hover { background:#666; } +.wysiwyg-dialog .wysiwyg-dialog-topbar .wysiwyg-dialog-title { font-size:12px; font-weight:bold; padding:5px; } +.wysiwyg-dialog .wysiwyg-dialog-content { padding:10px; background:#fcfcfc; -moz-border-radius: 0 0 3px 3px; -webkit-border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px; } +.wysiwyg-dialog-modal-div { position:absolute; top:0px; left:0px; width:100%; height:100%; background-color:rgb(255,255,255); background-color:rgba(0,0,0,0.5); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000); -ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";} +.wysiwyg-dialog-content form.wysiwyg fieldset { } +.wysiwyg-dialog-content form.wysiwyg legend { padding:7px; } +.wysiwyg-dialog-content form.wysiwyg .form-row { clear:both; padding:4px 0; } +.wysiwyg-dialog-content form.wysiwyg .form-row label, .wysiwyg-dialog form.wysiwyg .form-row .form-row-key { display:block; float:left; width:35%; text-align:right; padding:4px 5px; } +.wysiwyg-dialog-content form.wysiwyg .form-row .form-row-value { display:block; float:left; width:55%; } +.wysiwyg-dialog-content form.wysiwyg .form-row .form-row-value input { padding: 7px 10px; } +.wysiwyg-dialog-content form.wysiwyg .form-row input.width-auto { width:auto; } +.wysiwyg-dialog-content form.wysiwyg input.width-small { width:50px; min-width:50px; max-width:50px; } +.wysiwyg-dialog-content form.wysiwyg input, .wysiwyg-dialog form.wysiwyg select { padding:2px; width:100%; margin:2px; } +.wysiwyg-dialog-content form.wysiwyg input[type=submit], .wysiwyg-dialog form.wysiwyg input[type=reset] { padding:2px 7px; width:auto; } +.wysiwyg-dialog-content input.submit { background: url(../../images/buttonbg3.png) repeat-x top left; border: 1px solid #314a78; color: #fff; } +.wysiwyg-dialog-content input.reset { background: url(../../images/thead.png) repeat-x top left; border: 1px solid #bbb; color: #333; } +.wysiwyg-dialog-content label { float: left; width: 120px; } \ No newline at end of file diff --git a/referencia/template/css/style.css b/referencia/template/css/style.css new file mode 100644 index 0000000..d333617 --- /dev/null +++ b/referencia/template/css/style.css @@ -0,0 +1,584 @@ +/*** + * Created by: Mienard Lumaad + * Date: Nov 26, 2011 + * Website: http://themepixels.com/ +***/ + +@import url('plugins/colorbox.css'); +@import url('plugins/colorpicker.css'); +@import url('plugins/jquery.ui.css'); +@import url('plugins/jquery.jgrowl.css'); +@import url('plugins/jquery.alerts.css'); +@import url('plugins/fullcalendar.css'); + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + background: transparent; + border: 0; + margin: 0; + padding: 0; + vertical-align: baseline; +} + +/***@FONT FACE***/ +@font-face { + font-family: 'DroidSansRegular'; + src: url('../fonts/droidsans-webfont.eot'); + src: url('../fonts/droidsans-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/droidsans-webfont.woff') format('woff'), + url('../fonts/droidsans-webfont.ttf') format('truetype'), + url('../fonts/droidsans-webfont.svg#DroidSansRegular') format('svg'); + font-weight: normal; + font-style: normal; + +} + +/***GENERAL STYLES***/ +body { font-family: DroidSansRegular, "Segoe UI", "Lucida Sans Unicode", "Lucida Grande", sans-serif; font-size: 12px; } +body { background: #333 url(../images/texturebg.png); line-height: 21px; } +input, select, textarea, button { outline: none; font-family: DroidSansRegular, "Lucida Sans Unicode", "Lucida Grande", sans-serif; font-size: 12px; } +input, select, textarea, button { border: 1px solid #ccc; padding: 5px; } + +a { text-decoration: none; outline: none; color: #069; } +a:hover { text-decoration: underline; } +button { margin: 0; outline: 0; } +small { font-size: 11px; line-height: 12px; } + +.bodywhite { background: #fff; } +.bodygrey { background: #eee url(../images/leftbg.png) repeat-y top left; } +.page404 { background: #eee; } + +h1.prize { font-size: 28px; color: #000; font-family: Arial, Helvetica, sans-serif; margin-bottom: 5px; } +h2.prize { font-size: 20px; color: #000; font-family: Arial, Helvetica, sans-serif; margin-bottom: 5px; } + +/***NOTIFICATION MESSAGES (login.html, dashboard.html)***/ +.notification { padding: 10px 10px 10px 45px; margin: 0 0 20px 0; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; position: relative; } +.notification .close { position: absolute; right: 5px; top: 5px; display: inline-block; width: 8px; height: 8px; cursor: pointer; } +.notification .close { background: url(../images/icons/close.png) no-repeat 0 0; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; } +.notifyError { border: 1px solid #ff0000; background: #FFECEC; color: #ff0000; font-size: 11px; } + +.msgalert { border: 1px solid #eac572; background: #ffe9ad url(../images/icons/warning.png) no-repeat 10px center; } +.msginfo { border: 1px solid #99c4ea; background: #d1e4f3 url(../images/icons/info.png) no-repeat 10px center; } +.msgsuccess { border: 1px solid #c1d779; background: #effeb9 url(../images/icons/success.png) no-repeat 10px center; } +.msgerror { border: 1px solid #e18b7c; background: #fad5cf url(../images/icons/error.png) no-repeat 10px center; } + +/***LOGIN PAGE (index.html)***/ +.loginlogo { width: 279px; height: 50px; background: url(../images/gradcircle.png) no-repeat top left; margin: 80px auto 20px auto; padding: 75px 50px; } +.loginbox { width: 580px; height: 62px; margin: 10px auto; background: url(../images/loginbox.png) no-repeat right -62px; padding-right: 11px; } +.loginbox_inner { background: url(../images/loginbox.png) no-repeat 0 0; height: 62px; padding-left: 11px; } +.loginbox_content { background: url(../images/loginbox.png) repeat-x 0 -124px; height: 62px; overflow: hidden; padding: 15px 2px; } + +.loginbox .username { border: 0; background: #eee url(../images/usernamefield.png) no-repeat; background-position: top left; width: 190px; margin-right: 10px; } +.loginbox .username { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; padding: 7px 5px 6px 40px; display: inline-block; font-size: 14px; } +.loginbox .username:focus { background-color: #fff; background-position: 0 -32px; } +.loginbox .password { border: 0; background: #eee url(../images/passwordfield.png) no-repeat; background-position: top left; width: 190px; margin-right: 10px; } +.loginbox .password { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; padding: 7px 5px 6px 40px; display: inline-block; font-size: 14px; } +.loginbox .password:focus { background-color: #fff; background-position: 0 -32px; } +.loginbox button { background: #4b6592 url(../images/buttonbg.png) repeat-x top left; font-size: 13px; padding: 6px 14px; width: 67px; font-weight: bold;} +.loginbox button { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; cursor: pointer; color: #fff; text-shadow: 1px 1px #333; border: 0; } +.loginbox button:active { -moz-box-shadow: inset 1px 1px 2px #000; -webkit-box-shadow: inset 1px 1px 2px #000; box-shadow: inset 1px 1px 2px #000;} +.loginbox button:hover { background: #364f7e url(../images/buttonbg.png) repeat-x 0 -34px; } + +.loginoption { width: 570px; margin: 10px auto; background: url(../images/blacktrans.png); padding: 7px 10px; font-size: 11px; color: #ccc; } +.loginoption { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +.loginoption input { margin: 0; padding: 0; vertical-align: middle; } +.loginoption a { float: right; font-size: 11px; color: #ccc; } + +.loginNotify { display: none; padding: 7px; border: 0; width: 580px; margin: auto; background: url(../images/blacktrans.png); } +.loginNotify { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; text-align: center; } + +/***TOP HEADER (all page)***/ +.header, .topheader { min-width: 980px; } +.headerspace { height: 10px; background: #333; border-bottom: 1px solid #222; } +.topheader .msgicon { position: absolute; top: 7px; left: 8px; width: 15px; height: 15px; background-image: url(../images/icons/message.png); } +.topheader .infoicon { position: absolute; top: 7px; left: 8px; width: 14px; height: 15px; background-image: url(../images/icons/notification.png); } +.topheader .msgicon, .topheader .infoicon { background-repeat: no-repeat; background-position: 0 0; } +.topheader .thiconhover { background-position: 0 -15px !important; } + +.topheader > ul { list-style: none; position: absolute; top: 10px; left: 458px; } +.topheader > ul > li { display: inline-block; float: left; margin-right: 8px; line-height: 14px; position: relative; } +.topheader > ul > li > a { font-size: 11px; color: #fff; padding-right: 4px; position: relative; } +.topheader > ul > li > a { display: inline-block; background: url(../images/headbutton.png) no-repeat right -29px; } +.topheader > ul > li > a .wrap { display: block; padding: 7px 11px 7px 26px; color: #fff; background: url(../images/headbutton.png) no-repeat 0 0; height: 15px; } +.topheader > ul > li > a .wrap span.count { padding: 1px 5px 0 5px; display: block; position: absolute; top: -3px; right: -3px; font-size: 10px; } +.topheader > ul > li > a .wrap span.count { background: #cc0000; color: #fff; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +.topheader > ul > li > a:hover { background-position: right -88px; text-decoration: none; } +.topheader > ul > li > a:hover .wrap { background-position: 0 -59px; } +.topheader > ul > li.note a .wrap { padding-right: 0; } + +.dropbox { width: 250px; min-height: 100px; background: #fcfcfc; position: absolute; z-index: 5; } +.dropbox { top: 29px; left: -1px; border: 1px solid #333; border-top: 0; } +.dropbox { -moz-box-shadow: 3px 3px 2px #333; -webkit-box-shadow: 3px 3px 2px #333; box-shadow: 3px 3px 2px #333; } +.dropbox { -moz-border-radius: 0 3px 3px 3px; } + +.showmsg { -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; } +.showmsg .wrap { -moz-border-radius: 0 0 0; -webkit-border-radius: 3px 0 0 0; border-radius: 3px 0 0 0; } +.showmsg, .showmsg .wrap { background: #fcfcfc !important; } + + +/***TOP HEADER: SEARCH (all page)***/ +#search { position: absolute; top: 10px; left: 219px; } +#search input { color: #999; font-size: 11px; float: left; margin: 0; outline: 0; } +#search input { background: #333 url(../images/searchbar.png) no-repeat 0 0; border: 0; height: 25px; padding: 2px 3px 3px 75px; } +#search button { float: left; border: 0; margin: 0; background: #333 url(../images/searchicon.png) no-repeat 0 0; width: 27px; height: 30px; cursor: pointer; } + +/***HEADER (all page)***/ +.header { background: #333 url(../images/texturebg.png); padding: 20px 10px 11px 10px; position: relative; } +.header { border-top: 1px solid #444; border-bottom: 3px solid #272727; } +.accountinfo { position: absolute; right: 10px; top: 6px; background: url(../images/blacktrans.png); padding: 10px; overflow: hidden; line-height: 15px; } +.accountinfo { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +.accountinfo img { float: left; } +.accountinfo .info { float: left; margin-left: 10px; } +.accountinfo h3 { font-size: 12px; color: #fff; font-weight: normal; } +.accountinfo small { font-size: 11px; color: #999; } +.accountinfo p { margin-top: 5px; } +.accountinfo p a { font-size: 11px; color: #ccc; display: inline-block; color: #bbd0e8; } +.accountinfo p a:hover { text-decoration: underline; } +.accountinfo p a:first-child { margin-right: 5px; border-right: 1px solid #666; padding-right: 7px; } + +/***TAB MENU (all page)***/ +.tabmenu { line-height: 21px; position: absolute; top: 49px; left: 220px; } +.tabmenu ul { list-style: none; } +.tabmenu ul li { display: inline-block; float: left; position: relative; background: #4b6592 url(../images/tabmenubg.png) repeat-x top left; } +.tabmenu ul li:first-child { -moz-border-radius: 3px 0 0 0; -webkit-border-radius: 3px 0 0 0; border-radius: 3px 0 0 0; } +.tabmenu ul li:last-child { -moz-border-radius: 0 3px 0 0; -webkit-border-radius: 0 3px 0 0; border-radius: 0 3px 0 0; } +.tabmenu ul li a { display: inline-block; color: #fff; background: url(../images/separator.png) no-repeat right center; } +.tabmenu ul li a:hover { text-decoration: none; } +.tabmenu ul li:last-child a { background: none; } +.tabmenu ul li:hover { background: #37507f url(../images/tabmenubg.png) repeat-x 0 -68px; } +.tabmenu ul li a span { display: block; padding: 9px 15px 9px 40px; text-transform: uppercase; font-size: 12px; text-shadow: 1px 1px #224e82; } +.tabmenu ul li.current { background: #eee; text-shadow: 1px 1px #fff; } +.tabmenu ul li.current a { color: #333; background: none; } +.tabmenu ul li.current a span { text-shadow: 1px 1px #fcfcfc; } + +.tabmenu ul li a.dashboard span { background: url(../images/icons/dashboard.png) no-repeat 15px 12px; } +.tabmenu ul li.current a.dashboard span { background: url(../images/icons/dashboard.png) no-repeat 15px -57px; } +.tabmenu ul li a.elements span { background: url(../images/icons/elements.png) no-repeat 15px 12px; } +.tabmenu ul li.current a.elements span { background: url(../images/icons/elements.png) no-repeat 15px -57px; } +.tabmenu ul li a.reports span { background: url(../images/icons/reports.png) no-repeat 15px 12px; } +.tabmenu ul li.current a.reports span { background: url(../images/icons/reports.png) no-repeat 15px -57px; } +.tabmenu ul li a.users span { background: url(../images/icons/users.png) no-repeat 15px 14px; } +.tabmenu ul li.current a.users span { background: url(../images/icons/users.png) no-repeat 15px -59px; } + +.tabmenu ul li .subnav { + position: absolute; min-width: 200px; top: 39px; left: 0; display: none; z-index: 100; border: 1px solid #6785b0; border-bottom: 0; } +.tabmenu ul li .subnav li { display: block; float: none; background: none; } +.tabmenu ul li .subnav li a { display: block; background: #83a3ca; border-bottom: 1px solid #6785b0; color: #fff; } +.tabmenu ul li .subnav li:last-child a { background: #83a3ca; } +.tabmenu ul li .subnav li a:hover { background: #7293c1; color: #fff; } +.tabmenu ul li .subnav a span { padding: 5px 15px; text-transform: capitalize; text-shadow: 1px 1px #6785b0; } +.tabmenu ul li.current .subnav { border-color: #ccc; border-top: 0; } +.tabmenu ul li.current .subnav li a { background: #eee; border-bottom: 1px solid #ccc; color: #333; } +.tabmenu ul li.current .subnav li a:hover { background: #c8d9ed; } +.tabmenu ul li.current .subnav li a span { text-shadow: 1px 1px #f7f7f7; } + +/***SIDEBAR (all page)***/ +.sidebar { padding: 20px 0 20px 0; width: 220px; display: block; float: left; } + +#accordion h3 { background: url(../images/arrow.png) no-repeat 10px 6px; padding-left: 30px; } +#accordion h3 { cursor: pointer; font-size: 12px; color: #333; text-transform: uppercase; } +#accordion h3.open { background: url(../images/arrow.png) no-repeat 10px -37px; } +#accordion .content { display: none; margin: 10px 0 20px 0; } +#accordion .content:last-child { padding: 0 15px; color: #333; } + + +.leftmenu { list-style: none; } +.leftmenu li { display: block; margin-bottom: 1px; } +.leftmenu li a { font-size: 12px; display: block; padding: 5px 0 5px 40px; color: #333; } +.leftmenu li a:hover { } +.leftmenu li.current a { background-color: #eee; border-right: 0; color: #333; border-top: 1px solid #a6c0de; border-bottom: 1px solid #a6c0de; } +.leftmenu li.current a:hover { text-decoration: none; } + +.leftmenu li a.form { background-image: url(../images/icons/form.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.table { background-image: url(../images/icons/table.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.gallery { background-image: url(../images/icons/gallery.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.home { background-image: url(../images/icons/home.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.grid { background-image: url(../images/icons/grid.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.calendar { background-image: url(../images/icons/cal.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.buttons { background-image: url(../images/icons/buttons.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.editor { background-image: url(../images/icons/editor.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.file { background-image: url(../images/icons/file.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.error { background-image: url(../images/icons/404.png); background-repeat: no-repeat; background-position: 15px center; } + +/***COLUMNS***/ +.one_half{ width:48%; } +.one_third{ width:30.66%; } +.two_third{ width:65.33%; } +.one_fourth{ width:22%; } +.three_fourth{ width:74%; } +.one_fifth{ width:16.8%; } +.two_fifth{ width:37.6%; } +.three_fifth{ width:58.4%; } +.four_fifth{ width:67.2%; } +.one_sixth{ width:13.33%; } +.five_sixth{ width:82.67%; } + +.one_half,.one_third,.two_third,.three_fourth,.one_fourth,.one_fifth, +.two_fifth,.three_fifth,.four_fifth,.one_sixth,.five_sixth{ position:relative; margin-right:4%; float:left; } + +.last{ margin-right:0 !important; clear:right; } + +/***MAIN CONTENT (dashboard.html)***/ +.maincontent { margin-left: 220px; min-width: 1028px; position: relative; color: #333; } +.maincontent .left { padding: 20px 15px; overflow: hidden; } +.maincontent .right { padding: 20px 0; padding-right: 15px; overflow: hidden; } +.maincontent .right .widgetbox:last-child { margin-bottom: 0; border-bottom: 0; } + +.maincontent_inner { width:68.33%; margin-right: 1%; } + +.breadcrumbs { font-size: 11px; padding: 0 15px 0 30px; margin: 20px 15px 0 15px; border: 1px solid #ddd; } +.breadcrumbs { -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; background: #f7f7f7 url(../images/icons/homesmall.png) no-repeat 10px 9px; } +.breadcrumbs { -moz-box-shadow: 1px 1px 0 #f3f3f3; } +.breadcrumbs a { display: inline-block; color: #069; padding: 5px 20px 5px 0; } +.breadcrumbs a { background: url(../images/separator2.png) no-repeat right center; margin-right: 10px; } +.breadcrumbs a:hover { text-decoration: none; } +.breadcrumbs span { color: #666; } + +.widgetlist { list-style: none; } +.widgetlist li { display: inline-block; float: left; width: 130px; margin: 0 10px 10px 0; } +.widgetlist li a { display: block; padding: 15px; border: 1px solid #ccc; color: #333; text-align: center; background: #f7f7f7; } +.widgetlist li a { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; -moz-box-shadow: 1px 1px 0 #fff; color: #069; } +.widgetlist li a span { font-size: 12px; display: block; margin-top: 10px; } +.widgetlist li a:hover { -moz-box-shadow: 0 0 4px #ddd; background: #fcfcfc; text-decoration: none; } + + +/***MAIN CONTENT: BUTTONS(elements.html)***/ +button.button { padding: 7px 15px; font-size: 12px; display: inline-block; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +button.button { -moz-box-shadow: 1px 1px 2px #eee; -webkit-box-shadow: 1px 1px 2px #eee; box-shadow: 1px 1px 2px #eee; cursor: pointer; } +button.button:hover, .button:active { background-position: 0 -39px; } + +.anchorbutton { padding: 7px 15px; font-size: 12px; display: inline-block; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +.anchorbutton { -moz-box-shadow: 1px 1px 2px #eee; -webkit-box-shadow: 1px 1px 2px #eee; box-shadow: 1px 1px 2px #eee; cursor: pointer; } +.anchorbutton:hover, .anchorbutton:active { background-position: 0 -39px; text-decoration: none; } + +.button_white { border: 1px solid #ccc; background: #eee url(../images/buttons/button_white.png) repeat-x top left; text-shadow: 1px 1px #f7f7f7; color: #333; } +.button_white:active { -moz-box-shadow: inset 2px 2px 2px #ccc; -webkit-box-shadow: inset 2px 2px 2px #ccc; box-shadow: inset 2px 2px 2px #ccc; } + +.button_blue { border: 1px solid #39537f; background: #eee url(../images/buttons/button_blue.png) repeat-x top left; text-shadow: 1px 1px #39537f; color: #fff; } +.button_blue:active { -moz-box-shadow: inset 2px 2px 2px #12274c; -webkit-box-shadow: inset 2px 2px 2px #12274c; box-shadow: inset 2px 2px 2px #12274c; } + +.button_black { border: 1px solid #333; background: #333 url(../images/buttons/button_black.png) repeat-x top left; text-shadow: 1px 1px #333; color: #fff; } +.button_black:active { -moz-box-shadow: inset 2px 2px 2px #12274c; -webkit-box-shadow: inset 2px 2px 2px #12274c; box-shadow: inset 2px 2px 2px #12274c; } + +.button_red { border: 1px solid #b22407; background: #333 url(../images/buttons/button_red.png) repeat-x top left; text-shadow: 1px 1px #b22407; color: #fff; } +.button_red:active { -moz-box-shadow: inset 2px 2px 2px #b22407; -webkit-box-shadow: inset 2px 2px 2px #b22407; box-shadow: inset 2px 2px 2px #b22407; } + +.button_yellow { border: 1px solid #c67601; background: #333 url(../images/buttons/button_yellow.png) repeat-x top left; text-shadow: 1px 1px #c67601;color: #fff; } +.button_yellow:active { -moz-box-shadow: inset 2px 2px 2px #c67601; -webkit-box-shadow: inset 2px 2px 2px #c67601; box-shadow: inset 2px 2px 2px #c67601; } + +.button_green { border: 1px solid #507e0c; background: #333 url(../images/buttons/button_green.png) repeat-x top left; text-shadow: 1px 1px #507e0c;color: #fff; } +.button_green:active { -moz-box-shadow: inset 2px 2px 2px #507e0c; -webkit-box-shadow: inset 2px 2px 2px #507e0c; box-shadow: inset 2px 2px 2px #507e0c; } + +.button_brown { border: 1px solid #574128; background: #333 url(../images/buttons/button_brown.png) repeat-x top left; text-shadow: 1px 1px #574128; color: #fff; } +.button_brown:active { -moz-box-shadow: inset 2px 2px 2px #574128; -webkit-box-shadow: inset 2px 2px 2px #574128; box-shadow: inset 2px 2px 2px #574128; } + +.button_lblue { border: 1px solid #7197bd; background: #333 url(../images/buttons/button_lblue.png) repeat-x top left; text-shadow: 1px 1px #fff; color: #2161a0; } +.button_lblue:active { -moz-box-shadow: inset 2px 2px 2px #7197bd; -webkit-box-shadow: inset 2px 2px 2px #7197bd; box-shadow: inset 2px 2px 2px #7197bd; } + +/***MAIN CONTENT: WIDGET BOX (dashboard.html)***/ +.widgetbox { margin-bottom: 20px; -moz-box-shadow: 1px 1px 2px #ccc; -webkit-box-shadow: 1px 1px 2px #ccc; box-shadow: 1px 1px 2px #ccc; } +.widgetbox h3 { font-size: 12px; text-transform: uppercase; color: #fff; font-weight: normal; text-shadow: 1px 1px #4b6592; } +.widgetbox h3 { -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; } +.widgetbox h3 { border: 1px solid #6082ad; background: #688ab5 url(../images/titlebg.png) repeat-x top left; } +.widgetbox h3 span { padding: 10px 15px; display: block; } +.widgetbox h3.arrow span { background: url(../images/toggle.png) no-repeat right center; } +.widgetbox .content { background: #fcfcfc; padding: 20px 15px; color: #666; overflow: hidden; border: 1px solid #ccc; border-top: 0; } +.widgetbox .content { -moz-border-radius: 0 0 3px 3px; -webkit-border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px; } +.widgetbox .content p { margin: 5px auto; } +.widgetbox .content p:first-child { margin-top: 0; } + +.widgetbox2 { margin-bottom: 20px; -moz-box-shadow: 1px 1px 2px #ddd; -webkit-box-shadow: 1px 1px 2px #ddd; box-shadow: 1px 1px 2px #ddd; } +.widgetbox2 h3 { font-size: 12px; color: #333; font-weight: normal; text-shadow: 1px 1px #fff; } +.widgetbox2 h3 { -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; } +.widgetbox2 h3 { border: 1px solid #ddd; background: #eee url(../images/thead.png) repeat-x top left; } +.widgetbox2 h3 span { padding: 10px 15px; display: block; } +.widgetbox2 h3.arrow span { background: url(../images/toggle2.png) no-repeat right center; } +.widgetbox2 .content { background: #fcfcfc; padding: 20px 15px; color: #666; overflow: hidden; border: 1px solid #ddd; border-top: 0; } +.widgetbox2 .content { -moz-border-radius: 0 0 3px 3px; -webkit-border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px; } +.widgetbox2 .content p { margin: 5px 0; } +.widgetbox2 .content p:first-child { margin-top: 0; } +.widgetbox2 .content label { display: block; padding: 0; width: 120px; margin-right: 15px; float: left; } + +/***PROGRESS BAR (dashboard.html)***/ +.progress { margin: 5px 0; } +.progress .bar { background: #ddd; -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; padding: 2px; } +.progress .bar { -moz-box-shadow: inset 2px 2px 3px #999; -webkit-box-shadow: inset 2px 2px 3px #999; box-shadow: inset 2px 2px 3px #999; } +.progress .bar .value { height: 5px; -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; } + +.progress .bar2 { background: #ddd; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; padding: 2px; } +.progress .bar2 { -moz-box-shadow: inset 2px 2px 3px #999; -webkit-box-shadow: inset 2px 2px 3px #999; box-shadow: inset 2px 2px 3px #999; } +.progress .bar2 .value { padding: 3px 0; text-align: center; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; color: #fff; } +.progress .bar2 .value { background-image: url(../images/barbg.png); background-repeat: repeat-x; background-position: 0 0; } + +.progress .bluebar { background-color: #069; } +.progress .orangebar { background-color: #F90; } +.progress .redbar { background-color: #cc0000; } + + +/***MAIN CONTENT:FULL PAGE***/ +.fullpage { margin: 20px 15px; } +.pageTitle { font-size: 24px; margin-bottom: 20px; text-shadow: 1px 1px #fff; } + +/***MAIN CONTENT: SUB MENU (users.html)***/ +.submenu { list-style: none; overflow: hidden; } +.submenu li { display: inline-block; float: left; } +.submenu li a { display: block; padding: 5px 10px; border: 1px solid #bbb; background: url(../images/bgbutton4.png) repeat-x top left; border-left: 0; } +.submenu li a { color: #333; text-shadow: 1px 1px #eee; -moz-box-shadow: 1px 1px 0 #fcfcfc; -webkit-box-shadow: 1px 1px 0 #fcfcfc; box-shadow: 1px 1px 0 #fcfcfc; } +.submenu li a:hover { -moz-box-shadow: inset 1px 1px 2px #ccc; -webkit-box-shadow: inset 1px 1px 2px #ccc; box-shadow: inset 1px 1px 2px #ccc; } +.submenu li a:hover { text-decoration: none; } +.submenu li.current a { background: #f7f7f7; color: #069; text-shadow: none; } +.submenu li.current a:hover { -moz-box-shadow: none; webkit-box-shadow: none; box-shadow: none; } +.submenu li:last-child a { -moz-border-radius: 0 3px 3px 0; -webkit-border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0; } +.submenu li:first-child a { -moz-border-radius: 3px 0 0 3px; -webkit-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; border-left: 1px solid #bbb; } + +/***MAIN CONTENT: FORM STYLING (forms.html)***/ +.sf { width: 250px; } +.mf { width: 350px; } +.lf { width: 450px; } +textarea.mf { height: 100px; } +input[type=radio], input[type=checkbox] { margin: 0; padding: 0; vertical-align: middle; } + +.form_default fieldset { border: 1px solid #ccc; padding: 20px; background: #f7f7f7; } +.form_default legend { text-transform: uppercase; } +.form_default p { margin: 20px 0 !important; } +.form_default label { width: 150px; float: left; text-align: right; padding-top: 5px; margin-right: 20px; } + +.form_default input[type=text] { font-size: 12px; padding: 8px 5px; border: 1px solid #ccc; background: #fcfcfc; outline: none; } +.form_default input[type=text] { -moz-box-shadow: inset 1px 1px 3px #ccc; -webkit-box-shadow: inset 1px 1px 3px #ccc; box-shadow: inset 1px 1px 3px #ccc; } +.form_default input[type=text] { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; margin-right: 10px; } + +.form_default textarea { font-size: 12px; padding: 8px 5px; border: 1px solid #ccc; background: #fcfcfc; outline: none; } +.form_default textarea { -moz-box-shadow: inset 1px 1px 3px #ccc; -webkit-box-shadow: inset 1px 1px 3px #ccc; box-shadow: inset 1px 1px 3px #ccc; } +.form_default textarea { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; margin-right: 10px; } + +.form_default select { font-size: 12px; padding: 5px; border: 1px solid #ccc; background: #fcfcfc; outline: none; } +.form_default select { -moz-box-shadow: inset 1px 1px 3px #ccc; -webkit-box-shadow: inset 1px 1px 3px #ccc; box-shadow: inset 1px 1px 3px #ccc; } +.form_default select { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; margin-right: 10px; } + +.form_default input[type=text]:focus, .form_default textarea:focus { background: #fff; } + +.form_default button { background: #4b6592 url(../images/buttonbg3.png) repeat-x top left; color: #fff; padding: 7px 20px; cursor: pointer; } +.form_default button { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; border: 1px solid #395380; font-size: 12px; } +.form_default button { text-transform: uppercase; text-shadow: 1px 1px #395380; margin-left: 170px; } +.form_default button { -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; } +.form_default button:hover { background: #005681 url(../images/buttonbg3.png) repeat-x 0 -36px; } +.form_default button:active { -moz-box-shadow: inset 2px 2px 2px #12274c; -webkit-box-shadow: inset 2px 2px 2px #12274c; box-shadow: inset 2px 2px 2px #12274c; } + +.form_default input.error, .form_default textarea.error, .form_default select.error { border: 1px solid #ff0000; } +.form_default label.error { float: none; width: auto; color: #ff0000; font-size: 11px; display: inline-block; } + +/***MAIN CONTENT: STANDARD TABLE (users.html)***/ +.addNewButton { float: right; border: 1px solid #ccc; background: #4b6592 url(../images/buttonbg3.png) repeat-x top left; color: #fff; padding: 5px 20px; } +.addNewButton { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; border: 1px solid #395380; font-size: 12px; } +.addNewButton { text-transform: uppercase; text-shadow: 1px 1px #395380; margin-left: 170px; } +.addNewButton { -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; } +.addNewButton:hover { background: #005681 url(../images/buttonbg3.png) repeat-x 0 -36px; text-decoration: none; } + +.sTableOptions { padding: 12px 10px; border: 1px solid #bbb; border-bottom: 0; background: #eee url(../images/thead.png) repeat-x top left; } +.sTableOptions { -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; position: relative; } +.sTableOptions .button { display: inline-block; border: 1px solid #999; background: url(../images/buttonbg5.png) repeat-x bottom left; } +.sTableOptions .button { text-transform: uppercase; color: #333; text-shadow: 1px 1px #fcfcfc; -webkit-box-shadow: 0 1px 0 #ddd; box-shadow: 0 1px 0 #ddd; } +.sTableOptions .button { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; -moz-box-shadow: 0 1px 0 #ddd; } +.sTableOptions .button:hover { cursor: pointer; text-decoration: none; background-position: top left; } +.sTableOptions .button:active { -moz-box-shadow: inset 1px 1px 2px #999; -webkit-box-shadow: inset 1px 1px 2px #999; box-shadow: inset 1px 1px 2px #999; } +.sTableOptions .button:active { background: #eee; } +.sTableOptions .button span { padding: 5px 10px; display: block; } +.sTableOptions h4 { font-size: 12px; font-weight: normal; color: #333; } + +.sTableOptions .delete span { background: url(../images/icons/trash.png) no-repeat 8px center; padding-left: 30px; } + +/***(tables.html)***/ +.sTableOptions2 { padding: 12px 10px; border: 1px solid #ccc; border-bottom: 0; background: #ddd url(../images/bgbutton5.png) repeat-x top left; } +.sTableOptions2 { -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; position: relative; } +.sTableOptions2 .button { display: inline-block; border: 1px solid #999; background: url(../images/buttonbg5.png) repeat-x bottom left; } +.sTableOptions2 .button { text-transform: uppercase; color: #333; text-shadow: 1px 1px #fcfcfc; -webkit-box-shadow: 0 1px 0 #ddd; box-shadow: 0 1px 0 #ddd; } +.sTableOptions2 .button { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; -moz-box-shadow: 0 1px 0 #ddd; } +.sTableOptions2 .button:hover { cursor: pointer; text-decoration: none; background-position: top left; } +.sTableOptions2 .button:active { -moz-box-shadow: inset 1px 1px 2px #999; -webkit-box-shadow: inset 1px 1px 2px #999; box-shadow: inset 1px 1px 2px #999; } +.sTableOptions2 .button:active { background: #eee; } +.sTableOptions2 .button span { padding: 5px 10px; display: block; } +.sTableOptions2 h4 { font-size: 12px; font-weight: normal; color: #333; } + +.sTableHead { border-collapse: collapse; } +.sTableHead td { padding: 8px 10px; color: #ccc; text-shadow: 1px 1px #444; font-size: 12px; text-transform: uppercase; border-right: 1px solid #777; } +.sTableHead .head0 { background: #666; } +.sTableHead .head1 { background: #555; } + +.sTableWrapper { border: 1px solid #bbb; border-top: 0; } + +.sTable { border-collapse: collapse; } +.sTable tr td { padding: 8px 10px; border-right: 1px solid #fff; border-bottom: 1px solid #ddd; vertical-align: top; } +.sTable thead th { padding: 8px 10px; color: #ccc; text-shadow: 1px 1px #444; font-size: 12px; text-transform: uppercase; border-right: 1px solid #777; } +.sTable thead th { font-weight: normal; text-align: left; } +.sTable tr td:last-child { border-right: 0; } +.sTable tr:last-child td { border-bottom: 0; } +.sTable tr:hover { background: #ddd; } +.sTable tr.selected { background: #fffccc; } +.sTable .head0 { background: #666; } +.sTable .head1 { background: #555; } +.sTable .con1 { background: #eee; } +.sTable .con0 { background: #f7f7f7; } + +/***(tables.html)***/ +.sTable2 { border-collapse: collapse; border: 1px solid #ccc; } +.sTable2 thead td { padding: 5px 10px; background: #eee url(../images/thead.png) repeat-x top left; border: 1px solid #ccc; } +.sTable2 thead th { padding: 5px 10px; background: #eee url(../images/thead.png) repeat-x top left; border: 1px solid #ccc; } +.sTable2 tbody tr td { padding: 10px; background: #fff; border-top: 1px solid #eee; border-left: 1px solid #eee; } +.sTable2 tbody tr td:first-child { border-left: 1px solid #ccc; } +.sTable2 tbody tr.even td { background: #fcfcfc; } + +.sTable3 { border-collapse: collapse; } +.sTable3 thead td { padding: 5px 10px; background: #eee url(../images/thead.png) repeat-x top left; border-bottom: 1px solid #ccc; } +.sTable3 tbody tr td { padding: 10px; background: #fff; border-top: 1px solid #eee; border-left: 1px solid #eee; } +.sTable3 tbody tr.even td { background: #fcfcfc; } + +/**dynamic table***/ +.dataTables_wrapper { border: 1px solid #ccc; background: #eee url(../images/thead.png) repeat-x top left; +-moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; position: relative; } +.dataTables_filter { position: absolute; top: 11px; right: 5px; } +.dataTables_length { padding: 10px 10px; } +.dataTables_wrapper label { display: inline-block; margin-right: 5px; } +.dyntable { width: 100%; background: #fcfcfc; } +.dyntable thead th, .dyntable tfoot th { padding: 5px 10px; color: #fff; font-weight: normal; text-align: left; } +.dyntable thead th.head0, .dyntable tfoot th.head0 { background: #666; } +.dyntable thead th.head1, .dyntable tfoot th.head1 { background: #555; } +.dyntable tbody tr td { padding: 5px 10px; border-top: 1px solid #ddd; } +.dyntable tbody tr:first-child td { border-top: 0; } +.dyntable .con1 { background: #eee; } +.dyntable .con0 { background: #f7f7f7; } +.dyntable thead th.sorting { background-image: url(../images/sort_both.png); background-repeat: no-repeat; background-position: right 5px; } +.dyntable thead th.sorting_asc { background-image: url(../images/sort_asc.png); background-repeat: no-repeat; background-position: right 6px; } +.dyntable thead th.sorting_desc { background-image: url(../images/sort_desc.png); background-repeat: no-repeat; background-position: right 6px; } + +.dataTables_info { padding: 10px; } +.paging_full_numbers { position: absolute; bottom: 7px; right: 8px; } +.paging_full_numbers .paginate_button { + display: inline-block; padding: 2px 8px; border: 1px solid #ccc; margin-left: 5px; + background: #eee url(../images/buttonbg5.png) repeat-x top left; cursor: pointer; + -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; +} +.paging_full_numbers .paginate_button:hover { + background: #eee; -moz-box-shadow: inset 1px 1px 2px #ccc; -webkit-box-shadow: inset 1px 1px 2px #ccc; + box-shadow: inset 1px 1px 2px #ccc; +} +.paging_full_numbers .paginate_active, .paging_full_numbers .paginate_button:active { + display: inline-block; padding: 2px 8px; border: 1px solid #405A87; margin-left: 5px; + background: #405A87 url(../images/buttonbg3.png) repeat-x top left; color: #fff; + -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; +} +.paging_full_numbers .paginate_button_disabled { color: #999; } + +/***PAGINATION (users.html)***/ +.pagination a { display: inline-block; padding: 5px 10px; color: #333; border: 1px solid #bbb; background: url(../images/buttonbg5.png) repeat-x bottom left; } +.pagination a { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +.pagination a { -moz-box-shadow: 1px 1px 0 #f7f7f7; -webkit-box-shadow: 1px 1px 0 #f7f7f7; box-shadow: 1px 1px 0 #f7f7f7; } +.pagination a:hover { -moz-box-shadow: inset 1px 1px 3px #eee; -webkit-box-shadow: inset 1px 1px 3px #eee; } +.pagination a:hover { text-decoration: none; background: #eee; box-shadow: inset 1px 1px 3px #eee; } +.pagination a.disabled { color: #999; border: 1px solid #ccc; } +.pagination a.disabled:hover { background: url(../images/buttonbg5.png) repeat-x bottom left; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } +.pagination a.current { background: #333 url(../images/buttonbg3.png) repeat-x top left; color: #fff; border: 1px solid #405a87; } +.pagination a.current:hover { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } + +.pgright { position: absolute; right: 10px; top: 12px; } +.pgright a.disabled { border: 1px solid #ccc; } + +/***MAINCONTENT: GALLERY (galery.html)***/ +.gallery .thumbview ul { list-style: none; } +.gallery .thumbview ul li { float: left; display: inline-block; margin-right: 20px; margin-bottom: 20px; } +.gallery .thumbview .thumb { border: 1px solid #ccc; padding: 10px; background: #fcfcfc; -moz-box-shadow: 1px 1px 2px #ddd; box-shadow: 1px 1px 2px #ddd; } +.gallery .thumbview .thumb { -moz-border-radius: 3px; -webit-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 1px 1px 2px #ddd; position: relative; } +.gallery .thumbview .thumb img { cursor: pointer; } +.gallery .thumbview .info { width: 230px; height: 130px; position: absolute; top: 10px; left: 10px; font-size: 12px; line-height: 18px; } +.gallery .thumbview .info { padding: 10px; background: url(../images/blacktrans1.png); display: none; cursor: pointer; } +.gallery .thumbview .info label { width: 70px; display: inline-block; color: #ccc; } +.gallery .thumbview .info span { color: #fff; } +.gallery .thumbview .info .menu { margin-top: 10px; } +.gallery .thumbview .info .menu a { display: inline-block; margin-right: 5px; width: 22px; height: 22px; } +.gallery .thumbview .info .menu a { -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; } +.gallery .thumbview .info .menu a.view { background: #83a3ca url(../images/viewdelete.png) no-repeat 5px 5px; } +.gallery .thumbview .info .menu a.delete { background: #83a3ca url(../images/viewdelete.png) no-repeat 5px -15px; } +.gallery .thumbview .info .menu a:hover { text-decoration: none; background-color: #6385ae; } + +.gallery .listview { display: none; } + +/***PAGES: message.html, info.html***/ +.messagelist h4 { font-size: 11px; color: #333; font-weight: normal; padding: 8px 10px; border-bottom: 1px solid #ccc; text-transform: uppercase; } +.messagelist .link { padding: 8px 10px; background: #eee; font-size: 11px; border-top: 1px solid #ccc; } +.messagelist ul { list-style: none; } +.messagelist ul li { display: block; border-bottom: 1px dotted #ccc; padding: 5px 10px; } +.messagelist ul li:last-child { border-bottom: 0; } +.messagelist ul li.current { background: #fff; color: #333; } +.messagelist ul li.current a { color: #6385ae; font-weight: bold; } +.messagelist ul li a { display: block; color: #333; } +.messagelist ul li a:hover { text-decoration: none; } +.messagelist ul li span { color: #666; display: block; font-size: 11px; } +.messagelist ul li small { font-size: 11px; color: #666; } +.messagelist ul li:hover { background: #e8f3fe; } + +/***MAIN CONTENT: ELEMENTS (elements.html)***/ +.imgleft { float: left; margin: 0 10px 0 0; padding: 5px; border: 1px solid #ccc; } +.imgleft { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } + +/**BUTTONS & ICONS**/ +.iconlink { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; color: #fff; text-shadow: 1px 1px #304978; margin-bottom: 5px; } +.iconlink { -moz-box-shadow: 1px 1px 0 #f7f7f7; -webkit-box-shadow: 1px 1px 0 #f7f7f7; box-shadow: 1px 1px 0 #f7f7f7; } +.iconlink { display: inline-block; padding: 5px 7px; border: 1px solid #304978; background: url(../images/buttonbg3.png) repeat-x top left; } +.iconlink:hover { background-position: 0 -36px; text-decoration: none; } +.iconlink:active { -moz-box-shadow: inset 1px 1px 2px #304978; -webkit-box-shadow: inset 1px 1px 2px #304978; box-shadow: inset 1px 1px 2px #304978; } +.iconlink img { vertical-align: middle; display: inline-block; } + +.iconlink2 { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; color: #333; margin-bottom: 5px; } +.iconlink2 { -moz-box-shadow: 1px 1px 0 #f7f7f7; -webkit-box-shadow: 1px 1px 0 #f7f7f7; box-shadow: 1px 1px 0 #f7f7f7; } +.iconlink2 { display: inline-block; padding: 5px 7px; border: 1px solid #ccc; background: url(../images/bgbutton4.png) repeat-x top left; } +.iconlink2:active { -moz-box-shadow: inset 1px 1px 2px #ccc; -webkit-box-shadow: inset 1px 1px 2px #ccc; box-shadow: inset 1px 1px 2px #ccc; } +.iconlink2:hover { background-position: 0 -37px; text-decoration: none; } +.iconlink2 img { vertical-align: middle; display: inline-block; } + +/**INVOICE**/ +.invoice { border: 1px solid #ccc; background: #f7f7f7; -moz-box-shadow: 1px 1px 3px #ddd; -webkit-box-shadow: 1px 1px 3px #ddd; box-shadow: 1px 1px 3px #ddd; } +.invoice_inner { padding: 20px; position: relative; overflow: hidden; } +.invoice .title { font-size: 18px; float: right; } +.invoicetable { border-collape: collapse; } +.invoicetable thead td { border-bottom: 1px solid #ccc; padding: 5px 0; font-weight: bold; } +.invoicetable .subtotal td { font-weight: bold; } +.invoicetable tr td.line { border-bottom: 1px solid #ccc; } + +/** FOOTER**/ +.footer { background: #333; padding: 10px 0; } +.footerinner { padding: 0 20px; text-align: right; font-size: 11px; color: #ccc; } +.footer_float { position: fixed; bottom: 0; left: 0; width: 100%; } + +/***MAIN CONTENT: CUSTOM STYLES***/ +.errorpage { padding: 20px; } +.widgetbox .content .bright { border-right: 1px solid #ddd; width: 47%; } +.clear { clear: both; height: 15px; } +.nopadding { padding: 0 !important; } +.loaders img { vertical-align: middle; display: inline-block; margin-right: 10px; } +.padding15 { padding: 15px; overflow: hidden; } +.padding1020 { padding: 10px 20px; } +.padding20 { padding: 20px; overflow: hidden; } +.borderbottom { border-bottom: 1px solid #eee; } +.floatleft { float: left; } +.width50 { width: 50px; } +.ohidden { overflow: hidden; } +.overflownone { overflow: none !important; } +.marginleft150 { margin-left: 150px; } +.marginbottom20 { margin-bottom: 20px; } +.color069 { color: #069; } +.tooltipflot { background: url(../images/blacktrans1.png); padding: 2px 10px; color: #fff; font-size: 11px; } +.tooltipflot { -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; } +#colorselector { width: 16px; height: 16px; border: 2px solid #ccc; display: inline-block; } +#colorselector { background: url(../images/colorpicker.png) no-repeat top left; cursor: pointer; } +.pie { height: 200px; width: 290px; } +.external-event { border: 1px solid #a6bdd8; padding: 7px 10px; color: #333; margin-bottom: 5px; background: #c8d9ed; cursor: move; } +.mgright5 { margin-right: 5px; } +.inlineblock { display: inline-block; } +.alignright { text-align: right; } +.bordertop { border-top: 1px solid #ccc; } diff --git a/referencia/template/dashboard.html b/referencia/template/dashboard.html new file mode 100644 index 0000000..cf0f694 --- /dev/null +++ b/referencia/template/dashboard.html @@ -0,0 +1,384 @@ + + + + +Dashboard | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ + + + Logo + +
+ +
+ +
+ Avatar +
+

John Doe

+ youremail@domain.com +

+ Account Settings Logout +

+
+
+
+ + + + + +
+
+
+ +
+ + There are 3 submitted items from users. Click to approve +
+ + + + + +
+ +
+

Sample Chart

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Column 1Column 2Column 3ImpressionsPercentageColumn 6
Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
+
+
+ +
+

Sample Chart

+
+
+
+
+ +
+

Buttons

+
+   +   +   +   +   +   +   +
+
+
+ +
+

Form with validation

+
+
+ +
+ +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ + Male      Female +

+ +

+ + English      + Mandarin      + German +

+ +

+ + +

+ +

+ +

+ +
+
+ +
+
+ +
+ +
+
+ +
+
+ +
+

EARNINGS

+
+ +

$232.45

+

Estimate earnings by the end of the day: $300.00

+ +
+ +
+

$412.30

+ Yesterday's earnings +
+ +
+

$2,796.98

+ This month's earnings +
+ + +
+
+ +
+

PROGRESS BAR

+
+ +
+ Storage (60%) +
+
+ +
+ Bandwidth (86%) +
+
+ +
+ Impression (34%) +
+
+ +
+
+ +
+

Widget Box 2

+
+ +

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium.

+ + +
+
+ +
+ +
+

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

+
+
+

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.

+
+
+

Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.

+
+ +
+ +
+ +
+

First header

+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
+

Second header

+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
+

Third header

+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
+
+ +
+
+ +
+ +
+ +
+ + + + diff --git a/referencia/template/editor.html b/referencia/template/editor.html new file mode 100644 index 0000000..ca4ca23 --- /dev/null +++ b/referencia/template/editor.html @@ -0,0 +1,165 @@ + + + + +WYSIWYG Editor | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ + + + Logo + +
+ +
+ +
+ Avatar +
+

John Doe

+ youremail@domain.com +

+ Account Settings Logout +

+
+
+
+ + + + + +
+ + + +
+ +

WYSIWYG Editor

+ +
+

Editor

+
+ +
+
+ +
+ +
+ +
+ +
+ + + + diff --git a/referencia/template/elements.html b/referencia/template/elements.html new file mode 100644 index 0000000..049a66a --- /dev/null +++ b/referencia/template/elements.html @@ -0,0 +1,363 @@ + + + + +Interface Elements | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ + + + Logo + +
+ +
+ +
+ Avatar +
+

John Doe

+ youremail@domain.com +

+ Account Settings Logout +

+
+
+
+ + + + + +
+ + + +
+ +

Interface Elements

+ +
+
+

Image Loaders

+
+ + + + + + + + + + +

+ You can create your own loader images by going to ajaxload.info +
+
+
+ +
+ +
+
+

Buttons

+
+   +   +   +   +   +   +   +
+
+
+
+ +
+ +
+
+

Pickers

+
+
+ +
+ +

+ +
+
+
+

+ + +

+
+
+ +
+ +
+

Sliders

+
+
+ +
+
+
+
+ +
+ +
+ +
+ Sales earning: +
+
+
+ +
+ +
+ +
+ Price Range: +
+
+
+ +
+ +
+ Maximum price: +
+
+
+ +
+ +
+ Minimum price: +
+
+
+ +
+ +
+
+ Volume:
+
+
+ +
+ Price Range:
+
+
+
+
+ +
+
+ +
+ +
+ +
+
+

Growl Notification

+ +
+
+ +
+ +
+
+ +
+

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

+
+
+

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.

+
+
+

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.

+

Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.

+
+ +
+
+ +

+ +
+
+

Modal Alert Boxes

+
+   +   +   + +
+
+
+ +

+ +
+
+

First header

+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
+

Second header

+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
+

Third header

+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
+
+
+ +

+ +
+
+ +

This is an information message, can be any general information.

+
+ +
+ +

This is a success message. You can use this for any successful process.

+
+ +
+ +

This is an alert message. You can use this for any reminders or alerts.

+
+ +
+ +

This is an error message. If there is a failure or something.

+
+ +
+ +
+ +
+ +
+ +
+ + + + + diff --git a/referencia/template/filemanager.html b/referencia/template/filemanager.html new file mode 100644 index 0000000..4a23c00 --- /dev/null +++ b/referencia/template/filemanager.html @@ -0,0 +1,158 @@ + + + + +File Manager | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ + + + Logo + +
+ +
+ +
+ Avatar +
+

John Doe

+ youremail@domain.com +

+ Account Settings Logout +

+
+
+
+ + + + + +
+ + + +
+ +

File Manager

+ +
+

File Manager

+
+
+
+
+ +
+ +
+ +
+ +
+ + + + diff --git a/referencia/template/fonts/droidsans-webfont.eot b/referencia/template/fonts/droidsans-webfont.eot new file mode 100644 index 0000000..c80ca00 Binary files /dev/null and b/referencia/template/fonts/droidsans-webfont.eot differ diff --git a/referencia/template/fonts/droidsans-webfont.svg b/referencia/template/fonts/droidsans-webfont.svg new file mode 100644 index 0000000..5662210 --- /dev/null +++ b/referencia/template/fonts/droidsans-webfont.svg @@ -0,0 +1,231 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Digitized data copyright 2006 Google Corporation +Foundry : Ascender Corporation +Foundry URL : httpwwwascendercorpcom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/referencia/template/fonts/droidsans-webfont.ttf b/referencia/template/fonts/droidsans-webfont.ttf new file mode 100644 index 0000000..43c3c02 Binary files /dev/null and b/referencia/template/fonts/droidsans-webfont.ttf differ diff --git a/referencia/template/fonts/droidsans-webfont.woff b/referencia/template/fonts/droidsans-webfont.woff new file mode 100644 index 0000000..642c381 Binary files /dev/null and b/referencia/template/fonts/droidsans-webfont.woff differ diff --git a/referencia/template/fonts/index.html b/referencia/template/fonts/index.html new file mode 100644 index 0000000..c942a79 --- /dev/null +++ b/referencia/template/fonts/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/referencia/template/forms.html b/referencia/template/forms.html new file mode 100644 index 0000000..0fa9dec --- /dev/null +++ b/referencia/template/forms.html @@ -0,0 +1,278 @@ + + + + +Dashboard | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ + + + Logo + +
+ +
+ +
+ Avatar +
+

John Doe

+ youremail@domain.com +

+ Account Settings Logout +

+
+
+
+ + + + + +
+ + + +
+ +

Form Styling

+ +
+ +
+
+ Default form + +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ + Male      Female +

+ +

+ + English      + Mandarin      + German +

+ +

+ + +

+ +

+ +

+ +
+
+ + +
+ +
+ +
+ +
+
+ Default form with validation + +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ + Male      Female +

+ +

+ + English      + Mandarin      + German +

+ +

+ + +

+ +

+ +

+ +
+
+ + +
+ +
+ +
+ +
+ +
+ + + + diff --git a/referencia/template/gallery.html b/referencia/template/gallery.html new file mode 100644 index 0000000..733df8a --- /dev/null +++ b/referencia/template/gallery.html @@ -0,0 +1,538 @@ + + + + +Gallery | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ + + + Logo + +
+ +
+ +
+ Avatar +
+

John Doe

+ youremail@domain.com +

+ Account Settings Logout +

+
+
+
+ + + + + +
+ + + +
+ +

Gallery

+ + + + +
+ + + + +
+ +
+ +
+ +
+ + + + + diff --git a/referencia/template/grid.html b/referencia/template/grid.html new file mode 100644 index 0000000..5442fcd --- /dev/null +++ b/referencia/template/grid.html @@ -0,0 +1,217 @@ + + + + +Grid | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ + + + Logo + +
+ +
+ +
+ Avatar +
+

John Doe

+ youremail@domain.com +

+ Account Settings Logout +

+
+
+
+ + + + + +
+ + + +
+ +

Grid

+ +
+

One Half

+

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.

+
+ +
+

One Half

+

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.

+
+ +

+ +
+

One Third

+

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

+
+ +
+

One Third

+

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

+
+ +
+

One Third

+

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

+
+ +

+ +
+

One Fourth

+

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

+
+ +
+

One Fourth

+

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

+
+ +
+

One Fourth

+

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

+
+ +
+

One Fourth

+

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

+
+ +

+ +
+

One Fifth

+

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

+
+ +
+

One Fifth

+

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

+
+ +
+

One Fifth

+

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

+
+ +
+

One Fifth

+

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

+
+ +
+

One Fifth

+

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

+
+ +
+ +
+ +
+ +
+ + + + diff --git a/referencia/template/images/arrow.png b/referencia/template/images/arrow.png new file mode 100644 index 0000000..4a1a064 Binary files /dev/null and b/referencia/template/images/arrow.png differ diff --git a/referencia/template/images/assets/image1.png b/referencia/template/images/assets/image1.png new file mode 100644 index 0000000..e3f0817 Binary files /dev/null and b/referencia/template/images/assets/image1.png differ diff --git a/referencia/template/images/assets/thumb/large/thumb1.png b/referencia/template/images/assets/thumb/large/thumb1.png new file mode 100644 index 0000000..31642e6 Binary files /dev/null and b/referencia/template/images/assets/thumb/large/thumb1.png differ diff --git a/referencia/template/images/assets/thumb/large/thumb2.png b/referencia/template/images/assets/thumb/large/thumb2.png new file mode 100644 index 0000000..a8ceecd Binary files /dev/null and b/referencia/template/images/assets/thumb/large/thumb2.png differ diff --git a/referencia/template/images/assets/thumb/large/thumb3.png b/referencia/template/images/assets/thumb/large/thumb3.png new file mode 100644 index 0000000..8b4919a Binary files /dev/null and b/referencia/template/images/assets/thumb/large/thumb3.png differ diff --git a/referencia/template/images/assets/thumb/large/thumb4.png b/referencia/template/images/assets/thumb/large/thumb4.png new file mode 100644 index 0000000..fdaeee3 Binary files /dev/null and b/referencia/template/images/assets/thumb/large/thumb4.png differ diff --git a/referencia/template/images/assets/thumb/large/thumb5.png b/referencia/template/images/assets/thumb/large/thumb5.png new file mode 100644 index 0000000..68604b3 Binary files /dev/null and b/referencia/template/images/assets/thumb/large/thumb5.png differ diff --git a/referencia/template/images/assets/thumb/large/thumb6.png b/referencia/template/images/assets/thumb/large/thumb6.png new file mode 100644 index 0000000..b4a0a0b Binary files /dev/null and b/referencia/template/images/assets/thumb/large/thumb6.png differ diff --git a/referencia/template/images/assets/thumb/large/thumb7.png b/referencia/template/images/assets/thumb/large/thumb7.png new file mode 100644 index 0000000..8aaecf5 Binary files /dev/null and b/referencia/template/images/assets/thumb/large/thumb7.png differ diff --git a/referencia/template/images/assets/thumb/large/thumb8.png b/referencia/template/images/assets/thumb/large/thumb8.png new file mode 100644 index 0000000..3e46745 Binary files /dev/null and b/referencia/template/images/assets/thumb/large/thumb8.png differ diff --git a/referencia/template/images/assets/thumb/large/thumb9.png b/referencia/template/images/assets/thumb/large/thumb9.png new file mode 100644 index 0000000..36bc787 Binary files /dev/null and b/referencia/template/images/assets/thumb/large/thumb9.png differ diff --git a/referencia/template/images/assets/thumb/medium/thumb1.png b/referencia/template/images/assets/thumb/medium/thumb1.png new file mode 100644 index 0000000..90e20d2 Binary files /dev/null and b/referencia/template/images/assets/thumb/medium/thumb1.png differ diff --git a/referencia/template/images/assets/thumb/medium/thumb2.png b/referencia/template/images/assets/thumb/medium/thumb2.png new file mode 100644 index 0000000..93424c3 Binary files /dev/null and b/referencia/template/images/assets/thumb/medium/thumb2.png differ diff --git a/referencia/template/images/assets/thumb/medium/thumb3.png b/referencia/template/images/assets/thumb/medium/thumb3.png new file mode 100644 index 0000000..bafbe22 Binary files /dev/null and b/referencia/template/images/assets/thumb/medium/thumb3.png differ diff --git a/referencia/template/images/assets/thumb/medium/thumb4.png b/referencia/template/images/assets/thumb/medium/thumb4.png new file mode 100644 index 0000000..10e4182 Binary files /dev/null and b/referencia/template/images/assets/thumb/medium/thumb4.png differ diff --git a/referencia/template/images/assets/thumb/medium/thumb5.png b/referencia/template/images/assets/thumb/medium/thumb5.png new file mode 100644 index 0000000..8bc2afd Binary files /dev/null and b/referencia/template/images/assets/thumb/medium/thumb5.png differ diff --git a/referencia/template/images/assets/thumb/medium/thumb6.png b/referencia/template/images/assets/thumb/medium/thumb6.png new file mode 100644 index 0000000..063e5f2 Binary files /dev/null and b/referencia/template/images/assets/thumb/medium/thumb6.png differ diff --git a/referencia/template/images/assets/thumb/medium/thumb7.png b/referencia/template/images/assets/thumb/medium/thumb7.png new file mode 100644 index 0000000..f25df11 Binary files /dev/null and b/referencia/template/images/assets/thumb/medium/thumb7.png differ diff --git a/referencia/template/images/assets/thumb/medium/thumb8.png b/referencia/template/images/assets/thumb/medium/thumb8.png new file mode 100644 index 0000000..2b5580d Binary files /dev/null and b/referencia/template/images/assets/thumb/medium/thumb8.png differ diff --git a/referencia/template/images/assets/thumb/medium/thumb9.png b/referencia/template/images/assets/thumb/medium/thumb9.png new file mode 100644 index 0000000..cb7aad9 Binary files /dev/null and b/referencia/template/images/assets/thumb/medium/thumb9.png differ diff --git a/referencia/template/images/assets/thumb/small/thumb1.png b/referencia/template/images/assets/thumb/small/thumb1.png new file mode 100644 index 0000000..8adb0f4 Binary files /dev/null and b/referencia/template/images/assets/thumb/small/thumb1.png differ diff --git a/referencia/template/images/assets/thumb/small/thumb2.png b/referencia/template/images/assets/thumb/small/thumb2.png new file mode 100644 index 0000000..07d33ba Binary files /dev/null and b/referencia/template/images/assets/thumb/small/thumb2.png differ diff --git a/referencia/template/images/assets/thumb/small/thumb3.png b/referencia/template/images/assets/thumb/small/thumb3.png new file mode 100644 index 0000000..b235cb8 Binary files /dev/null and b/referencia/template/images/assets/thumb/small/thumb3.png differ diff --git a/referencia/template/images/assets/thumb/small/thumb4.png b/referencia/template/images/assets/thumb/small/thumb4.png new file mode 100644 index 0000000..3e3bd26 Binary files /dev/null and b/referencia/template/images/assets/thumb/small/thumb4.png differ diff --git a/referencia/template/images/assets/thumb/small/thumb5.png b/referencia/template/images/assets/thumb/small/thumb5.png new file mode 100644 index 0000000..1c00331 Binary files /dev/null and b/referencia/template/images/assets/thumb/small/thumb5.png differ diff --git a/referencia/template/images/assets/thumb/small/thumb6.png b/referencia/template/images/assets/thumb/small/thumb6.png new file mode 100644 index 0000000..1bfbdaf Binary files /dev/null and b/referencia/template/images/assets/thumb/small/thumb6.png differ diff --git a/referencia/template/images/assets/thumb/small/thumb7.png b/referencia/template/images/assets/thumb/small/thumb7.png new file mode 100644 index 0000000..d0f5a37 Binary files /dev/null and b/referencia/template/images/assets/thumb/small/thumb7.png differ diff --git a/referencia/template/images/assets/thumb/small/thumb8.png b/referencia/template/images/assets/thumb/small/thumb8.png new file mode 100644 index 0000000..09a5665 Binary files /dev/null and b/referencia/template/images/assets/thumb/small/thumb8.png differ diff --git a/referencia/template/images/assets/thumb/small/thumb9.png b/referencia/template/images/assets/thumb/small/thumb9.png new file mode 100644 index 0000000..7586512 Binary files /dev/null and b/referencia/template/images/assets/thumb/small/thumb9.png differ diff --git a/referencia/template/images/avatar.png b/referencia/template/images/avatar.png new file mode 100644 index 0000000..ea1b4a7 Binary files /dev/null and b/referencia/template/images/avatar.png differ diff --git a/referencia/template/images/barbg.png b/referencia/template/images/barbg.png new file mode 100644 index 0000000..cf46147 Binary files /dev/null and b/referencia/template/images/barbg.png differ diff --git a/referencia/template/images/bgbutton4.png b/referencia/template/images/bgbutton4.png new file mode 100644 index 0000000..6cef0f8 Binary files /dev/null and b/referencia/template/images/bgbutton4.png differ diff --git a/referencia/template/images/bgbutton5.png b/referencia/template/images/bgbutton5.png new file mode 100644 index 0000000..347d122 Binary files /dev/null and b/referencia/template/images/bgbutton5.png differ diff --git a/referencia/template/images/blacktrans.png b/referencia/template/images/blacktrans.png new file mode 100644 index 0000000..61cb1b4 Binary files /dev/null and b/referencia/template/images/blacktrans.png differ diff --git a/referencia/template/images/blacktrans1.png b/referencia/template/images/blacktrans1.png new file mode 100644 index 0000000..7b50aff Binary files /dev/null and b/referencia/template/images/blacktrans1.png differ diff --git a/referencia/template/images/blacktrans2.png b/referencia/template/images/blacktrans2.png new file mode 100644 index 0000000..528d21c Binary files /dev/null and b/referencia/template/images/blacktrans2.png differ diff --git a/referencia/template/images/bluetrans.png b/referencia/template/images/bluetrans.png new file mode 100644 index 0000000..b77487f Binary files /dev/null and b/referencia/template/images/bluetrans.png differ diff --git a/referencia/template/images/borderwhite.png b/referencia/template/images/borderwhite.png new file mode 100644 index 0000000..7d7452b Binary files /dev/null and b/referencia/template/images/borderwhite.png differ diff --git a/referencia/template/images/buttonbg.png b/referencia/template/images/buttonbg.png new file mode 100644 index 0000000..fd78fd0 Binary files /dev/null and b/referencia/template/images/buttonbg.png differ diff --git a/referencia/template/images/buttonbg2.png b/referencia/template/images/buttonbg2.png new file mode 100644 index 0000000..dc0a82f Binary files /dev/null and b/referencia/template/images/buttonbg2.png differ diff --git a/referencia/template/images/buttonbg3.png b/referencia/template/images/buttonbg3.png new file mode 100644 index 0000000..d7ad79e Binary files /dev/null and b/referencia/template/images/buttonbg3.png differ diff --git a/referencia/template/images/buttonbg5.png b/referencia/template/images/buttonbg5.png new file mode 100644 index 0000000..9d847f2 Binary files /dev/null and b/referencia/template/images/buttonbg5.png differ diff --git a/referencia/template/images/buttonbg6.png b/referencia/template/images/buttonbg6.png new file mode 100644 index 0000000..1fef736 Binary files /dev/null and b/referencia/template/images/buttonbg6.png differ diff --git a/referencia/template/images/buttons/button_black.png b/referencia/template/images/buttons/button_black.png new file mode 100644 index 0000000..4c5681a Binary files /dev/null and b/referencia/template/images/buttons/button_black.png differ diff --git a/referencia/template/images/buttons/button_blue.png b/referencia/template/images/buttons/button_blue.png new file mode 100644 index 0000000..26d71bc Binary files /dev/null and b/referencia/template/images/buttons/button_blue.png differ diff --git a/referencia/template/images/buttons/button_brown.png b/referencia/template/images/buttons/button_brown.png new file mode 100644 index 0000000..42896bd Binary files /dev/null and b/referencia/template/images/buttons/button_brown.png differ diff --git a/referencia/template/images/buttons/button_green.png b/referencia/template/images/buttons/button_green.png new file mode 100644 index 0000000..5b47586 Binary files /dev/null and b/referencia/template/images/buttons/button_green.png differ diff --git a/referencia/template/images/buttons/button_lblue.png b/referencia/template/images/buttons/button_lblue.png new file mode 100644 index 0000000..9856957 Binary files /dev/null and b/referencia/template/images/buttons/button_lblue.png differ diff --git a/referencia/template/images/buttons/button_red.png b/referencia/template/images/buttons/button_red.png new file mode 100644 index 0000000..128fe82 Binary files /dev/null and b/referencia/template/images/buttons/button_red.png differ diff --git a/referencia/template/images/buttons/button_white.png b/referencia/template/images/buttons/button_white.png new file mode 100644 index 0000000..daf6eee Binary files /dev/null and b/referencia/template/images/buttons/button_white.png differ diff --git a/referencia/template/images/buttons/button_yellow.png b/referencia/template/images/buttons/button_yellow.png new file mode 100644 index 0000000..0d44cb2 Binary files /dev/null and b/referencia/template/images/buttons/button_yellow.png differ diff --git a/referencia/template/images/colorbox/controls.png b/referencia/template/images/colorbox/controls.png new file mode 100644 index 0000000..e1e9798 Binary files /dev/null and b/referencia/template/images/colorbox/controls.png differ diff --git a/referencia/template/images/colorbox/loading.gif b/referencia/template/images/colorbox/loading.gif new file mode 100644 index 0000000..19c67bb Binary files /dev/null and b/referencia/template/images/colorbox/loading.gif differ diff --git a/referencia/template/images/colorpicker.png b/referencia/template/images/colorpicker.png new file mode 100644 index 0000000..ff3dfe9 Binary files /dev/null and b/referencia/template/images/colorpicker.png differ diff --git a/referencia/template/images/colorpicker/Thumbs.db b/referencia/template/images/colorpicker/Thumbs.db new file mode 100644 index 0000000..d396c36 Binary files /dev/null and b/referencia/template/images/colorpicker/Thumbs.db differ diff --git a/referencia/template/images/colorpicker/blank.gif b/referencia/template/images/colorpicker/blank.gif new file mode 100644 index 0000000..75b945d Binary files /dev/null and b/referencia/template/images/colorpicker/blank.gif differ diff --git a/referencia/template/images/colorpicker/colorpicker_background.png b/referencia/template/images/colorpicker/colorpicker_background.png new file mode 100644 index 0000000..8401572 Binary files /dev/null and b/referencia/template/images/colorpicker/colorpicker_background.png differ diff --git a/referencia/template/images/colorpicker/colorpicker_hex.png b/referencia/template/images/colorpicker/colorpicker_hex.png new file mode 100644 index 0000000..4e532d7 Binary files /dev/null and b/referencia/template/images/colorpicker/colorpicker_hex.png differ diff --git a/referencia/template/images/colorpicker/colorpicker_hsb_b.png b/referencia/template/images/colorpicker/colorpicker_hsb_b.png new file mode 100644 index 0000000..dfac595 Binary files /dev/null and b/referencia/template/images/colorpicker/colorpicker_hsb_b.png differ diff --git a/referencia/template/images/colorpicker/colorpicker_hsb_h.png b/referencia/template/images/colorpicker/colorpicker_hsb_h.png new file mode 100644 index 0000000..3977ed9 Binary files /dev/null and b/referencia/template/images/colorpicker/colorpicker_hsb_h.png differ diff --git a/referencia/template/images/colorpicker/colorpicker_hsb_s.png b/referencia/template/images/colorpicker/colorpicker_hsb_s.png new file mode 100644 index 0000000..a2a6997 Binary files /dev/null and b/referencia/template/images/colorpicker/colorpicker_hsb_s.png differ diff --git a/referencia/template/images/colorpicker/colorpicker_indic.gif b/referencia/template/images/colorpicker/colorpicker_indic.gif new file mode 100644 index 0000000..f9fa95e Binary files /dev/null and b/referencia/template/images/colorpicker/colorpicker_indic.gif differ diff --git a/referencia/template/images/colorpicker/colorpicker_overlay.png b/referencia/template/images/colorpicker/colorpicker_overlay.png new file mode 100644 index 0000000..561cdd9 Binary files /dev/null and b/referencia/template/images/colorpicker/colorpicker_overlay.png differ diff --git a/referencia/template/images/colorpicker/colorpicker_rgb_b.png b/referencia/template/images/colorpicker/colorpicker_rgb_b.png new file mode 100644 index 0000000..dfac595 Binary files /dev/null and b/referencia/template/images/colorpicker/colorpicker_rgb_b.png differ diff --git a/referencia/template/images/colorpicker/colorpicker_rgb_g.png b/referencia/template/images/colorpicker/colorpicker_rgb_g.png new file mode 100644 index 0000000..72b3276 Binary files /dev/null and b/referencia/template/images/colorpicker/colorpicker_rgb_g.png differ diff --git a/referencia/template/images/colorpicker/colorpicker_rgb_r.png b/referencia/template/images/colorpicker/colorpicker_rgb_r.png new file mode 100644 index 0000000..4855fe0 Binary files /dev/null and b/referencia/template/images/colorpicker/colorpicker_rgb_r.png differ diff --git a/referencia/template/images/colorpicker/colorpicker_select.gif b/referencia/template/images/colorpicker/colorpicker_select.gif new file mode 100644 index 0000000..599f7f1 Binary files /dev/null and b/referencia/template/images/colorpicker/colorpicker_select.gif differ diff --git a/referencia/template/images/colorpicker/colorpicker_submit.png b/referencia/template/images/colorpicker/colorpicker_submit.png new file mode 100644 index 0000000..7f4c082 Binary files /dev/null and b/referencia/template/images/colorpicker/colorpicker_submit.png differ diff --git a/referencia/template/images/colorpicker/custom_background.png b/referencia/template/images/colorpicker/custom_background.png new file mode 100644 index 0000000..cf55ffd Binary files /dev/null and b/referencia/template/images/colorpicker/custom_background.png differ diff --git a/referencia/template/images/colorpicker/custom_hex.png b/referencia/template/images/colorpicker/custom_hex.png new file mode 100644 index 0000000..888f444 Binary files /dev/null and b/referencia/template/images/colorpicker/custom_hex.png differ diff --git a/referencia/template/images/colorpicker/custom_hsb_b.png b/referencia/template/images/colorpicker/custom_hsb_b.png new file mode 100644 index 0000000..2f99dae Binary files /dev/null and b/referencia/template/images/colorpicker/custom_hsb_b.png differ diff --git a/referencia/template/images/colorpicker/custom_hsb_h.png b/referencia/template/images/colorpicker/custom_hsb_h.png new file mode 100644 index 0000000..a217e92 Binary files /dev/null and b/referencia/template/images/colorpicker/custom_hsb_h.png differ diff --git a/referencia/template/images/colorpicker/custom_hsb_s.png b/referencia/template/images/colorpicker/custom_hsb_s.png new file mode 100644 index 0000000..7826b41 Binary files /dev/null and b/referencia/template/images/colorpicker/custom_hsb_s.png differ diff --git a/referencia/template/images/colorpicker/custom_indic.gif b/referencia/template/images/colorpicker/custom_indic.gif new file mode 100644 index 0000000..222fb94 Binary files /dev/null and b/referencia/template/images/colorpicker/custom_indic.gif differ diff --git a/referencia/template/images/colorpicker/custom_rgb_b.png b/referencia/template/images/colorpicker/custom_rgb_b.png new file mode 100644 index 0000000..80764e5 Binary files /dev/null and b/referencia/template/images/colorpicker/custom_rgb_b.png differ diff --git a/referencia/template/images/colorpicker/custom_rgb_g.png b/referencia/template/images/colorpicker/custom_rgb_g.png new file mode 100644 index 0000000..fc9778b Binary files /dev/null and b/referencia/template/images/colorpicker/custom_rgb_g.png differ diff --git a/referencia/template/images/colorpicker/custom_rgb_r.png b/referencia/template/images/colorpicker/custom_rgb_r.png new file mode 100644 index 0000000..91b0cd4 Binary files /dev/null and b/referencia/template/images/colorpicker/custom_rgb_r.png differ diff --git a/referencia/template/images/colorpicker/custom_submit.png b/referencia/template/images/colorpicker/custom_submit.png new file mode 100644 index 0000000..cd202cd Binary files /dev/null and b/referencia/template/images/colorpicker/custom_submit.png differ diff --git a/referencia/template/images/colorpicker/select.png b/referencia/template/images/colorpicker/select.png new file mode 100644 index 0000000..21213bf Binary files /dev/null and b/referencia/template/images/colorpicker/select.png differ diff --git a/referencia/template/images/colorpicker/select2.png b/referencia/template/images/colorpicker/select2.png new file mode 100644 index 0000000..2cd2cab Binary files /dev/null and b/referencia/template/images/colorpicker/select2.png differ diff --git a/referencia/template/images/colorpicker/slider.png b/referencia/template/images/colorpicker/slider.png new file mode 100644 index 0000000..8b03da9 Binary files /dev/null and b/referencia/template/images/colorpicker/slider.png differ diff --git a/referencia/template/images/filemanager/icons-big.png b/referencia/template/images/filemanager/icons-big.png new file mode 100644 index 0000000..923a832 Binary files /dev/null and b/referencia/template/images/filemanager/icons-big.png differ diff --git a/referencia/template/images/filemanager/icons-small.png b/referencia/template/images/filemanager/icons-small.png new file mode 100644 index 0000000..746c399 Binary files /dev/null and b/referencia/template/images/filemanager/icons-small.png differ diff --git a/referencia/template/images/filemanager/ql.png b/referencia/template/images/filemanager/ql.png new file mode 100644 index 0000000..aedeadd Binary files /dev/null and b/referencia/template/images/filemanager/ql.png differ diff --git a/referencia/template/images/filemanager/spinner.gif b/referencia/template/images/filemanager/spinner.gif new file mode 100644 index 0000000..d84f653 Binary files /dev/null and b/referencia/template/images/filemanager/spinner.gif differ diff --git a/referencia/template/images/filemanager/toolbar.png b/referencia/template/images/filemanager/toolbar.png new file mode 100644 index 0000000..ef48931 Binary files /dev/null and b/referencia/template/images/filemanager/toolbar.png differ diff --git a/referencia/template/images/gradcircle.png b/referencia/template/images/gradcircle.png new file mode 100644 index 0000000..97df141 Binary files /dev/null and b/referencia/template/images/gradcircle.png differ diff --git a/referencia/template/images/headbutton.png b/referencia/template/images/headbutton.png new file mode 100644 index 0000000..1722778 Binary files /dev/null and b/referencia/template/images/headbutton.png differ diff --git a/referencia/template/images/help.gif b/referencia/template/images/help.gif new file mode 100644 index 0000000..3b51425 Binary files /dev/null and b/referencia/template/images/help.gif differ diff --git a/referencia/template/images/icons/404.png b/referencia/template/images/icons/404.png new file mode 100644 index 0000000..d5fcf76 Binary files /dev/null and b/referencia/template/images/icons/404.png differ diff --git a/referencia/template/images/icons/buttons.png b/referencia/template/images/icons/buttons.png new file mode 100644 index 0000000..bf602e9 Binary files /dev/null and b/referencia/template/images/icons/buttons.png differ diff --git a/referencia/template/images/icons/cal.png b/referencia/template/images/icons/cal.png new file mode 100644 index 0000000..364baa4 Binary files /dev/null and b/referencia/template/images/icons/cal.png differ diff --git a/referencia/template/images/icons/calarrow.png b/referencia/template/images/icons/calarrow.png new file mode 100644 index 0000000..41d7307 Binary files /dev/null and b/referencia/template/images/icons/calarrow.png differ diff --git a/referencia/template/images/icons/calendar.png b/referencia/template/images/icons/calendar.png new file mode 100644 index 0000000..a2bb3a4 Binary files /dev/null and b/referencia/template/images/icons/calendar.png differ diff --git a/referencia/template/images/icons/close.png b/referencia/template/images/icons/close.png new file mode 100644 index 0000000..1b20e8b Binary files /dev/null and b/referencia/template/images/icons/close.png differ diff --git a/referencia/template/images/icons/createreport.png b/referencia/template/images/icons/createreport.png new file mode 100644 index 0000000..5b021b8 Binary files /dev/null and b/referencia/template/images/icons/createreport.png differ diff --git a/referencia/template/images/icons/dashboard.png b/referencia/template/images/icons/dashboard.png new file mode 100644 index 0000000..37dc71a Binary files /dev/null and b/referencia/template/images/icons/dashboard.png differ diff --git a/referencia/template/images/icons/document.png b/referencia/template/images/icons/document.png new file mode 100644 index 0000000..1237ceb Binary files /dev/null and b/referencia/template/images/icons/document.png differ diff --git a/referencia/template/images/icons/editor.png b/referencia/template/images/icons/editor.png new file mode 100644 index 0000000..0327f06 Binary files /dev/null and b/referencia/template/images/icons/editor.png differ diff --git a/referencia/template/images/icons/elements.png b/referencia/template/images/icons/elements.png new file mode 100644 index 0000000..60f2ac8 Binary files /dev/null and b/referencia/template/images/icons/elements.png differ diff --git a/referencia/template/images/icons/error.png b/referencia/template/images/icons/error.png new file mode 100644 index 0000000..44a7dd6 Binary files /dev/null and b/referencia/template/images/icons/error.png differ diff --git a/referencia/template/images/icons/file.png b/referencia/template/images/icons/file.png new file mode 100644 index 0000000..6f64195 Binary files /dev/null and b/referencia/template/images/icons/file.png differ diff --git a/referencia/template/images/icons/form.png b/referencia/template/images/icons/form.png new file mode 100644 index 0000000..5a8909e Binary files /dev/null and b/referencia/template/images/icons/form.png differ diff --git a/referencia/template/images/icons/gallery.png b/referencia/template/images/icons/gallery.png new file mode 100644 index 0000000..15600f3 Binary files /dev/null and b/referencia/template/images/icons/gallery.png differ diff --git a/referencia/template/images/icons/grid.png b/referencia/template/images/icons/grid.png new file mode 100644 index 0000000..62b0c4a Binary files /dev/null and b/referencia/template/images/icons/grid.png differ diff --git a/referencia/template/images/icons/hbutton.png b/referencia/template/images/icons/hbutton.png new file mode 100644 index 0000000..c4c006f Binary files /dev/null and b/referencia/template/images/icons/hbutton.png differ diff --git a/referencia/template/images/icons/home.png b/referencia/template/images/icons/home.png new file mode 100644 index 0000000..a05243a Binary files /dev/null and b/referencia/template/images/icons/home.png differ diff --git a/referencia/template/images/icons/homesmall.png b/referencia/template/images/icons/homesmall.png new file mode 100644 index 0000000..39ff2ea Binary files /dev/null and b/referencia/template/images/icons/homesmall.png differ diff --git a/referencia/template/images/icons/info.png b/referencia/template/images/icons/info.png new file mode 100644 index 0000000..66b0da2 Binary files /dev/null and b/referencia/template/images/icons/info.png differ diff --git a/referencia/template/images/icons/mail.png b/referencia/template/images/icons/mail.png new file mode 100644 index 0000000..e478d24 Binary files /dev/null and b/referencia/template/images/icons/mail.png differ diff --git a/referencia/template/images/icons/media.png b/referencia/template/images/icons/media.png new file mode 100644 index 0000000..edb6a15 Binary files /dev/null and b/referencia/template/images/icons/media.png differ diff --git a/referencia/template/images/icons/message.png b/referencia/template/images/icons/message.png new file mode 100644 index 0000000..e90330a Binary files /dev/null and b/referencia/template/images/icons/message.png differ diff --git a/referencia/template/images/icons/notification.png b/referencia/template/images/icons/notification.png new file mode 100644 index 0000000..4dcfc30 Binary files /dev/null and b/referencia/template/images/icons/notification.png differ diff --git a/referencia/template/images/icons/reports.png b/referencia/template/images/icons/reports.png new file mode 100644 index 0000000..568699b Binary files /dev/null and b/referencia/template/images/icons/reports.png differ diff --git a/referencia/template/images/icons/small/black/calendar.png b/referencia/template/images/icons/small/black/calendar.png new file mode 100644 index 0000000..2eeb514 Binary files /dev/null and b/referencia/template/images/icons/small/black/calendar.png differ diff --git a/referencia/template/images/icons/small/black/chat.png b/referencia/template/images/icons/small/black/chat.png new file mode 100644 index 0000000..971d204 Binary files /dev/null and b/referencia/template/images/icons/small/black/chat.png differ diff --git a/referencia/template/images/icons/small/black/check.png b/referencia/template/images/icons/small/black/check.png new file mode 100644 index 0000000..79ffbe4 Binary files /dev/null and b/referencia/template/images/icons/small/black/check.png differ diff --git a/referencia/template/images/icons/small/black/close.png b/referencia/template/images/icons/small/black/close.png new file mode 100644 index 0000000..7a666b0 Binary files /dev/null and b/referencia/template/images/icons/small/black/close.png differ diff --git a/referencia/template/images/icons/small/black/contact.png b/referencia/template/images/icons/small/black/contact.png new file mode 100644 index 0000000..8713b85 Binary files /dev/null and b/referencia/template/images/icons/small/black/contact.png differ diff --git a/referencia/template/images/icons/small/black/document.png b/referencia/template/images/icons/small/black/document.png new file mode 100644 index 0000000..59b9bca Binary files /dev/null and b/referencia/template/images/icons/small/black/document.png differ diff --git a/referencia/template/images/icons/small/black/edit.png b/referencia/template/images/icons/small/black/edit.png new file mode 100644 index 0000000..6ea45f2 Binary files /dev/null and b/referencia/template/images/icons/small/black/edit.png differ diff --git a/referencia/template/images/icons/small/black/mail.png b/referencia/template/images/icons/small/black/mail.png new file mode 100644 index 0000000..a1128ad Binary files /dev/null and b/referencia/template/images/icons/small/black/mail.png differ diff --git a/referencia/template/images/icons/small/black/minus.png b/referencia/template/images/icons/small/black/minus.png new file mode 100644 index 0000000..f4c3b4a Binary files /dev/null and b/referencia/template/images/icons/small/black/minus.png differ diff --git a/referencia/template/images/icons/small/black/music.png b/referencia/template/images/icons/small/black/music.png new file mode 100644 index 0000000..278912b Binary files /dev/null and b/referencia/template/images/icons/small/black/music.png differ diff --git a/referencia/template/images/icons/small/black/people.png b/referencia/template/images/icons/small/black/people.png new file mode 100644 index 0000000..83729b7 Binary files /dev/null and b/referencia/template/images/icons/small/black/people.png differ diff --git a/referencia/template/images/icons/small/black/plus.png b/referencia/template/images/icons/small/black/plus.png new file mode 100644 index 0000000..2ec3d31 Binary files /dev/null and b/referencia/template/images/icons/small/black/plus.png differ diff --git a/referencia/template/images/icons/small/black/save.png b/referencia/template/images/icons/small/black/save.png new file mode 100644 index 0000000..6a3aa1a Binary files /dev/null and b/referencia/template/images/icons/small/black/save.png differ diff --git a/referencia/template/images/icons/small/black/search.png b/referencia/template/images/icons/small/black/search.png new file mode 100644 index 0000000..44c031d Binary files /dev/null and b/referencia/template/images/icons/small/black/search.png differ diff --git a/referencia/template/images/icons/small/black/settings.png b/referencia/template/images/icons/small/black/settings.png new file mode 100644 index 0000000..51e89a0 Binary files /dev/null and b/referencia/template/images/icons/small/black/settings.png differ diff --git a/referencia/template/images/icons/small/black/star.png b/referencia/template/images/icons/small/black/star.png new file mode 100644 index 0000000..59ec25a Binary files /dev/null and b/referencia/template/images/icons/small/black/star.png differ diff --git a/referencia/template/images/icons/small/black/tag.png b/referencia/template/images/icons/small/black/tag.png new file mode 100644 index 0000000..854af40 Binary files /dev/null and b/referencia/template/images/icons/small/black/tag.png differ diff --git a/referencia/template/images/icons/small/black/user.png b/referencia/template/images/icons/small/black/user.png new file mode 100644 index 0000000..e9e73af Binary files /dev/null and b/referencia/template/images/icons/small/black/user.png differ diff --git a/referencia/template/images/icons/small/black/video.png b/referencia/template/images/icons/small/black/video.png new file mode 100644 index 0000000..befbfe3 Binary files /dev/null and b/referencia/template/images/icons/small/black/video.png differ diff --git a/referencia/template/images/icons/small/white/calendar.png b/referencia/template/images/icons/small/white/calendar.png new file mode 100644 index 0000000..0b64bfb Binary files /dev/null and b/referencia/template/images/icons/small/white/calendar.png differ diff --git a/referencia/template/images/icons/small/white/chat.png b/referencia/template/images/icons/small/white/chat.png new file mode 100644 index 0000000..0a13f72 Binary files /dev/null and b/referencia/template/images/icons/small/white/chat.png differ diff --git a/referencia/template/images/icons/small/white/check.png b/referencia/template/images/icons/small/white/check.png new file mode 100644 index 0000000..724a564 Binary files /dev/null and b/referencia/template/images/icons/small/white/check.png differ diff --git a/referencia/template/images/icons/small/white/close.png b/referencia/template/images/icons/small/white/close.png new file mode 100644 index 0000000..be88245 Binary files /dev/null and b/referencia/template/images/icons/small/white/close.png differ diff --git a/referencia/template/images/icons/small/white/contact.png b/referencia/template/images/icons/small/white/contact.png new file mode 100644 index 0000000..e6f510d Binary files /dev/null and b/referencia/template/images/icons/small/white/contact.png differ diff --git a/referencia/template/images/icons/small/white/document.png b/referencia/template/images/icons/small/white/document.png new file mode 100644 index 0000000..04b492b Binary files /dev/null and b/referencia/template/images/icons/small/white/document.png differ diff --git a/referencia/template/images/icons/small/white/edit.png b/referencia/template/images/icons/small/white/edit.png new file mode 100644 index 0000000..62ed626 Binary files /dev/null and b/referencia/template/images/icons/small/white/edit.png differ diff --git a/referencia/template/images/icons/small/white/mail.png b/referencia/template/images/icons/small/white/mail.png new file mode 100644 index 0000000..4840a5c Binary files /dev/null and b/referencia/template/images/icons/small/white/mail.png differ diff --git a/referencia/template/images/icons/small/white/minus.png b/referencia/template/images/icons/small/white/minus.png new file mode 100644 index 0000000..7152a70 Binary files /dev/null and b/referencia/template/images/icons/small/white/minus.png differ diff --git a/referencia/template/images/icons/small/white/music.png b/referencia/template/images/icons/small/white/music.png new file mode 100644 index 0000000..042a01a Binary files /dev/null and b/referencia/template/images/icons/small/white/music.png differ diff --git a/referencia/template/images/icons/small/white/people.png b/referencia/template/images/icons/small/white/people.png new file mode 100644 index 0000000..d934670 Binary files /dev/null and b/referencia/template/images/icons/small/white/people.png differ diff --git a/referencia/template/images/icons/small/white/plus.png b/referencia/template/images/icons/small/white/plus.png new file mode 100644 index 0000000..9f939cf Binary files /dev/null and b/referencia/template/images/icons/small/white/plus.png differ diff --git a/referencia/template/images/icons/small/white/save.png b/referencia/template/images/icons/small/white/save.png new file mode 100644 index 0000000..561470f Binary files /dev/null and b/referencia/template/images/icons/small/white/save.png differ diff --git a/referencia/template/images/icons/small/white/search.png b/referencia/template/images/icons/small/white/search.png new file mode 100644 index 0000000..e4af1d9 Binary files /dev/null and b/referencia/template/images/icons/small/white/search.png differ diff --git a/referencia/template/images/icons/small/white/settings.png b/referencia/template/images/icons/small/white/settings.png new file mode 100644 index 0000000..78b26b9 Binary files /dev/null and b/referencia/template/images/icons/small/white/settings.png differ diff --git a/referencia/template/images/icons/small/white/star.png b/referencia/template/images/icons/small/white/star.png new file mode 100644 index 0000000..79fcafd Binary files /dev/null and b/referencia/template/images/icons/small/white/star.png differ diff --git a/referencia/template/images/icons/small/white/tag.png b/referencia/template/images/icons/small/white/tag.png new file mode 100644 index 0000000..89fb71d Binary files /dev/null and b/referencia/template/images/icons/small/white/tag.png differ diff --git a/referencia/template/images/icons/small/white/user.png b/referencia/template/images/icons/small/white/user.png new file mode 100644 index 0000000..c459a6a Binary files /dev/null and b/referencia/template/images/icons/small/white/user.png differ diff --git a/referencia/template/images/icons/small/white/video.png b/referencia/template/images/icons/small/white/video.png new file mode 100644 index 0000000..2df8c5a Binary files /dev/null and b/referencia/template/images/icons/small/white/video.png differ diff --git a/referencia/template/images/icons/statistics.png b/referencia/template/images/icons/statistics.png new file mode 100644 index 0000000..1e62bb3 Binary files /dev/null and b/referencia/template/images/icons/statistics.png differ diff --git a/referencia/template/images/icons/success.png b/referencia/template/images/icons/success.png new file mode 100644 index 0000000..f036793 Binary files /dev/null and b/referencia/template/images/icons/success.png differ diff --git a/referencia/template/images/icons/table.png b/referencia/template/images/icons/table.png new file mode 100644 index 0000000..bffeba1 Binary files /dev/null and b/referencia/template/images/icons/table.png differ diff --git a/referencia/template/images/icons/trash.png b/referencia/template/images/icons/trash.png new file mode 100644 index 0000000..a23787b Binary files /dev/null and b/referencia/template/images/icons/trash.png differ diff --git a/referencia/template/images/icons/users.png b/referencia/template/images/icons/users.png new file mode 100644 index 0000000..b464426 Binary files /dev/null and b/referencia/template/images/icons/users.png differ diff --git a/referencia/template/images/icons/vbutton.png b/referencia/template/images/icons/vbutton.png new file mode 100644 index 0000000..a80b000 Binary files /dev/null and b/referencia/template/images/icons/vbutton.png differ diff --git a/referencia/template/images/icons/warning.png b/referencia/template/images/icons/warning.png new file mode 100644 index 0000000..948b59f Binary files /dev/null and b/referencia/template/images/icons/warning.png differ diff --git a/referencia/template/images/imghover.png b/referencia/template/images/imghover.png new file mode 100644 index 0000000..0b73c7f Binary files /dev/null and b/referencia/template/images/imghover.png differ diff --git a/referencia/template/images/important.gif b/referencia/template/images/important.gif new file mode 100644 index 0000000..41d4943 Binary files /dev/null and b/referencia/template/images/important.gif differ diff --git a/referencia/template/images/info.gif b/referencia/template/images/info.gif new file mode 100644 index 0000000..c81828d Binary files /dev/null and b/referencia/template/images/info.gif differ diff --git a/referencia/template/images/jquery.wysiwyg.gif b/referencia/template/images/jquery.wysiwyg.gif new file mode 100644 index 0000000..3daed50 Binary files /dev/null and b/referencia/template/images/jquery.wysiwyg.gif differ diff --git a/referencia/template/images/leftbg.png b/referencia/template/images/leftbg.png new file mode 100644 index 0000000..f3963ee Binary files /dev/null and b/referencia/template/images/leftbg.png differ diff --git a/referencia/template/images/loaders/loader1.gif b/referencia/template/images/loaders/loader1.gif new file mode 100644 index 0000000..26bb9e7 Binary files /dev/null and b/referencia/template/images/loaders/loader1.gif differ diff --git a/referencia/template/images/loaders/loader10.gif b/referencia/template/images/loaders/loader10.gif new file mode 100644 index 0000000..b327795 Binary files /dev/null and b/referencia/template/images/loaders/loader10.gif differ diff --git a/referencia/template/images/loaders/loader2.gif b/referencia/template/images/loaders/loader2.gif new file mode 100644 index 0000000..54b54a9 Binary files /dev/null and b/referencia/template/images/loaders/loader2.gif differ diff --git a/referencia/template/images/loaders/loader3.gif b/referencia/template/images/loaders/loader3.gif new file mode 100644 index 0000000..c111c62 Binary files /dev/null and b/referencia/template/images/loaders/loader3.gif differ diff --git a/referencia/template/images/loaders/loader4.gif b/referencia/template/images/loaders/loader4.gif new file mode 100644 index 0000000..4df287b Binary files /dev/null and b/referencia/template/images/loaders/loader4.gif differ diff --git a/referencia/template/images/loaders/loader5.gif b/referencia/template/images/loaders/loader5.gif new file mode 100644 index 0000000..c1b8624 Binary files /dev/null and b/referencia/template/images/loaders/loader5.gif differ diff --git a/referencia/template/images/loaders/loader6.gif b/referencia/template/images/loaders/loader6.gif new file mode 100644 index 0000000..bd6ea7b Binary files /dev/null and b/referencia/template/images/loaders/loader6.gif differ diff --git a/referencia/template/images/loaders/loader7.gif b/referencia/template/images/loaders/loader7.gif new file mode 100644 index 0000000..9669d83 Binary files /dev/null and b/referencia/template/images/loaders/loader7.gif differ diff --git a/referencia/template/images/loaders/loader8.gif b/referencia/template/images/loaders/loader8.gif new file mode 100644 index 0000000..9256b2c Binary files /dev/null and b/referencia/template/images/loaders/loader8.gif differ diff --git a/referencia/template/images/loaders/loader9.gif b/referencia/template/images/loaders/loader9.gif new file mode 100644 index 0000000..075a436 Binary files /dev/null and b/referencia/template/images/loaders/loader9.gif differ diff --git a/referencia/template/images/loginbox.png b/referencia/template/images/loginbox.png new file mode 100644 index 0000000..6cd4e11 Binary files /dev/null and b/referencia/template/images/loginbox.png differ diff --git a/referencia/template/images/logo.png b/referencia/template/images/logo.png new file mode 100644 index 0000000..7808a37 Binary files /dev/null and b/referencia/template/images/logo.png differ diff --git a/referencia/template/images/logo2.png b/referencia/template/images/logo2.png new file mode 100644 index 0000000..303e986 Binary files /dev/null and b/referencia/template/images/logo2.png differ diff --git a/referencia/template/images/passwordfield.png b/referencia/template/images/passwordfield.png new file mode 100644 index 0000000..fad81b0 Binary files /dev/null and b/referencia/template/images/passwordfield.png differ diff --git a/referencia/template/images/prevnext.png b/referencia/template/images/prevnext.png new file mode 100644 index 0000000..00091e2 Binary files /dev/null and b/referencia/template/images/prevnext.png differ diff --git a/referencia/template/images/searchbar.png b/referencia/template/images/searchbar.png new file mode 100644 index 0000000..125aacd Binary files /dev/null and b/referencia/template/images/searchbar.png differ diff --git a/referencia/template/images/searchicon.png b/referencia/template/images/searchicon.png new file mode 100644 index 0000000..8ac2534 Binary files /dev/null and b/referencia/template/images/searchicon.png differ diff --git a/referencia/template/images/separator.png b/referencia/template/images/separator.png new file mode 100644 index 0000000..1b3e3c9 Binary files /dev/null and b/referencia/template/images/separator.png differ diff --git a/referencia/template/images/separator2.png b/referencia/template/images/separator2.png new file mode 100644 index 0000000..f60a514 Binary files /dev/null and b/referencia/template/images/separator2.png differ diff --git a/referencia/template/images/sort_asc.png b/referencia/template/images/sort_asc.png new file mode 100644 index 0000000..3ff9d44 Binary files /dev/null and b/referencia/template/images/sort_asc.png differ diff --git a/referencia/template/images/sort_asc_disabled.png b/referencia/template/images/sort_asc_disabled.png new file mode 100644 index 0000000..b5ebfea Binary files /dev/null and b/referencia/template/images/sort_asc_disabled.png differ diff --git a/referencia/template/images/sort_both.png b/referencia/template/images/sort_both.png new file mode 100644 index 0000000..be7f07e Binary files /dev/null and b/referencia/template/images/sort_both.png differ diff --git a/referencia/template/images/sort_desc.png b/referencia/template/images/sort_desc.png new file mode 100644 index 0000000..e192841 Binary files /dev/null and b/referencia/template/images/sort_desc.png differ diff --git a/referencia/template/images/sort_desc_disabled.png b/referencia/template/images/sort_desc_disabled.png new file mode 100644 index 0000000..d642f31 Binary files /dev/null and b/referencia/template/images/sort_desc_disabled.png differ diff --git a/referencia/template/images/tabmenubg.png b/referencia/template/images/tabmenubg.png new file mode 100644 index 0000000..29f018c Binary files /dev/null and b/referencia/template/images/tabmenubg.png differ diff --git a/referencia/template/images/texturebg.png b/referencia/template/images/texturebg.png new file mode 100644 index 0000000..72c4001 Binary files /dev/null and b/referencia/template/images/texturebg.png differ diff --git a/referencia/template/images/thead.png b/referencia/template/images/thead.png new file mode 100644 index 0000000..9dbbd08 Binary files /dev/null and b/referencia/template/images/thead.png differ diff --git a/referencia/template/images/title.gif b/referencia/template/images/title.gif new file mode 100644 index 0000000..f92b596 Binary files /dev/null and b/referencia/template/images/title.gif differ diff --git a/referencia/template/images/titlebg.png b/referencia/template/images/titlebg.png new file mode 100644 index 0000000..c23f628 Binary files /dev/null and b/referencia/template/images/titlebg.png differ diff --git a/referencia/template/images/toggle.png b/referencia/template/images/toggle.png new file mode 100644 index 0000000..fa2d44b Binary files /dev/null and b/referencia/template/images/toggle.png differ diff --git a/referencia/template/images/toggle2.png b/referencia/template/images/toggle2.png new file mode 100644 index 0000000..07ace62 Binary files /dev/null and b/referencia/template/images/toggle2.png differ diff --git a/referencia/template/images/usernamefield.png b/referencia/template/images/usernamefield.png new file mode 100644 index 0000000..ec862fd Binary files /dev/null and b/referencia/template/images/usernamefield.png differ diff --git a/referencia/template/images/viewdelete.png b/referencia/template/images/viewdelete.png new file mode 100644 index 0000000..dc8de38 Binary files /dev/null and b/referencia/template/images/viewdelete.png differ diff --git a/referencia/template/index.html b/referencia/template/index.html new file mode 100644 index 0000000..9564cbe --- /dev/null +++ b/referencia/template/index.html @@ -0,0 +1,48 @@ + + + + +Login Page | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + +
Invalid username or password. (Type anything)
+ +
+
+
+
+ + + +
+
+
+ +
+ Can't access your account? + Remember me on this computer. +
+
+ + + diff --git a/referencia/template/invoice.html b/referencia/template/invoice.html new file mode 100644 index 0000000..336954a --- /dev/null +++ b/referencia/template/invoice.html @@ -0,0 +1,320 @@ + + + + +Invoice | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ + + + Logo + +
+ +
+ +
+ Avatar +
+

John Doe

+ youremail@domain.com +

+ Account Settings Logout +

+
+
+
+ + + + + +
+ + + +
+ +

Invoice

+ +
+
+ + [Logo here] + +

Invoice

+ +

+ +
+ John Doe
+ Company Name
+ Attn: Accounts Receivable MS 22
+ 20121 Owen Business Park
+ Mountain View, CA 32423 +
+ +
+
+ + Number:
+ Date:
+ Job Number:
+ PO #
+ Charge #
+
+ +
+ 2323
+ December 5, 2011
+ 54-GH-23D6-L23
+ 43344
+ 1-232-456-354654-6 +
+
+ +

+ +
+ + Job Name:
+ Agency Contact:
+ Description:
+
+ +
+ Web Development
+ Justin Miller
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sed tristique diam. Suspendisse tempus nibh ac velit interdum rutrum. Aliquam ullamcorper bibendum elit eget egestas. Pellentesque sodales, justo at feugiat sagittis, quam massa luctus leo, et facilisis tortor nibh mollis nulla. Nulla facilisis sem et dolor congue nec porta enim varius. Quisque ac dolor felis, in laoreet est. Sed a urna est. Phasellus sed elementum ipsum. +
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DescriptionHours BilledAmount
 
Logo Design12.5$ 500.00
PSD Layout22.5$ 980.00
Design Subtotal122.5$ 1 675.00
 
HTML/CSS40$ 3 000.00
Backend Integration55$ 4 980.00
Database Design18$ 1 480.00
Coding Subtotal233$ 6 175.00
 
Domain2 years$ 22.00
Hosting3 years$ 300.00
Server Subtotaln/a$ 322.00
 
 
SUB-TOTAL32$ 8 322.00
*4.5% Sales Tax $ 122.00
 
TOTAL $ 8 622.00
+ +
+ +
+
+ DUE DATE
+ PAYMENT TERMS
+
+
+ January 01, 2011
+ NET +
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+ + + + diff --git a/referencia/template/js/custom/calendar.js b/referencia/template/js/custom/calendar.js new file mode 100644 index 0000000..0babdbd --- /dev/null +++ b/referencia/template/js/custom/calendar.js @@ -0,0 +1,55 @@ +jQuery(document).ready(function() { + /* initialize the external events */ + jQuery('#external-events div.external-event').each(function() { + + // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/) + // it doesn't need to have a start or end + var eventObject = { + title: jQuery.trim(jQuery(this).text()) // use the element's text as the event title + }; + + // store the Event Object in the DOM element so we can get to it later + jQuery(this).data('eventObject', eventObject); + + // make the event draggable using jQuery UI + jQuery(this).draggable({ + zIndex: 999, + revert: true, // will cause the event to go back to its + revertDuration: 0 // original position after the drag + }); + + }); + + + /* initialize the calendar */ + jQuery('#calendar').fullCalendar({ + header: { + left: 'prev,next today', + center: 'title', + right: 'month,agendaWeek,agendaDay' + }, + editable: true, + droppable: true, // this allows things to be dropped onto the calendar !!! + drop: function(date, allDay) { // this function is called when something is dropped + + // retrieve the dropped element's stored Event Object + var originalEventObject = jQuery(this).data('eventObject'); + + // we need to copy it, so that multiple events don't have a reference to the same object + var copiedEventObject = jQuery.extend({}, originalEventObject); + + // assign it the date that was reported + copiedEventObject.start = date; + copiedEventObject.allDay = allDay; + + // render the event on the calendar + // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/) + jQuery('#calendar').fullCalendar('renderEvent', copiedEventObject, true); + + // is the "remove after drop" checkbox checked? + + jQuery(this).remove(); + + } + }); +}); diff --git a/referencia/template/js/custom/dashboard.js b/referencia/template/js/custom/dashboard.js new file mode 100644 index 0000000..f59fa3b --- /dev/null +++ b/referencia/template/js/custom/dashboard.js @@ -0,0 +1,85 @@ + jQuery(document).ready(function () { + + + //////////// CHARTS ///////////////// + var flash = [], html5 = []; + for (var i = 0; i < 14; i += 0.5) { + flash.push([i, Math.sin(i)]); + html5.push([i, Math.cos(i)]); + } + + function showTooltip(x, y, contents) { + jQuery('
' + contents + '
').css( { + position: 'absolute', + display: 'none', + top: y + 5, + left: x + 5 + }).appendTo("body").fadeIn(200); + } + + + var plot = jQuery.plot(jQuery("#chartplace"), + [ { data: flash, label: "Flash(x)", color: "#069"}, { data: html5, label: "HTML5(x)", color: "#ff0000"} ], { + series: { + lines: { show: true }, + points: { show: true } + }, + grid: { hoverable: true, clickable: true }, + yaxis: { min: -1.2, max: 1.2 } + }); + + var previousPoint = null; + jQuery("#chartplace").bind("plothover", function (event, pos, item) { + jQuery("#x").text(pos.x.toFixed(2)); + jQuery("#y").text(pos.y.toFixed(2)); + + if(item) { + if (previousPoint != item.dataIndex) { + previousPoint = item.dataIndex; + + jQuery("#tooltip").remove(); + var x = item.datapoint[0].toFixed(2), + y = item.datapoint[1].toFixed(2); + + showTooltip(item.pageX, item.pageY, + item.series.label + " of " + x + " = " + y); + } + } + else { + jQuery("#tooltip").remove(); + previousPoint = null; + } + + }); + + jQuery("#chartplace").bind("plotclick", function (event, pos, item) { + if (item) { + jQuery("#clickdata").text("You clicked point " + item.dataIndex + " in " + item.series.label + "."); + plot.highlight(item.series, item.datapoint); + } + }); + + //////////// TABS ///////////////// + jQuery( "#tabs" ).tabs(); + + //////////// ACCORDION ///////////////// + jQuery( ".accordion" ).accordion(); + + //////////// FORM VALIDATION ///////////////// + jQuery("#form").validate({ + rules: { + name: "required", + email: { + required: true, + email: true, + }, + occupation: "required" + }, + messages: { + name: "Please enter your name", + email: "Please enter a valid email address", + occupation: "Please select your occupation" + } + }); + +}); diff --git a/referencia/template/js/custom/elements.js b/referencia/template/js/custom/elements.js new file mode 100644 index 0000000..8e7f4d7 --- /dev/null +++ b/referencia/template/js/custom/elements.js @@ -0,0 +1,185 @@ +jQuery.noConflict(); + +jQuery(document).ready(function(){ + /** + * Color Picker + **/ + jQuery('#colorpicker').ColorPicker({ + onSubmit: function(hsb, hex, rgb, el) { + jQuery(el).val(hex); + jQuery(el).ColorPickerHide(); + }, + onBeforeShow: function () { + jQuery(this).ColorPickerSetColor(this.value); + } + }) + .bind('keyup', function(){ + jQuery(this).ColorPickerSetColor(this.value); + }); + + jQuery('#colorselector').ColorPicker({ + color: '#0000ff', + onShow: function (colpkr) { + jQuery(colpkr).fadeIn(500); + return false; + }, + onHide: function (colpkr) { + jQuery(colpkr).fadeOut(500); + return false; + }, + onChange: function (hsb, hex, rgb) { + jQuery('#colorselector').css('backgroundColor', '#' + hex); + } + }); + + /** + * Date picker + **/ + jQuery( "#datepicker" ).datepicker(); + + + /** + * Growl Notification + **/ + jQuery('.growl').click(function(){ + jQuery.jGrowl("Hello world!"); + return false; + }); + + jQuery('.growl2').click(function(){ + var msg = "This notification will live a little longer."; + var position = "top-right"; + var scrollpos = jQuery(document).scrollTop(); + if(scrollpos < 50) position = "customtop-right"; + jQuery.jGrowl(msg, { life: 5000, position: position}); + return false; + }); + + //this will prevent growl box to show on top of the header when + //scroll event is fired + jQuery(document).scroll(function(){ + if(jQuery('.jGrowl').length != 0) { + var pos = jQuery(document).scrollTop(); + if(pos < 50) jQuery('.jGrowl').css({top: '100px'}); else jQuery('.jGrowl').css({top: '0'}); + } + }); + + + /** + * Tab + **/ + jQuery( "#tabs" ).tabs(); + + /** + * Accordion + **/ + jQuery( ".accordion" ).accordion(); + + + /** + * Modal Alert Boxes + **/ + jQuery('.alertboxbutton').click(function(){ + jAlert('This is a custom alert box', 'Alert Dialog'); + }); + + jQuery('.confirmbutton').click(function(){ + jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) { + jAlert('Confirmed: ' + r, 'Confirmation Results'); + }); + }); + + jQuery('.promptbutton').click(function(){ + jPrompt('Type something:', 'Prefilled value', 'Prompt Dialog', function(r) { + if( r ) alert('You entered ' + r); + }); + }); + + jQuery('.alerthtmlbutton').click(function(){ + jAlert('You can use HTML, such as bold, italics, and underline!'); + }); + + + /** + * Slider + **/ + jQuery("#slider").slider({value: 40}); + + //Slider that snap to increments + jQuery("#slider2").slider({ + value:100, + min: 0, + max: 500, + step: 50, + slide: function(event, ui) { + jQuery("#amount").text("$"+ui.value); + } + }); + jQuery("#amount").text("$" + jQuery("#slider").slider("value")); + + + //Slider with range + jQuery("#slider3").slider({ + range: true, + min: 0, + max: 500, + values: [ 75, 300 ], + slide: function( event, ui ) { + jQuery("#amount2").text("$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ]); + } + }); + jQuery("#amount2").text("$" + jQuery("#slider3").slider("values", 0) + + " - $" + jQuery("#slider3").slider("values", 1)); + + // Slider with fixed minimum + jQuery("#slider4").slider({ + range: "min", + value: 37, + min: 1, + max: 100, + slide: function( event, ui ) { + jQuery("#amount4").text("$" + ui.value); + } + }); + jQuery("#amount4").text("$"+jQuery("#slider4").slider("value")); + + //Slider with fixed maximum + jQuery("#slider5").slider({ + range: "max", + value: 60, + min: 1, + max: 100, + slide: function(event, ui) { + jQuery("#amount5").text("$"+ui.value); + } + }); + jQuery("#amount5").text("$"+jQuery("#slider5").slider("value")); + + //Slider vertical + jQuery("#slider6").slider({ + orientation: "vertical", + range: "min", + min: 0, + max: 100, + value: 60, + slide: function( event, ui ) { + jQuery("#amount6").text(ui.value); + } + }); + jQuery("#amount6").text( jQuery("#slider6").slider("value")); + + + //Slider vertical with range + jQuery("#slider7").slider({ + orientation: "vertical", + range: true, + values: [17, 67], + slide: function(event, ui) { + jQuery("#amount7").text("$"+ui.values[0]+"-$"+ui.values[1]); + } + }); + jQuery("#amount7").text("$"+jQuery("#slider7").slider("values",0) + + " - $"+jQuery("#slider7").slider("values",1)); + + +}); \ No newline at end of file diff --git a/referencia/template/js/custom/gallery.js b/referencia/template/js/custom/gallery.js new file mode 100644 index 0000000..be0cd50 --- /dev/null +++ b/referencia/template/js/custom/gallery.js @@ -0,0 +1,55 @@ +jQuery(document).ready(function(){ + + /** + * Add an hover effect in images (gallery.html) + **/ + jQuery('.thumbview .thumb').hover(function(){ + var t = jQuery(this); + t.find('.info').stop(true,true).fadeIn('slow'); + },function(){ + var t = jQuery(this); + t.find('.info').stop(true,true).fadeOut('slow'); + }); + + /** + * Sub Menu + **/ + jQuery('.submenu a').click(function(){ + var id = jQuery(this).attr('href'); + jQuery('.submenu a').each(function(){ + jQuery(this).parent().removeClass('current'); + jQuery(jQuery(this).attr('href')).hide(); + }); + jQuery(this).parent().addClass('current'); + jQuery(id).fadeIn(); + }); + + + /** + * Gallery Colorbox + **/ + jQuery(".thumb .view").colorbox({rel:'view'}); + jQuery(".listview .view").colorbox({rel:'listview'}); + + + /** + * Thumb delete image + **/ + jQuery('.thumb .delete').click(function(){ + var c = confirm('Continue delete?'); + if(c) jQuery(this).parents('li').remove(); + return false; + }); + + /** + * Delete a single image in a row + **/ + jQuery('.deleteimage').click(function(){ + var c = confirm("Are you sure you want to delete this image?"); + if(c) { + jQuery(this).parents('tr').fadeOut(); + } + return false; + }); + +}); diff --git a/referencia/template/js/custom/general.js b/referencia/template/js/custom/general.js new file mode 100644 index 0000000..d7cef2a --- /dev/null +++ b/referencia/template/js/custom/general.js @@ -0,0 +1,145 @@ +jQuery.noConflict(); + +jQuery(document).ready(function(){ + + /** + * This will remove username/password text in the login form fields + **/ + jQuery('.username, .password').focusout(function(){ + if(jQuery(this).val() != '') { + jQuery(this).css({backgroundPosition: "0 -32px"}); + } else { + jQuery(this).css({backgroundPosition: "0 0"}); + } + }); + + jQuery('.username, .password').focusin(function(){ + if(jQuery(this).val() == '') { + jQuery(this).css({backgroundPosition: "0 -32px"}); + } + }); + + + /** + * Message Notify Drop Down + **/ + jQuery('.messagenotify .wrap, .alertnotify .wrap').click(function(){ + var t = jQuery(this).parent(); + var url = t.attr('href'); + if(t.hasClass('showmsg')) { + t.removeClass('showmsg'); + t.find('.thicon').removeClass('thiconhover'); + t.parent().find('.dropbox').remove(); + + } else { + + jQuery('.topheader li').each(function(){ + jQuery(this).find('.showmsg').removeClass('showmsg'); + jQuery(this).find('.thicon').removeClass('thiconhover'); + jQuery(this).find('.dropbox').remove(); + }); + + t.addClass('showmsg'); + t.find('.thicon').addClass('thiconhover'); + t.parent().append('
'); + + jQuery.post(url,function(data){ + jQuery('.dropbox').append(data); + }); + } + return false; + + }); + + jQuery(document).click(function(event) { + var msglist = jQuery('.dropbox'); + if(!jQuery(event.target).is('.dropbox')) { + if(msglist.is(":visible")) { + msglist.prev().removeClass('showmsg'); + msglist.prev().find('.thicon').removeClass('thiconhover'); + msglist.remove(); + } + } + }); + + + /** + * Login form validation + **/ + jQuery('#loginform').submit(function(){ + var username = jQuery('.username').val(); + var password = jQuery('.password').val(); + if(username == '' && password == '') { + jQuery('.loginNotify').slideDown('fast'); + return false; + } else { + return true; + } + }); + + + /** + * Sidebar accordion + **/ + jQuery('#accordion h3').click(function() { + if(jQuery(this).hasClass('open')) { + jQuery(this).removeClass('open'); + jQuery(this).next().slideUp('fast'); + } else { + jQuery(this).addClass('open'); + jQuery(this).next().slideDown('fast'); + } return false; + }); + + + /** + * Widget Box Toggle + **/ + jQuery('.widgetbox h3, .widgetbox2 h3').hover(function(){ + jQuery(this).addClass('arrow'); + return false; + },function(){ + jQuery(this).removeClass('arrow'); + return false; + }); + + jQuery('.widgetbox h3, .widgetbox2 h3').toggle(function(){ + jQuery(this).next().slideUp('fast'); + jQuery(this).css({MozBorderRadius: '3px', + WebkitBorderRadius: '3px', + borderRadius: '3px'}); + return false; + },function(){ + jQuery(this).next().slideDown('fast'); + jQuery(this).css({MozBorderRadius: '3px 3px 0 0', + WebkitBorderRadius: '3px 3px 0 0', + borderRadius: '3px 3px 0 0'}); + return false; + }); + + + /** + * Notification + **/ + jQuery('.notification .close').click(function(){ + jQuery(this).parent().fadeOut(); + }); + + + /** Make footer always at the bottom**/ + if(jQuery('body').height() > jQuery(window).height()) { + jQuery('.footer').removeClass('footer_float'); + } + + + + /**DROP DOWN MENU**/ + jQuery(".subnav").css({display: "none"}); // Opera Fix + jQuery(".tabmenu li").hover(function(){ + jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400); + },function(){ + jQuery(this).find('ul:first').css({visibility: "hidden"}); + }); + + +}); \ No newline at end of file diff --git a/referencia/template/js/custom/reports.js b/referencia/template/js/custom/reports.js new file mode 100644 index 0000000..604f8e1 --- /dev/null +++ b/referencia/template/js/custom/reports.js @@ -0,0 +1,195 @@ +jQuery(document).ready(function () { + + /***START OF SIMPLE CHART***/ + + var flash = [], html5 = []; + for (var i = 0; i < 14; i += 0.5) { + flash.push([i, Math.sin(i)]); + html5.push([i, Math.cos(i)]); + } + + function showTooltip(x, y, contents) { + jQuery('
' + contents + '
').css( { + position: 'absolute', + display: 'none', + top: y + 5, + left: x + 5 + }).appendTo("body").fadeIn(200); + } + + + var plot = jQuery.plot(jQuery("#chartplace"), + [ { data: flash, label: "Flash(x)", color: "#ff7200"}, { data: html5, label: "HTML5(x)", color: "#39870a"} ], { + series: { + lines: { show: true }, + points: { show: true } + }, + grid: { hoverable: true, clickable: true, borderColor: '#ccc', borderWidth: 1 }, + yaxis: { min: -1.2, max: 1.2 } + }); + + var previousPoint = null; + jQuery("#chartplace").bind("plothover", function (event, pos, item) { + jQuery("#x").text(pos.x.toFixed(2)); + jQuery("#y").text(pos.y.toFixed(2)); + + if(item) { + if (previousPoint != item.dataIndex) { + previousPoint = item.dataIndex; + + jQuery("#tooltip").remove(); + var x = item.datapoint[0].toFixed(2), + y = item.datapoint[1].toFixed(2); + + showTooltip(item.pageX, item.pageY, + item.series.label + " of " + x + " = " + y); + } + + } else { + jQuery("#tooltip").remove(); + previousPoint = null; + } + + }); + + jQuery("#chartplace").bind("plotclick", function (event, pos, item) { + if (item) { + jQuery("#clickdata").text("You clicked point " + item.dataIndex + " in " + item.series.label + "."); + plot.highlight(item.series, item.datapoint); + } + }); + + + + + /**ANNOTATING CHART**/ + + // generate a dataset + var d1 = []; + for (var i = 0; i < 20; ++i) + d1.push([i, Math.sin(i)]); + + var data = [{ data: d1, label: "Pressure", color: "#333" }]; + + // setup background areas + var markings = [ + { color: '#eee', yaxis: { from: 1 } }, + { color: '#eee', yaxis: { to: -1 } }, + { color: '#ccc', lineWidth: 1, xaxis: { from: 2, to: 2 } }, + { color: '#ccc', lineWidth: 1, xaxis: { from: 8, to: 8 } } + ]; + + var placeholder = jQuery("#annotation"); + + // plot it + var plot = jQuery.plot(placeholder, data, { + bars: { show: true, barWidth: 0.5, lineWidth: 0, fill: 0.9, fillColor: "#069"}, + xaxis: { ticks: [], autoscaleMargin: 0.02 }, + yaxis: { min: -2, max: 2 }, + grid: { markings: markings, borderColor: '#ccc', borderWidth: 1} + }); + + // add labels + var o; + + o = plot.pointOffset({ x: 2, y: -1.2}); + // we just append it to the placeholder which Flot already uses + // for positioning + placeholder.append('
Warming up
'); + + o = plot.pointOffset({ x: 8, y: -1.2}); + placeholder.append('
Actual measurements
'); + + // draw a little arrow on top of the last label to demonstrate + // canvas drawing + var ctx = plot.getCanvas().getContext("2d"); + ctx.beginPath(); + o.left += 4; + ctx.moveTo(o.left, o.top); + ctx.lineTo(o.left, o.top - 10); + ctx.lineTo(o.left + 10, o.top - 5); + ctx.lineTo(o.left, o.top); + ctx.fillStyle = "#000"; + ctx.fill(); + + + /**PIE CHART**/ + var data = []; + var series = 5; + for( var i = 0; i 0) + data = data.slice(1); + + // do a random walk + while (data.length < totalPoints) { + var prev = data.length > 0 ? data[data.length - 1] : 50; + var y = prev + Math.random() * 10 - 5; + if (y < 0) + y = 0; + if (y > 100) + y = 100; + data.push(y); + } + + // zip the generated y values with the x values + var res = []; + for (var i = 0; i < data.length; ++i) + res.push([i, data[i]]) + return res; + } + + // setup control widget + var updateInterval = 500; + jQuery("#updateInterval").val(updateInterval).change(function () { + var v = jQuery(this).val(); + if (v && !isNaN(+v)) { + updateInterval = +v; + if (updateInterval < 1) + updateInterval = 1; + if (updateInterval > 2000) + updateInterval = 2000; + jQuery(this).val("" + updateInterval); + } + }); + + // setup plot + var options = { + series: { lines: { fill: true, fillColor: '#fffccc' }, shadowSize: 0, }, // drawing is faster without shadows + yaxis: { min: 0, max: 100 }, + xaxis: { show: false }, + grid: { borderColor: '#ccc', borderWidth: 1}, + + }; + var plot = jQuery.plot(jQuery("#realtime"), [ getRandomData() ], options); + + function update() { + plot.setData([ getRandomData() ]); + // since the axes don't change, we don't need to call plot.setupGrid() + plot.draw(); + + setTimeout(update, updateInterval); + } + + update(); + + + +}); \ No newline at end of file diff --git a/referencia/template/js/custom/users.js b/referencia/template/js/custom/users.js new file mode 100644 index 0000000..723cb3d --- /dev/null +++ b/referencia/template/js/custom/users.js @@ -0,0 +1,70 @@ +jQuery(document).ready(function(){ + + /** + * Highlight selected table row + **/ + jQuery('.sTable input').click(function(){ + + if(jQuery(this).is(':checked')) { + jQuery(this).parents('tr').addClass('selected'); + } else { + jQuery(this).parents('tr').removeClass('selected'); + } + }); + + + /** + * Delete a single user in a row + **/ + jQuery('.deleteuser').click(function(){ + var c = confirm("Are you sure you want to delete this user?"); + if(c) { + jQuery(this).parents('tr').fadeOut(); + } + return false; + }); + + /** + * Check/Uncheck all items in a table + **/ + jQuery('.checkall').click(function(){ + if(!jQuery(this).is(':checked')) { + jQuery('.sTable input[type=checkbox]').each(function(){ + jQuery(this).attr('checked',false); + jQuery(this).parents('tr').removeClass('selected'); + }); + } else { + jQuery('.sTable input[type=checkbox]').each(function(){ + jQuery(this).attr('checked',true); + jQuery(this).parents('tr').addClass('selected'); + }); + } + }); + + + + /** + * Delete selected items in a table + **/ + jQuery('.sTableOptions .delete').click(function(){ + var empt = true; + jQuery('.sTable input[type=checkbox]').each(function(){ + if(jQuery(this).is(':checked')) { + empt = false; + } + }); + if(empt == true) { + alert('No item selected'); + } else { + var c = confirm('Are you sure you want to delete this user?'); + if(c) { + jQuery('.sTable input[type=checkbox]').each(function(){ + if(jQuery(this).is(':checked')) { + jQuery(this).parents('tr').fadeOut(); + } + }); + } + } + }); + +}); \ No newline at end of file diff --git a/referencia/template/js/plugins/colorpicker.js b/referencia/template/js/plugins/colorpicker.js new file mode 100644 index 0000000..10a2b22 --- /dev/null +++ b/referencia/template/js/plugins/colorpicker.js @@ -0,0 +1,484 @@ +/** + * + * Color picker + * Author: Stefan Petre www.eyecon.ro + * + * Dual licensed under the MIT and GPL licenses + * + */ +(function ($) { + var ColorPicker = function () { + var + ids = {}, + inAction, + charMin = 65, + visible, + tpl = '
', + defaults = { + eventName: 'click', + onShow: function () {}, + onBeforeShow: function(){}, + onHide: function () {}, + onChange: function () {}, + onSubmit: function () {}, + color: 'ff0000', + livePreview: true, + flat: false + }, + fillRGBFields = function (hsb, cal) { + var rgb = HSBToRGB(hsb); + $(cal).data('colorpicker').fields + .eq(1).val(rgb.r).end() + .eq(2).val(rgb.g).end() + .eq(3).val(rgb.b).end(); + }, + fillHSBFields = function (hsb, cal) { + $(cal).data('colorpicker').fields + .eq(4).val(hsb.h).end() + .eq(5).val(hsb.s).end() + .eq(6).val(hsb.b).end(); + }, + fillHexFields = function (hsb, cal) { + $(cal).data('colorpicker').fields + .eq(0).val(HSBToHex(hsb)).end(); + }, + setSelector = function (hsb, cal) { + $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100})); + $(cal).data('colorpicker').selectorIndic.css({ + left: parseInt(150 * hsb.s/100, 10), + top: parseInt(150 * (100-hsb.b)/100, 10) + }); + }, + setHue = function (hsb, cal) { + $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10)); + }, + setCurrentColor = function (hsb, cal) { + $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb)); + }, + setNewColor = function (hsb, cal) { + $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb)); + }, + keyDown = function (ev) { + var pressedKey = ev.charCode || ev.keyCode || -1; + if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) { + return false; + } + var cal = $(this).parent().parent(); + if (cal.data('colorpicker').livePreview === true) { + change.apply(this); + } + }, + change = function (ev) { + var cal = $(this).parent().parent(), col; + if (this.parentNode.className.indexOf('_hex') > 0) { + cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value)); + } else if (this.parentNode.className.indexOf('_hsb') > 0) { + cal.data('colorpicker').color = col = fixHSB({ + h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10), + s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10), + b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10) + }); + } else { + cal.data('colorpicker').color = col = RGBToHSB(fixRGB({ + r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10), + g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10), + b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10) + })); + } + if (ev) { + fillRGBFields(col, cal.get(0)); + fillHexFields(col, cal.get(0)); + fillHSBFields(col, cal.get(0)); + } + setSelector(col, cal.get(0)); + setHue(col, cal.get(0)); + setNewColor(col, cal.get(0)); + cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]); + }, + blur = function (ev) { + var cal = $(this).parent().parent(); + cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus'); + }, + focus = function () { + charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65; + $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus'); + $(this).parent().addClass('colorpicker_focus'); + }, + downIncrement = function (ev) { + var field = $(this).parent().find('input').focus(); + var current = { + el: $(this).parent().addClass('colorpicker_slider'), + max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255), + y: ev.pageY, + field: field, + val: parseInt(field.val(), 10), + preview: $(this).parent().parent().data('colorpicker').livePreview + }; + $(document).bind('mouseup', current, upIncrement); + $(document).bind('mousemove', current, moveIncrement); + }, + moveIncrement = function (ev) { + ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10)))); + if (ev.data.preview) { + change.apply(ev.data.field.get(0), [true]); + } + return false; + }, + upIncrement = function (ev) { + change.apply(ev.data.field.get(0), [true]); + ev.data.el.removeClass('colorpicker_slider').find('input').focus(); + $(document).unbind('mouseup', upIncrement); + $(document).unbind('mousemove', moveIncrement); + return false; + }, + downHue = function (ev) { + var current = { + cal: $(this).parent(), + y: $(this).offset().top + }; + current.preview = current.cal.data('colorpicker').livePreview; + $(document).bind('mouseup', current, upHue); + $(document).bind('mousemove', current, moveHue); + }, + moveHue = function (ev) { + change.apply( + ev.data.cal.data('colorpicker') + .fields + .eq(4) + .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10)) + .get(0), + [ev.data.preview] + ); + return false; + }, + upHue = function (ev) { + fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + $(document).unbind('mouseup', upHue); + $(document).unbind('mousemove', moveHue); + return false; + }, + downSelector = function (ev) { + var current = { + cal: $(this).parent(), + pos: $(this).offset() + }; + current.preview = current.cal.data('colorpicker').livePreview; + $(document).bind('mouseup', current, upSelector); + $(document).bind('mousemove', current, moveSelector); + }, + moveSelector = function (ev) { + change.apply( + ev.data.cal.data('colorpicker') + .fields + .eq(6) + .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10)) + .end() + .eq(5) + .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10)) + .get(0), + [ev.data.preview] + ); + return false; + }, + upSelector = function (ev) { + fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + $(document).unbind('mouseup', upSelector); + $(document).unbind('mousemove', moveSelector); + return false; + }, + enterSubmit = function (ev) { + $(this).addClass('colorpicker_focus'); + }, + leaveSubmit = function (ev) { + $(this).removeClass('colorpicker_focus'); + }, + clickSubmit = function (ev) { + var cal = $(this).parent(); + var col = cal.data('colorpicker').color; + cal.data('colorpicker').origColor = col; + setCurrentColor(col, cal.get(0)); + cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el); + }, + show = function (ev) { + var cal = $('#' + $(this).data('colorpickerId')); + cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]); + var pos = $(this).offset(); + var viewPort = getViewport(); + var top = pos.top + this.offsetHeight; + var left = pos.left; + if (top + 176 > viewPort.t + viewPort.h) { + top -= this.offsetHeight + 176; + } + if (left + 356 > viewPort.l + viewPort.w) { + left -= 356; + } + cal.css({left: left + 'px', top: top + 'px'}); + if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) { + cal.show(); + } + $(document).bind('mousedown', {cal: cal}, hide); + return false; + }, + hide = function (ev) { + if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) { + if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) { + ev.data.cal.hide(); + } + $(document).unbind('mousedown', hide); + } + }, + isChildOf = function(parentEl, el, container) { + if (parentEl == el) { + return true; + } + if (parentEl.contains) { + return parentEl.contains(el); + } + if ( parentEl.compareDocumentPosition ) { + return !!(parentEl.compareDocumentPosition(el) & 16); + } + var prEl = el.parentNode; + while(prEl && prEl != container) { + if (prEl == parentEl) + return true; + prEl = prEl.parentNode; + } + return false; + }, + getViewport = function () { + var m = document.compatMode == 'CSS1Compat'; + return { + l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft), + t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop), + w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth), + h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight) + }; + }, + fixHSB = function (hsb) { + return { + h: Math.min(360, Math.max(0, hsb.h)), + s: Math.min(100, Math.max(0, hsb.s)), + b: Math.min(100, Math.max(0, hsb.b)) + }; + }, + fixRGB = function (rgb) { + return { + r: Math.min(255, Math.max(0, rgb.r)), + g: Math.min(255, Math.max(0, rgb.g)), + b: Math.min(255, Math.max(0, rgb.b)) + }; + }, + fixHex = function (hex) { + var len = 6 - hex.length; + if (len > 0) { + var o = []; + for (var i=0; i -1) ? hex.substring(1) : hex), 16); + return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)}; + }, + HexToHSB = function (hex) { + return RGBToHSB(HexToRGB(hex)); + }, + RGBToHSB = function (rgb) { + var hsb = { + h: 0, + s: 0, + b: 0 + }; + var min = Math.min(rgb.r, rgb.g, rgb.b); + var max = Math.max(rgb.r, rgb.g, rgb.b); + var delta = max - min; + hsb.b = max; + if (max != 0) { + + } + hsb.s = max != 0 ? 255 * delta / max : 0; + if (hsb.s != 0) { + if (rgb.r == max) { + hsb.h = (rgb.g - rgb.b) / delta; + } else if (rgb.g == max) { + hsb.h = 2 + (rgb.b - rgb.r) / delta; + } else { + hsb.h = 4 + (rgb.r - rgb.g) / delta; + } + } else { + hsb.h = -1; + } + hsb.h *= 60; + if (hsb.h < 0) { + hsb.h += 360; + } + hsb.s *= 100/255; + hsb.b *= 100/255; + return hsb; + }, + HSBToRGB = function (hsb) { + var rgb = {}; + var h = Math.round(hsb.h); + var s = Math.round(hsb.s*255/100); + var v = Math.round(hsb.b*255/100); + if(s == 0) { + rgb.r = rgb.g = rgb.b = v; + } else { + var t1 = v; + var t2 = (255-s)*v/255; + var t3 = (t1-t2)*(h%60)/60; + if(h==360) h = 0; + if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3} + else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3} + else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3} + else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3} + else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3} + else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3} + else {rgb.r=0; rgb.g=0; rgb.b=0} + } + return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)}; + }, + RGBToHex = function (rgb) { + var hex = [ + rgb.r.toString(16), + rgb.g.toString(16), + rgb.b.toString(16) + ]; + $.each(hex, function (nr, val) { + if (val.length == 1) { + hex[nr] = '0' + val; + } + }); + return hex.join(''); + }, + HSBToHex = function (hsb) { + return RGBToHex(HSBToRGB(hsb)); + }, + restoreOriginal = function () { + var cal = $(this).parent(); + var col = cal.data('colorpicker').origColor; + cal.data('colorpicker').color = col; + fillRGBFields(col, cal.get(0)); + fillHexFields(col, cal.get(0)); + fillHSBFields(col, cal.get(0)); + setSelector(col, cal.get(0)); + setHue(col, cal.get(0)); + setNewColor(col, cal.get(0)); + }; + return { + init: function (opt) { + opt = $.extend({}, defaults, opt||{}); + if (typeof opt.color == 'string') { + opt.color = HexToHSB(opt.color); + } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) { + opt.color = RGBToHSB(opt.color); + } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) { + opt.color = fixHSB(opt.color); + } else { + return this; + } + return this.each(function () { + if (!$(this).data('colorpickerId')) { + var options = $.extend({}, opt); + options.origColor = opt.color; + var id = 'collorpicker_' + parseInt(Math.random() * 1000); + $(this).data('colorpickerId', id); + var cal = $(tpl).attr('id', id); + if (options.flat) { + cal.appendTo(this).show(); + } else { + cal.appendTo(document.body); + } + options.fields = cal + .find('input') + .bind('keyup', keyDown) + .bind('change', change) + .bind('blur', blur) + .bind('focus', focus); + cal + .find('span').bind('mousedown', downIncrement).end() + .find('>div.colorpicker_current_color').bind('click', restoreOriginal); + options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector); + options.selectorIndic = options.selector.find('div div'); + options.el = this; + options.hue = cal.find('div.colorpicker_hue div'); + cal.find('div.colorpicker_hue').bind('mousedown', downHue); + options.newColor = cal.find('div.colorpicker_new_color'); + options.currentColor = cal.find('div.colorpicker_current_color'); + cal.data('colorpicker', options); + cal.find('div.colorpicker_submit') + .bind('mouseenter', enterSubmit) + .bind('mouseleave', leaveSubmit) + .bind('click', clickSubmit); + fillRGBFields(options.color, cal.get(0)); + fillHSBFields(options.color, cal.get(0)); + fillHexFields(options.color, cal.get(0)); + setHue(options.color, cal.get(0)); + setSelector(options.color, cal.get(0)); + setCurrentColor(options.color, cal.get(0)); + setNewColor(options.color, cal.get(0)); + if (options.flat) { + cal.css({ + position: 'relative', + display: 'block' + }); + } else { + $(this).bind(options.eventName, show); + } + } + }); + }, + showPicker: function() { + return this.each( function () { + if ($(this).data('colorpickerId')) { + show.apply(this); + } + }); + }, + hidePicker: function() { + return this.each( function () { + if ($(this).data('colorpickerId')) { + $('#' + $(this).data('colorpickerId')).hide(); + } + }); + }, + setColor: function(col) { + if (typeof col == 'string') { + col = HexToHSB(col); + } else if (col.r != undefined && col.g != undefined && col.b != undefined) { + col = RGBToHSB(col); + } else if (col.h != undefined && col.s != undefined && col.b != undefined) { + col = fixHSB(col); + } else { + return this; + } + return this.each(function(){ + if ($(this).data('colorpickerId')) { + var cal = $('#' + $(this).data('colorpickerId')); + cal.data('colorpicker').color = col; + cal.data('colorpicker').origColor = col; + fillRGBFields(col, cal.get(0)); + fillHSBFields(col, cal.get(0)); + fillHexFields(col, cal.get(0)); + setHue(col, cal.get(0)); + setSelector(col, cal.get(0)); + setCurrentColor(col, cal.get(0)); + setNewColor(col, cal.get(0)); + } + }); + } + }; + }(); + $.fn.extend({ + ColorPicker: ColorPicker.init, + ColorPickerHide: ColorPicker.hidePicker, + ColorPickerShow: ColorPicker.showPicker, + ColorPickerSetColor: ColorPicker.setColor + }); +})(jQuery) \ No newline at end of file diff --git a/referencia/template/js/plugins/elfinder.min.js b/referencia/template/js/plugins/elfinder.min.js new file mode 100644 index 0000000..bb7dcc7 --- /dev/null +++ b/referencia/template/js/plugins/elfinder.min.js @@ -0,0 +1 @@ +(function(a){elFinder=function(d,g){var b=this,h;this.log=function(i){window.console&&window.console.log&&window.console.log(i)};this.options=a.extend({},this.options,g||{});if(!this.options.url){alert("Invalid configuration! You have to set URL option.");return}this.id="";if((h=a(d).attr("id"))){this.id=h}else{}this.version="1.2";this.jquery=a.fn.jquery.split(".").join("");this.cwd={};this.cdc={};this.buffer={};this.selected=[];this.history=[];this.locked=false;this.zIndex=2;this.dialog=null;this.anchor=this.options.docked?a("
").hide().insertBefore(d):null;this.params={dotFiles:false,arc:"",uplMaxSize:""};this.vCookie="el-finder-view-"+this.id;this.pCookie="el-finder-places-"+this.id;this.lCookie="el-finder-last-"+this.id;this.view=new this.view(this,d);this.ui=new this.ui(this);this.eventsManager=new this.eventsManager(this);this.quickLook=new this.quickLook(this);this.cookie=function(j,l){if(typeof l=="undefined"){if(document.cookie&&document.cookie!=""){var k,p=document.cookie.split(";");j+="=";for(k=0;kp',b.view.cwd).css("background",' url("'+k.images[j]+'") 0 0 no-repeat')}}k.tmb&&b.tmb()}},{lock:false,silent:true})};this.getPlaces=function(){var i=[],j=this.cookie(this.pCookie);if(j.length){if(j.indexOf(":")!=-1){i=j.split(":")}else{i.push(j)}}return i};this.addPlace=function(j){var i=this.getPlaces();if(a.inArray(j,i)==-1){i.push(j);this.savePlaces(i);return true}};this.removePlace=function(j){var i=this.getPlaces();if(a.inArray(j,i)!=-1){this.savePlaces(a.map(i,function(k){return k==j?null:k}));return true}};this.savePlaces=function(i){this.cookie(this.pCookie,i.join(":"))};this.reload=function(m){var k;this.cwd=m.cwd;this.cdc={};for(k=0;k0){this.iID&&clearInterval(this.iID);this.iID=setInterval(function(){!b.locked&&b.ui.exec("reload")},this.options.autoReload*60000)}};this.updateCwd=function(){this.lockShortcuts(true);this.selected=[];this.view.renderCwd();this.eventsManager.updateCwd();this.view.tree.find('a[key="'+this.cwd.hash+'"]').trigger("select");this.lockShortcuts()};this.drop=function(l,j,k){if(j.helper.find('[key="'+k+'"]').length){return b.view.error("Unable to copy into itself")}var i=[];j.helper.find('div:not(.noaccess):has(>label):not(:has(em[class="readonly"],em[class=""]))').each(function(){i.push(a(this).hide().attr("key"))});if(!j.helper.find("div:has(>label):visible").length){j.helper.hide()}if(i.length){b.setBuffer(i,l.shiftKey?0:1,k);if(b.buffer.files){setTimeout(function(){b.ui.exec("paste");b.buffer={}},300)}}else{a(this).removeClass("el-finder-droppable")}};this.getSelected=function(j){var k,l=[];if(j>=0){return this.cdc[this.selected[j]]||{}}for(k=0;k:]+$/)};this.fileExists=function(k){for(var j in this.cdc){if(this.cdc[j].name==k){return j}}return false};this.uniqueName=function(m,l){m=b.i18n(m);var j=m,k=0,l=l||"";if(!this.fileExists(j+l)){return j+l}while(k++<100){if(!this.fileExists(j+k+l)){return j+k+l}}return j.replace("100","")+Math.random()+l};this.lastDir=function(i){if(this.options.rememberLastDir){return i?this.cookie(this.lCookie,i):this.cookie(this.lCookie)}};function c(i,j){i&&b.view.win.width(i);j&&b.view.nav.add(b.view.cwd).height(j)}function e(){c(null,b.dialog.height()-b.view.tlb.parent().height()-(a.browser.msie?47:32))}this.time=function(){return new Date().getMilliseconds()};this.setView(this.cookie(this.vCookie));c(b.options.width,b.options.height);if(this.options.dialog||this.options.docked){this.options.dialog=a.extend({width:570,dialogClass:"",minWidth:480,minHeight:330},this.options.dialog||{});this.options.dialog.open=function(){setTimeout(function(){a('').appendTo(b.view.win).focus().select().remove()},200)};this.options.dialog.dialogClass+="el-finder-dialog";this.options.dialog.resize=e;if(this.options.docked){this.options.dialog.close=function(){b.dock()};this.view.win.data("size",{width:this.view.win.width(),height:this.view.nav.height()})}else{this.options.dialog.close=function(){b.destroy()};this.dialog=a("
").append(this.view.win).dialog(this.options.dialog)}}this.ajax({cmd:"open",target:this.lastDir()||"",init:true,tree:true},function(i){if(i.cwd){b.eventsManager.init();b.reload(i);a.extend(b.params,i.params||{});a("*",document.body).each(function(){var j=parseInt(a(this).css("z-index"));if(j>=b.zIndex){b.zIndex=j+1}});b.ui.init(i.disabled)}},{force:true});this.open=function(){this.dialog?this.dialog.dialog("open"):this.view.win.show();this.eventsManager.lock=false};this.close=function(){this.quickLook.hide();if(this.options.docked&&this.view.win.attr("undocked")){this.dock()}else{this.dialog?this.dialog.dialog("close"):this.view.win.hide()}this.eventsManager.lock=true};this.destroy=function(){this.eventsManager.lock=true;this.quickLook.hide();this.quickLook.win.remove();if(this.dialog){this.dialog.dialog("destroy");this.view.win.parent().remove()}else{this.view.win.remove()}this.ui.menu.remove()};this.dock=function(){if(this.options.docked&&this.view.win.attr("undocked")){this.quickLook.hide();var i=this.view.win.data("size");this.view.win.insertAfter(this.anchor).removeAttr("undocked");c(i.width,i.height);this.dialog.dialog("destroy");this.dialog=null}};this.undock=function(){if(this.options.docked&&!this.view.win.attr("undocked")){this.quickLook.hide();this.dialog=a("
").append(this.view.win.css("width","100%").attr("undocked",true).show()).dialog(this.options.dialog);e()}}};elFinder.prototype.i18n=function(b){return this.options.i18n[this.options.lang]&&this.options.i18n[this.options.lang][b]?this.options.i18n[this.options.lang][b]:b};elFinder.prototype.options={url:"",lang:"en",cssClass:"",wrap:14,places:"Places",placesFirst:true,editorCallback:null,cutURL:"",closeOnEditorCallback:true,i18n:{},view:"icons",width:"",height:"",disableShortcuts:false,rememberLastDir:true,cookie:{expires:30,domain:"",path:"/",secure:false},toolbar:[["back","reload"],["select","open"],["mkdir","mkfile","upload"],["copy","paste","rm"],["rename","edit"],["info","quicklook","resize"],["icons","list"],["help"]],contextmenu:{cwd:["reload","delim","mkdir","mkfile","upload","delim","paste","delim","info"],file:["select","open","quicklook","delim","copy","cut","rm","delim","duplicate","rename","edit","resize","archive","extract","delim","info"],group:["select","copy","cut","rm","delim","archive","extract","delim","info"]},dialog:null,docked:false,autoReload:0,selectMultiple:false};a.fn.elfinder=function(b){return this.each(function(){var c=typeof(b)=="string"?b:"";if(!this.elfinder){this.elfinder=new elFinder(this,typeof(b)=="object"?b:{})}switch(c){case"close":case"hide":this.elfinder.close();break;case"open":case"show":this.elfinder.open();break;case"dock":this.elfinder.dock();break;case"undock":this.elfinder.undock();break;case"destroy":this.elfinder.destroy();break}})}})(jQuery);(function(a){elFinder.prototype.view=function(d,c){var b=this;this.fm=d;this.kinds={unknown:"Unknown",directory:"Folder",symlink:"Alias","symlink-broken":"Broken alias","application/x-empty":"Plain text","application/postscript":"Postscript document","application/octet-stream":"Application","application/vnd.ms-office":"Microsoft Office document","application/vnd.ms-word":"Microsoft Word document","application/vnd.ms-excel":"Microsoft Excel document","application/vnd.ms-powerpoint":"Microsoft Powerpoint presentation","application/pdf":"Portable Document Format (PDF)","application/vnd.oasis.opendocument.text":"Open Office document","application/x-shockwave-flash":"Flash application","application/xml":"XML document","application/x-bittorrent":"Bittorrent file","application/x-7z-compressed":"7z archive","application/x-tar":"TAR archive","application/x-gzip":"GZIP archive","application/x-bzip2":"BZIP archive","application/zip":"ZIP archive","application/x-rar":"RAR archive","application/javascript":"Javascript application","text/plain":"Plain text","text/x-php":"PHP source","text/html":"HTML document","text/javascript":"Javascript source","text/css":"CSS style sheet","text/rtf":"Rich Text Format (RTF)","text/rtfd":"RTF with attachments (RTFD)","text/x-c":"C source","text/x-c++":"C++ source","text/x-shellscript":"Unix shell script","text/x-python":"Python source","text/x-java":"Java source","text/x-ruby":"Ruby source","text/x-perl":"Perl script","text/xml":"XML document","image/x-ms-bmp":"BMP image","image/jpeg":"JPEG image","image/gif":"GIF Image","image/png":"PNG image","image/x-targa":"TGA image","image/tiff":"TIFF image","image/vnd.adobe.photoshop":"Adobe Photoshop image","audio/mpeg":"MPEG audio","audio/midi":"MIDI audio","audio/ogg":"Ogg Vorbis audio","audio/mp4":"MP4 audio","audio/wav":"WAV audio","video/x-dv":"DV video","video/mp4":"MP4 video","video/mpeg":"MPEG video","video/x-msvideo":"AVI video","video/quicktime":"Quicktime video","video/x-ms-wmv":"WM video","video/x-flv":"Flash video","video/x-matroska":"Matroska video"};this.tlb=a("
    ");this.nav=a('
    ').resizable({handles:"e",autoHide:true,minWidth:200,maxWidth:500});this.cwd=a('
    ').attr("unselectable","on");this.spn=a('
    ');this.err=a('

    ').click(function(){a(this).hide()});this.nfo=a('
    ');this.pth=a('
    ');this.sel=a('
    ');this.stb=a('
    ').append(this.pth).append(this.nfo).append(this.sel);this.wrz=a('
    ').append(this.nav).append(this.cwd).append(this.spn).append(this.err).append('
    ');this.win=a(c).empty().attr("id",this.fm.id).addClass("el-finder "+(d.options.cssClass||"")).append(a('
    ').append(this.tlb)).append(this.wrz).append(this.stb);this.tree=a('
      ').appendTo(this.nav);this.plc=a('
      • '+this.fm.i18n(this.fm.options.places)+"
          ").hide();this.nav[this.fm.options.placesFirst?"prepend":"append"](this.plc);this.spinner=function(e){this.win.toggleClass("el-finder-disabled",e);this.spn.toggle(e)};this.fatal=function(e){b.error(e.status!="404"?"Invalid backend configuration":"Unable to connect to backend")};this.error=function(e,g){this.fm.lock();this.err.show().children("strong").html(this.fm.i18n(e)+"!"+this.formatErrorData(g));setTimeout(function(){b.err.fadeOut("slow")},4000)};this.renderNav=function(g){var i=g.dirs.length?h(g.dirs):"",e='
        • "+i+"
        • ";this.tree.html(e);this.fm.options.places&&this.renderPlaces();function h(j){var l,m,n,k='
            ';for(l=0;l";if(j[l].dirs.length){k+=h(j[l].dirs)}k+=""}return k+"
          "}};this.renderPlaces=function(){var g,j,h=this.fm.getPlaces(),e=this.plc.show().find("ul").empty().hide();a("div:first",this.plc).removeClass("collapsed expanded");if(h.length){h.sort(function(k,i){var m=b.tree.find('a[key="'+k+'"]').text()||"",l=b.tree.find('a[key="'+i+'"]').text()||"";return m.localeCompare(l)});for(g=0;g'+this.fm.i18n("Name")+""+this.fm.i18n("Permissions")+""+this.fm.i18n("Modified")+''+this.fm.i18n("Size")+""+this.fm.i18n("Kind")+""+g+"")}this.pth.text(d.cwd.rel);this.nfo.text(d.i18n("items")+": "+e+", "+this.formatSize(h));this.sel.empty()};this.renderIcon=function(e){var g="";if(e.link||e.mime=="symlink-broken"){g+=""}if(!e.read&&!e.write){g+=''}else{if(e.read&&!e.write){g+=''}else{if(!e.read&&e.write){g+=''}}}return'
          '+g+"
          "};this.renderRow=function(g,e){var h=g.link||g.mime=="symlink-broken"?"":"";if(!g.read&&!g.write){h+=''}else{if(g.read&&!g.write){h+=''}else{if(!g.read&&g.write){h+=''}}}return'

          '+h+"

          "+g.name+""+b.formatPermissions(g.read,g.write,g.rm)+""+b.formatDate(g.date)+''+b.formatSize(g.size)+""+b.mime2kind(g.link?"symlink":g.mime)+""};this.updateFile=function(g){var h=this.cwd.find('[key="'+g.hash+'"]');h.replaceWith(h[0].nodeName=="DIV"?this.renderIcon(g):this.renderRow(g))};this.selectedInfo=function(){var e,g=0,h;if(b.fm.selected.length){h=this.fm.getSelected();for(e=0;e0?this.fm.i18n("selected items")+": "+h.length+", "+this.formatSize(g):"")};this.formatName=function(g){var e=b.fm.options.wrap;if(e>0){if(g.length>e*2){return g.substr(0,e)+"­"+g.substr(e,e-5)+"…"+g.substr(g.length-3)}else{if(g.length>e){return g.substr(0,e)+"­"+g.substr(e)}}}return g};this.formatErrorData=function(h){var e,g="";if(typeof(h)=="object"){g="
          ";for(e in h){g+=e+" "+b.fm.i18n(h[e])+"
          "}}return g};this.mime2class=function(e){return e.replace("/"," ").replace(/\./g,"-")};this.formatDate=function(e){return e.replace(/([a-z]+)\s/i,function(h,g){return b.fm.i18n(g)+" "})};this.formatSize=function(g){var h=1,e="bytes";if(g>1073741824){h=1073741824;e="Gb"}else{if(g>1048576){h=1048576;e="Mb"}else{if(g>1024){h=1024;e="Kb"}}}return Math.round(g/h)+" "+e};this.formatPermissions=function(g,e,i){var h=[];g&&h.push(b.fm.i18n("read"));e&&h.push(b.fm.i18n("write"));i&&h.push(b.fm.i18n("remove"));return h.join("/")};this.mime2kind=function(e){return this.fm.i18n(this.kinds[e]||"unknown")}}})(jQuery);(function(a){elFinder.prototype.ui=function(c){var b=this;this.fm=c;this.cmd={};this.buttons={};this.menu=a('
          ').appendTo(document.body).hide();this.dockButton=a('
          ');this.exec=function(e,d){if(this.cmd[e]){if(e!="open"&&!this.cmd[e].isAllowed()){return this.fm.view.error("Command not allowed")}if(!this.fm.locked){this.fm.quickLook.hide();a(".el-finder-info").remove();this.cmd[e].exec(d);this.update()}}};this.cmdName=function(d){if(this.cmd[d]&&this.cmd[d].name){return d=="archive"&&this.fm.params.archives.length==1?this.fm.i18n("Create")+" "+this.fm.view.mime2kind(this.fm.params.archives[0]).toLowerCase():this.fm.i18n(this.cmd[d].name)}return d};this.isCmdAllowed=function(d){return b.cmd[d]&&b.cmd[d].isAllowed()};this.execIfAllowed=function(d){this.isCmdAllowed(d)&&this.exec(d)};this.includeInCm=function(e,d){return this.isCmdAllowed(e)&&this.cmd[e].cm(d)};this.showMenu=function(i){var g,h,d,k="";this.hideMenu();if(!b.fm.selected.length){g="cwd"}else{if(b.fm.selected.length==1){g="file"}else{g="group"}}j(g);h=a(window);d={height:h.height(),width:h.width(),sT:h.scrollTop(),cW:this.menu.width(),cH:this.menu.height()};this.menu.css({left:((i.clientX+d.cW)>d.width?(i.clientX-d.cW):i.clientX),top:((i.clientY+d.cH)>d.height&&i.clientY>d.cH?(i.clientY+d.sT-d.cH):i.clientY+d.sT)}).show().find("div[name]").hover(function(){var l=a(this),m=l.children("div"),e;l.addClass("hover");if(m.length){if(!m.attr("pos")){e=l.outerWidth();m.css(a(window).width()-e-l.offset().left>m.width()?"left":"right",e-5).attr("pos",true)}m.show()}},function(){a(this).removeClass("hover").children("div").hide()}).click(function(m){m.stopPropagation();var l=a(this);if(!l.children("div").length){b.hideMenu();b.exec(l.attr("name"),l.attr("argc"))}});function j(q){var p,n,m,o,e,r=b.fm.options.contextmenu[q]||[];for(p=0;p')}else{if(b.fm.ui.includeInCm(r[p],q)){m=b.cmd[r[p]].argc();o="";if(m.length){o='
          ';for(var n=0;n'+m[n].text+"
          "}o+="
          "}b.menu.append('
          '+o+b.cmdName(r[p])+"
          ")}}}}};this.hideMenu=function(){this.menu.hide().empty()};this.update=function(){for(var d in this.buttons){this.buttons[d].toggleClass("disabled",!this.cmd[d].isAllowed())}};this.init=function(k){var h,d,o,m=false,g=2,l,e=this.fm.options.toolbar;if(!this.fm.options.editorCallback){k.push("select")}if(!this.fm.params.archives.length&&a.inArray("archive",k)==-1){k.push("archive")}for(h in this.commands){if(a.inArray(h,k)==-1){this.commands[h].prototype=this.command.prototype;this.cmd[h]=new this.commands[h](this.fm)}}for(h=0;h')}m=false;for(d=0;d').appendTo(this.fm.view.tlb).click(function(i){i.stopPropagation()}).bind("click",(function(i){return function(){!a(this).hasClass("disabled")&&i.exec(a(this).attr("name"))}})(this)).hover(function(){!a(this).hasClass("disabled")&&a(this).addClass("el-finder-tb-hover")},function(){a(this).removeClass("el-finder-tb-hover")})}}}this.update();this.menu.css("z-index",this.fm.zIndex);if(this.fm.options.docked){this.dockButton.hover(function(){a(this).addClass("el-finder-dock-button-hover")},function(){a(this).removeClass("el-finder-dock-button-hover")}).click(function(){b.fm.view.win.attr("undocked")?b.fm.dock():b.fm.undock();a(this).trigger("mouseout")}).prependTo(this.fm.view.tlb)}}};elFinder.prototype.ui.prototype.command=function(b){};elFinder.prototype.ui.prototype.command.prototype.isAllowed=function(){return true};elFinder.prototype.ui.prototype.command.prototype.cm=function(b){return false};elFinder.prototype.ui.prototype.command.prototype.argc=function(b){return[]};elFinder.prototype.ui.prototype.commands={back:function(c){var b=this;this.name="Back";this.fm=c;this.exec=function(){if(this.fm.history.length){this.fm.ajax({cmd:"open",target:this.fm.history.pop()},function(d){b.fm.reload(d)})}};this.isAllowed=function(){return this.fm.history.length}},reload:function(c){var b=this;this.name="Reload";this.fm=c;this.exec=function(){this.fm.ajax({cmd:"open",target:this.fm.cwd.hash,tree:true},function(d){b.fm.reload(d)})};this.cm=function(d){return d=="cwd"}},open:function(c){var b=this;this.name="Open";this.fm=c;this.exec=function(e){var g=null;if(e){g={hash:a(e).attr("key"),mime:"directory",read:!a(e).hasClass("noaccess")&&!a(e).hasClass("dropbox")}}else{g=this.fm.getSelected(0)}if(!g.hash){return}if(!g.read){return this.fm.view.error("Access denied")}if(g.type=="link"&&!g.link){return this.fm.view.error("Unable to open broken link")}if(g.mime=="directory"){h(g.link||g.hash)}else{d(g)}function h(i){b.fm.history.push(b.fm.cwd.hash);b.fm.ajax({cmd:"open",target:i},function(j){b.fm.reload(j)})}function d(k){var j,i="";if(k.dim){j=k.dim.split("x");i="width="+(parseInt(j[0])+20)+",height="+(parseInt(j[1])+20)+","}window.open(k.url||b.fm.options.url+"?cmd=open¤t="+(k.parent||b.fm.cwd.hash)+"&target="+(k.link||k.hash),false,"top=50,left=50,"+i+"scrollbars=yes,resizable=yes")}};this.isAllowed=function(){return this.fm.selected.length==1&&this.fm.getSelected(0).read};this.cm=function(d){return d=="file"}},select:function(b){this.name="Select file";this.fm=b;if(b.options.selectMultiple){this.exec=function(){var c=a(b.getSelected()).map(function(){return b.options.cutURL=="root"?this.url.substr(b.params.url.length):this.url.replace(new RegExp("^("+b.options.cutURL+")"),"")});b.options.editorCallback(c);if(b.options.closeOnEditorCallback){b.dock();b.close()}}}else{this.exec=function(){var c=this.fm.getSelected(0);if(!c.url){return this.fm.view.error("File URL disabled by connector config")}this.fm.options.editorCallback(this.fm.options.cutURL=="root"?c.url.substr(this.fm.params.url.length):c.url.replace(new RegExp("^("+this.fm.options.cutURL+")"),""));if(this.fm.options.closeOnEditorCallback){this.fm.dock();this.fm.close();this.fm.destroy()}}}this.isAllowed=function(){return((this.fm.options.selectMultiple&&this.fm.selected.length>=1)||this.fm.selected.length==1)&&!/(symlink\-broken|directory)/.test(this.fm.getSelected(0).mime)};this.cm=function(c){return c!="cwd"}},quicklook:function(c){var b=this;this.name="Preview with Quick Look";this.fm=c;this.exec=function(){b.fm.quickLook.toggle()};this.isAllowed=function(){return this.fm.selected.length==1};this.cm=function(){return true}},info:function(c){var b=this;this.name="Get info";this.fm=c;this.exec=function(){var j,i,e=this.fm.selected.length,d=a(window).width(),g=a(window).height();this.fm.lockShortcuts(true);if(!e){k(b.fm.cwd)}else{a.each(this.fm.getSelected(),function(){k(this)})}function k(m){var n=["50%","50%"],h,q,o,l='";if(m.link){l+=""}if(m.dim){l+=""}if(m.url){l+=""}if(e>1){o=a(".el-finder-dialog-info:last");if(!o.length){h=Math.round(((d-350)/2)-(e*10));q=Math.round(((g-300)/2)-(e*10));n=[h>20?h:20,q>20?q:20]}else{h=o.offset().left+10;q=o.offset().top+10;n=[h").append(l+"
          '+b.fm.i18n("Name")+""+m.name+"
          "+b.fm.i18n("Kind")+""+b.fm.view.mime2kind(m.link?"symlink":m.mime)+"
          "+b.fm.i18n("Size")+""+b.fm.view.formatSize(m.size)+"
          "+b.fm.i18n("Modified")+""+b.fm.view.formatDate(m.date)+"
          "+b.fm.i18n("Permissions")+""+b.fm.view.formatPermissions(m.read,m.write,m.rm)+"
          "+b.fm.i18n("Link to")+""+m.linkTo+"
          "+b.fm.i18n("Dimensions")+""+m.dim+" px.
          "+b.fm.i18n("URL")+''+m.url+"
          ").dialog({dialogClass:"el-finder-dialog el-finder-dialog-info",width:390,position:n,title:b.fm.i18n(m.mime=="directory"?"Folder info":"File info"),close:function(){if(--e<=0){b.fm.lockShortcuts()}a(this).dialog("destroy")},buttons:{Ok:function(){a(this).dialog("close")}}})}};this.cm=function(d){return true}},rename:function(c){var b=this;this.name="Rename";this.fm=c;this.exec=function(){var i=this.fm.getSelected(),h,l,e,j,k;if(i.length==1){j=i[0];h=this.fm.view.cwd.find('[key="'+j.hash+'"]');l=this.fm.options.view=="icons"?h.children("label"):h.find("td").eq(1);k=l.html();e=a('').val(j.name).appendTo(l.empty()).bind("change blur",d).keydown(function(m){m.stopPropagation();if(m.keyCode==27){g()}else{if(m.keyCode==13){if(j.name==e.val()){g()}else{a(this).trigger("change")}}}}).click(function(m){m.stopPropagation()}).select().focus();this.fm.lockShortcuts(true)}function g(){l.html(k);b.fm.lockShortcuts()}function d(){if(!b.fm.locked){var n,m=e.val();if(j.name==e.val()){return g()}if(!b.fm.isValidName(m)){n="Invalid name"}else{if(b.fm.fileExists(m)){n="File or folder with the same name already exists"}}if(n){b.fm.view.error(n);h.addClass("ui-selected");b.fm.lockShortcuts(true);return e.select().focus()}b.fm.ajax({cmd:"rename",current:b.fm.cwd.hash,target:j.hash,name:m},function(o){if(o.error){g()}else{j.mime=="directory"&&b.fm.removePlace(j.hash)&&b.fm.addPlace(o.target);b.fm.reload(o)}},{force:true})}}};this.isAllowed=function(){return this.fm.cwd.write&&this.fm.getSelected(0).write};this.cm=function(d){return d=="file"}},copy:function(b){this.name="Copy";this.fm=b;this.exec=function(){this.fm.setBuffer(this.fm.selected)};this.isAllowed=function(){if(this.fm.selected.length){var d=this.fm.getSelected(),c=d.length;while(c--){if(d[c].read){return true}}}return false};this.cm=function(c){return c!="cwd"}},cut:function(b){this.name="Cut";this.fm=b;this.exec=function(){this.fm.setBuffer(this.fm.selected,1)};this.isAllowed=function(){if(this.fm.selected.length){var d=this.fm.getSelected(),c=d.length;while(c--){if(d[c].read&&d[c].rm){return true}}}return false};this.cm=function(c){return c!="cwd"}},paste:function(c){var b=this;this.name="Paste";this.fm=c;this.exec=function(){var e,l,h,g,k="";if(!this.fm.buffer.dst){this.fm.buffer.dst=this.fm.cwd.hash}l=this.fm.view.tree.find('[key="'+this.fm.buffer.dst+'"]');if(!l.length||l.hasClass("noaccess")||l.hasClass("readonly")){return this.fm.view.error("Access denied")}if(this.fm.buffer.src==this.fm.buffer.dst){return this.fm.view.error("Unable to copy into itself")}var j={cmd:"paste",current:this.fm.cwd.hash,src:this.fm.buffer.src,dst:this.fm.buffer.dst,cut:this.fm.buffer.cut};if(this.fm.jquery>132){j.targets=this.fm.buffer.files}else{j["targets[]"]=this.fm.buffer.files}this.fm.ajax(j,function(d){d.cdc&&b.fm.reload(d)},{force:true})};this.isAllowed=function(){return this.fm.buffer.files};this.cm=function(d){return d=="cwd"}},rm:function(c){var b=this;this.name="Remove";this.fm=c;this.exec=function(){var d,g=[],e=this.fm.getSelected();for(var d=0;d
          '+this.fm.i18n("Are you sure you want to remove files?
          This cannot be undone!")+"
          ").dialog({title:this.fm.i18n("Confirmation required"),dialogClass:"el-finder-dialog",width:350,close:function(){b.fm.lockShortcuts()},buttons:{Cancel:function(){a(this).dialog("close")},Ok:function(){a(this).dialog("close");var h={cmd:"rm",current:b.fm.cwd.hash};if(b.fm.jquery>132){h.targets=g}else{h["targets[]"]=g}b.fm.ajax(h,function(i){i.tree&&b.fm.reload(i)},{force:true})}}})}};this.isAllowed=function(g){if(this.fm.selected.length){var e=this.fm.getSelected(),d=e.length;while(d--){if(e[d].rm){return true}}}return false};this.cm=function(d){return d!="cwd"}},mkdir:function(c){var b=this;this.name="New folder";this.fm=c;this.exec=function(){b.fm.unselectAll();var e=this.fm.uniqueName("untitled folder");input=a('').val(e);prev=this.fm.view.cwd.find(".directory:last");f={name:e,hash:"",mime:"directory",read:true,write:true,date:"",size:0},el=this.fm.options.view=="list"?a(this.fm.view.renderRow(f)).children("td").eq(1).empty().append(input).end().end():a(this.fm.view.renderIcon(f)).children("label").empty().append(input).end();el.addClass("directory ui-selected");if(prev.length){el.insertAfter(prev)}else{if(this.fm.options.view=="list"){el.insertAfter(this.fm.view.cwd.find("tr").eq(0))}else{el.prependTo(this.fm.view.cwd)}}b.fm.checkSelectedPos();input.select().focus().click(function(g){g.stopPropagation()}).bind("change blur",d).keydown(function(g){g.stopPropagation();if(g.keyCode==27){el.remove();b.fm.lockShortcuts()}else{if(g.keyCode==13){d()}}});b.fm.lockShortcuts(true);function d(){if(!b.fm.locked){var h,g=input.val();if(!b.fm.isValidName(g)){h="Invalid name"}else{if(b.fm.fileExists(g)){h="File or folder with the same name already exists"}}if(h){b.fm.view.error(h);b.fm.lockShortcuts(true);el.addClass("ui-selected");return input.select().focus()}b.fm.ajax({cmd:"mkdir",current:b.fm.cwd.hash,name:g},function(i){if(i.error){el.addClass("ui-selected");return input.select().focus()}b.fm.reload(i)},{force:true})}}};this.isAllowed=function(){return this.fm.cwd.write};this.cm=function(d){return d=="cwd"}},mkfile:function(c){var b=this;this.name="New text file";this.fm=c;this.exec=function(){b.fm.unselectAll();var i=this.fm.uniqueName("untitled file",".txt"),e=a('').val(i),h={name:i,hash:"",mime:"text/plain",read:true,write:true,date:"",size:0},g=this.fm.options.view=="list"?a(this.fm.view.renderRow(h)).children("td").eq(1).empty().append(e).end().end():a(this.fm.view.renderIcon(h)).children("label").empty().append(e).end();g.addClass("text ui-selected").appendTo(this.fm.options.view=="list"?b.fm.view.cwd.children("table"):b.fm.view.cwd);e.select().focus().bind("change blur",d).click(function(j){j.stopPropagation()}).keydown(function(j){j.stopPropagation();if(j.keyCode==27){g.remove();b.fm.lockShortcuts()}else{if(j.keyCode==13){d()}}});b.fm.lockShortcuts(true);function d(){if(!b.fm.locked){var k,j=e.val();if(!b.fm.isValidName(j)){k="Invalid name"}else{if(b.fm.fileExists(j)){k="File or folder with the same name already exists"}}if(k){b.fm.view.error(k);b.fm.lockShortcuts(true);g.addClass("ui-selected");return e.select().focus()}b.fm.ajax({cmd:"mkfile",current:b.fm.cwd.hash,name:j},function(l){if(l.error){g.addClass("ui-selected");return e.select().focus()}b.fm.reload(l)},{force:true})}}};this.isAllowed=function(d){return this.fm.cwd.write};this.cm=function(d){return d=="cwd"}},upload:function(c){var b=this;this.name="Upload files";this.fm=c;this.exec=function(){var g="el-finder-io-"+(new Date().getTime()),l=a('
          '),h=this.fm.params.uplMaxSize?"

          "+this.fm.i18n("Maximum allowed files size")+": "+this.fm.params.uplMaxSize+"

          ":"",s=a('

          '+this.fm.i18n("Add field")+"

          ").click(function(){a(this).before('

          ')}),k='
          ',o=a("
          "),j=3;while(j--){k+='

          '}var r=a("meta[name=csrf-token]").attr("content");var q=a("meta[name=csrf-param]").attr("content");if(q!=null&&r!=null){k+=''}k=a(k+"");o.append(k.append(l.hide()).prepend(h).append(s)).dialog({dialogClass:"el-finder-dialog",title:b.fm.i18n("Upload files"),modal:true,resizable:false,close:function(){b.fm.lockShortcuts()},buttons:{Cancel:function(){a(this).dialog("close")},Ok:function(){if(!a(":file[value]",k).length){return p(b.fm.i18n("Select at least one file to upload"))}setTimeout(function(){b.fm.lock();if(a.browser.safari){a.ajax({url:b.fm.options.url,data:{cmd:"ping"},error:n,success:n})}else{n()}});a(this).dialog("close")}}});b.fm.lockShortcuts(true);function p(d){l.show().find("div").empty().text(d)}function n(){var v=a('': +"");a._keyEvent=false;return w},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
          ',o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&&l)?" ":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var s=(new Date).getFullYear();i=function(q){q=q.match(/c[+-].*/)?c+parseInt(q.substring(1),10):q.match(/[+-].*/)?s+parseInt(q,10):parseInt(q,10);return isNaN(q)?s:q};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b, +e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
          ";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+ +(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b)b.apply(a.input? +a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c, +e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a, +"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length)return this; +if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));return this.each(function(){typeof a== +"string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new M;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.16";window["DP_jQuery_"+B]=d})(jQuery); +;/* + * jQuery UI Progressbar 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
          ").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); +this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* +this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.16"})})(jQuery); +;/* + * jQuery UI Effects 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/ + */ +jQuery.effects||function(f,j){function m(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], +16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return n.transparent;return n[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return m(b)}function o(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, +a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function p(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d= +a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function l(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor", +"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=m(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0, +0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211, +211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},q=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b, +d){if(f.isFunction(b)){d=b;b=null}return this.queue(function(){var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("class");f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});r=p(o.call(this));e.attr("class",v);e.animate(u(h,r),{queue:false,duration:a,easing:b,complete:function(){f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments);f.dequeue(this)}})})}; +f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this, +[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.16",save:function(c,a){for(var b=0;b
          ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}), +d=document.activeElement;c.wrap(b);if(c[0]===d||f.contains(c[0],d))f(d).focus();b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(e,g){a[g]=c.css(g);if(isNaN(parseInt(a[g],10)))a[g]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){var a,b=document.activeElement; +if(c.parent().is(".ui-effects-wrapper")){a=c.parent().replaceWith(c);if(c[0]===b||f.contains(c[0],b))f(b).focus();return a}return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)}); +return d.call(this,b)},_show:f.fn.show,show:function(c){if(l(c))return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(l(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(l(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this, +arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/ +2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b, +d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c, +a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b, +d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h
          ").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+ +e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); +;/* + * jQuery UI Effects Fade 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fade + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Fold 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fold + * + * Depends: + * jquery.effects.core.js + */ +(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1], +10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); +;/* + * jQuery UI Effects Highlight 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Highlight + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&& +this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Pulsate 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Pulsate + * + * Depends: + * jquery.effects.core.js + */ +(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c
        ').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments); +b.dequeue()})})}})(jQuery); +; \ No newline at end of file diff --git a/referencia/template/js/plugins/jquery.alerts.js b/referencia/template/js/plugins/jquery.alerts.js new file mode 100644 index 0000000..80b1c85 --- /dev/null +++ b/referencia/template/js/plugins/jquery.alerts.js @@ -0,0 +1,235 @@ +// jQuery Alert Dialogs Plugin +// +// Version 1.1 +// +// Cory S.N. LaViska +// A Beautiful Site (http://abeautifulsite.net/) +// 14 May 2009 +// +// Visit http://abeautifulsite.net/notebook/87 for more information +// +// Usage: +// jAlert( message, [title, callback] ) +// jConfirm( message, [title, callback] ) +// jPrompt( message, [value, title, callback] ) +// +// History: +// +// 1.00 - Released (29 December 2008) +// +// 1.01 - Fixed bug where unbinding would destroy all resize events +// +// License: +// +// This plugin is dual-licensed under the GNU General Public License and the MIT License and +// is copyright 2008 A Beautiful Site, LLC. +// +(function($) { + + $.alerts = { + + // These properties can be read/written by accessing $.alerts.propertyName from your scripts at any time + + verticalOffset: -75, // vertical offset of the dialog from center screen, in pixels + horizontalOffset: 0, // horizontal offset of the dialog from center screen, in pixels/ + repositionOnResize: true, // re-centers the dialog on window resize + overlayOpacity: .01, // transparency level of overlay + overlayColor: '#FFF', // base color of overlay + draggable: true, // make the dialogs draggable (requires UI Draggables plugin) + okButton: ' OK ', // text for the OK button + cancelButton: ' Cancel ', // text for the Cancel button + dialogClass: null, // if specified, this class will be applied to all dialogs + + // Public methods + + alert: function(message, title, callback) { + if( title == null ) title = 'Alert'; + $.alerts._show(title, message, null, 'alert', function(result) { + if( callback ) callback(result); + }); + }, + + confirm: function(message, title, callback) { + if( title == null ) title = 'Confirm'; + $.alerts._show(title, message, null, 'confirm', function(result) { + if( callback ) callback(result); + }); + }, + + prompt: function(message, value, title, callback) { + if( title == null ) title = 'Prompt'; + $.alerts._show(title, message, value, 'prompt', function(result) { + if( callback ) callback(result); + }); + }, + + // Private methods + + _show: function(title, msg, value, type, callback) { + + $.alerts._hide(); + $.alerts._overlay('show'); + + $("BODY").append( + ''); + + if( $.alerts.dialogClass ) $("#popup_container").addClass($.alerts.dialogClass); + + // IE6 Fix + var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ) ? 'absolute' : 'fixed'; + + $("#popup_container").css({ + position: pos, + zIndex: 99999, + padding: 0, + margin: 0 + }); + + $("#popup_title").text(title); + $("#popup_content").addClass(type); + $("#popup_message").text(msg); + $("#popup_message").html( $("#popup_message").text().replace(/\n/g, '
        ') ); + + $("#popup_container").css({ + minWidth: $("#popup_container").outerWidth(), + maxWidth: $("#popup_container").outerWidth() + }); + + $.alerts._reposition(); + $.alerts._maintainPosition(true); + + switch( type ) { + case 'alert': + $("#popup_message").after(''); + $("#popup_ok").click( function() { + $.alerts._hide(); + callback(true); + }); + $("#popup_ok").focus().keypress( function(e) { + if( e.keyCode == 13 || e.keyCode == 27 ) $("#popup_ok").trigger('click'); + }); + break; + case 'confirm': + $("#popup_message").after(''); + $("#popup_ok").click( function() { + $.alerts._hide(); + if( callback ) callback(true); + }); + $("#popup_cancel").click( function() { + $.alerts._hide(); + if( callback ) callback(false); + }); + $("#popup_ok").focus(); + $("#popup_ok, #popup_cancel").keypress( function(e) { + if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); + if( e.keyCode == 27 ) $("#popup_cancel").trigger('click'); + }); + break; + case 'prompt': + $("#popup_message").append('
        ').after(''); + $("#popup_prompt").width( $("#popup_message").width() ); + $("#popup_ok").click( function() { + var val = $("#popup_prompt").val(); + $.alerts._hide(); + if( callback ) callback( val ); + }); + $("#popup_cancel").click( function() { + $.alerts._hide(); + if( callback ) callback( null ); + }); + $("#popup_prompt, #popup_ok, #popup_cancel").keypress( function(e) { + if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); + if( e.keyCode == 27 ) $("#popup_cancel").trigger('click'); + }); + if( value ) $("#popup_prompt").val(value); + $("#popup_prompt").focus().select(); + break; + } + + // Make draggable + if( $.alerts.draggable ) { + try { + $("#popup_container").draggable({ handle: $("#popup_title") }); + $("#popup_title").css({ cursor: 'move' }); + } catch(e) { /* requires jQuery UI draggables */ } + } + }, + + _hide: function() { + $("#popup_container").remove(); + $.alerts._overlay('hide'); + $.alerts._maintainPosition(false); + }, + + _overlay: function(status) { + switch( status ) { + case 'show': + $.alerts._overlay('hide'); + $("BODY").append(''); + $("#popup_overlay").css({ + position: 'absolute', + zIndex: 99998, + top: '0px', + left: '0px', + width: '100%', + height: $(document).height(), + background: $.alerts.overlayColor, + opacity: $.alerts.overlayOpacity + }); + break; + case 'hide': + $("#popup_overlay").remove(); + break; + } + }, + + _reposition: function() { + var top = (($(window).height() / 2) - ($("#popup_container").outerHeight() / 2)) + $.alerts.verticalOffset; + var left = (($(window).width() / 2) - ($("#popup_container").outerWidth() / 2)) + $.alerts.horizontalOffset; + if( top < 0 ) top = 0; + if( left < 0 ) left = 0; + + // IE6 fix + if( $.browser.msie && parseInt($.browser.version) <= 6 ) top = top + $(window).scrollTop(); + + $("#popup_container").css({ + top: top + 'px', + left: left + 'px' + }); + $("#popup_overlay").height( $(document).height() ); + }, + + _maintainPosition: function(status) { + if( $.alerts.repositionOnResize ) { + switch(status) { + case true: + $(window).bind('resize', $.alerts._reposition); + break; + case false: + $(window).unbind('resize', $.alerts._reposition); + break; + } + } + } + + } + + // Shortuct functions + jAlert = function(message, title, callback) { + $.alerts.alert(message, title, callback); + } + + jConfirm = function(message, title, callback) { + $.alerts.confirm(message, title, callback); + }; + + jPrompt = function(message, value, title, callback) { + $.alerts.prompt(message, value, title, callback); + }; + +})(jQuery); \ No newline at end of file diff --git a/referencia/template/js/plugins/jquery.colorbox-min.js b/referencia/template/js/plugins/jquery.colorbox-min.js new file mode 100644 index 0000000..5449a51 --- /dev/null +++ b/referencia/template/js/plugins/jquery.colorbox-min.js @@ -0,0 +1,4 @@ +// ColorBox v1.3.18 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+ +// Copyright (c) 2011 Jack Moore - jack@colorpowered.com +// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php +(function(a,b,c){function Y(c,d,e){var g=b.createElement(c);return d&&(g.id=f+d),e&&(g.style.cssText=e),a(g)}function Z(a){var b=y.length,c=(Q+a)%b;return c<0?b+c:c}function $(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function _(a){return K.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(a)}function ba(){var b;K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.slice(0,2)!=="on"&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,typeof K.href=="string"&&(K.href=a.trim(K.href))}function bb(b,c){a.event.trigger(b),c&&c.call(P)}function bc(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;K.slideshow&&y[1]?(d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(Q"),b.open=!0}return c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b)),a(this).addClass(g)}),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&bd(f[0]),f},W.init=function(){if(!r){if(!a("body")[0]){a(W.init);return}z=a(c),r=Y(X).attr({id:e,"class":n?f+(o?"IE6":"IE"):""}),q=Y(X,"Overlay",o?"position:absolute":"").hide(),s=Y(X,"Wrapper"),t=Y(X,"Content").append(A=Y(X,"LoadedContent","width:0; height:0; overflow:hidden"),C=Y(X,"LoadingOverlay").add(Y(X,"LoadingGraphic")),D=Y(X,"Title"),E=Y(X,"Current"),G=Y(X,"Next"),H=Y(X,"Previous"),F=Y(X,"Slideshow").bind(h,bc),I=Y(X,"Close")),s.append(Y(X).append(Y(X,"TopLeft"),u=Y(X,"TopCenter"),Y(X,"TopRight")),Y(X,!1,"clear:left").append(v=Y(X,"MiddleLeft"),t,w=Y(X,"MiddleRight")),Y(X,!1,"clear:left").append(Y(X,"BottomLeft"),x=Y(X,"BottomCenter"),Y(X,"BottomRight"))).find("div div").css({"float":"left"}),B=Y(X,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),a("body").prepend(q,r.append(s,B)),L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}).hide(),G.click(function(){W.next()}),H.click(function(){W.prev()}),I.click(function(){W.close()}),J=G.add(H).add(E).add(F),q.click(function(){K.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),W.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))})}},W.remove=function(){r.add(q).remove(),r=null,a("."+g).removeData(e).removeClass(g)},W.position=function(a,b){function g(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,C[0].style.height=C[1].style.height=t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var c=0,d=0,e=r.offset();z.unbind("resize."+f),r.css({top:-99999,left:-99999}),K.fixed&&!o?r.css({position:"fixed"}):(c=z.scrollTop(),d=z.scrollLeft(),r.css({position:"absolute"})),K.right!==!1?d+=Math.max(z.width()-K.w-O-M-$(K.right,"x"),0):K.left!==!1?d+=$(K.left,"x"):d+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?c+=Math.max(z.height()-K.h-N-L-$(K.bottom,"y"),0):K.top!==!1?c+=$(K.top,"y"):c+=Math.round(Math.max(z.height()-K.h-N-L,0)/2),r.css({top:e.top,left:e.left}),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",r.dequeue().animate({width:K.w+O,height:K.h+N,top:c,left:d},{duration:a,complete:function(){g(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",b&&b(),setTimeout(function(){z.bind("resize."+f,W.position)},1)},step:function(){g(this)}})},W.resize=function(a){S&&(a=a||{},a.width&&(K.w=$(a.width,"x")-O-M),a.innerWidth&&(K.w=$(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=$(a.height,"y")-N-L),a.innerHeight&&(K.h=$(a.innerHeight,"y")),!a.innerHeight&&!a.height&&(A.css({height:"auto"}),K.h=A.height()),A.css({height:K.h}),W.position(K.transition==="none"?0:K.speed))},W.prep=function(b){function g(){return K.w=K.w||A.width(),K.w=K.mw&&K.mw1){typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",g)).show(),G[K.loop||QK.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(Q1||a.shiftKey||a.altKey||a.metaKey||(a.preventDefault(),bd(this))}),W.init()})(jQuery,document,this); \ No newline at end of file diff --git a/referencia/template/js/plugins/jquery.dataTables.js b/referencia/template/js/plugins/jquery.dataTables.js new file mode 100644 index 0000000..98c792d --- /dev/null +++ b/referencia/template/js/plugins/jquery.dataTables.js @@ -0,0 +1,7440 @@ +/* + * File: jquery.dataTables.js + * Version: 1.8.2 + * Description: Paginate, search and sort HTML tables + * Author: Allan Jardine (www.sprymedia.co.uk) + * Created: 28/3/2008 + * Language: Javascript + * License: GPL v2 or BSD 3 point style + * Project: Mtaala + * Contact: allan.jardine@sprymedia.co.uk + * + * Copyright 2008-2011 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD style license, as supplied with this software. + * + * This source file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + * + * For details please refer to: http://www.datatables.net + */ + +/* + * When considering jsLint, we need to allow eval() as it it is used for reading cookies + */ +/*jslint evil: true, undef: true, browser: true */ +/*globals $, jQuery,_fnExternApiFunc,_fnInitialise,_fnInitComplete,_fnLanguageProcess,_fnAddColumn,_fnColumnOptions,_fnAddData,_fnCreateTr,_fnGatherData,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnServerParams,_fnAddOptionsHtml,_fnFeatureHtmlTable,_fnScrollDraw,_fnAdjustColumnSizing,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnBuildSearchArray,_fnBuildSearchRow,_fnFilterCreateSearch,_fnDataToSearch,_fnSort,_fnSortAttachListener,_fnSortingClasses,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnFeatureHtmlLength,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnNodeToDataIndex,_fnVisbleColumns,_fnCalculateEnd,_fnConvertToWidth,_fnCalculateColumnWidths,_fnScrollingWidthAdjust,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnArrayCmp,_fnDetectType,_fnSettingsFromNode,_fnGetDataMaster,_fnGetTrNodes,_fnGetTdNodes,_fnEscapeRegex,_fnDeleteIndex,_fnReOrderIndex,_fnColumnOrdering,_fnLog,_fnClearTable,_fnSaveState,_fnLoadState,_fnCreateCookie,_fnReadCookie,_fnDetectHeader,_fnGetUniqueThs,_fnScrollBarWidth,_fnApplyToChildren,_fnMap,_fnGetRowData,_fnGetCellData,_fnSetCellData,_fnGetObjectDataFn,_fnSetObjectDataFn*/ + +(function($, window, document) { + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Section - DataTables variables + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /* + * Variable: dataTableSettings + * Purpose: Store the settings for each dataTables instance + * Scope: jQuery.fn + */ + $.fn.dataTableSettings = []; + var _aoSettings = $.fn.dataTableSettings; /* Short reference for fast internal lookup */ + + /* + * Variable: dataTableExt + * Purpose: Container for customisable parts of DataTables + * Scope: jQuery.fn + */ + $.fn.dataTableExt = {}; + var _oExt = $.fn.dataTableExt; + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Section - DataTables extensible objects + * + * The _oExt object is used to provide an area where user defined plugins can be + * added to DataTables. The following properties of the object are used: + * oApi - Plug-in API functions + * aTypes - Auto-detection of types + * oSort - Sorting functions used by DataTables (based on the type) + * oPagination - Pagination functions for different input styles + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /* + * Variable: sVersion + * Purpose: Version string for plug-ins to check compatibility + * Scope: jQuery.fn.dataTableExt + * Notes: Allowed format is a.b.c.d.e where: + * a:int, b:int, c:int, d:string(dev|beta), e:int. d and e are optional + */ + _oExt.sVersion = "1.8.2"; + + /* + * Variable: sErrMode + * Purpose: How should DataTables report an error. Can take the value 'alert' or 'throw' + * Scope: jQuery.fn.dataTableExt + */ + _oExt.sErrMode = "alert"; + + /* + * Variable: iApiIndex + * Purpose: Index for what 'this' index API functions should use + * Scope: jQuery.fn.dataTableExt + */ + _oExt.iApiIndex = 0; + + /* + * Variable: oApi + * Purpose: Container for plugin API functions + * Scope: jQuery.fn.dataTableExt + */ + _oExt.oApi = { }; + + /* + * Variable: aFiltering + * Purpose: Container for plugin filtering functions + * Scope: jQuery.fn.dataTableExt + */ + _oExt.afnFiltering = [ ]; + + /* + * Variable: aoFeatures + * Purpose: Container for plugin function functions + * Scope: jQuery.fn.dataTableExt + * Notes: Array of objects with the following parameters: + * fnInit: Function for initialisation of Feature. Takes oSettings and returns node + * cFeature: Character that will be matched in sDom - case sensitive + * sFeature: Feature name - just for completeness :-) + */ + _oExt.aoFeatures = [ ]; + + /* + * Variable: ofnSearch + * Purpose: Container for custom filtering functions + * Scope: jQuery.fn.dataTableExt + * Notes: This is an object (the name should match the type) for custom filtering function, + * which can be used for live DOM checking or formatted text filtering + */ + _oExt.ofnSearch = { }; + + /* + * Variable: afnSortData + * Purpose: Container for custom sorting data source functions + * Scope: jQuery.fn.dataTableExt + * Notes: Array (associative) of functions which is run prior to a column of this + * 'SortDataType' being sorted upon. + * Function input parameters: + * object:oSettings- DataTables settings object + * int:iColumn - Target column number + * Return value: Array of data which exactly matched the full data set size for the column to + * be sorted upon + */ + _oExt.afnSortData = [ ]; + + /* + * Variable: oStdClasses + * Purpose: Storage for the various classes that DataTables uses + * Scope: jQuery.fn.dataTableExt + */ + _oExt.oStdClasses = { + /* Two buttons buttons */ + "sPagePrevEnabled": "paginate_enabled_previous", + "sPagePrevDisabled": "paginate_disabled_previous", + "sPageNextEnabled": "paginate_enabled_next", + "sPageNextDisabled": "paginate_disabled_next", + "sPageJUINext": "", + "sPageJUIPrev": "", + + /* Full numbers paging buttons */ + "sPageButton": "paginate_button", + "sPageButtonActive": "paginate_active", + "sPageButtonStaticDisabled": "paginate_button paginate_button_disabled", + "sPageFirst": "first", + "sPagePrevious": "previous", + "sPageNext": "next", + "sPageLast": "last", + + /* Striping classes */ + "sStripeOdd": "odd", + "sStripeEven": "even", + + /* Empty row */ + "sRowEmpty": "dataTables_empty", + + /* Features */ + "sWrapper": "dataTables_wrapper", + "sFilter": "dataTables_filter", + "sInfo": "dataTables_info", + "sPaging": "dataTables_paginate paging_", /* Note that the type is postfixed */ + "sLength": "dataTables_length", + "sProcessing": "dataTables_processing", + + /* Sorting */ + "sSortAsc": "sorting_asc", + "sSortDesc": "sorting_desc", + "sSortable": "sorting", /* Sortable in both directions */ + "sSortableAsc": "sorting_asc_disabled", + "sSortableDesc": "sorting_desc_disabled", + "sSortableNone": "sorting_disabled", + "sSortColumn": "sorting_", /* Note that an int is postfixed for the sorting order */ + "sSortJUIAsc": "", + "sSortJUIDesc": "", + "sSortJUI": "", + "sSortJUIAscAllowed": "", + "sSortJUIDescAllowed": "", + "sSortJUIWrapper": "", + "sSortIcon": "", + + /* Scrolling */ + "sScrollWrapper": "dataTables_scroll", + "sScrollHead": "dataTables_scrollHead", + "sScrollHeadInner": "dataTables_scrollHeadInner", + "sScrollBody": "dataTables_scrollBody", + "sScrollFoot": "dataTables_scrollFoot", + "sScrollFootInner": "dataTables_scrollFootInner", + + /* Misc */ + "sFooterTH": "" + }; + + /* + * Variable: oJUIClasses + * Purpose: Storage for the various classes that DataTables uses - jQuery UI suitable + * Scope: jQuery.fn.dataTableExt + */ + _oExt.oJUIClasses = { + /* Two buttons buttons */ + "sPagePrevEnabled": "fg-button ui-button ui-state-default ui-corner-left", + "sPagePrevDisabled": "fg-button ui-button ui-state-default ui-corner-left ui-state-disabled", + "sPageNextEnabled": "fg-button ui-button ui-state-default ui-corner-right", + "sPageNextDisabled": "fg-button ui-button ui-state-default ui-corner-right ui-state-disabled", + "sPageJUINext": "ui-icon ui-icon-circle-arrow-e", + "sPageJUIPrev": "ui-icon ui-icon-circle-arrow-w", + + /* Full numbers paging buttons */ + "sPageButton": "fg-button ui-button ui-state-default", + "sPageButtonActive": "fg-button ui-button ui-state-default ui-state-disabled", + "sPageButtonStaticDisabled": "fg-button ui-button ui-state-default ui-state-disabled", + "sPageFirst": "first ui-corner-tl ui-corner-bl", + "sPagePrevious": "previous", + "sPageNext": "next", + "sPageLast": "last ui-corner-tr ui-corner-br", + + /* Striping classes */ + "sStripeOdd": "odd", + "sStripeEven": "even", + + /* Empty row */ + "sRowEmpty": "dataTables_empty", + + /* Features */ + "sWrapper": "dataTables_wrapper", + "sFilter": "dataTables_filter", + "sInfo": "dataTables_info", + "sPaging": "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi "+ + "ui-buttonset-multi paging_", /* Note that the type is postfixed */ + "sLength": "dataTables_length", + "sProcessing": "dataTables_processing", + + /* Sorting */ + "sSortAsc": "ui-state-default", + "sSortDesc": "ui-state-default", + "sSortable": "ui-state-default", + "sSortableAsc": "ui-state-default", + "sSortableDesc": "ui-state-default", + "sSortableNone": "ui-state-default", + "sSortColumn": "sorting_", /* Note that an int is postfixed for the sorting order */ + "sSortJUIAsc": "css_right ui-icon ui-icon-triangle-1-n", + "sSortJUIDesc": "css_right ui-icon ui-icon-triangle-1-s", + "sSortJUI": "css_right ui-icon ui-icon-carat-2-n-s", + "sSortJUIAscAllowed": "css_right ui-icon ui-icon-carat-1-n", + "sSortJUIDescAllowed": "css_right ui-icon ui-icon-carat-1-s", + "sSortJUIWrapper": "DataTables_sort_wrapper", + "sSortIcon": "DataTables_sort_icon", + + /* Scrolling */ + "sScrollWrapper": "dataTables_scroll", + "sScrollHead": "dataTables_scrollHead ui-state-default", + "sScrollHeadInner": "dataTables_scrollHeadInner", + "sScrollBody": "dataTables_scrollBody", + "sScrollFoot": "dataTables_scrollFoot ui-state-default", + "sScrollFootInner": "dataTables_scrollFootInner", + + /* Misc */ + "sFooterTH": "ui-state-default" + }; + + /* + * Variable: oPagination + * Purpose: Container for the various type of pagination that dataTables supports + * Scope: jQuery.fn.dataTableExt + */ + _oExt.oPagination = { + /* + * Variable: two_button + * Purpose: Standard two button (forward/back) pagination + * Scope: jQuery.fn.dataTableExt.oPagination + */ + "two_button": { + /* + * Function: oPagination.two_button.fnInit + * Purpose: Initialise dom elements required for pagination with forward/back buttons only + * Returns: - + * Inputs: object:oSettings - dataTables settings object + * node:nPaging - the DIV which contains this pagination control + * function:fnCallbackDraw - draw function which must be called on update + */ + "fnInit": function ( oSettings, nPaging, fnCallbackDraw ) + { + var nPrevious, nNext, nPreviousInner, nNextInner; + + /* Store the next and previous elements in the oSettings object as they can be very + * usful for automation - particularly testing + */ + if ( !oSettings.bJUI ) + { + nPrevious = document.createElement( 'div' ); + nNext = document.createElement( 'div' ); + } + else + { + nPrevious = document.createElement( 'a' ); + nNext = document.createElement( 'a' ); + + nNextInner = document.createElement('span'); + nNextInner.className = oSettings.oClasses.sPageJUINext; + nNext.appendChild( nNextInner ); + + nPreviousInner = document.createElement('span'); + nPreviousInner.className = oSettings.oClasses.sPageJUIPrev; + nPrevious.appendChild( nPreviousInner ); + } + + nPrevious.className = oSettings.oClasses.sPagePrevDisabled; + nNext.className = oSettings.oClasses.sPageNextDisabled; + + nPrevious.title = oSettings.oLanguage.oPaginate.sPrevious; + nNext.title = oSettings.oLanguage.oPaginate.sNext; + + nPaging.appendChild( nPrevious ); + nPaging.appendChild( nNext ); + + $(nPrevious).bind( 'click.DT', function() { + if ( oSettings.oApi._fnPageChange( oSettings, "previous" ) ) + { + /* Only draw when the page has actually changed */ + fnCallbackDraw( oSettings ); + } + } ); + + $(nNext).bind( 'click.DT', function() { + if ( oSettings.oApi._fnPageChange( oSettings, "next" ) ) + { + fnCallbackDraw( oSettings ); + } + } ); + + /* Take the brutal approach to cancelling text selection */ + $(nPrevious).bind( 'selectstart.DT', function () { return false; } ); + $(nNext).bind( 'selectstart.DT', function () { return false; } ); + + /* ID the first elements only */ + if ( oSettings.sTableId !== '' && typeof oSettings.aanFeatures.p == "undefined" ) + { + nPaging.setAttribute( 'id', oSettings.sTableId+'_paginate' ); + nPrevious.setAttribute( 'id', oSettings.sTableId+'_previous' ); + nNext.setAttribute( 'id', oSettings.sTableId+'_next' ); + } + }, + + /* + * Function: oPagination.two_button.fnUpdate + * Purpose: Update the two button pagination at the end of the draw + * Returns: - + * Inputs: object:oSettings - dataTables settings object + * function:fnCallbackDraw - draw function to call on page change + */ + "fnUpdate": function ( oSettings, fnCallbackDraw ) + { + if ( !oSettings.aanFeatures.p ) + { + return; + } + + /* Loop over each instance of the pager */ + var an = oSettings.aanFeatures.p; + for ( var i=0, iLen=an.length ; i= (iPages - iPageCountHalf)) + { + iStartButton = iPages - iPageCount + 1; + iEndButton = iPages; + } + else + { + iStartButton = iCurrentPage - Math.ceil(iPageCount / 2) + 1; + iEndButton = iStartButton + iPageCount - 1; + } + } + } + + /* Build the dynamic list */ + for ( i=iStartButton ; i<=iEndButton ; i++ ) + { + if ( iCurrentPage != i ) + { + sList += ''+i+''; + } + else + { + sList += ''+i+''; + } + } + + /* Loop over each instance of the pager */ + var an = oSettings.aanFeatures.p; + var anButtons, anStatic, nPaginateList; + var fnClick = function(e) { + /* Use the information in the element to jump to the required page */ + var iTarget = (this.innerHTML * 1) - 1; + oSettings._iDisplayStart = iTarget * oSettings._iDisplayLength; + fnCallbackDraw( oSettings ); + e.preventDefault(); + }; + var fnFalse = function () { return false; }; + + for ( i=0, iLen=an.length ; i y) ? 1 : 0)); + }, + + "string-desc": function ( a, b ) + { + if ( typeof a != 'string' ) { a = ''; } + if ( typeof b != 'string' ) { b = ''; } + var x = a.toLowerCase(); + var y = b.toLowerCase(); + return ((x < y) ? 1 : ((x > y) ? -1 : 0)); + }, + + + /* + * html sorting (ignore html tags) + */ + "html-asc": function ( a, b ) + { + var x = a.replace( /<.*?>/g, "" ).toLowerCase(); + var y = b.replace( /<.*?>/g, "" ).toLowerCase(); + return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + }, + + "html-desc": function ( a, b ) + { + var x = a.replace( /<.*?>/g, "" ).toLowerCase(); + var y = b.replace( /<.*?>/g, "" ).toLowerCase(); + return ((x < y) ? 1 : ((x > y) ? -1 : 0)); + }, + + + /* + * date sorting + */ + "date-asc": function ( a, b ) + { + var x = Date.parse( a ); + var y = Date.parse( b ); + + if ( isNaN(x) || x==="" ) + { + x = Date.parse( "01/01/1970 00:00:00" ); + } + if ( isNaN(y) || y==="" ) + { + y = Date.parse( "01/01/1970 00:00:00" ); + } + + return x - y; + }, + + "date-desc": function ( a, b ) + { + var x = Date.parse( a ); + var y = Date.parse( b ); + + if ( isNaN(x) || x==="" ) + { + x = Date.parse( "01/01/1970 00:00:00" ); + } + if ( isNaN(y) || y==="" ) + { + y = Date.parse( "01/01/1970 00:00:00" ); + } + + return y - x; + }, + + + /* + * numerical sorting + */ + "numeric-asc": function ( a, b ) + { + var x = (a=="-" || a==="") ? 0 : a*1; + var y = (b=="-" || b==="") ? 0 : b*1; + return x - y; + }, + + "numeric-desc": function ( a, b ) + { + var x = (a=="-" || a==="") ? 0 : a*1; + var y = (b=="-" || b==="") ? 0 : b*1; + return y - x; + } + }; + + + /* + * Variable: aTypes + * Purpose: Container for the various type of type detection that dataTables supports + * Scope: jQuery.fn.dataTableExt + * Notes: The functions in this array are expected to parse a string to see if it is a data + * type that it recognises. If so then the function should return the name of the type (a + * corresponding sort function should be defined!), if the type is not recognised then the + * function should return null such that the parser and move on to check the next type. + * Note that ordering is important in this array - the functions are processed linearly, + * starting at index 0. + * Note that the input for these functions is always a string! It cannot be any other data + * type + */ + _oExt.aTypes = [ + /* + * Function: - + * Purpose: Check to see if a string is numeric + * Returns: string:'numeric' or null + * Inputs: mixed:sText - string to check + */ + function ( sData ) + { + /* Allow zero length strings as a number */ + if ( typeof sData == 'number' ) + { + return 'numeric'; + } + else if ( typeof sData != 'string' ) + { + return null; + } + + var sValidFirstChars = "0123456789-"; + var sValidChars = "0123456789."; + var Char; + var bDecimal = false; + + /* Check for a valid first char (no period and allow negatives) */ + Char = sData.charAt(0); + if (sValidFirstChars.indexOf(Char) == -1) + { + return null; + } + + /* Check all the other characters are valid */ + for ( var i=1 ; i') != -1 ) + { + return 'html'; + } + return null; + } + ]; + + /* + * Function: fnVersionCheck + * Purpose: Check a version string against this version of DataTables. Useful for plug-ins + * Returns: bool:true -this version of DataTables is greater or equal to the required version + * false -this version of DataTales is not suitable + * Inputs: string:sVersion - the version to check against. May be in the following formats: + * "a", "a.b" or "a.b.c" + * Notes: This function will only check the first three parts of a version string. It is + * assumed that beta and dev versions will meet the requirements. This might change in future + */ + _oExt.fnVersionCheck = function( sVersion ) + { + /* This is cheap, but very effective */ + var fnZPad = function (Zpad, count) + { + while(Zpad.length < count) { + Zpad += '0'; + } + return Zpad; + }; + var aThis = _oExt.sVersion.split('.'); + var aThat = sVersion.split('.'); + var sThis = '', sThat = ''; + + for ( var i=0, iLen=aThat.length ; i= parseInt(sThat, 10); + }; + + /* + * Variable: _oExternConfig + * Purpose: Store information for DataTables to access globally about other instances + * Scope: jQuery.fn.dataTableExt + */ + _oExt._oExternConfig = { + /* int:iNextUnique - next unique number for an instance */ + "iNextUnique": 0 + }; + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Section - DataTables prototype + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /* + * Function: dataTable + * Purpose: DataTables information + * Returns: - + * Inputs: object:oInit - initialisation options for the table + */ + $.fn.dataTable = function( oInit ) + { + /* + * Function: classSettings + * Purpose: Settings container function for all 'class' properties which are required + * by dataTables + * Returns: - + * Inputs: - + */ + function classSettings () + { + this.fnRecordsTotal = function () + { + if ( this.oFeatures.bServerSide ) { + return parseInt(this._iRecordsTotal, 10); + } else { + return this.aiDisplayMaster.length; + } + }; + + this.fnRecordsDisplay = function () + { + if ( this.oFeatures.bServerSide ) { + return parseInt(this._iRecordsDisplay, 10); + } else { + return this.aiDisplay.length; + } + }; + + this.fnDisplayEnd = function () + { + if ( this.oFeatures.bServerSide ) { + if ( this.oFeatures.bPaginate === false || this._iDisplayLength == -1 ) { + return this._iDisplayStart+this.aiDisplay.length; + } else { + return Math.min( this._iDisplayStart+this._iDisplayLength, + this._iRecordsDisplay ); + } + } else { + return this._iDisplayEnd; + } + }; + + /* + * Variable: oInstance + * Purpose: The DataTables object for this table + * Scope: jQuery.dataTable.classSettings + */ + this.oInstance = null; + + /* + * Variable: sInstance + * Purpose: Unique idendifier for each instance of the DataTables object + * Scope: jQuery.dataTable.classSettings + */ + this.sInstance = null; + + /* + * Variable: oFeatures + * Purpose: Indicate the enablement of key dataTable features + * Scope: jQuery.dataTable.classSettings + */ + this.oFeatures = { + "bPaginate": true, + "bLengthChange": true, + "bFilter": true, + "bSort": true, + "bInfo": true, + "bAutoWidth": true, + "bProcessing": false, + "bSortClasses": true, + "bStateSave": false, + "bServerSide": false, + "bDeferRender": false + }; + + /* + * Variable: oScroll + * Purpose: Container for scrolling options + * Scope: jQuery.dataTable.classSettings + */ + this.oScroll = { + "sX": "", + "sXInner": "", + "sY": "", + "bCollapse": false, + "bInfinite": false, + "iLoadGap": 100, + "iBarWidth": 0, + "bAutoCss": true + }; + + /* + * Variable: aanFeatures + * Purpose: Array referencing the nodes which are used for the features + * Scope: jQuery.dataTable.classSettings + * Notes: The parameters of this object match what is allowed by sDom - i.e. + * 'l' - Length changing + * 'f' - Filtering input + * 't' - The table! + * 'i' - Information + * 'p' - Pagination + * 'r' - pRocessing + */ + this.aanFeatures = []; + + /* + * Variable: oLanguage + * Purpose: Store the language strings used by dataTables + * Scope: jQuery.dataTable.classSettings + * Notes: The words in the format _VAR_ are variables which are dynamically replaced + * by javascript + */ + this.oLanguage = { + "sProcessing": "Processing...", + "sLengthMenu": "Show _MENU_ entries", + "sZeroRecords": "No matching records found", + "sEmptyTable": "No data available in table", + "sLoadingRecords": "Loading...", + "sInfo": "Showing _START_ to _END_ of _TOTAL_ entries", + "sInfoEmpty": "Showing 0 to 0 of 0 entries", + "sInfoFiltered": "(filtered from _MAX_ total entries)", + "sInfoPostFix": "", + "sInfoThousands": ",", + "sSearch": "Search:", + "sUrl": "", + "oPaginate": { + "sFirst": "First", + "sPrevious": "Previous", + "sNext": "Next", + "sLast": "Last" + }, + "fnInfoCallback": null + }; + + /* + * Variable: aoData + * Purpose: Store data information + * Scope: jQuery.dataTable.classSettings + * Notes: This is an array of objects with the following parameters: + * int: _iId - internal id for tracking + * array: _aData - internal data - used for sorting / filtering etc + * node: nTr - display node + * array node: _anHidden - hidden TD nodes + * string: _sRowStripe + */ + this.aoData = []; + + /* + * Variable: aiDisplay + * Purpose: Array of indexes which are in the current display (after filtering etc) + * Scope: jQuery.dataTable.classSettings + */ + this.aiDisplay = []; + + /* + * Variable: aiDisplayMaster + * Purpose: Array of indexes for display - no filtering + * Scope: jQuery.dataTable.classSettings + */ + this.aiDisplayMaster = []; + + /* + * Variable: aoColumns + * Purpose: Store information about each column that is in use + * Scope: jQuery.dataTable.classSettings + */ + this.aoColumns = []; + + /* + * Variable: aoHeader + * Purpose: Store information about the table's header + * Scope: jQuery.dataTable.classSettings + */ + this.aoHeader = []; + + /* + * Variable: aoFooter + * Purpose: Store information about the table's footer + * Scope: jQuery.dataTable.classSettings + */ + this.aoFooter = []; + + /* + * Variable: iNextId + * Purpose: Store the next unique id to be used for a new row + * Scope: jQuery.dataTable.classSettings + */ + this.iNextId = 0; + + /* + * Variable: asDataSearch + * Purpose: Search data array for regular expression searching + * Scope: jQuery.dataTable.classSettings + */ + this.asDataSearch = []; + + /* + * Variable: oPreviousSearch + * Purpose: Store the previous search incase we want to force a re-search + * or compare the old search to a new one + * Scope: jQuery.dataTable.classSettings + */ + this.oPreviousSearch = { + "sSearch": "", + "bRegex": false, + "bSmart": true + }; + + /* + * Variable: aoPreSearchCols + * Purpose: Store the previous search for each column + * Scope: jQuery.dataTable.classSettings + */ + this.aoPreSearchCols = []; + + /* + * Variable: aaSorting + * Purpose: Sorting information + * Scope: jQuery.dataTable.classSettings + * Notes: Index 0 - column number + * Index 1 - current sorting direction + * Index 2 - index of asSorting for this column + */ + this.aaSorting = [ [0, 'asc', 0] ]; + + /* + * Variable: aaSortingFixed + * Purpose: Sorting information that is always applied + * Scope: jQuery.dataTable.classSettings + */ + this.aaSortingFixed = null; + + /* + * Variable: asStripeClasses + * Purpose: Classes to use for the striping of a table + * Scope: jQuery.dataTable.classSettings + */ + this.asStripeClasses = []; + + /* + * Variable: asDestroyStripes + * Purpose: If restoring a table - we should restore its striping classes as well + * Scope: jQuery.dataTable.classSettings + */ + this.asDestroyStripes = []; + + /* + * Variable: sDestroyWidth + * Purpose: If restoring a table - we should restore its width + * Scope: jQuery.dataTable.classSettings + */ + this.sDestroyWidth = 0; + + /* + * Variable: fnRowCallback + * Purpose: Call this function every time a row is inserted (draw) + * Scope: jQuery.dataTable.classSettings + */ + this.fnRowCallback = null; + + /* + * Variable: fnHeaderCallback + * Purpose: Callback function for the header on each draw + * Scope: jQuery.dataTable.classSettings + */ + this.fnHeaderCallback = null; + + /* + * Variable: fnFooterCallback + * Purpose: Callback function for the footer on each draw + * Scope: jQuery.dataTable.classSettings + */ + this.fnFooterCallback = null; + + /* + * Variable: aoDrawCallback + * Purpose: Array of callback functions for draw callback functions + * Scope: jQuery.dataTable.classSettings + * Notes: Each array element is an object with the following parameters: + * function:fn - function to call + * string:sName - name callback (feature). useful for arranging array + */ + this.aoDrawCallback = []; + + /* + * Variable: fnPreDrawCallback + * Purpose: Callback function for just before the table is redrawn. A return of false + * will be used to cancel the draw. + * Scope: jQuery.dataTable.classSettings + */ + this.fnPreDrawCallback = null; + + /* + * Variable: fnInitComplete + * Purpose: Callback function for when the table has been initialised + * Scope: jQuery.dataTable.classSettings + */ + this.fnInitComplete = null; + + /* + * Variable: sTableId + * Purpose: Cache the table ID for quick access + * Scope: jQuery.dataTable.classSettings + */ + this.sTableId = ""; + + /* + * Variable: nTable + * Purpose: Cache the table node for quick access + * Scope: jQuery.dataTable.classSettings + */ + this.nTable = null; + + /* + * Variable: nTHead + * Purpose: Permanent ref to the thead element + * Scope: jQuery.dataTable.classSettings + */ + this.nTHead = null; + + /* + * Variable: nTFoot + * Purpose: Permanent ref to the tfoot element - if it exists + * Scope: jQuery.dataTable.classSettings + */ + this.nTFoot = null; + + /* + * Variable: nTBody + * Purpose: Permanent ref to the tbody element + * Scope: jQuery.dataTable.classSettings + */ + this.nTBody = null; + + /* + * Variable: nTableWrapper + * Purpose: Cache the wrapper node (contains all DataTables controlled elements) + * Scope: jQuery.dataTable.classSettings + */ + this.nTableWrapper = null; + + /* + * Variable: bDeferLoading + * Purpose: Indicate if when using server-side processing the loading of data + * should be deferred until the second draw + * Scope: jQuery.dataTable.classSettings + */ + this.bDeferLoading = false; + + /* + * Variable: bInitialised + * Purpose: Indicate if all required information has been read in + * Scope: jQuery.dataTable.classSettings + */ + this.bInitialised = false; + + /* + * Variable: aoOpenRows + * Purpose: Information about open rows + * Scope: jQuery.dataTable.classSettings + * Notes: Has the parameters 'nTr' and 'nParent' + */ + this.aoOpenRows = []; + + /* + * Variable: sDom + * Purpose: Dictate the positioning that the created elements will take + * Scope: jQuery.dataTable.classSettings + * Notes: + * The following options are allowed: + * 'l' - Length changing + * 'f' - Filtering input + * 't' - The table! + * 'i' - Information + * 'p' - Pagination + * 'r' - pRocessing + * The following constants are allowed: + * 'H' - jQueryUI theme "header" classes + * 'F' - jQueryUI theme "footer" classes + * The following syntax is expected: + * '<' and '>' - div elements + * '<"class" and '>' - div with a class + * Examples: + * '<"wrapper"flipt>', 'ip>' + */ + this.sDom = 'lfrtip'; + + /* + * Variable: sPaginationType + * Purpose: Note which type of sorting should be used + * Scope: jQuery.dataTable.classSettings + */ + this.sPaginationType = "two_button"; + + /* + * Variable: iCookieDuration + * Purpose: The cookie duration (for bStateSave) in seconds - default 2 hours + * Scope: jQuery.dataTable.classSettings + */ + this.iCookieDuration = 60 * 60 * 2; + + /* + * Variable: sCookiePrefix + * Purpose: The cookie name prefix + * Scope: jQuery.dataTable.classSettings + */ + this.sCookiePrefix = "SpryMedia_DataTables_"; + + /* + * Variable: fnCookieCallback + * Purpose: Callback function for cookie creation + * Scope: jQuery.dataTable.classSettings + */ + this.fnCookieCallback = null; + + /* + * Variable: aoStateSave + * Purpose: Array of callback functions for state saving + * Scope: jQuery.dataTable.classSettings + * Notes: Each array element is an object with the following parameters: + * function:fn - function to call. Takes two parameters, oSettings and the JSON string to + * save that has been thus far created. Returns a JSON string to be inserted into a + * json object (i.e. '"param": [ 0, 1, 2]') + * string:sName - name of callback + */ + this.aoStateSave = []; + + /* + * Variable: aoStateLoad + * Purpose: Array of callback functions for state loading + * Scope: jQuery.dataTable.classSettings + * Notes: Each array element is an object with the following parameters: + * function:fn - function to call. Takes two parameters, oSettings and the object stored. + * May return false to cancel state loading. + * string:sName - name of callback + */ + this.aoStateLoad = []; + + /* + * Variable: oLoadedState + * Purpose: State that was loaded from the cookie. Useful for back reference + * Scope: jQuery.dataTable.classSettings + */ + this.oLoadedState = null; + + /* + * Variable: sAjaxSource + * Purpose: Source url for AJAX data for the table + * Scope: jQuery.dataTable.classSettings + */ + this.sAjaxSource = null; + + /* + * Variable: sAjaxDataProp + * Purpose: Property from a given object from which to read the table data from. This can + * be an empty string (when not server-side processing), in which case it is + * assumed an an array is given directly. + * Scope: jQuery.dataTable.classSettings + */ + this.sAjaxDataProp = 'aaData'; + + /* + * Variable: bAjaxDataGet + * Purpose: Note if draw should be blocked while getting data + * Scope: jQuery.dataTable.classSettings + */ + this.bAjaxDataGet = true; + + /* + * Variable: jqXHR + * Purpose: The last jQuery XHR object that was used for server-side data gathering. + * This can be used for working with the XHR information in one of the callbacks + * Scope: jQuery.dataTable.classSettings + */ + this.jqXHR = null; + + /* + * Variable: fnServerData + * Purpose: Function to get the server-side data - can be overruled by the developer + * Scope: jQuery.dataTable.classSettings + */ + this.fnServerData = function ( url, data, callback, settings ) { + settings.jqXHR = $.ajax( { + "url": url, + "data": data, + "success": function (json) { + $(settings.oInstance).trigger('xhr', settings); + callback( json ); + }, + "dataType": "json", + "cache": false, + "error": function (xhr, error, thrown) { + if ( error == "parsererror" ) { + alert( "DataTables warning: JSON data from server could not be parsed. "+ + "This is caused by a JSON formatting error." ); + } + } + } ); + }; + + /* + * Variable: aoServerParams + * Purpose: Functions which are called prior to sending an Ajax request so extra parameters + * can easily be sent to the server + * Scope: jQuery.dataTable.classSettings + * Notes: Each array element is an object with the following parameters: + * function:fn - function to call + * string:sName - name callback - useful for knowing where it came from (plugin etc) + */ + this.aoServerParams = []; + + /* + * Variable: fnFormatNumber + * Purpose: Format numbers for display + * Scope: jQuery.dataTable.classSettings + */ + this.fnFormatNumber = function ( iIn ) + { + if ( iIn < 1000 ) + { + /* A small optimisation for what is likely to be the vast majority of use cases */ + return iIn; + } + else + { + var s=(iIn+""), a=s.split(""), out="", iLen=s.length; + + for ( var i=0 ; i
        ")}}if(aI.length>0){aI.push('
        ');aC=aH(aI,"width:10000px;");aG=aC.height();aC.remove()}}}else{if(aK==null||aG==null){for(aF=0;aF'+aE+"
        ")}}if(aI.length>0){aC=aH(aI,"");if(aK==null){aK=aC.children().width()}if(aG==null){aG=aC.find("div.tickLabel").height()}aC.remove()}}}if(aK==null){aK=0}if(aG==null){aG=0}aD.labelWidth=aK;aD.labelHeight=aG}function au(aD){var aC=aD.labelWidth,aL=aD.labelHeight,aH=aD.options.position,aF=aD.options.tickLength,aG=O.grid.axisMargin,aJ=O.grid.labelMargin,aK=aD.direction=="x"?p:aw,aE;var aB=c.grep(aK,function(aN){return aN&&aN.options.position==aH&&aN.reserveSpace});if(c.inArray(aD,aB)==aB.length-1){aG=0}if(aF==null){aF="full"}var aI=c.grep(aK,function(aN){return aN&&aN.reserveSpace});var aM=c.inArray(aD,aI)==0;if(!aM&&aF=="full"){aF=5}if(!isNaN(+aF)){aJ+=+aF}if(aD.direction=="x"){aL+=aJ;if(aH=="bottom"){q.bottom+=aL+aG;aD.box={top:I-q.bottom,height:aL}}else{aD.box={top:q.top+aG,height:aL};q.top+=aL+aG}}else{aC+=aJ;if(aH=="left"){aD.box={left:q.left+aG,width:aC};q.left+=aC+aG}else{q.right+=aC+aG;aD.box={left:G-q.right,width:aC}}}aD.position=aH;aD.tickLength=aF;aD.box.padding=aJ;aD.innermost=aM}function U(aB){if(aB.direction=="x"){aB.box.left=q.left;aB.box.width=h}else{aB.box.top=q.top;aB.box.height=w}}function t(){var aC,aE=m();c.each(aE,function(aF,aG){aG.show=aG.options.show;if(aG.show==null){aG.show=aG.used}aG.reserveSpace=aG.show||aG.options.reserveSpace;n(aG)});allocatedAxes=c.grep(aE,function(aF){return aF.reserveSpace});q.left=q.right=q.top=q.bottom=0;if(O.grid.show){c.each(allocatedAxes,function(aF,aG){S(aG);P(aG);ap(aG,aG.ticks);L(aG)});for(aC=allocatedAxes.length-1;aC>=0;--aC){au(allocatedAxes[aC])}var aD=O.grid.minBorderMargin;if(aD==null){aD=0;for(aC=0;aC=0){aD=0}}if(aF.max==null){aB+=aH*aG;if(aB>0&&aE.datamax!=null&&aE.datamax<=0){aB=0}}}}aE.min=aD;aE.max=aB}function S(aG){var aM=aG.options;var aH;if(typeof aM.ticks=="number"&&aM.ticks>0){aH=aM.ticks}else{aH=0.3*Math.sqrt(aG.direction=="x"?G:I)}var aT=(aG.max-aG.min)/aH,aO,aB,aN,aR,aS,aQ,aI;if(aM.mode=="time"){var aJ={second:1000,minute:60*1000,hour:60*60*1000,day:24*60*60*1000,month:30*24*60*60*1000,year:365.2425*24*60*60*1000};var aK=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[0.25,"month"],[0.5,"month"],[1,"month"],[2,"month"],[3,"month"],[6,"month"],[1,"year"]];var aC=0;if(aM.minTickSize!=null){if(typeof aM.tickSize=="number"){aC=aM.tickSize}else{aC=aM.minTickSize[0]*aJ[aM.minTickSize[1]]}}for(var aS=0;aS=aC){break}}aO=aK[aS][0];aN=aK[aS][1];if(aN=="year"){aQ=Math.pow(10,Math.floor(Math.log(aT/aJ.year)/Math.LN10));aI=(aT/aJ.year)/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ}aG.tickSize=aM.tickSize||[aO,aN];aB=function(aX){var a2=[],a0=aX.tickSize[0],a3=aX.tickSize[1],a1=new Date(aX.min);var aW=a0*aJ[a3];if(a3=="second"){a1.setUTCSeconds(a(a1.getUTCSeconds(),a0))}if(a3=="minute"){a1.setUTCMinutes(a(a1.getUTCMinutes(),a0))}if(a3=="hour"){a1.setUTCHours(a(a1.getUTCHours(),a0))}if(a3=="month"){a1.setUTCMonth(a(a1.getUTCMonth(),a0))}if(a3=="year"){a1.setUTCFullYear(a(a1.getUTCFullYear(),a0))}a1.setUTCMilliseconds(0);if(aW>=aJ.minute){a1.setUTCSeconds(0)}if(aW>=aJ.hour){a1.setUTCMinutes(0)}if(aW>=aJ.day){a1.setUTCHours(0)}if(aW>=aJ.day*4){a1.setUTCDate(1)}if(aW>=aJ.year){a1.setUTCMonth(0)}var a5=0,a4=Number.NaN,aY;do{aY=a4;a4=a1.getTime();a2.push(a4);if(a3=="month"){if(a0<1){a1.setUTCDate(1);var aV=a1.getTime();a1.setUTCMonth(a1.getUTCMonth()+1);var aZ=a1.getTime();a1.setTime(a4+a5*aJ.hour+(aZ-aV)*a0);a5=a1.getUTCHours();a1.setUTCHours(0)}else{a1.setUTCMonth(a1.getUTCMonth()+a0)}}else{if(a3=="year"){a1.setUTCFullYear(a1.getUTCFullYear()+a0)}else{a1.setTime(a4+aW)}}}while(a4aU){aP=aU}aQ=Math.pow(10,-aP);aI=aT/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2;if(aI>2.25&&(aU==null||aP+1<=aU)){aO=2.5;++aP}}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ;if(aM.minTickSize!=null&&aO0){if(aM.min==null){aG.min=Math.min(aG.min,aL[0])}if(aM.max==null&&aL.length>1){aG.max=Math.max(aG.max,aL[aL.length-1])}}aB=function(aX){var aY=[],aV,aW;for(aW=0;aW1&&/\..*0$/.test((aD[1]-aD[0]).toFixed(aE)))){aG.tickDecimals=aE}}}}aG.tickGenerator=aB;if(c.isFunction(aM.tickFormatter)){aG.tickFormatter=function(aV,aW){return""+aM.tickFormatter(aV,aW)}}else{aG.tickFormatter=aR}}function P(aF){var aH=aF.options.ticks,aG=[];if(aH==null||(typeof aH=="number"&&aH>0)){aG=aF.tickGenerator(aF)}else{if(aH){if(c.isFunction(aH)){aG=aH({min:aF.min,max:aF.max})}else{aG=aH}}}var aE,aB;aF.ticks=[];for(aE=0;aE1){aC=aD[1]}}else{aB=+aD}if(aC==null){aC=aF.tickFormatter(aB,aF)}if(!isNaN(aB)){aF.ticks.push({v:aB,label:aC})}}}function ap(aB,aC){if(aB.options.autoscaleMargin&&aC.length>0){if(aB.options.min==null){aB.min=Math.min(aB.min,aC[0].v)}if(aB.options.max==null&&aC.length>1){aB.max=Math.max(aB.max,aC[aC.length-1].v)}}}function W(){H.clearRect(0,0,G,I);var aC=O.grid;if(aC.show&&aC.backgroundColor){N()}if(aC.show&&!aC.aboveData){ac()}for(var aB=0;aBaG){var aC=aH;aH=aG;aG=aC}return{from:aH,to:aG,axis:aE}}function N(){H.save();H.translate(q.left,q.top);H.fillStyle=am(O.grid.backgroundColor,w,0,"rgba(255, 255, 255, 0)");H.fillRect(0,0,h,w);H.restore()}function ac(){var aF;H.save();H.translate(q.left,q.top);var aH=O.grid.markings;if(aH){if(c.isFunction(aH)){var aK=aq.getAxes();aK.xmin=aK.xaxis.min;aK.xmax=aK.xaxis.max;aK.ymin=aK.yaxis.min;aK.ymax=aK.yaxis.max;aH=aH(aK)}for(aF=0;aFaC.axis.max||aI.toaI.axis.max){continue}aC.from=Math.max(aC.from,aC.axis.min);aC.to=Math.min(aC.to,aC.axis.max);aI.from=Math.max(aI.from,aI.axis.min);aI.to=Math.min(aI.to,aI.axis.max);if(aC.from==aC.to&&aI.from==aI.to){continue}aC.from=aC.axis.p2c(aC.from);aC.to=aC.axis.p2c(aC.to);aI.from=aI.axis.p2c(aI.from);aI.to=aI.axis.p2c(aI.to);if(aC.from==aC.to||aI.from==aI.to){H.beginPath();H.strokeStyle=aD.color||O.grid.markingsColor;H.lineWidth=aD.lineWidth||O.grid.markingsLineWidth;H.moveTo(aC.from,aI.from);H.lineTo(aC.to,aI.to);H.stroke()}else{H.fillStyle=aD.color||O.grid.markingsColor;H.fillRect(aC.from,aI.to,aC.to-aC.from,aI.from-aI.to)}}}var aK=m(),aM=O.grid.borderWidth;for(var aE=0;aEaB.max||(aQ=="full"&&aM>0&&(aO==aB.min||aO==aB.max))){continue}if(aB.direction=="x"){aN=aB.p2c(aO);aJ=aQ=="full"?-w:aQ;if(aB.position=="top"){aJ=-aJ}}else{aL=aB.p2c(aO);aP=aQ=="full"?-h:aQ;if(aB.position=="left"){aP=-aP}}if(H.lineWidth==1){if(aB.direction=="x"){aN=Math.floor(aN)+0.5}else{aL=Math.floor(aL)+0.5}}H.moveTo(aN,aL);H.lineTo(aN+aP,aL+aJ)}H.stroke()}if(aM){H.lineWidth=aM;H.strokeStyle=O.grid.borderColor;H.strokeRect(-aM/2,-aM/2,h+aM,w+aM)}H.restore()}function k(){av.find(".tickLabels").remove();var aG=['
        '];var aJ=m();for(var aD=0;aD');for(var aE=0;aEaC.max){continue}var aK={},aI;if(aC.direction=="x"){aI="center";aK.left=Math.round(q.left+aC.p2c(aH.v)-aC.labelWidth/2);if(aC.position=="bottom"){aK.top=aF.top+aF.padding}else{aK.bottom=I-(aF.top+aF.height-aF.padding)}}else{aK.top=Math.round(q.top+aC.p2c(aH.v)-aC.labelHeight/2);if(aC.position=="left"){aK.right=G-(aF.left+aF.width-aF.padding);aI="right"}else{aK.left=aF.left+aF.padding;aI="left"}}aK.width=aC.labelWidth;var aB=["position:absolute","text-align:"+aI];for(var aL in aK){aB.push(aL+":"+aK[aL]+"px")}aG.push('
        '+aH.label+"
        ")}aG.push("
        ")}aG.push("
        ");av.append(aG.join(""))}function d(aB){if(aB.lines.show){at(aB)}if(aB.bars.show){e(aB)}if(aB.points.show){ao(aB)}}function at(aE){function aD(aP,aQ,aI,aU,aT){var aV=aP.points,aJ=aP.pointsize,aN=null,aM=null;H.beginPath();for(var aO=aJ;aO=aR&&aS>aT.max){if(aR>aT.max){continue}aL=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aS=aT.max}else{if(aR>=aS&&aR>aT.max){if(aS>aT.max){continue}aK=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aR=aT.max}}if(aL<=aK&&aL=aK&&aL>aU.max){if(aK>aU.max){continue}aS=(aU.max-aL)/(aK-aL)*(aR-aS)+aS;aL=aU.max}else{if(aK>=aL&&aK>aU.max){if(aL>aU.max){continue}aR=(aU.max-aL)/(aK-aL)*(aR-aS)+aS;aK=aU.max}}if(aL!=aN||aS!=aM){H.moveTo(aU.p2c(aL)+aQ,aT.p2c(aS)+aI)}aN=aK;aM=aR;H.lineTo(aU.p2c(aK)+aQ,aT.p2c(aR)+aI)}H.stroke()}function aF(aI,aQ,aP){var aW=aI.points,aV=aI.pointsize,aN=Math.min(Math.max(0,aP.min),aP.max),aX=0,aU,aT=false,aM=1,aL=0,aR=0;while(true){if(aV>0&&aX>aW.length+aV){break}aX+=aV;var aZ=aW[aX-aV],aK=aW[aX-aV+aM],aY=aW[aX],aJ=aW[aX+aM];if(aT){if(aV>0&&aZ!=null&&aY==null){aR=aX;aV=-aV;aM=2;continue}if(aV<0&&aX==aL+aV){H.fill();aT=false;aV=-aV;aM=1;aX=aL=aR+aV;continue}}if(aZ==null||aY==null){continue}if(aZ<=aY&&aZ=aY&&aZ>aQ.max){if(aY>aQ.max){continue}aK=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)+aK;aZ=aQ.max}else{if(aY>=aZ&&aY>aQ.max){if(aZ>aQ.max){continue}aJ=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)+aK;aY=aQ.max}}if(!aT){H.beginPath();H.moveTo(aQ.p2c(aZ),aP.p2c(aN));aT=true}if(aK>=aP.max&&aJ>=aP.max){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.max));H.lineTo(aQ.p2c(aY),aP.p2c(aP.max));continue}else{if(aK<=aP.min&&aJ<=aP.min){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.min));H.lineTo(aQ.p2c(aY),aP.p2c(aP.min));continue}}var aO=aZ,aS=aY;if(aK<=aJ&&aK=aP.min){aZ=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.min}else{if(aJ<=aK&&aJ=aP.min){aY=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.min}}if(aK>=aJ&&aK>aP.max&&aJ<=aP.max){aZ=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.max}else{if(aJ>=aK&&aJ>aP.max&&aK<=aP.max){aY=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.max}}if(aZ!=aO){H.lineTo(aQ.p2c(aO),aP.p2c(aK))}H.lineTo(aQ.p2c(aZ),aP.p2c(aK));H.lineTo(aQ.p2c(aY),aP.p2c(aJ));if(aY!=aS){H.lineTo(aQ.p2c(aY),aP.p2c(aJ));H.lineTo(aQ.p2c(aS),aP.p2c(aJ))}}}H.save();H.translate(q.left,q.top);H.lineJoin="round";var aG=aE.lines.lineWidth,aB=aE.shadowSize;if(aG>0&&aB>0){H.lineWidth=aB;H.strokeStyle="rgba(0,0,0,0.1)";var aH=Math.PI/18;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/2),Math.cos(aH)*(aG/2+aB/2),aE.xaxis,aE.yaxis);H.lineWidth=aB/2;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/4),Math.cos(aH)*(aG/2+aB/4),aE.xaxis,aE.yaxis)}H.lineWidth=aG;H.strokeStyle=aE.color;var aC=ae(aE.lines,aE.color,0,w);if(aC){H.fillStyle=aC;aF(aE.datapoints,aE.xaxis,aE.yaxis)}if(aG>0){aD(aE.datapoints,0,0,aE.xaxis,aE.yaxis)}H.restore()}function ao(aE){function aH(aN,aM,aU,aK,aS,aT,aQ,aJ){var aR=aN.points,aI=aN.pointsize;for(var aL=0;aLaT.max||aOaQ.max){continue}H.beginPath();aP=aT.p2c(aP);aO=aQ.p2c(aO)+aK;if(aJ=="circle"){H.arc(aP,aO,aM,0,aS?Math.PI:Math.PI*2,false)}else{aJ(H,aP,aO,aM,aS)}H.closePath();if(aU){H.fillStyle=aU;H.fill()}H.stroke()}}H.save();H.translate(q.left,q.top);var aG=aE.points.lineWidth,aC=aE.shadowSize,aB=aE.points.radius,aF=aE.points.symbol;if(aG>0&&aC>0){var aD=aC/2;H.lineWidth=aD;H.strokeStyle="rgba(0,0,0,0.1)";aH(aE.datapoints,aB,null,aD+aD/2,true,aE.xaxis,aE.yaxis,aF);H.strokeStyle="rgba(0,0,0,0.2)";aH(aE.datapoints,aB,null,aD/2,true,aE.xaxis,aE.yaxis,aF)}H.lineWidth=aG;H.strokeStyle=aE.color;aH(aE.datapoints,aB,ae(aE.points,aE.color),0,false,aE.xaxis,aE.yaxis,aF);H.restore()}function E(aN,aM,aV,aI,aQ,aF,aD,aL,aK,aU,aR,aC){var aE,aT,aJ,aP,aG,aB,aO,aH,aS;if(aR){aH=aB=aO=true;aG=false;aE=aV;aT=aN;aP=aM+aI;aJ=aM+aQ;if(aTaL.max||aPaK.max){return}if(aEaL.max){aT=aL.max;aB=false}if(aJaK.max){aP=aK.max;aO=false}aE=aL.p2c(aE);aJ=aK.p2c(aJ);aT=aL.p2c(aT);aP=aK.p2c(aP);if(aD){aU.beginPath();aU.moveTo(aE,aJ);aU.lineTo(aE,aP);aU.lineTo(aT,aP);aU.lineTo(aT,aJ);aU.fillStyle=aD(aJ,aP);aU.fill()}if(aC>0&&(aG||aB||aO||aH)){aU.beginPath();aU.moveTo(aE,aJ+aF);if(aG){aU.lineTo(aE,aP+aF)}else{aU.moveTo(aE,aP+aF)}if(aO){aU.lineTo(aT,aP+aF)}else{aU.moveTo(aT,aP+aF)}if(aB){aU.lineTo(aT,aJ+aF)}else{aU.moveTo(aT,aJ+aF)}if(aH){aU.lineTo(aE,aJ+aF)}else{aU.moveTo(aE,aJ+aF)}aU.stroke()}}function e(aD){function aC(aJ,aI,aL,aG,aK,aN,aM){var aO=aJ.points,aF=aJ.pointsize;for(var aH=0;aH")}aH.push("");aF=true}if(aN){aJ=aN(aJ,aM)}aH.push('
        '+aJ+"")}if(aF){aH.push("")}if(aH.length==0){return}var aL=''+aH.join("")+"
        ";if(O.legend.container!=null){c(O.legend.container).html(aL)}else{var aI="",aC=O.legend.position,aD=O.legend.margin;if(aD[0]==null){aD=[aD,aD]}if(aC.charAt(0)=="n"){aI+="top:"+(aD[1]+q.top)+"px;"}else{if(aC.charAt(0)=="s"){aI+="bottom:"+(aD[1]+q.bottom)+"px;"}}if(aC.charAt(1)=="e"){aI+="right:"+(aD[0]+q.right)+"px;"}else{if(aC.charAt(1)=="w"){aI+="left:"+(aD[0]+q.left)+"px;"}}var aK=c('
        '+aL.replace('style="','style="position:absolute;'+aI+";")+"
        ").appendTo(av);if(O.legend.backgroundOpacity!=0){var aG=O.legend.backgroundColor;if(aG==null){aG=O.grid.backgroundColor;if(aG&&typeof aG=="string"){aG=c.color.parse(aG)}else{aG=c.color.extract(aK,"background-color")}aG.a=1;aG=aG.toString()}var aB=aK.children();c('
        ').prependTo(aK).css("opacity",O.legend.backgroundOpacity)}}}var ab=[],M=null;function K(aI,aG,aD){var aO=O.grid.mouseActiveRadius,a0=aO*aO+1,aY=null,aR=false,aW,aU;for(aW=Q.length-1;aW>=0;--aW){if(!aD(Q[aW])){continue}var aP=Q[aW],aH=aP.xaxis,aF=aP.yaxis,aV=aP.datapoints.points,aT=aP.datapoints.pointsize,aQ=aH.c2p(aI),aN=aF.c2p(aG),aC=aO/aH.scale,aB=aO/aF.scale;if(aH.options.inverseTransform){aC=Number.MAX_VALUE}if(aF.options.inverseTransform){aB=Number.MAX_VALUE}if(aP.lines.show||aP.points.show){for(aU=0;aUaC||aK-aQ<-aC||aJ-aN>aB||aJ-aN<-aB){continue}var aM=Math.abs(aH.p2c(aK)-aI),aL=Math.abs(aF.p2c(aJ)-aG),aS=aM*aM+aL*aL;if(aS=Math.min(aZ,aK)&&aN>=aJ+aE&&aN<=aJ+aX):(aQ>=aK+aE&&aQ<=aK+aX&&aN>=Math.min(aZ,aJ)&&aN<=Math.max(aZ,aJ))){aY=[aW,aU/aT]}}}}if(aY){aW=aY[0];aU=aY[1];aT=Q[aW].datapoints.pointsize;return{datapoint:Q[aW].datapoints.points.slice(aU*aT,(aU+1)*aT),dataIndex:aU,series:Q[aW],seriesIndex:aW}}return null}function aa(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return aC.hoverable!=false})}}function l(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return false})}}function R(aB){u("plotclick",aB,function(aC){return aC.clickable!=false})}function u(aC,aB,aD){var aE=y.offset(),aH=aB.pageX-aE.left-q.left,aF=aB.pageY-aE.top-q.top,aJ=C({left:aH,top:aF});aJ.pageX=aB.pageX;aJ.pageY=aB.pageY;var aK=K(aH,aF,aD);if(aK){aK.pageX=parseInt(aK.series.xaxis.p2c(aK.datapoint[0])+aE.left+q.left);aK.pageY=parseInt(aK.series.yaxis.p2c(aK.datapoint[1])+aE.top+q.top)}if(O.grid.autoHighlight){for(var aG=0;aGaH.max||aIaG.max){return}var aF=aE.points.radius+aE.points.lineWidth/2;A.lineWidth=aF;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aB=1.5*aF,aC=aH.p2c(aC),aI=aG.p2c(aI);A.beginPath();if(aE.points.symbol=="circle"){A.arc(aC,aI,aB,0,2*Math.PI,false)}else{aE.points.symbol(A,aC,aI,aB,false)}A.closePath();A.stroke()}function v(aE,aB){A.lineWidth=aE.bars.lineWidth;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aD=c.color.parse(aE.color).scale("a",0.5).toString();var aC=aE.bars.align=="left"?0:-aE.bars.barWidth/2;E(aB[0],aB[1],aB[2]||0,aC,aC+aE.bars.barWidth,0,function(){return aD},aE.xaxis,aE.yaxis,A,aE.bars.horizontal,aE.bars.lineWidth)}function am(aJ,aB,aH,aC){if(typeof aJ=="string"){return aJ}else{var aI=H.createLinearGradient(0,aH,0,aB);for(var aE=0,aD=aJ.colors.length;aE12){n=n-12}else{if(n==0){n=12}}}for(var g=0;g1){N.series.pie.tilt=1}if(N.series.pie.tilt<0){N.series.pie.tilt=0}O.hooks.processDatapoints.push(E);O.hooks.drawOverlay.push(H);O.hooks.draw.push(r)}}function e(P,N){var O=P.getOptions();if(O.series.pie.show&&O.grid.hoverable){N.unbind("mousemove").mousemove(t)}if(O.series.pie.show&&O.grid.clickable){N.unbind("click").click(l)}}function G(O){var P="";function N(S,T){if(!T){T=0}for(var R=0;Rh.width-n){B=h.width-n}}}function v(O){for(var N=0;N0){R.push({data:[[1,P]],color:N,label:a.series.pie.combine.label,angle:(P*(Math.PI*2))/M,percent:(P/M*100)})}return R}function r(S,Q){if(!L){return}ctx=Q;I();var T=S.getData();var P=0;while(F&&P0){n*=w}P+=1;N();if(a.series.pie.tilt<=0.8){O()}R()}if(P>=o){N();L.prepend('
        Could not draw pie with labels contained inside canvas
        ')}if(S.setSeries&&S.insertLegend){S.setSeries(T);S.insertLegend()}function N(){ctx.clearRect(0,0,h.width,h.height);L.children().filter(".pieLabel, .pieLabelBackground").remove()}function O(){var Z=5;var Y=15;var W=10;var X=0.02;if(a.series.pie.radius>1){var U=a.series.pie.radius}else{var U=n*a.series.pie.radius}if(U>=(h.width/2)-Z||U*a.series.pie.tilt>=(h.height/2)-Y||U<=W){return}ctx.save();ctx.translate(Z,Y);ctx.globalAlpha=X;ctx.fillStyle="#000";ctx.translate(B,p);ctx.scale(1,a.series.pie.tilt);for(var V=1;V<=W;V++){ctx.beginPath();ctx.arc(0,0,U,0,Math.PI*2,false);ctx.fill();U-=V}ctx.restore()}function R(){startAngle=Math.PI*a.series.pie.startAngle;if(a.series.pie.radius>1){var U=a.series.pie.radius}else{var U=n*a.series.pie.radius}ctx.save();ctx.translate(B,p);ctx.scale(1,a.series.pie.tilt);ctx.save();var Y=startAngle;for(var W=0;W1e-9){ctx.moveTo(0,0)}else{if(b.browser.msie){ab-=0.0001}}ctx.arc(0,0,U,Y,Y+ab,false);ctx.closePath();Y+=ab;if(aa){ctx.fill()}else{ctx.stroke()}}function V(){var ac=startAngle;if(a.series.pie.label.radius>1){var Z=a.series.pie.label.radius}else{var Z=n*a.series.pie.label.radius}for(var ab=0;ab=a.series.pie.label.threshold*100){aa(T[ab],ac,ab)}ac+=T[ab].angle}function aa(ap,ai,ag){if(ap.data[0][1]==0){return}var ar=a.legend.labelFormatter,aq,ae=a.series.pie.label.formatter;if(ar){aq=ar(ap.label,ap)}else{aq=ap.label}if(ae){aq=ae(aq,ap)}var aj=((ai+ap.angle)+ai)/2;var ao=B+Math.round(Math.cos(aj)*Z);var am=p+Math.round(Math.sin(aj)*Z)*a.series.pie.tilt;var af=''+aq+"";L.append(af);var an=L.children("#pieLabel"+ag);var ad=(am-an.height()/2);var ah=(ao-an.width()/2);an.css("top",ad);an.css("left",ah);if(0-ad>0||0-ah>0||h.height-(ad+an.height())<0||h.width-(ah+an.width())<0){F=true}if(a.series.pie.label.background.opacity!=0){var ak=a.series.pie.label.background.color;if(ak==null){ak=ap.color}var al="top:"+ad+"px;left:"+ah+"px;";b('
        ').insertBefore(an).css("opacity",a.series.pie.label.background.opacity)}}}}}function J(N){if(a.series.pie.innerRadius>0){N.save();innerRadius=a.series.pie.innerRadius>1?a.series.pie.innerRadius:n*a.series.pie.innerRadius;N.globalCompositeOperation="destination-out";N.beginPath();N.fillStyle=a.series.pie.stroke.color;N.arc(0,0,innerRadius,0,Math.PI*2,false);N.fill();N.closePath();N.restore();N.save();N.beginPath();N.strokeStyle=a.series.pie.stroke.color;N.arc(0,0,innerRadius,0,Math.PI*2,false);N.stroke();N.closePath();N.restore()}}function s(Q,R){for(var S=false,P=-1,N=Q.length,O=N-1;++P1?O.series.pie.radius:n*O.series.pie.radius;for(var Q=0;Q1?P.series.pie.radius:n*P.series.pie.radius;R.save();R.translate(B,p);R.scale(1,P.series.pie.tilt);for(i=0;i1e-9){R.moveTo(0,0)}R.arc(0,0,N,S.startAngle,S.startAngle+S.angle,false);R.closePath();R.fill()}}}var a={series:{pie:{show:false,radius:"auto",innerRadius:0,startAngle:3/2,tilt:1,offset:{top:0,left:"auto"},stroke:{color:"#FFF",width:1},label:{show:"auto",formatter:function(d,e){return'
        '+d+"
        "+Math.round(e.percent)+"%
        "},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:0.5}}}};b.plot.plugins.push({init:c,options:a,name:"pie",version:"1.0"})})(jQuery); \ No newline at end of file diff --git a/referencia/template/js/plugins/jquery.jgrowl.js b/referencia/template/js/plugins/jquery.jgrowl.js new file mode 100644 index 0000000..3c3b789 --- /dev/null +++ b/referencia/template/js/plugins/jquery.jgrowl.js @@ -0,0 +1,338 @@ +/** + * jGrowl 1.2.6 + * + * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) + * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. + * + * Written by Stan Lemon + * Last updated: 2011.03.27 + * + * jGrowl is a jQuery plugin implementing unobtrusive userland notifications. These + * notifications function similarly to the Growl Framework available for + * Mac OS X (http://growl.info). + * + * To Do: + * - Move library settings to containers and allow them to be changed per container + * + * Changes in 1.2.6 + * - Fixed js error when a notification is opening and closing at the same time + * + * Changes in 1.2.5 + * - Changed wrapper jGrowl's options usage to "o" instead of $.jGrowl.defaults + * - Added themeState option to control 'highlight' or 'error' for jQuery UI + * - Ammended some CSS to provide default positioning for nested usage. + * - Changed some CSS to be prefixed with jGrowl- to prevent namespacing issues + * - Added two new options - openDuration and closeDuration to allow + * better control of notification open and close speeds, respectively + * Patch contributed by Jesse Vincet. + * - Added afterOpen callback. Patch contributed by Russel Branca. + * + * Changes in 1.2.4 + * - Fixed IE bug with the close-all button + * - Fixed IE bug with the filter CSS attribute (special thanks to gotwic) + * - Update IE opacity CSS + * - Changed font sizes to use "em", and only set the base style + * + * Changes in 1.2.3 + * - The callbacks no longer use the container as context, instead they use the actual notification + * - The callbacks now receive the container as a parameter after the options parameter + * - beforeOpen and beforeClose now check the return value, if it's false - the notification does + * not continue. The open callback will also halt execution if it returns false. + * - Fixed bug where containers would get confused + * - Expanded the pause functionality to pause an entire container. + * + * Changes in 1.2.2 + * - Notification can now be theme rolled for jQuery UI, special thanks to Jeff Chan! + * + * Changes in 1.2.1 + * - Fixed instance where the interval would fire the close method multiple times. + * - Added CSS to hide from print media + * - Fixed issue with closer button when div { position: relative } is set + * - Fixed leaking issue with multiple containers. Special thanks to Matthew Hanlon! + * + * Changes in 1.2.0 + * - Added message pooling to limit the number of messages appearing at a given time. + * - Closing a notification is now bound to the notification object and triggered by the close button. + * + * Changes in 1.1.2 + * - Added iPhone styled example + * - Fixed possible IE7 bug when determining if the ie6 class shoudl be applied. + * - Added template for the close button, so that it's content could be customized. + * + * Changes in 1.1.1 + * - Fixed CSS styling bug for ie6 caused by a mispelling + * - Changes height restriction on default notifications to min-height + * - Added skinned examples using a variety of images + * - Added the ability to customize the content of the [close all] box + * - Added jTweet, an example of using jGrowl + Twitter + * + * Changes in 1.1.0 + * - Multiple container and instances. + * - Standard $.jGrowl() now wraps $.fn.jGrowl() by first establishing a generic jGrowl container. + * - Instance methods of a jGrowl container can be called by $.fn.jGrowl(methodName) + * - Added glue preferenced, which allows notifications to be inserted before or after nodes in the container + * - Added new log callback which is called before anything is done for the notification + * - Corner's attribute are now applied on an individual notification basis. + * + * Changes in 1.0.4 + * - Various CSS fixes so that jGrowl renders correctly in IE6. + * + * Changes in 1.0.3 + * - Fixed bug with options persisting across notifications + * - Fixed theme application bug + * - Simplified some selectors and manipulations. + * - Added beforeOpen and beforeClose callbacks + * - Reorganized some lines of code to be more readable + * - Removed unnecessary this.defaults context + * - If corners plugin is present, it's now customizable. + * - Customizable open animation. + * - Customizable close animation. + * - Customizable animation easing. + * - Added customizable positioning (top-left, top-right, bottom-left, bottom-right, center) + * + * Changes in 1.0.2 + * - All CSS styling is now external. + * - Added a theme parameter which specifies a secondary class for styling, such + * that notifications can be customized in appearance on a per message basis. + * - Notification life span is now customizable on a per message basis. + * - Added the ability to disable the global closer, enabled by default. + * - Added callbacks for when a notification is opened or closed. + * - Added callback for the global closer. + * - Customizable animation speed. + * - jGrowl now set itself up and tears itself down. + * + * Changes in 1.0.1: + * - Removed dependency on metadata plugin in favor of .data() + * - Namespaced all events + */ +(function($) { + + /** jGrowl Wrapper - Establish a base jGrowl Container for compatibility with older releases. **/ + $.jGrowl = function( m , o ) { + // To maintain compatibility with older version that only supported one instance we'll create the base container. + if ( $('#jGrowl').size() == 0 ) + $('
        ').addClass( (o && o.position) ? o.position : $.jGrowl.defaults.position ).appendTo('body'); + + // Create a notification on the container. + $('#jGrowl').jGrowl(m,o); + }; + + + /** Raise jGrowl Notification on a jGrowl Container **/ + $.fn.jGrowl = function( m , o ) { + if ( $.isFunction(this.each) ) { + var args = arguments; + + return this.each(function() { + var self = this; + + /** Create a jGrowl Instance on the Container if it does not exist **/ + if ( $(this).data('jGrowl.instance') == undefined ) { + $(this).data('jGrowl.instance', $.extend( new $.fn.jGrowl(), { notifications: [], element: null, interval: null } )); + $(this).data('jGrowl.instance').startup( this ); + } + + /** Optionally call jGrowl instance methods, or just raise a normal notification **/ + if ( $.isFunction($(this).data('jGrowl.instance')[m]) ) { + $(this).data('jGrowl.instance')[m].apply( $(this).data('jGrowl.instance') , $.makeArray(args).slice(1) ); + } else { + $(this).data('jGrowl.instance').create( m , o ); + } + }); + }; + }; + + $.extend( $.fn.jGrowl.prototype , { + + /** Default JGrowl Settings **/ + defaults: { + pool: 0, + header: '', + group: '', + sticky: false, + position: 'top-right', + glue: 'after', + theme: 'default', + themeState: 'highlight', + corners: '10px', + check: 250, + life: 3000, + closeDuration: 'normal', + openDuration: 'normal', + easing: 'swing', + closer: true, + closeTemplate: '×', + closerTemplate: '
        [ close all ]
        ', + log: function(e,m,o) {}, + beforeOpen: function(e,m,o) {}, + afterOpen: function(e,m,o) {}, + open: function(e,m,o) {}, + beforeClose: function(e,m,o) {}, + close: function(e,m,o) {}, + animateOpen: { + opacity: 'show' + }, + animateClose: { + opacity: 'hide' + } + }, + + notifications: [], + + /** jGrowl Container Node **/ + element: null, + + /** Interval Function **/ + interval: null, + + /** Create a Notification **/ + create: function( message , o ) { + var o = $.extend({}, this.defaults, o); + + /* To keep backward compatibility with 1.24 and earlier, honor 'speed' if the user has set it */ + if (typeof o.speed !== 'undefined') { + o.openDuration = o.speed; + o.closeDuration = o.speed; + } + + this.notifications.push({ message: message , options: o }); + + o.log.apply( this.element , [this.element,message,o] ); + }, + + render: function( notification ) { + var self = this; + var message = notification.message; + var o = notification.options; + + // Support for jQuery theme-states, if this is not used it displays a widget header + o.themeState = (o.themeState == '') ? '' : 'ui-state-' + o.themeState; + + var notification = $( + '
        ' + + '
        ' + o.closeTemplate + '
        ' + + '
        ' + o.header + '
        ' + + '
        ' + message + '
        ' + ).data("jGrowl", o).addClass(o.theme).children('div.jGrowl-close').bind("click.jGrowl", function() { + $(this).parent().trigger('jGrowl.close'); + }).parent(); + + + /** Notification Actions **/ + $(notification).bind("mouseover.jGrowl", function() { + $('div.jGrowl-notification', self.element).data("jGrowl.pause", true); + }).bind("mouseout.jGrowl", function() { + $('div.jGrowl-notification', self.element).data("jGrowl.pause", false); + }).bind('jGrowl.beforeOpen', function() { + if ( o.beforeOpen.apply( notification , [notification,message,o,self.element] ) != false ) { + $(this).trigger('jGrowl.open'); + } + }).bind('jGrowl.open', function() { + if ( o.open.apply( notification , [notification,message,o,self.element] ) != false ) { + if ( o.glue == 'after' ) { + $('div.jGrowl-notification:last', self.element).after(notification); + } else { + $('div.jGrowl-notification:first', self.element).before(notification); + } + + $(this).animate(o.animateOpen, o.openDuration, o.easing, function() { + // Fixes some anti-aliasing issues with IE filters. + if ($.browser.msie && (parseInt($(this).css('opacity'), 10) === 1 || parseInt($(this).css('opacity'), 10) === 0)) + this.style.removeAttribute('filter'); + + if ( $(this).data("jGrowl") != null ) // Happens when a notification is closing before it's open. + $(this).data("jGrowl").created = new Date(); + + $(this).trigger('jGrowl.afterOpen'); + }); + } + }).bind('jGrowl.afterOpen', function() { + o.afterOpen.apply( notification , [notification,message,o,self.element] ); + }).bind('jGrowl.beforeClose', function() { + if ( o.beforeClose.apply( notification , [notification,message,o,self.element] ) != false ) + $(this).trigger('jGrowl.close'); + }).bind('jGrowl.close', function() { + // Pause the notification, lest during the course of animation another close event gets called. + $(this).data('jGrowl.pause', true); + $(this).animate(o.animateClose, o.closeDuration, o.easing, function() { + if ( $.isFunction(o.close) ) { + if ( o.close.apply( notification , [notification,message,o,self.element] ) !== false ) + $(this).remove(); + } else { + $(this).remove(); + } + }); + }).trigger('jGrowl.beforeOpen'); + + /** Optional Corners Plugin **/ + if ( o.corners != '' && $.fn.corner != undefined ) $(notification).corner( o.corners ); + + /** Add a Global Closer if more than one notification exists **/ + if ( $('div.jGrowl-notification:parent', self.element).size() > 1 && + $('div.jGrowl-closer', self.element).size() == 0 && this.defaults.closer != false ) { + $(this.defaults.closerTemplate).addClass('jGrowl-closer ' + this.defaults.themeState + ' ui-corner-all').addClass(this.defaults.theme) + .appendTo(self.element).animate(this.defaults.animateOpen, this.defaults.speed, this.defaults.easing) + .bind("click.jGrowl", function() { + $(this).siblings().trigger("jGrowl.beforeClose"); + + if ( $.isFunction( self.defaults.closer ) ) { + self.defaults.closer.apply( $(this).parent()[0] , [$(this).parent()[0]] ); + } + }); + }; + }, + + /** Update the jGrowl Container, removing old jGrowl notifications **/ + update: function() { + $(this.element).find('div.jGrowl-notification:parent').each( function() { + if ( $(this).data("jGrowl") != undefined && $(this).data("jGrowl").created != undefined && + ($(this).data("jGrowl").created.getTime() + parseInt($(this).data("jGrowl").life)) < (new Date()).getTime() && + $(this).data("jGrowl").sticky != true && + ($(this).data("jGrowl.pause") == undefined || $(this).data("jGrowl.pause") != true) ) { + + // Pause the notification, lest during the course of animation another close event gets called. + $(this).trigger('jGrowl.beforeClose'); + } + }); + + if ( this.notifications.length > 0 && + (this.defaults.pool == 0 || $(this.element).find('div.jGrowl-notification:parent').size() < this.defaults.pool) ) + this.render( this.notifications.shift() ); + + if ( $(this.element).find('div.jGrowl-notification:parent').size() < 2 ) { + $(this.element).find('div.jGrowl-closer').animate(this.defaults.animateClose, this.defaults.speed, this.defaults.easing, function() { + $(this).remove(); + }); + } + }, + + /** Setup the jGrowl Notification Container **/ + startup: function(e) { + this.element = $(e).addClass('jGrowl').append('
        '); + this.interval = setInterval( function() { + $(e).data('jGrowl.instance').update(); + }, parseInt(this.defaults.check)); + + if ($.browser.msie && parseInt($.browser.version) < 7 && !window["XMLHttpRequest"]) { + $(this.element).addClass('ie6'); + } + }, + + /** Shutdown jGrowl, removing it and clearing the interval **/ + shutdown: function() { + $(this.element).removeClass('jGrowl').find('div.jGrowl-notification').remove(); + clearInterval( this.interval ); + }, + + close: function() { + $(this.element).find('div.jGrowl-notification').each(function(){ + $(this).trigger('jGrowl.beforeClose'); + }); + } + }); + + /** Reference the Defaults Object for compatibility with older versions of jGrowl **/ + $.jGrowl.defaults = $.fn.jGrowl.prototype.defaults; + +})(jQuery); \ No newline at end of file diff --git a/referencia/template/js/plugins/jquery.validate.min.js b/referencia/template/js/plugins/jquery.validate.min.js new file mode 100644 index 0000000..edd6452 --- /dev/null +++ b/referencia/template/js/plugins/jquery.validate.min.js @@ -0,0 +1,51 @@ +/** + * jQuery Validation Plugin 1.9.0 + * + * http://bassistance.de/jquery-plugins/jquery-plugin-validation/ + * http://docs.jquery.com/Plugins/Validation + * + * Copyright (c) 2006 - 2011 Jörn Zaefferer + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ +(function(c){c.extend(c.fn,{validate:function(a){if(this.length){var b=c.data(this[0],"validator");if(b)return b;this.attr("novalidate","novalidate");b=new c.validator(a,this[0]);c.data(this[0],"validator",b);if(b.settings.onsubmit){a=this.find("input, button");a.filter(".cancel").click(function(){b.cancelSubmit=true});b.settings.submitHandler&&a.filter(":submit").click(function(){b.submitButton=this});this.submit(function(d){function e(){if(b.settings.submitHandler){if(b.submitButton)var f=c("").attr("name", +b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm);b.settings.submitHandler.call(b,b.currentForm);b.submitButton&&f.remove();return false}return true}b.settings.debug&&d.preventDefault();if(b.cancelSubmit){b.cancelSubmit=false;return e()}if(b.form()){if(b.pendingRequest){b.formSubmitted=true;return false}return e()}else{b.focusInvalid();return false}})}return b}else a&&a.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(c(this[0]).is("form"))return this.validate().form(); +else{var a=true,b=c(this[0].form).validate();this.each(function(){a&=b.element(this)});return a}},removeAttrs:function(a){var b={},d=this;c.each(a.split(/\s/),function(e,f){b[f]=d.attr(f);d.removeAttr(f)});return b},rules:function(a,b){var d=this[0];if(a){var e=c.data(d.form,"validator").settings,f=e.rules,g=c.validator.staticRules(d);switch(a){case "add":c.extend(g,c.validator.normalizeRule(b));f[d.name]=g;if(b.messages)e.messages[d.name]=c.extend(e.messages[d.name],b.messages);break;case "remove":if(!b){delete f[d.name]; +return g}var h={};c.each(b.split(/\s/),function(j,i){h[i]=g[i];delete g[i]});return h}}d=c.validator.normalizeRules(c.extend({},c.validator.metadataRules(d),c.validator.classRules(d),c.validator.attributeRules(d),c.validator.staticRules(d)),d);if(d.required){e=d.required;delete d.required;d=c.extend({required:e},d)}return d}});c.extend(c.expr[":"],{blank:function(a){return!c.trim(""+a.value)},filled:function(a){return!!c.trim(""+a.value)},unchecked:function(a){return!a.checked}});c.validator=function(a, +b){this.settings=c.extend(true,{},c.validator.defaults,a);this.currentForm=b;this.init()};c.validator.format=function(a,b){if(arguments.length==1)return function(){var d=c.makeArray(arguments);d.unshift(a);return c.validator.format.apply(this,d)};if(arguments.length>2&&b.constructor!=Array)b=c.makeArray(arguments).slice(1);if(b.constructor!=Array)b=[b];c.each(b,function(d,e){a=a.replace(RegExp("\\{"+d+"\\}","g"),e)});return a};c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error", +validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(a){this.lastActive=a;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(a)).hide()}},onfocusout:function(a){if(!this.checkable(a)&&(a.name in this.submitted||!this.optional(a)))this.element(a)}, +onkeyup:function(a){if(a.name in this.submitted||a==this.lastElement)this.element(a)},onclick:function(a){if(a.name in this.submitted)this.element(a);else a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).addClass(b).removeClass(d):c(a).addClass(b).removeClass(d)},unhighlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).removeClass(b).addClass(d):c(a).removeClass(b).addClass(d)}},setDefaults:function(a){c.extend(c.validator.defaults, +a)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:c.validator.format("Please enter no more than {0} characters."), +minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(e){var f=c.data(this[0].form,"validator"),g="on"+e.type.replace(/^validate/, +"");f.settings[g]&&f.settings[g].call(f,this[0],e)}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=this.groups={};c.each(this.settings.groups,function(e,f){c.each(f.split(/\s/),function(g,h){b[h]=e})});var d= +this.settings.rules;c.each(d,function(e,f){d[e]=c.validator.normalizeRule(f)});c(this.currentForm).validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",a).validateDelegate("[type='radio'], [type='checkbox'], select, option","click", +a);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(a){this.lastElement= +a=this.validationTargetFor(this.clean(a));this.prepareElement(a);this.currentElements=c(a);var b=this.check(a);if(b)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return b},showErrors:function(a){if(a){c.extend(this.errorMap,a);this.errorList=[];for(var b in a)this.errorList.push({message:a[b],element:this.findByName(b)[0]});this.successList=c.grep(this.successList,function(d){return!(d.name in a)})}this.settings.showErrors? +this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b=0,d;for(d in a)b++;return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()== +0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&c.grep(this.errorList,function(b){return b.element.name==a.name}).length==1&&a},elements:function(){var a=this,b={};return c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&& +a.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!a.objectLength(c(this).rules()))return false;return b[this.name]=true})},clean:function(a){return c(a)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)}, +prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(a){a=this.validationTargetFor(this.clean(a));var b=c(a).rules(),d=false,e;for(e in b){var f={method:e,parameters:b[e]};try{var g=c.validator.methods[e].call(this,a.value.replace(/\r/g,""),a,f.parameters);if(g=="dependency-mismatch")d=true;else{d=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!g){this.formatAndAdd(a,f);return false}}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+ +a.id+", check the '"+f.method+"' method",h);throw h;}}if(!d){this.objectLength(b)&&this.successList.push(a);return true}},customMetaMessage:function(a,b){if(c.metadata){var d=this.settings.meta?c(a).metadata()[this.settings.meta]:c(a).metadata();return d&&d.messages&&d.messages[b]}},customMessage:function(a,b){var d=this.settings.messages[a];return d&&(d.constructor==String?d:d[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+a.name+"
        ")},formatAndAdd:function(a,b){var d=this.defaultMessage(a,b.method),e=/\$?\{(\d+)\}/g;if(typeof d=="function")d=d.call(this,b.parameters,a);else if(e.test(d))d=jQuery.format(d.replace(e,"{$1}"),b.parameters);this.errorList.push({message:d,element:a});this.errorMap[a.name]=d;this.submitted[a.name]= +d},addWrapper:function(a){if(this.settings.wrapper)a=a.add(a.parent(this.settings.wrapper));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var b=this.errorList[a];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]); +if(this.settings.unhighlight){a=0;for(b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return c(this.errorList).map(function(){return this.element})},showLabel:function(a,b){var d=this.errorsFor(a);if(d.length){d.removeClass(this.settings.validClass).addClass(this.settings.errorClass); +d.attr("generated")&&d.html(b)}else{d=c("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(b||"");if(this.settings.wrapper)d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,c(a)):d.insertAfter(a))}if(!b&&this.settings.success){d.text("");typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow= +this.toShow.add(d)},errorsFor:function(a){var b=this.idOrName(a);return this.errors().filter(function(){return c(this).attr("for")==b})},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(a){if(this.checkable(a))a=this.findByName(a.name).not(this.settings.ignore)[0];return a},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(a){var b=this.currentForm;return c(document.getElementsByName(a)).map(function(d, +e){return e.form==b&&e.name==a&&e||null})},getLength:function(a,b){switch(b.nodeName.toLowerCase()){case "select":return c("option:selected",b).length;case "input":if(this.checkable(b))return this.findByName(b.name).filter(":checked").length}return a.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):true},dependTypes:{"boolean":function(a){return a},string:function(a,b){return!!c(a,b.form).length},"function":function(a,b){return a(b)}},optional:function(a){return!c.validator.methods.required.call(this, +c.trim(a.value),a)&&"dependency-mismatch"},startRequest:function(a){if(!this.pending[a.name]){this.pendingRequest++;this.pending[a.name]=true}},stopRequest:function(a,b){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[a.name];if(b&&this.pendingRequest==0&&this.formSubmitted&&this.form()){c(this.currentForm).submit();this.formSubmitted=false}else if(!b&&this.pendingRequest==0&&this.formSubmitted){c(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted= +false}},previousValue:function(a){return c.data(a,"previousValue")||c.data(a,"previousValue",{old:null,valid:true,message:this.defaultMessage(a,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(a,b){a.constructor==String?this.classRuleSettings[a]=b:c.extend(this.classRuleSettings, +a)},classRules:function(a){var b={};(a=c(a).attr("class"))&&c.each(a.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(b,c.validator.classRuleSettings[this])});return b},attributeRules:function(a){var b={};a=c(a);for(var d in c.validator.methods){var e;if(e=d==="required"&&typeof c.fn.prop==="function"?a.prop(d):a.attr(d))b[d]=e;else if(a[0].getAttribute("type")===d)b[d]=true}b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)&&delete b.maxlength;return b},metadataRules:function(a){if(!c.metadata)return{}; +var b=c.data(a.form,"validator").settings.meta;return b?c(a).metadata()[b]:c(a).metadata()},staticRules:function(a){var b={},d=c.data(a.form,"validator");if(d.settings.rules)b=c.validator.normalizeRule(d.settings.rules[a.name])||{};return b},normalizeRules:function(a,b){c.each(a,function(d,e){if(e===false)delete a[d];else if(e.param||e.depends){var f=true;switch(typeof e.depends){case "string":f=!!c(e.depends,b.form).length;break;case "function":f=e.depends.call(b,b)}if(f)a[d]=e.param!==undefined? +e.param:true;else delete a[d]}});c.each(a,function(d,e){a[d]=c.isFunction(e)?e(b):e});c.each(["minlength","maxlength","min","max"],function(){if(a[this])a[this]=Number(a[this])});c.each(["rangelength","range"],function(){if(a[this])a[this]=[Number(a[this][0]),Number(a[this][1])]});if(c.validator.autoCreateRanges){if(a.min&&a.max){a.range=[a.min,a.max];delete a.min;delete a.max}if(a.minlength&&a.maxlength){a.rangelength=[a.minlength,a.maxlength];delete a.minlength;delete a.maxlength}}a.messages&&delete a.messages; +return a},normalizeRule:function(a){if(typeof a=="string"){var b={};c.each(a.split(/\s/),function(){b[this]=true});a=b}return a},addMethod:function(a,b,d){c.validator.methods[a]=b;c.validator.messages[a]=d!=undefined?d:c.validator.messages[a];b.length<3&&c.validator.addClassRules(a,c.validator.normalizeRule(a))},methods:{required:function(a,b,d){if(!this.depend(d,b))return"dependency-mismatch";switch(b.nodeName.toLowerCase()){case "select":return(a=c(b).val())&&a.length>0;case "input":if(this.checkable(b))return this.getLength(a, +b)>0;default:return c.trim(a).length>0}},remote:function(a,b,d){if(this.optional(b))return"dependency-mismatch";var e=this.previousValue(b);this.settings.messages[b.name]||(this.settings.messages[b.name]={});e.originalMessage=this.settings.messages[b.name].remote;this.settings.messages[b.name].remote=e.message;d=typeof d=="string"&&{url:d}||d;if(this.pending[b.name])return"pending";if(e.old===a)return e.valid;e.old=a;var f=this;this.startRequest(b);var g={};g[b.name]=a;c.ajax(c.extend(true,{url:d, +mode:"abort",port:"validate"+b.name,dataType:"json",data:g,success:function(h){f.settings.messages[b.name].remote=e.originalMessage;var j=h===true;if(j){var i=f.formSubmitted;f.prepareElement(b);f.formSubmitted=i;f.successList.push(b);f.showErrors()}else{i={};h=h||f.defaultMessage(b,"remote");i[b.name]=e.message=c.isFunction(h)?h(a):h;f.showErrors(i)}e.valid=j;f.stopRequest(b,j)}},d));return"pending"},minlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)>=d},maxlength:function(a, +b,d){return this.optional(b)||this.getLength(c.trim(a),b)<=d},rangelength:function(a,b,d){a=this.getLength(c.trim(a),b);return this.optional(b)||a>=d[0]&&a<=d[1]},min:function(a,b,d){return this.optional(b)||a>=d},max:function(a,b,d){return this.optional(b)||a<=d},range:function(a,b,d){return this.optional(b)||a>=d[0]&&a<=d[1]},email:function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(a)}, +url:function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)}, +date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 -]+/.test(a))return false;var d=0,e=0,f=false;a=a.replace(/\D/g,"");for(var g=a.length-1;g>= +0;g--){e=a.charAt(g);e=parseInt(e,10);if(f)if((e*=2)>9)e-=9;d+=e;f=!f}return d%10==0},accept:function(a,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||a.match(RegExp(".("+d+")$","i"))},equalTo:function(a,b,d){d=c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){c(b).valid()});return a==d.val()}}});c.format=c.validator.format})(jQuery); +(function(c){var a={};if(c.ajaxPrefilter)c.ajaxPrefilter(function(d,e,f){e=d.port;if(d.mode=="abort"){a[e]&&a[e].abort();a[e]=f}});else{var b=c.ajax;c.ajax=function(d){var e=("port"in d?d:c.ajaxSettings).port;if(("mode"in d?d:c.ajaxSettings).mode=="abort"){a[e]&&a[e].abort();return a[e]=b.apply(this,arguments)}return b.apply(this,arguments)}}})(jQuery); +(function(c){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.handle.call(this,e)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)},handler:function(e){arguments[0]=c.event.fix(e);arguments[0].type=b;return c.event.handle.apply(this,arguments)}}});c.extend(c.fn,{validateDelegate:function(a, +b,d){return this.bind(b,function(e){var f=c(e.target);if(f.is(a))return d.apply(f,arguments)})}})})(jQuery); diff --git a/referencia/template/js/plugins/wysiwyg/jquery.wysiwyg.js b/referencia/template/js/plugins/wysiwyg/jquery.wysiwyg.js new file mode 100644 index 0000000..3964112 --- /dev/null +++ b/referencia/template/js/plugins/wysiwyg/jquery.wysiwyg.js @@ -0,0 +1,2454 @@ +/** + * WYSIWYG - jQuery plugin 0.97 + * (0.97.2 - From infinity) + * + * Copyright (c) 2008-2009 Juan M Martinez, 2010-2011 Akzhan Abdulin and all contributors + * https://github.com/akzhan/jwysiwyg + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ + +/*jslint browser: true, forin: true */ + +(function ($) { + "use strict"; + /* Wysiwyg namespace: private properties and methods */ + + var console = window.console ? window.console : { + log: $.noop, + error: function (msg) { + $.error(msg); + } + }; + var supportsProp = (('prop' in $.fn) && ('removeProp' in $.fn)); + + function Wysiwyg() { + // - the item is added by this.ui.appendControls and then appendItem + // - click triggers this.triggerControl + // cmd or[key] - designMode exec function name + // tags - activates control for these tags (@see checkTargets) + // css - activates control if one of css is applied + this.controls = { + bold: { + groupIndex: 0, + visible: true, + tags: ["b", "strong"], + css: { + fontWeight: "bold" + }, + tooltip: "Bold", + hotkey: {"ctrl": 1, "key": 66} + }, + + copy: { + groupIndex: 8, + visible: false, + tooltip: "Copy" + }, + + createLink: { + groupIndex: 6, + visible: true, + exec: function () { + var self = this; + if ($.wysiwyg.controls && $.wysiwyg.controls.link) { + $.wysiwyg.controls.link.init(this); + } else if ($.wysiwyg.autoload) { + $.wysiwyg.autoload.control("wysiwyg.link.js", function () { + self.controls.createLink.exec.apply(self); + }); + } else { + console.error("$.wysiwyg.controls.link not defined. You need to include wysiwyg.link.js file"); + } + }, + tags: ["a"], + tooltip: "Create link" + }, + + cut: { + groupIndex: 8, + visible: false, + tooltip: "Cut" + }, + + decreaseFontSize: { + groupIndex: 9, + visible: false, + tags: ["small"], + tooltip: "Decrease font size", + exec: function () { + this.decreaseFontSize(); + } + }, + + h1: { + groupIndex: 7, + visible: true, + className: "h1", + command: ($.browser.msie || $.browser.safari) ? "FormatBlock" : "heading", + "arguments": ($.browser.msie || $.browser.safari) ? "

        " : "h1", + tags: ["h1"], + tooltip: "Header 1" + }, + + h2: { + groupIndex: 7, + visible: true, + className: "h2", + command: ($.browser.msie || $.browser.safari) ? "FormatBlock" : "heading", + "arguments": ($.browser.msie || $.browser.safari) ? "

        " : "h2", + tags: ["h2"], + tooltip: "Header 2" + }, + + h3: { + groupIndex: 7, + visible: true, + className: "h3", + command: ($.browser.msie || $.browser.safari) ? "FormatBlock" : "heading", + "arguments": ($.browser.msie || $.browser.safari) ? "

        " : "h3", + tags: ["h3"], + tooltip: "Header 3" + }, + + highlight: { + tooltip: "Highlight", + className: "highlight", + groupIndex: 1, + visible: false, + css: { + backgroundColor: "rgb(255, 255, 102)" + }, + exec: function () { + var command, node, selection, args; + + if ($.browser.msie || $.browser.safari) { + command = "backcolor"; + } else { + command = "hilitecolor"; + } + + if ($.browser.msie) { + node = this.getInternalRange().parentElement(); + } else { + selection = this.getInternalSelection(); + node = selection.extentNode || selection.focusNode; + + while (node.style === undefined) { + node = node.parentNode; + if (node.tagName && node.tagName.toLowerCase() === "body") { + return; + } + } + } + + if (node.style.backgroundColor === "rgb(255, 255, 102)" || + node.style.backgroundColor === "#ffff66") { + args = "#ffffff"; + } else { + args = "#ffff66"; + } + + this.editorDoc.execCommand(command, false, args); + } + }, + + html: { + groupIndex: 10, + visible: false, + exec: function () { + var elementHeight; + + if (this.options.resizeOptions && $.fn.resizable) { + elementHeight = this.element.height(); + } + + if (this.viewHTML) { //textarea is shown + this.setContent(this.original.value); + + $(this.original).hide(); + this.editor.show(); + + if (this.options.resizeOptions && $.fn.resizable) { + // if element.height still the same after frame was shown + if (elementHeight === this.element.height()) { + this.element.height(elementHeight + this.editor.height()); + } + + this.element.resizable($.extend(true, { + alsoResize: this.editor + }, this.options.resizeOptions)); + } + + this.ui.toolbar.find("li").each(function () { + var li = $(this); + + if (li.hasClass("html")) { + li.removeClass("active"); + } else { + li.removeClass('disabled'); + } + }); + } else { //wysiwyg is shown + this.saveContent(); + + $(this.original).css({ + width: this.element.outerWidth() - 6, + height: this.element.height() - this.ui.toolbar.height() - 6, + resize: "none" + }).show(); + this.editor.hide(); + + if (this.options.resizeOptions && $.fn.resizable) { + // if element.height still the same after frame was hidden + if (elementHeight === this.element.height()) { + this.element.height(this.ui.toolbar.height()); + } + + this.element.resizable("destroy"); + } + + this.ui.toolbar.find("li").each(function () { + var li = $(this); + + if (li.hasClass("html")) { + li.addClass("active"); + } else { + if (false === li.hasClass("fullscreen")) { + li.removeClass("active").addClass('disabled'); + } + } + }); + } + + this.viewHTML = !(this.viewHTML); + }, + tooltip: "View source code" + }, + + increaseFontSize: { + groupIndex: 9, + visible: false, + tags: ["big"], + tooltip: "Increase font size", + exec: function () { + this.increaseFontSize(); + } + }, + + indent: { + groupIndex: 2, + visible: true, + tooltip: "Indent" + }, + + insertHorizontalRule: { + groupIndex: 6, + visible: true, + tags: ["hr"], + tooltip: "Insert Horizontal Rule" + }, + + insertImage: { + groupIndex: 6, + visible: true, + exec: function () { + var self = this; + + if ($.wysiwyg.controls && $.wysiwyg.controls.image) { + $.wysiwyg.controls.image.init(this); + } else if ($.wysiwyg.autoload) { + $.wysiwyg.autoload.control("wysiwyg.image.js", function () { + self.controls.insertImage.exec.apply(self); + }); + } else { + console.error("$.wysiwyg.controls.image not defined. You need to include wysiwyg.image.js file"); + } + }, + tags: ["img"], + tooltip: "Insert image" + }, + + insertOrderedList: { + groupIndex: 5, + visible: true, + tags: ["ol"], + tooltip: "Insert Ordered List" + }, + + insertTable: { + groupIndex: 6, + visible: true, + exec: function () { + var self = this; + + if ($.wysiwyg.controls && $.wysiwyg.controls.table) { + $.wysiwyg.controls.table(this); + } else if ($.wysiwyg.autoload) { + $.wysiwyg.autoload.control("wysiwyg.table.js", function () { + self.controls.insertTable.exec.apply(self); + }); + } else { + console.error("$.wysiwyg.controls.table not defined. You need to include wysiwyg.table.js file"); + } + }, + tags: ["table"], + tooltip: "Insert table" + }, + + insertUnorderedList: { + groupIndex: 5, + visible: true, + tags: ["ul"], + tooltip: "Insert Unordered List" + }, + + italic: { + groupIndex: 0, + visible: true, + tags: ["i", "em"], + css: { + fontStyle: "italic" + }, + tooltip: "Italic", + hotkey: {"ctrl": 1, "key": 73} + }, + + justifyCenter: { + groupIndex: 1, + visible: true, + tags: ["center"], + css: { + textAlign: "center" + }, + tooltip: "Justify Center" + }, + + justifyFull: { + groupIndex: 1, + visible: true, + css: { + textAlign: "justify" + }, + tooltip: "Justify Full" + }, + + justifyLeft: { + visible: true, + groupIndex: 1, + css: { + textAlign: "left" + }, + tooltip: "Justify Left" + }, + + justifyRight: { + groupIndex: 1, + visible: true, + css: { + textAlign: "right" + }, + tooltip: "Justify Right" + }, + + ltr: { + groupIndex: 10, + visible: false, + exec: function () { + var p = this.dom.getElement("p"); + + if (!p) { + return false; + } + + $(p).attr("dir", "ltr"); + return true; + }, + tooltip : "Left to Right" + }, + + outdent: { + groupIndex: 2, + visible: true, + tooltip: "Outdent" + }, + + paragraph: { + groupIndex: 7, + visible: false, + className: "paragraph", + command: "FormatBlock", + "arguments": ($.browser.msie || $.browser.safari) ? "

        " : "p", + tags: ["p"], + tooltip: "Paragraph" + }, + + paste: { + groupIndex: 8, + visible: false, + tooltip: "Paste" + }, + + redo: { + groupIndex: 4, + visible: true, + tooltip: "Redo" + }, + + removeFormat: { + groupIndex: 10, + visible: true, + exec: function () { + this.removeFormat(); + }, + tooltip: "Remove formatting" + }, + + rtl: { + groupIndex: 10, + visible: false, + exec: function () { + var p = this.dom.getElement("p"); + + if (!p) { + return false; + } + + $(p).attr("dir", "rtl"); + return true; + }, + tooltip : "Right to Left" + }, + + strikeThrough: { + groupIndex: 0, + visible: true, + tags: ["s", "strike"], + css: { + textDecoration: "line-through" + }, + tooltip: "Strike-through" + }, + + subscript: { + groupIndex: 3, + visible: true, + tags: ["sub"], + tooltip: "Subscript" + }, + + superscript: { + groupIndex: 3, + visible: true, + tags: ["sup"], + tooltip: "Superscript" + }, + + underline: { + groupIndex: 0, + visible: true, + tags: ["u"], + css: { + textDecoration: "underline" + }, + tooltip: "Underline", + hotkey: {"ctrl": 1, "key": 85} + }, + + undo: { + groupIndex: 4, + visible: true, + tooltip: "Undo" + }, + + code: { + visible : true, + groupIndex: 6, + tooltip: "Code snippet", + exec: function () { + var range = this.getInternalRange(), + common = $(range.commonAncestorContainer), + $nodeName = range.commonAncestorContainer.nodeName.toLowerCase(); + if (common.parent("code").length) { + common.unwrap(); + } else { + if ($nodeName !== "body") { + common.wrap(""); + } + } + } + }, + + cssWrap: { + visible : false, + groupIndex: 6, + tooltip: "CSS Wrapper", + exec: function () { + $.wysiwyg.controls.cssWrap.init(this); + } + } + + }; + + this.defaults = { +html: 'INITIAL_CONTENT', + debug: false, + controls: {}, + css: {}, + events: {}, + autoGrow: false, + autoSave: true, + brIE: true, // http://code.google.com/p/jwysiwyg/issues/detail?id=15 + formHeight: 270, + formWidth: 440, + iFrameClass: null, + initialContent: "

        Initial content

        ", + maxHeight: 10000, // see autoGrow + maxLength: 0, + messages: { + nonSelection: "Select the text you wish to link" + }, + toolbarHtml: '', + removeHeadings: false, + replaceDivWithP: false, + resizeOptions: false, + rmUnusedControls: false, // https://github.com/akzhan/jwysiwyg/issues/52 + rmUnwantedBr: true, // http://code.google.com/p/jwysiwyg/issues/detail?id=11 + tableFiller: "Lorem ipsum", + initialMinHeight: null, + + controlImage: { + forceRelativeUrls: false + }, + + controlLink: { + forceRelativeUrls: false + }, + + plugins: { // placeholder for plugins settings + autoload: false, + i18n: false, + rmFormat: { + rmMsWordMarkup: false + } + }, + + dialog : "default" + }; + + //these properties are set from control hashes + this.availableControlProperties = [ + "arguments", + "callback", + "className", + "command", + "css", + "custom", + "exec", + "groupIndex", + "hotkey", + "icon", + "tags", + "tooltip", + "visible" + ]; + + this.editor = null; //jquery iframe holder + this.editorDoc = null; + this.element = null; + this.options = {}; + this.original = null; + this.savedRange = null; + this.timers = []; + this.validKeyCodes = [8, 9, 13, 16, 17, 18, 19, 20, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46]; + + this.isDestroyed = false; + + this.dom = { // DOM related properties and methods + ie: { + parent: null // link to dom + }, + w3c: { + parent: null // link to dom + } + }; + this.dom.parent = this; + this.dom.ie.parent = this.dom; + this.dom.w3c.parent = this.dom; + + this.ui = {}; // UI related properties and methods + this.ui.self = this; + this.ui.toolbar = null; + this.ui.initialHeight = null; // ui.grow + + this.dom.getAncestor = function (element, filterTagName) { + filterTagName = filterTagName.toLowerCase(); + + while (element && typeof element.tagName != "undefined" && "body" !== element.tagName.toLowerCase()) { + if (filterTagName === element.tagName.toLowerCase()) { + return element; + } + + element = element.parentNode; + } + if(!element.tagName && (element.previousSibling || element.nextSibling)) { + if(element.previousSibling) { + if(element.previousSibling.tagName.toLowerCase() == filterTagName) { + return element.previousSibling; + } + } + if(element.nextSibling) { + if(element.nextSibling.tagName.toLowerCase() == filterTagName) { + return element.nextSibling; + } + } + } + + return null; + }; + + this.dom.getElement = function (filterTagName) { + var dom = this; + + filterTagName = filterTagName.toLowerCase(); + + if (window.getSelection) { + return dom.w3c.getElement(filterTagName); + } else { + return dom.ie.getElement(filterTagName); + } + }; + + this.dom.ie.getElement = function (filterTagName) { + var dom = this.parent, + selection = dom.parent.getInternalSelection(), + range = selection.createRange(), + element; + + if ("Control" === selection.type) { + // control selection + if (1 === range.length) { + element = range.item(0); + } else { + // multiple control selection + return null; + } + } else { + element = range.parentElement(); + } + + return dom.getAncestor(element, filterTagName); + }; + + this.dom.w3c.getElement = function (filterTagName) { + var dom = this.parent, + range = dom.parent.getInternalRange(), + element; + + if (!range) { + return null; + } + + element = range.commonAncestorContainer; + + if (3 === element.nodeType) { + element = element.parentNode; + } + + // if startContainer not Text, Comment, or CDATASection element then + // startOffset is the number of child nodes between the start of the + // startContainer and the boundary point of the Range + if (element === range.startContainer) { + element = element.childNodes[range.startOffset]; + } + + if(!element.tagName && (element.previousSibiling || element.nextSibling)) { + if(element.previousSibiling) { + if(element.previousSibiling.tagName.toLowerCase() == filterTagName) { + return element.previousSibiling; + } + } + if(element.nextSibling) { + if(element.nextSibling.tagName.toLowerCase() == filterTagName) { + return element.nextSibling; + } + } + } + + return dom.getAncestor(element, filterTagName); + }; + + this.ui.addHoverClass = function () { + $(this).addClass("wysiwyg-button-hover"); + }; + + this.ui.appendControls = function () { + var ui = this, + self = this.self, + controls = self.parseControls(), + hasVisibleControls = true, // to prevent separator before first item + groups = [], + controlsByGroup = {}, + i, + currentGroupIndex, // jslint wants all vars at top of function + iterateGroup = function (controlName, control) { //called for every group when adding + if (control.groupIndex && currentGroupIndex !== control.groupIndex) { + currentGroupIndex = control.groupIndex; + hasVisibleControls = false; + } + + if (!control.visible) { + return; + } + + if (!hasVisibleControls) { + ui.appendItemSeparator(); + hasVisibleControls = true; + } + + if (control.custom) { + ui.appendItemCustom(controlName, control); + } else { + ui.appendItem(controlName, control); + } + }; + + $.each(controls, function (name, c) { //sort by groupIndex + var index = "empty"; + + if (undefined !== c.groupIndex) { + if ("" === c.groupIndex) { + index = "empty"; + } else { + index = c.groupIndex; + } + } + + if (undefined === controlsByGroup[index]) { + groups.push(index); + controlsByGroup[index] = {}; + } + controlsByGroup[index][name] = c; + }); + + groups.sort(function (a, b) { //just sort group indexes by + if ("number" === typeof (a) && typeof (a) === typeof (b)) { + return (a - b); + } else { + a = a.toString(); + b = b.toString(); + + if (a > b) { + return 1; + } + + if (a === b) { + return 0; + } + + return -1; + } + }); + + if (0 < groups.length) { + // set to first index in groups to proper placement of separator + currentGroupIndex = groups[0]; + } + + for (i = 0; i < groups.length; i += 1) { + $.each(controlsByGroup[groups[i]], iterateGroup); + } + }; + + this.ui.appendItem = function (name, control) { + var self = this.self, + className = control.className || control.command || name || "empty", + tooltip = control.tooltip || control.command || name || ""; + + return $('
      • ' + (className) + "
      • ") + .addClass(className) + .attr("title", tooltip) + .hover(this.addHoverClass, this.removeHoverClass) + .click(function (event) { + if ($(this).hasClass("disabled")) { + return false; + } + + self.triggerControl.apply(self, [name, control]); + + /** + * @link https://github.com/akzhan/jwysiwyg/issues/219 + */ + var $target = $(event.target); + for (var controlName in self.controls) { + if ($target.hasClass(controlName)) { + self.ui.toolbar.find("." + controlName).toggleClass("active"); + self.editorDoc.rememberCommand = true; + break; + } + } + + this.blur(); + self.ui.returnRange(); + self.ui.focus(); + return true; + }) + .appendTo(self.ui.toolbar); + }; + + this.ui.appendItemCustom = function (name, control) { + var self = this.self, + tooltip = control.tooltip || control.command || name || ""; + + if (control.callback) { + $(window).bind("trigger-" + name + ".wysiwyg", control.callback); + } + + return $('
      • ') + .addClass("custom-command-" + name) + .addClass("wysiwyg-custom-command") + .addClass(name) + .attr("title", tooltip) + .hover(this.addHoverClass, this.removeHoverClass) + .click(function () { + if ($(this).hasClass("disabled")) { + return false; + } + + self.triggerControl.apply(self, [name, control]); + + this.blur(); + self.ui.returnRange(); + self.ui.focus(); + + self.triggerControlCallback(name); + return true; + }) + .appendTo(self.ui.toolbar); + }; + + this.ui.appendItemSeparator = function () { + var self = this.self; + return $('').appendTo(self.ui.toolbar); + }; + + this.autoSaveFunction = function () { + this.saveContent(); + }; + + //called after click in wysiwyg "textarea" + this.ui.checkTargets = function (element) { + var self = this.self; + + //activate controls + $.each(self.options.controls, function (name, control) { + var className = control.className || control.command || name || "empty", + tags, + elm, + css, + el, + checkActiveStatus = function (cssProperty, cssValue) { + var handler; + + if ("function" === typeof (cssValue)) { + handler = cssValue; + if (handler(el.css(cssProperty).toString().toLowerCase(), self)) { + self.ui.toolbar.find("." + className).addClass("active"); + } + } else { + if (el.css(cssProperty).toString().toLowerCase() === cssValue) { + self.ui.toolbar.find("." + className).addClass("active"); + } + } + }; + + if ("fullscreen" !== className) { + self.ui.toolbar.find("." + className).removeClass("active"); + } + + //activate by allowed tags + if (control.tags || (control.options && control.options.tags)) { + tags = control.tags || (control.options && control.options.tags); + + elm = element; + while (elm) { + if (elm.nodeType !== 1) { + break; + } + + if ($.inArray(elm.tagName.toLowerCase(), tags) !== -1) { + self.ui.toolbar.find("." + className).addClass("active"); + } + + elm = elm.parentNode; + } + } + + //activate by supposed css + if (control.css || (control.options && control.options.css)) { + css = control.css || (control.options && control.options.css); + el = $(element); + + while (el) { + if (el[0].nodeType !== 1) { + break; + } + $.each(css, checkActiveStatus); + + el = el.parent(); + } + } + }); + }; + + this.ui.designMode = function () { + var attempts = 3, + self = this.self, + runner; + runner = function (attempts) { + if ("on" === self.editorDoc.designMode) { + if (self.timers.designMode) { + window.clearTimeout(self.timers.designMode); + } + + // IE needs to reget the document element (this.editorDoc) after designMode was set + if (self.innerDocument() !== self.editorDoc) { + self.ui.initFrame(); + } + + return; + } + + try { + self.editorDoc.designMode = "on"; + } catch (e) { + } + + attempts -= 1; + if (attempts > 0) { + self.timers.designMode = window.setTimeout(function () { runner(attempts); }, 100); + } + }; + + runner(attempts); + }; + + this.destroy = function () { + this.isDestroyed = true; + + var i, $form = this.element.closest("form"); + + for (i = 0; i < this.timers.length; i += 1) { + window.clearTimeout(this.timers[i]); + } + + // Remove bindings + $form.unbind(".wysiwyg"); + this.element.remove(); + $.removeData(this.original, "wysiwyg"); + $(this.original).show(); + return this; + }; + + this.getRangeText = function () { + var r = this.getInternalRange(); + + if (r.toString) { + r = r.toString(); + } else if (r.text) { // IE + r = r.text; + } + + return r; + }; + //not used? + this.execute = function (command, arg) { + if (typeof (arg) === "undefined") { + arg = null; + } + this.editorDoc.execCommand(command, false, arg); + }; + + this.extendOptions = function (options) { + var controls = {}; + + /** + * If the user set custom controls, we catch it, and merge with the + * defaults controls later. + */ + if ("object" === typeof options.controls) { + controls = options.controls; + delete options.controls; + } + + options = $.extend(true, {}, this.defaults, options); + options.controls = $.extend(true, {}, controls, this.controls, controls); + + if (options.rmUnusedControls) { + $.each(options.controls, function (controlName) { + if (!controls[controlName]) { + delete options.controls[controlName]; + } + }); + } + + return options; + }; + + this.ui.focus = function () { + var self = this.self; + + self.editor.get(0).contentWindow.focus(); + return self; + }; + + this.ui.returnRange = function () { + var self = this.self, sel; + + if (self.savedRange !== null) { + if (window.getSelection) { //non IE and there is already a selection + sel = window.getSelection(); + if (sel.rangeCount > 0) { + sel.removeAllRanges(); + } + try { + sel.addRange(self.savedRange); + } catch (e) { + console.error(e); + } + } else if (window.document.createRange) { // non IE and no selection + window.getSelection().addRange(self.savedRange); + } else if (window.document.selection) { //IE + self.savedRange.select(); + } + + self.savedRange = null; + } + }; + + this.increaseFontSize = function () { + if ($.browser.mozilla || $.browser.opera) { + this.editorDoc.execCommand("increaseFontSize", false, null); + } else if ($.browser.safari) { + var Range = this.getInternalRange(), + Selection = this.getInternalSelection(), + newNode = this.editorDoc.createElement("big"); + + // If cursor placed on text node + if (true === Range.collapsed && 3 === Range.commonAncestorContainer.nodeType) { + var text = Range.commonAncestorContainer.nodeValue.toString(), + start = text.lastIndexOf(" ", Range.startOffset) + 1, + end = (-1 === text.indexOf(" ", Range.startOffset)) ? text : text.indexOf(" ", Range.startOffset); + + Range.setStart(Range.commonAncestorContainer, start); + Range.setEnd(Range.commonAncestorContainer, end); + + Range.surroundContents(newNode); + Selection.addRange(Range); + } else { + Range.surroundContents(newNode); + Selection.removeAllRanges(); + Selection.addRange(Range); + } + } else { + console.error("Internet Explorer?"); + } + }; + + this.decreaseFontSize = function () { + if ($.browser.mozilla || $.browser.opera) { + this.editorDoc.execCommand("decreaseFontSize", false, null); + } else if ($.browser.safari) { + var Range = this.getInternalRange(), + Selection = this.getInternalSelection(), + newNode = this.editorDoc.createElement("small"); + + // If cursor placed on text node + if (true === Range.collapsed && 3 === Range.commonAncestorContainer.nodeType) { + var text = Range.commonAncestorContainer.nodeValue.toString(), + start = text.lastIndexOf(" ", Range.startOffset) + 1, + end = (-1 === text.indexOf(" ", Range.startOffset)) ? text : text.indexOf(" ", Range.startOffset); + + Range.setStart(Range.commonAncestorContainer, start); + Range.setEnd(Range.commonAncestorContainer, end); + + Range.surroundContents(newNode); + Selection.addRange(Range); + } else { + Range.surroundContents(newNode); + Selection.removeAllRanges(); + Selection.addRange(Range); + } + } else { + console.error("Internet Explorer?"); + } + }; + + this.getContent = function () { + if (this.viewHTML) { + this.setContent(this.original.value); + } + return this.events.filter('getContent', this.editorDoc.body.innerHTML); + }; + + /** + * A jWysiwyg specific event system. + * + * Example: + * + * $("#editor").getWysiwyg().events.bind("getContent", function (orig) { + * return "
        "+orgi+"
        "; + * }); + * + * This makes it so that when ever getContent is called, it is wrapped in a div#content. + */ + this.events = { + _events : {}, + + /** + * Similar to jQuery's bind, but for jWysiwyg only. + */ + bind : function (eventName, callback) { + if (typeof (this._events.eventName) !== "object") { + this._events[eventName] = []; + } + this._events[eventName].push(callback); + }, + + /** + * Similar to jQuery's trigger, but for jWysiwyg only. + */ + trigger : function (eventName, args) { + if (typeof (this._events.eventName) === "object") { + var editor = this.editor; + $.each(this._events[eventName], function (k, v) { + if (typeof (v) === "function") { + v.apply(editor, args); + } + }); + } + }, + + /** + * This "filters" `originalText` by passing it as the first argument to every callback + * with the name `eventName` and taking the return value and passing it to the next function. + * + * This function returns the result after all the callbacks have been applied to `originalText`. + */ + filter : function (eventName, originalText) { + if (typeof (this._events[eventName]) === "object") { + var editor = this.editor, + args = Array.prototype.slice.call(arguments, 1); + + $.each(this._events[eventName], function (k, v) { + if (typeof (v) === "function") { + originalText = v.apply(editor, args); + } + }); + } + return originalText; + } + }; + + this.getElementByAttributeValue = function (tagName, attributeName, attributeValue) { + var i, value, elements = this.editorDoc.getElementsByTagName(tagName); + + for (i = 0; i < elements.length; i += 1) { + value = elements[i].getAttribute(attributeName); + + if ($.browser.msie) { + /** IE add full path, so I check by the last chars. */ + value = value.substr(value.length - attributeValue.length); + } + + if (value === attributeValue) { + return elements[i]; + } + } + + return false; + }; + + this.getInternalRange = function () { + var selection = this.getInternalSelection(); + + if (!selection) { + return null; + } + + if (selection.rangeCount && selection.rangeCount > 0) { // w3c + return selection.getRangeAt(0); + } else if (selection.createRange) { // ie + return selection.createRange(); + } + + return null; + }; + + this.getInternalSelection = function () { + // firefox: document.getSelection is deprecated + if (this.editor.get(0).contentWindow) { + if (this.editor.get(0).contentWindow.getSelection) { + return this.editor.get(0).contentWindow.getSelection(); + } + if (this.editor.get(0).contentWindow.selection) { + return this.editor.get(0).contentWindow.selection; + } + } + if (this.editorDoc.getSelection) { + return this.editorDoc.getSelection(); + } + if (this.editorDoc.selection) { + return this.editorDoc.selection; + } + + return null; + }; + + this.getRange = function () { + var selection = this.getSelection(); + + if (!selection) { + return null; + } + + if (selection.rangeCount && selection.rangeCount > 0) { // w3c + selection.getRangeAt(0); + } else if (selection.createRange) { // ie + return selection.createRange(); + } + + return null; + }; + + this.getSelection = function () { + return (window.getSelection) ? window.getSelection() : window.document.selection; + }; + + // :TODO: you can type long string and letters will be hidden because of overflow + this.ui.grow = function () { + var self = this.self, + innerBody = $(self.editorDoc.body), + innerHeight = $.browser.msie ? innerBody[0].scrollHeight : innerBody.height() + 2 + 20, // 2 - borders, 20 - to prevent content jumping on grow + minHeight = self.ui.initialHeight, + height = Math.max(innerHeight, minHeight); + + height = Math.min(height, self.options.maxHeight); + + self.editor.attr("scrolling", height < self.options.maxHeight ? "no" : "auto"); // hide scrollbar firefox + innerBody.css("overflow", height < self.options.maxHeight ? "hidden" : ""); // hide scrollbar chrome + + self.editor.get(0).height = height; + + return self; + }; + + this.init = function (element, options) { + var self = this, + $form = $(element).closest("form"), + newX = (element.width || element.clientWidth || 0), + newY = (element.height || element.clientHeight || 0) + ; + + this.options = this.extendOptions(options); + this.original = element; + this.ui.toolbar = $(this.options.toolbarHtml); + + if ($.browser.msie && parseInt($.browser.version, 10) < 8) { + this.options.autoGrow = false; + } + + if (newX === 0 && element.cols) { + newX = (element.cols * 8) + 21; + } + if (newY === 0 && element.rows) { + newY = (element.rows * 16) + 16; + } + + this.editor = $(window.location.protocol === "https:" ? '' : "").attr("frameborder", "0"); + + if (this.options.iFrameClass) { + this.editor.addClass(this.options.iFrameClass); + } else { + this.editor.css({ + minHeight: (newY - 6).toString() + "px", + // fix for issue 12 ( http://github.com/akzhan/jwysiwyg/issues/issue/12 ) + width: (newX > 50) ? (newX - 8).toString() + "px" : "" + }); + if ($.browser.msie && parseInt($.browser.version, 10) < 7) { + this.editor.css("height", newY.toString() + "px"); + } + } + /** + * Automagically add id to iframe if textarea has its own when possible + * ( http://github.com/akzhan/jwysiwyg/issues/245 ) + */ + if (element.id) { + var proposedId = element.id + '-wysiwyg-iframe'; + if (! document.getElementById(proposedId)) { + this.editor.attr('id', proposedId); + } + } + + /** + * http://code.google.com/p/jwysiwyg/issues/detail?id=96 + */ + this.editor.attr("tabindex", $(element).attr("tabindex")); + + this.element = $("
        ").addClass("wysiwyg"); + + if (!this.options.iFrameClass) { + this.element.css({ + width: (newX > 0) ? newX.toString() + "px" : "100%" + }); + } + + $(element).hide().before(this.element); + + this.viewHTML = false; + + /** + * @link http://code.google.com/p/jwysiwyg/issues/detail?id=52 + */ + this.initialContent = $(element).val(); + this.ui.initFrame(); + + if (this.options.resizeOptions && $.fn.resizable) { + this.element.resizable($.extend(true, { + alsoResize: this.editor + }, this.options.resizeOptions)); + } + + if (this.options.autoSave) { + $form.bind("submit.wysiwyg", function () { self.autoSaveFunction(); }); + } + + $form.bind("reset.wysiwyg", function () { self.resetFunction(); }); + }; + + this.ui.initFrame = function () { + var self = this.self, + stylesheet, + growHandler, + saveHandler; + + self.ui.appendControls(); + self.element.append(self.ui.toolbar) + .append($("
        ") + .css({ + clear: "both" + })) + .append(self.editor); + + self.editorDoc = self.innerDocument(); + + if (self.isDestroyed) { + return null; + } + + self.ui.designMode(); + self.editorDoc.open(); + self.editorDoc.write( + self.options.html + /** + * @link http://code.google.com/p/jwysiwyg/issues/detail?id=144 + */ + .replace(/INITIAL_CONTENT/, function () { return self.wrapInitialContent(); }) + ); + self.editorDoc.close(); + + $.wysiwyg.plugin.bind(self); + + $(self.editorDoc).trigger("initFrame.wysiwyg"); + + $(self.editorDoc).bind("click.wysiwyg", function (event) { + self.ui.checkTargets(event.target ? event.target : event.srcElement); + }); + + /** + * @link https://github.com/akzhan/jwysiwyg/issues/251 + */ + setInterval(function () { + var offset = null; + + try { + var range = self.getInternalRange(); + if (range) { + offset = { + range: range, + parent: $.browser.msie ? range.parentElement() : range.endContainer.parentNode, + width: ($.browser.msie ? range.boundingWidth : range.startOffset - range.endOffset) || 0 + }; + } + } + catch (e) { console.error(e); } + + if (offset && offset.width == 0 && !self.editorDoc.rememberCommand) { + self.ui.checkTargets(offset.parent); + } + }, 400); + + /** + * @link http://code.google.com/p/jwysiwyg/issues/detail?id=20 + */ + $(self.original).focus(function () { + if ($(this).filter(":visible").length === 0) { + return; + } + self.ui.focus(); + }); + + $(self.editorDoc).keydown(function (event) { + var emptyContentRegex; + if (event.keyCode === 8) { // backspace + emptyContentRegex = /^<([\w]+)[^>]*>()?<\/\1>$/; + if (emptyContentRegex.test(self.getContent())) { // if content is empty + event.stopPropagation(); // prevent remove single empty tag + return false; + } + } + + self.editorDoc.rememberCommand = false; + return true; + }); + + if (!$.browser.msie) { + $(self.editorDoc).keydown(function (event) { + var controlName; + + /* Meta for Macs. tom@punkave.com */ + if (event.ctrlKey || event.metaKey) { + for (controlName in self.controls) { + if (self.controls[controlName].hotkey && self.controls[controlName].hotkey.ctrl) { + if (event.keyCode === self.controls[controlName].hotkey.key) { + self.triggerControl.apply(self, [controlName, self.controls[controlName]]); + + return false; + } + } + } + } + + return true; + }); + } else if (self.options.brIE) { + $(self.editorDoc).keydown(function (event) { + if (event.keyCode === 13) { + var rng = self.getRange(); + rng.pasteHTML("
        "); + rng.collapse(false); + rng.select(); + + return false; + } + + return true; + }); + } + + if (self.options.plugins.rmFormat.rmMsWordMarkup) { + $(self.editorDoc).bind("keyup.wysiwyg", function (event) { + if (event.ctrlKey || event.metaKey) { + // CTRL + V (paste) + if (86 === event.keyCode) { + if ($.wysiwyg.rmFormat) { + if ("object" === typeof (self.options.plugins.rmFormat.rmMsWordMarkup)) { + $.wysiwyg.rmFormat.run(self, {rules: { msWordMarkup: self.options.plugins.rmFormat.rmMsWordMarkup }}); + } else { + $.wysiwyg.rmFormat.run(self, {rules: { msWordMarkup: { enabled: true }}}); + } + } + } + } + }); + } + + if (self.options.autoSave) { + $(self.editorDoc).keydown(function () { self.autoSaveFunction(); }) + .keyup(function () { self.autoSaveFunction(); }) + .mousedown(function () { self.autoSaveFunction(); }) + .bind($.support.noCloneEvent ? "input.wysiwyg" : "paste.wysiwyg", function () { self.autoSaveFunction(); }); + } + + if (self.options.autoGrow) { + if (self.options.initialMinHeight !== null) { + self.ui.initialHeight = self.options.initialMinHeight; + } else { + self.ui.initialHeight = $(self.editorDoc).height(); + } + $(self.editorDoc.body).css("border", "1px solid white"); // cancel margin collapsing + + growHandler = function () { + self.ui.grow(); + }; + + $(self.editorDoc).keyup(growHandler); + $(self.editorDoc).bind("editorRefresh.wysiwyg", growHandler); + + // fix when content height > textarea height + self.ui.grow(); + } + + if (self.options.css) { + if (String === self.options.css.constructor) { + if ($.browser.msie) { + stylesheet = self.editorDoc.createStyleSheet(self.options.css); + $(stylesheet).attr({ + "media": "all" + }); + } else { + stylesheet = $("").attr({ + "href": self.options.css, + "media": "all", + "rel": "stylesheet", + "type": "text/css" + }); + + $(self.editorDoc).find("head").append(stylesheet); + } + } else { + self.timers.initFrame_Css = window.setTimeout(function () { + $(self.editorDoc.body).css(self.options.css); + }, 0); + } + } + + if (self.initialContent.length === 0) { + if ("function" === typeof (self.options.initialContent)) { + self.setContent(self.options.initialContent()); + } else { + self.setContent(self.options.initialContent); + } + } + + if (self.options.maxLength > 0) { + $(self.editorDoc).keydown(function (event) { + if ($(self.editorDoc).text().length >= self.options.maxLength && $.inArray(event.which, self.validKeyCodes) === -1) { + event.preventDefault(); + } + }); + } + + // Support event callbacks + $.each(self.options.events, function (key, handler) { + $(self.editorDoc).bind(key + ".wysiwyg", function (event) { + // Trigger event handler, providing the event and api to + // support additional functionality. + handler.apply(self.editorDoc, [event, self]); + }); + }); + + // restores selection properly on focus + if ($.browser.msie) { + // Event chain: beforedeactivate => focusout => blur. + // Focusout & blur fired too late to handle internalRange() in dialogs. + // When clicked on input boxes both got range = null + $(self.editorDoc).bind("beforedeactivate.wysiwyg", function () { + self.savedRange = self.getInternalRange(); + }); + } else { + $(self.editorDoc).bind("blur.wysiwyg", function () { + self.savedRange = self.getInternalRange(); + }); + } + + $(self.editorDoc.body).addClass("wysiwyg"); + if (self.options.events && self.options.events.save) { + saveHandler = self.options.events.save; + + $(self.editorDoc).bind("keyup.wysiwyg", saveHandler); + $(self.editorDoc).bind("change.wysiwyg", saveHandler); + + if ($.support.noCloneEvent) { + $(self.editorDoc).bind("input.wysiwyg", saveHandler); + } else { + $(self.editorDoc).bind("paste.wysiwyg", saveHandler); + $(self.editorDoc).bind("cut.wysiwyg", saveHandler); + } + } + + /** + * XHTML5 {@link https://github.com/akzhan/jwysiwyg/issues/152} + */ + if (self.options.xhtml5 && self.options.unicode) { + var replacements = {ne:8800,le:8804,para:182,xi:958,darr:8595,nu:957,oacute:243,Uacute:218,omega:969,prime:8242,pound:163,igrave:236,thorn:254,forall:8704,emsp:8195,lowast:8727,brvbar:166,alefsym:8501,nbsp:160,delta:948,clubs:9827,lArr:8656,Omega:937,Auml:196,cedil:184,and:8743,plusmn:177,ge:8805,raquo:187,uml:168,equiv:8801,laquo:171,rdquo:8221,Epsilon:917,divide:247,fnof:402,chi:967,Dagger:8225,iacute:237,rceil:8969,sigma:963,Oslash:216,acute:180,frac34:190,lrm:8206,upsih:978,Scaron:352,part:8706,exist:8707,nabla:8711,image:8465,prop:8733,zwj:8205,omicron:959,aacute:225,Yuml:376,Yacute:221,weierp:8472,rsquo:8217,otimes:8855,kappa:954,thetasym:977,harr:8596,Ouml:214,Iota:921,ograve:242,sdot:8901,copy:169,oplus:8853,acirc:226,sup:8835,zeta:950,Iacute:205,Oacute:211,crarr:8629,Nu:925,bdquo:8222,lsquo:8216,apos:39,Beta:914,eacute:233,egrave:232,lceil:8968,Kappa:922,piv:982,Ccedil:199,ldquo:8220,Xi:926,cent:162,uarr:8593,hellip:8230,Aacute:193,ensp:8194,sect:167,Ugrave:217,aelig:230,ordf:170,curren:164,sbquo:8218,macr:175,Phi:934,Eta:919,rho:961,Omicron:927,sup2:178,euro:8364,aring:229,Theta:920,mdash:8212,uuml:252,otilde:245,eta:951,uacute:250,rArr:8658,nsub:8836,agrave:224,notin:8713,ndash:8211,Psi:936,Ocirc:212,sube:8838,szlig:223,micro:181,not:172,sup1:185,middot:183,iota:953,ecirc:234,lsaquo:8249,thinsp:8201,sum:8721,ntilde:241,scaron:353,cap:8745,atilde:227,lang:10216,__replacement:65533,isin:8712,gamma:947,Euml:203,ang:8736,upsilon:965,Ntilde:209,hearts:9829,Alpha:913,Tau:932,spades:9824,dagger:8224,THORN:222,"int":8747,lambda:955,Eacute:201,Uuml:220,infin:8734,rlm:8207,Aring:197,ugrave:249,Egrave:200,Acirc:194,rsaquo:8250,ETH:208,oslash:248,alpha:945,Ograve:210,Prime:8243,mu:956,ni:8715,real:8476,bull:8226,beta:946,icirc:238,eth:240,prod:8719,larr:8592,ordm:186,perp:8869,Gamma:915,reg:174,ucirc:251,Pi:928,psi:968,tilde:732,asymp:8776,zwnj:8204,Agrave:192,deg:176,AElig:198,times:215,Delta:916,sim:8764,Otilde:213,Mu:924,uArr:8657,circ:710,theta:952,Rho:929,sup3:179,diams:9830,tau:964,Chi:935,frac14:188,oelig:339,shy:173,or:8744,dArr:8659,phi:966,iuml:239,Lambda:923,rfloor:8971,iexcl:161,cong:8773,ccedil:231,Icirc:206,frac12:189,loz:9674,rarr:8594,cup:8746,radic:8730,frasl:8260,euml:235,OElig:338,hArr:8660,Atilde:195,Upsilon:933,there4:8756,ouml:246,oline:8254,Ecirc:202,yacute:253,auml:228,permil:8240,sigmaf:962,iquest:191,empty:8709,pi:960,Ucirc:219,supe:8839,Igrave:204,yen:165,rang:10217,trade:8482,lfloor:8970,minus:8722,Zeta:918,sub:8834,epsilon:949,yuml:255,Sigma:931,Iuml:207,ocirc:244}; + self.events.bind("getContent", function (text) { + return text.replace(/&(?:amp;)?(?!amp|lt|gt|quot)([a-z][a-z0-9]*);/gi, function (str, p1) { + if (!replacements[p1]) { + p1 = p1.toLowerCase(); + if (!replacements[p1]) { + p1 = "__replacement"; + } + } + + var num = replacements[p1]; + /* Numeric return if ever wanted: return replacements[p1] ? "&#"+num+";" : ""; */ + return String.fromCharCode(num); + }); + }); + } + $(self.original).trigger('ready.jwysiwyg', [self.editorDoc, self]); + }; + + this.innerDocument = function () { + var element = this.editor.get(0); + + if (element.nodeName.toLowerCase() === "iframe") { + if (element.contentDocument) { // Gecko + return element.contentDocument; + } else if (element.contentWindow) { // IE + return element.contentWindow.document; + } + + if (this.isDestroyed) { + return null; + } + + console.error("Unexpected error in innerDocument"); + + /* + return ( $.browser.msie ) + ? document.frames[element.id].document + : element.contentWindow.document // contentDocument; + */ + } + + return element; + }; + + this.insertHtml = function (szHTML) { + var img, range; + + if (!szHTML || szHTML.length === 0) { + return this; + } + + if ($.browser.msie) { + this.ui.focus(); + this.editorDoc.execCommand("insertImage", false, "#jwysiwyg#"); + img = this.getElementByAttributeValue("img", "src", "#jwysiwyg#"); + if (img) { + $(img).replaceWith(szHTML); + } + } else { + if ($.browser.mozilla) { // @link https://github.com/akzhan/jwysiwyg/issues/50 + if (1 === $(szHTML).length) { + range = this.getInternalRange(); + range.deleteContents(); + range.insertNode($(szHTML).get(0)); + } else { + this.editorDoc.execCommand("insertHTML", false, szHTML); + } + } else { + if (!this.editorDoc.execCommand("insertHTML", false, szHTML)) { + this.editor.focus(); + /* :TODO: place caret at the end + if (window.getSelection) { + } else { + } + this.editor.focus(); + */ + this.editorDoc.execCommand("insertHTML", false, szHTML); + } + } + } + + this.saveContent(); + + return this; + }; + + //check allowed properties + this.parseControls = function () { + var self = this; + + $.each(this.options.controls, function (controlName, control) { + $.each(control, function (propertyName) { + if (-1 === $.inArray(propertyName, self.availableControlProperties)) { + throw controlName + '["' + propertyName + '"]: property "' + propertyName + '" not exists in Wysiwyg.availableControlProperties'; + } + }); + }); + + if (this.options.parseControls) { //user callback + return this.options.parseControls.call(this); + } + + return this.options.controls; + }; + + this.removeFormat = function () { + if ($.browser.msie) { + this.ui.focus(); + } + + if (this.options.removeHeadings) { + this.editorDoc.execCommand("formatBlock", false, "

        "); // remove headings + } + + this.editorDoc.execCommand("removeFormat", false, null); + this.editorDoc.execCommand("unlink", false, null); + + if ($.wysiwyg.rmFormat && $.wysiwyg.rmFormat.enabled) { + if ("object" === typeof (this.options.plugins.rmFormat.rmMsWordMarkup)) { + $.wysiwyg.rmFormat.run(this, {rules: { msWordMarkup: this.options.plugins.rmFormat.rmMsWordMarkup }}); + } else { + $.wysiwyg.rmFormat.run(this, {rules: { msWordMarkup: { enabled: true }}}); + } + } + + return this; + }; + + this.ui.removeHoverClass = function () { + $(this).removeClass("wysiwyg-button-hover"); + }; + + this.resetFunction = function () { + this.setContent(this.initialContent); + }; + + this.saveContent = function () { + if (this.viewHTML) + { + return; // no need + } + if (this.original) { + var content, newContent; + + content = this.getContent(); + + if (this.options.rmUnwantedBr) { + content = content.replace(/$/, ""); + } + + if (this.options.replaceDivWithP) { + newContent = $("

        ").addClass("temp").append(content); + + newContent.children("div").each(function () { + var element = $(this), p = element.find("p"), i; + + if (0 === p.length) { + p = $("

        "); + + if (this.attributes.length > 0) { + for (i = 0; i < this.attributes.length; i += 1) { + p.attr(this.attributes[i].name, element.attr(this.attributes[i].name)); + } + } + + p.append(element.html()); + + element.replaceWith(p); + } + }); + + content = newContent.html(); + } + + $(this.original).val(content); + + if (this.options.events && this.options.events.save) { + this.options.events.save.call(this); + } + } + + return this; + }; + + this.setContent = function (newContent) { + this.editorDoc.body.innerHTML = newContent; + this.saveContent(); + + return this; + }; + + this.triggerControl = function (name, control) { + var cmd = control.command || name, //command directly for designMode=on iframe (this.editorDoc) + args = control["arguments"] || []; + + if (control.exec) { + control.exec.apply(this); //custom exec function in control, allows DOM changing + } else { + this.ui.focus(); + this.ui.withoutCss(); //disable style="" attr inserting in mozzila's designMode + // when click , or got "Access to XPConnect service denied" code: "1011" + // in Firefox untrusted JavaScript is not allowed to access the clipboard + try { + this.editorDoc.execCommand(cmd, false, args); + } catch (e) { + console.error(e); + } + } + + if (this.options.autoSave) { + this.autoSaveFunction(); + } + }; + + this.triggerControlCallback = function (name) { + $(window).trigger("trigger-" + name + ".wysiwyg", [this]); + }; + + this.ui.withoutCss = function () { + var self = this.self; + + if ($.browser.mozilla) { + try { + self.editorDoc.execCommand("styleWithCSS", false, false); + } catch (e) { + try { + self.editorDoc.execCommand("useCSS", false, true); + } catch (e2) { + } + } + } + + return self; + }; + + this.wrapInitialContent = function () { + var content = this.initialContent, + found = content.match(/<\/?p>/gi); + + if (!found) { + return "

        " + content + "

        "; + } else { + // :TODO: checking/replacing + } + + return content; + }; + } + + /* + * Wysiwyg namespace: public properties and methods + */ + $.wysiwyg = { + messages: { + noObject: "Something goes wrong, check object" + }, + + /** + * Custom control support by Alec Gorge ( http://github.com/alecgorge ) + */ + addControl: function (object, name, settings) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"), + customControl = {}, + toolbar; + + if (!oWysiwyg) { + return this; + } + + customControl[name] = $.extend(true, {visible: true, custom: true}, settings); + $.extend(true, oWysiwyg.options.controls, customControl); + + // render new toolbar + toolbar = $(oWysiwyg.options.toolbarHtml); + oWysiwyg.ui.toolbar.replaceWith(toolbar); + oWysiwyg.ui.toolbar = toolbar; + oWysiwyg.ui.appendControls(); + }); + }, + + clear: function (object) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"); + + if (!oWysiwyg) { + return this; + } + + oWysiwyg.setContent(""); + }); + }, + + console: console, // let our console be available for extensions + + destroy: function (object) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"); + + if (!oWysiwyg) { + return this; + } + + oWysiwyg.destroy(); + }); + }, + + "document": function (object) { + // no chains because of return + var oWysiwyg = object.data("wysiwyg"); + + if (!oWysiwyg) { + return undefined; + } + + return $(oWysiwyg.editorDoc); + }, + + getContent: function (object) { + // no chains because of return + var oWysiwyg = object.data("wysiwyg"); + + if (!oWysiwyg) { + return undefined; + } + + return oWysiwyg.getContent(); + }, + + init: function (object, options) { + return object.each(function () { + var opts = $.extend(true, {}, options), + obj; + + // :4fun: + // remove this textarea validation and change line in this.saveContent function + // $(this.original).val(content); to $(this.original).html(content); + // now you can make WYSIWYG editor on h1, p, and many more tags + if (("textarea" !== this.nodeName.toLowerCase()) || $(this).data("wysiwyg")) { + return; + } + + obj = new Wysiwyg(); + obj.init(this, opts); + $.data(this, "wysiwyg", obj); + + $(obj.editorDoc).trigger("afterInit.wysiwyg"); + }); + }, + + insertHtml: function (object, szHTML) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"); + + if (!oWysiwyg) { + return this; + } + + oWysiwyg.insertHtml(szHTML); + }); + }, + + plugin: { + listeners: {}, + + bind: function (Wysiwyg) { + var self = this; + + $.each(this.listeners, function (action, handlers) { + var i, plugin; + + for (i = 0; i < handlers.length; i += 1) { + plugin = self.parseName(handlers[i]); + + $(Wysiwyg.editorDoc).bind(action + ".wysiwyg", {plugin: plugin}, function (event) { + $.wysiwyg[event.data.plugin.name][event.data.plugin.method].apply($.wysiwyg[event.data.plugin.name], [Wysiwyg]); + }); + } + }); + }, + + exists: function (name) { + var plugin; + + if ("string" !== typeof (name)) { + return false; + } + + plugin = this.parseName(name); + + if (!$.wysiwyg[plugin.name] || !$.wysiwyg[plugin.name][plugin.method]) { + return false; + } + + return true; + }, + + listen: function (action, handler) { + var plugin; + + plugin = this.parseName(handler); + + if (!$.wysiwyg[plugin.name] || !$.wysiwyg[plugin.name][plugin.method]) { + return false; + } + + if (!this.listeners[action]) { + this.listeners[action] = []; + } + + this.listeners[action].push(handler); + + return true; + }, + + parseName: function (name) { + var elements; + + if ("string" !== typeof (name)) { + return false; + } + + elements = name.split("."); + + if (2 > elements.length) { + return false; + } + + return {name: elements[0], method: elements[1]}; + }, + + register: function (data) { + if (!data.name) { + console.error("Plugin name missing"); + } + + $.each($.wysiwyg, function (pluginName) { + if (pluginName === data.name) { + console.error("Plugin with name '" + data.name + "' was already registered"); + } + }); + + $.wysiwyg[data.name] = data; + + return true; + } + }, + + removeFormat: function (object) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"); + + if (!oWysiwyg) { + return this; + } + + oWysiwyg.removeFormat(); + }); + }, + + save: function (object) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"); + + if (!oWysiwyg) { + return this; + } + + oWysiwyg.saveContent(); + }); + }, + + selectAll: function (object) { + var oWysiwyg = object.data("wysiwyg"), oBody, oRange, selection; + + if (!oWysiwyg) { + return this; + } + + oBody = oWysiwyg.editorDoc.body; + if (window.getSelection) { + selection = oWysiwyg.getInternalSelection(); + selection.selectAllChildren(oBody); + } else { + oRange = oBody.createTextRange(); + oRange.moveToElementText(oBody); + oRange.select(); + } + }, + + setContent: function (object, newContent) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"); + + if (!oWysiwyg) { + return this; + } + + oWysiwyg.setContent(newContent); + }); + }, + + triggerControl: function (object, controlName) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"); + + if (!oWysiwyg) { + return this; + } + + if (!oWysiwyg.controls[controlName]) { + console.error("Control '" + controlName + "' not exists"); + } + + oWysiwyg.triggerControl.apply(oWysiwyg, [controlName, oWysiwyg.controls[controlName]]); + }); + }, + + support: { + prop: supportsProp + }, + + utils: { + extraSafeEntities: [["<", ">", "'", '"', " "], [32]], + + encodeEntities: function (str) { + var self = this, aStr, aRet = []; + + if (this.extraSafeEntities[1].length === 0) { + $.each(this.extraSafeEntities[0], function (i, ch) { + self.extraSafeEntities[1].push(ch.charCodeAt(0)); + }); + } + aStr = str.split(""); + $.each(aStr, function (i) { + var iC = aStr[i].charCodeAt(0); + if ($.inArray(iC, self.extraSafeEntities[1]) && (iC < 65 || iC > 127 || (iC > 90 && iC < 97))) { + aRet.push('&#' + iC + ';'); + } else { + aRet.push(aStr[i]); + } + }); + + return aRet.join(''); + } + } + }; + + /** + * Unifies dialog methods to allow custom implementations + * + * Events: + * * afterOpen + * * beforeShow + * * afterShow + * * beforeHide + * * afterHide + * * beforeClose + * * afterClose + * + * Example: + * var dialog = new ($.wysiwyg.dialog)($('#idToTextArea').data('wysiwyg'), {"title": "Test", "content": "form data, etc."}); + * + * dialog.bind("afterOpen", function () { alert('you should see a dialog behind this one!'); }); + * + * dialog.open(); + * + * + */ + $.wysiwyg.dialog = function (jWysiwyg, opts) { + + var theme = (jWysiwyg && jWysiwyg.options && jWysiwyg.options.dialog) ? jWysiwyg.options.dialog : (opts.theme ? opts.theme : "default"), + obj = new $.wysiwyg.dialog.createDialog(theme), + that = this, + $that = $(that); + + this.options = { + "modal": true, + "draggable": true, + "title": "Title", + "content": "Content", + "width": "auto", + "height": "auto", + "zIndex": 2000, + "open": false, + "close": false + }; + + this.isOpen = false; + + $.extend(this.options, opts); + + this.object = obj; + + // Opens a dialog with the specified content + this.open = function () { + this.isOpen = true; + + obj.init.apply(that, []); + var $dialog = obj.show.apply(that, []); + + $that.trigger("afterOpen", [$dialog]); + + }; + + this.show = function () { + this.isOpen = true; + + $that.trigger("beforeShow"); + + var $dialog = obj.show.apply(that, []); + + $that.trigger("afterShow"); + }; + + this.hide = function () { + this.isOpen = false; + + $that.trigger("beforeHide"); + + var $dialog = obj.hide.apply(that, []); + + $that.trigger("afterHide", [$dialog]); + }; + + // Closes the dialog window. + this.close = function () { + this.isOpen = false; + + var $dialog = obj.hide.apply(that, []); + + $that.trigger("beforeClose", [$dialog]); + + obj.destroy.apply(that, []); + + $that.trigger("afterClose", [$dialog]); + + }; + + if (this.options.open) { + $that.bind("afterOpen", this.options.open); + } + if (this.options.close) { + $that.bind("afterClose", this.options.close); + } + + return this; + }; + + // "Static" Dialog methods. + $.extend(true, $.wysiwyg.dialog, { + _themes : {}, // sample {"Theme Name": object} + _theme : "", // the current theme + + register : function(name, obj) { + $.wysiwyg.dialog._themes[name] = obj; + }, + + deregister : function (name) { + delete $.wysiwyg.dialog._themes[name]; + }, + + createDialog : function (name) { + return new ($.wysiwyg.dialog._themes[name]); + }, + + getDimensions : function () { + var width = document.body.scrollWidth, + height = document.body.scrollHeight; + + if ($.browser.opera) { + height = Math.max( + $(document).height(), + $(window).height(), + document.documentElement.clientHeight); + } + + return [width, height]; + } + }); + + $(function () { // need access to jQuery UI stuff. + if (jQuery.ui) { + $.wysiwyg.dialog.register("jqueryui", function () { + var that = this; + + this._$dialog = null; + + this.init = function() { + var abstractDialog = this, + content = this.options.content; + + if (typeof content === 'object') { + if (typeof content.html === 'function') { + content = content.html(); + } else if(typeof content.toString === 'function') { + content = content.toString(); + } + } + + that._$dialog = $('
        ').attr('title', this.options.title).html(content); + + var dialogHeight = this.options.height == 'auto' ? 300 : this.options.height, + dialogWidth = this.options.width == 'auto' ? 450 : this.options.width; + + // console.log(that._$dialog); + + that._$dialog.dialog({ + modal: this.options.modal, + draggable: this.options.draggable, + height: dialogHeight, + width: dialogWidth + }); + + return that._$dialog; + }; + + this.show = function () { + that._$dialog.dialog("open"); + return that._$dialog; + }; + + this.hide = function () { + that._$dialog.dialog("close"); + return that._$dialog; + }; + + this.destroy = function() { + that._$dialog.dialog("destroy"); + return that._$dialog; + }; + }); + } + + $.wysiwyg.dialog.register("default", function () { + var that = this; + + this._$dialog = null; + + this.init = function() { + var abstractDialog = this, + content = this.options.content; + + if (typeof content === 'object') { + if(typeof content.html === 'function') { + content = content.html(); + } + else if(typeof content.toString === 'function') { + content = content.toString(); + } + } + + that._$dialog = $('
        ').css({"z-index": this.options.zIndex}); + + var $topbar = $('
        '+this.options.title+'
        '); + var $link = $('X'); + + $link.click(function () { + abstractDialog.close(); // this is important it makes sure that is close from the abstract $.wysiwyg.dialog instace, not just locally + }); + + $topbar.find('.wysiwyg-dialog-close-wrapper').prepend($link); + + var $dcontent = $('
        '+content+'
        '); + + that._$dialog.append($topbar).append($dcontent); + + // Set dialog's height & width, and position it correctly: + var dialogHeight = this.options.height == 'auto' ? 300 : this.options.height, + dialogWidth = this.options.width == 'auto' ? 450 : this.options.width; + that._$dialog.hide().css({ + "width": dialogWidth, + "height": dialogHeight, + "left": (($(window).width() - dialogWidth) / 2), + "top": (($(window).height() - dialogHeight) / 3) + }); + + $("body").append(that._$dialog); + + return that._$dialog; + }; + + this.show = function () { + + // Modal feature: + if (this.options.modal) { + var dimensions = $.wysiwyg.dialog.getDimensions(), + wrapper = $('
        ') + .css({"width": dimensions[0], "height": dimensions[1]}); + that._$dialog.wrap(wrapper); + } + + // Draggable feature: + if (this.options.draggable) { + + var mouseDown = false; + + that._$dialog.find("div.wysiwyg-dialog-topbar").bind("mousedown", function (e) { + e.preventDefault(); + $(this).css({ "cursor": "move" }); + var $topbar = $(this), + _dialog = $(this).parents(".wysiwyg-dialog"), + offsetX = (e.pageX - parseInt(_dialog.css("left"), 10)), + offsetY = (e.pageY - parseInt(_dialog.css("top"), 10)); + mouseDown = true; + $(this).css({ "cursor": "move" }); + + $(document).bind("mousemove", function (e) { + e.preventDefault(); + if (mouseDown) { + _dialog.css({ + "top": (e.pageY - offsetY), + "left": (e.pageX - offsetX) + }); + } + }).bind("mouseup", function (e) { + e.preventDefault(); + mouseDown = false; + $topbar.css({ "cursor": "auto" }); + $(document).unbind("mousemove").unbind("mouseup"); + }); + + }); + } + + that._$dialog.show(); + return that._$dialog; + + }; + + this.hide = function () { + that._$dialog.hide(); + return that._$dialog; + }; + + this.destroy = function() { + + // Modal feature: + if (this.options.modal) { + that._$dialog.unwrap(); + } + + // Draggable feature: + if (this.options.draggable) { + that._$dialog.find("div.wysiwyg-dialog-topbar").unbind("mousedown"); + } + + that._$dialog.remove(); + return that._$dialog; + }; + }); + }); + // end Dialog + + $.fn.wysiwyg = function (method) { + var args = arguments, plugin; + + if ("undefined" !== typeof $.wysiwyg[method]) { + // set argument object to undefined + args = Array.prototype.concat.call([args[0]], [this], Array.prototype.slice.call(args, 1)); + return $.wysiwyg[method].apply($.wysiwyg, Array.prototype.slice.call(args, 1)); + } else if ("object" === typeof method || !method) { + Array.prototype.unshift.call(args, this); + return $.wysiwyg.init.apply($.wysiwyg, args); + } else if ($.wysiwyg.plugin.exists(method)) { + plugin = $.wysiwyg.plugin.parseName(method); + args = Array.prototype.concat.call([args[0]], [this], Array.prototype.slice.call(args, 1)); + return $.wysiwyg[plugin.name][plugin.method].apply($.wysiwyg[plugin.name], Array.prototype.slice.call(args, 1)); + } else { + console.error("Method '" + method + "' does not exist on jQuery.wysiwyg.\nTry to include some extra controls or plugins"); + } + }; + + $.fn.getWysiwyg = function () { + return this.data("wysiwyg"); + }; +})(jQuery); diff --git a/referencia/template/js/plugins/wysiwyg/wysiwyg.colorpicker.js b/referencia/template/js/plugins/wysiwyg/wysiwyg.colorpicker.js new file mode 100644 index 0000000..c2dd7e9 --- /dev/null +++ b/referencia/template/js/plugins/wysiwyg/wysiwyg.colorpicker.js @@ -0,0 +1,250 @@ +/** + * Controls: Colorpicker plugin + * + * Depends on jWYSIWYG, (farbtastic || other colorpicker plugins) + */ +(function ($) { + "use strict"; + + if (undefined === $.wysiwyg) { + throw "wysiwyg.colorpicker.js depends on $.wysiwyg"; + } + + if (!$.wysiwyg.controls) { + $.wysiwyg.controls = {}; + } + + /* + * Wysiwyg namespace: public properties and methods + */ + $.wysiwyg.controls.colorpicker = { + modalOpen: false, + color: { + back: { + prev: "#ffffff", + palette: [] + }, + fore: { + prev: "#123456", + palette: [] + } + }, + + addColorToPalette: function (type, color) { + if (-1 === $.inArray(color, this.color[type].palette)) { + this.color[type].palette.push(color); + } else { + this.color[type].palette.sort(function (a, b) { + if (a === color) { + return 1; + } + + return 0; + }); + } + }, + + init: function (Wysiwyg) { + if ($.wysiwyg.controls.colorpicker.modalOpen === true) { + return false; + } else { + $.wysiwyg.controls.colorpicker.modalOpen = true; + } + var self = this, elements, dialog, colorpickerHtml, dialogReplacements, key, translation; + + dialogReplacements = { + legend: "Colorpicker", + color: "Color", + submit: "Apply", + reset: "Cancel" + }; + + colorpickerHtml = '
        {legend}' + + '
          ' + + '' + + '
          ' + + ' ' + + '
          '; + + for (key in dialogReplacements) { + if ($.wysiwyg.i18n) { + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs.colorpicker"); + + if (translation === dialogReplacements[key]) { // if not translated search in dialogs + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs"); + } + + dialogReplacements[key] = translation; + } + + colorpickerHtml = colorpickerHtml.replace("{" + key + "}", dialogReplacements[key]); + } + + if ($.modal) { + elements = $(colorpickerHtml); + + if ($.farbtastic) { + this.renderPalette(elements, "fore"); + elements.find(".wheel").farbtastic(elements.find("input:text")); + } + + $.modal(elements.html(), { + maxWidth: Wysiwyg.defaults.formWidth, + maxHeight: Wysiwyg.defaults.formHeight, + overlayClose: true, + + onShow: function (dialog) { + $("input:submit", dialog.data).click(function (e) { + var color = $('input[name="color"]', dialog.data).val(); + self.color.fore.prev = color; + self.addColorToPalette("fore", color); + + if ($.browser.msie) { + Wysiwyg.ui.returnRange(); + } + + Wysiwyg.editorDoc.execCommand('ForeColor', false, color); + $.modal.close(); + return false; + }); + $("input:reset", dialog.data).click(function (e) { + if ($.browser.msie) { + Wysiwyg.ui.returnRange(); + } + + $.modal.close(); + return false; + }); + $("fieldset", dialog.data).click(function (e) { + e.stopPropagation(); + }); + }, + + onClose: function (dialog) { + $.wysiwyg.controls.colorpicker.modalOpen = false; + $.modal.close(); + } + }); + } else if ($.fn.dialog) { + elements = $(colorpickerHtml); + + if ($.farbtastic) { + this.renderPalette(elements, "fore"); + elements.find(".wheel").farbtastic(elements.find("input:text")); + } + + dialog = elements.appendTo("body"); + dialog.dialog({ + modal: true, + + open: function (event, ui) { + $("input:submit", elements).click(function (e) { + var color = $('input[name="color"]', dialog).val(); + self.color.fore.prev = color; + self.addColorToPalette("fore", color); + + if ($.browser.msie) { + Wysiwyg.ui.returnRange(); + } + + Wysiwyg.editorDoc.execCommand('ForeColor', false, color); + $(dialog).dialog("close"); + return false; + }); + $("input:reset", elements).click(function (e) { + if ($.browser.msie) { + Wysiwyg.ui.returnRange(); + } + + $(dialog).dialog("close"); + return false; + }); + $('fieldset', elements).click(function (e) { + e.stopPropagation(); + }); + }, + + close: function (event, ui) { + $.wysiwyg.controls.colorpicker.modalOpen = false; + dialog.dialog("destroy"); + dialog.remove(); + } + }); + } else { + if ($.farbtastic) { + elements = $("
          ") + .css({"position": "fixed", + "z-index": 2000, + "left": "50%", "top": "50%", "background": "rgb(0, 0, 0)", + "margin-top": -1 * Math.round(Wysiwyg.defaults.formHeight / 2), + "margin-left": -1 * Math.round(Wysiwyg.defaults.formWidth / 2)}) + .html(colorpickerHtml); + this.renderPalette(elements, "fore"); + elements.find("input[name=color]").val(self.color.fore.prev); + elements.find(".wheel").farbtastic(elements.find("input:text")); + $("input:submit", elements).click(function (event) { + var color = $('input[name="color"]', elements).val(); + self.color.fore.prev = color; + self.addColorToPalette("fore", color); + + if ($.browser.msie) { + Wysiwyg.ui.returnRange(); + } + + Wysiwyg.editorDoc.execCommand('ForeColor', false, color); + + $(elements).remove(); + $.wysiwyg.controls.colorpicker.modalOpen = false; + return false; + }); + $("input:reset", elements).click(function (event) { + + if ($.browser.msie) { + Wysiwyg.ui.returnRange(); + } + + $(elements).remove(); + $.wysiwyg.controls.colorpicker.modalOpen = false; + return false; + }); + $("body").append(elements); + elements.click(function (e) { + e.stopPropagation(); + }); + } + } + }, + + renderPalette: function (jqObj, type) { + var palette = jqObj.find(".palette"), + bind = function () { + var color = $(this).text(); + jqObj.find("input[name=color]").val(color); + // farbtastic binds on keyup + if ($.farbtastic) { + jqObj.find("input[name=color]").trigger("keyup"); + } + }, + colorExample, + colorSelect, + i; + + for (i = this.color[type].palette.length - 1; i > -1; i -= 1) { + colorExample = $("
          ").css({ + "float": "left", + "width": "16px", + "height": "16px", + "margin": "0px 5px 0px 0px", + "background-color": this.color[type].palette[i] + }); + + colorSelect = $("
        • " + this.color[type].palette[i] + "
        • ") + .css({"float": "left", "list-style": "none"}) + .append(colorExample) + .bind("click.wysiwyg", bind); + + palette.append(colorSelect).css({"margin": "0px", "padding": "0px"}); + } + } + }; +})(jQuery); \ No newline at end of file diff --git a/referencia/template/js/plugins/wysiwyg/wysiwyg.cssWrap.js b/referencia/template/js/plugins/wysiwyg/wysiwyg.cssWrap.js new file mode 100644 index 0000000..0215f02 --- /dev/null +++ b/referencia/template/js/plugins/wysiwyg/wysiwyg.cssWrap.js @@ -0,0 +1,134 @@ +/** + * Controls: Element CSS Wrapper plugin + * + * Depends on jWYSIWYG + * + * By Yotam Bar-On (https://github.com/tudmotu) + */ +(function ($) { + if (undefined === $.wysiwyg) { + throw "wysiwyg.cssWrap.js depends on $.wysiwyg"; + } + /* For core enhancements #143 + $.wysiwyg.ui.addControl("cssWrap", { + visible : false, + groupIndex: 6, + tooltip: "CSS Wrapper", + exec: function () { + $.wysiwyg.controls.cssWrap.init(this); + } + } + */ + if (!$.wysiwyg.controls) { + $.wysiwyg.controls = {}; + } + + /* + * Wysiwyg namespace: public properties and methods + */ + $.wysiwyg.controls.cssWrap = { + init: function (Wysiwyg) { + var self = this, formWrapHtml, key, translation, + dialogReplacements = { + legend : "Wrap Element", + wrapperType : "Wrapper Type", + ID : "ID", + "class" : "Class", + wrap : "Wrap", + unwrap: "Unwrap", + cancel : "Cancel" + }; + + formWrapHtml = '
          {legend}' + + '
          ' + + '
          ' + + '
          ' + + '
          ' + + '' + + '
          '; + + for (key in dialogReplacements) { + if ($.wysiwyg.i18n) { + translation = $.wysiwyg.i18n.t(dialogReplacements[key]); + if (translation === dialogReplacements[key]) { // if not translated search in dialogs + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs"); + } + dialogReplacements[key] = translation; + } + formWrapHtml = formWrapHtml.replace("{" + key + "}", dialogReplacements[key]); + } + if (!$(".wysiwyg-dialog-wrapper").length) { + $(formWrapHtml).appendTo("body"); + $("form.wysiwyg").dialog({ + modal: true, + open: function (ev, ui) { + var $this = $(this), range = Wysiwyg.getInternalRange(), common, $nodeName; + // We make sure that there is some selection: + if (range) { + if ($.browser.msie) { + Wysiwyg.ui.focus(); + } + common = $(range.commonAncestorContainer); + } else { + alert("You must select some elements before you can wrap them."); + $this.dialog("close"); + return 0; + } + $nodeName = range.commonAncestorContainer.nodeName.toLowerCase(); + // If the selection is already a .wysiwygCssWrapper, then we want to change it and not double-wrap it. + if (common.parent(".wysiwygCssWrapper").length) { + alert(common.parent(".wysiwygCssWrapper").get(0).nodeName.toLowerCase()); + $this.find("select[name=type]").val(common.parent(".wysiwygCssWrapper").get(0).nodeName.toLowerCase()); + $this.find("select[name=type]").attr("disabled", "disabled"); + $this.find("input[name=id]").val(common.parent(".wysiwygCssWrapper").attr("id")); + $this.find("input[name=class]").val(common.parent(".wysiwygCssWrapper").attr("class").replace('wysiwygCssWrapper ', '')); + // Add the "unwrap" button: + $("form.wysiwyg").find(".cssWrap-unwrap").show(); + $("form.wysiwyg").find(".cssWrap-unwrap").click(function (e) { + e.preventDefault(); + if ($nodeName !== "body") { + common.unwrap(); + } + $this.dialog("close"); + return 1; + }); + } + // Submit button. + $("form.wysiwyg").find(".cssWrap-submit").click(function (e) { + e.preventDefault(); + var $wrapper = $("form.wysiwyg").find("select[name=type]").val(), + $id = $("form.wysiwyg").find("input[name=id]").val(), + $class = $("form.wysiwyg").find("input[name=class]").val(); + + if ($nodeName !== "body") { + // If the selection is already a .wysiwygCssWrapper, then we want to change it and not double-wrap it. + if (common.parent(".wysiwygCssWrapper").length) { + common.parent(".wysiwygCssWrapper").attr("id", $class); + common.parent(".wysiwygCssWrapper").attr("class", $class); + } else { + common.wrap("<" + $wrapper + " id=\"" + $id + "\" class=\"" + "wysiwygCssWrapper " + $class + "\"/>"); + } + } else { + // Currently no implemntation for if $nodeName == 'body'. + } + $this.dialog("close"); + }); + // Cancel button. + $("form.wysiwyg").find(".cssWrap-cancel").click(function (e) { + e.preventDefault(); + $this.dialog("close"); + return 1; + }); + }, + close: function () { + $(this).dialog("destroy"); + $(this).remove(); + } + }); + Wysiwyg.saveContent(); + } + $(Wysiwyg.editorDoc).trigger("editorRefresh.wysiwyg"); + return 1; + } + }; +})(jQuery); diff --git a/referencia/template/js/plugins/wysiwyg/wysiwyg.image.js b/referencia/template/js/plugins/wysiwyg/wysiwyg.image.js new file mode 100644 index 0000000..d940f93 --- /dev/null +++ b/referencia/template/js/plugins/wysiwyg/wysiwyg.image.js @@ -0,0 +1,285 @@ +/** + * Controls: Image plugin + * + * Depends on jWYSIWYG + */ +(function ($) { + "use strict"; + + if (undefined === $.wysiwyg) { + throw "wysiwyg.image.js depends on $.wysiwyg"; + } + + if (!$.wysiwyg.controls) { + $.wysiwyg.controls = {}; + } + + /* + * Wysiwyg namespace: public properties and methods + */ + $.wysiwyg.controls.image = { + groupIndex: 6, + visible: true, + exec: function () { + $.wysiwyg.controls.image.init(this); + }, + tags: ["img"], + tooltip: "Insert image", + init: function (Wysiwyg) { + var self = this, elements, adialog, dialog, formImageHtml, regexp, dialogReplacements, key, translation, + img = { + alt: "", + self: Wysiwyg.dom ? Wysiwyg.dom.getElement("img") : null, // link to element node + src: "http://", + title: "" + }; + + dialogReplacements = { + legend : "Insert Image", + preview : "Preview", + url : "URL", + title : "Title", + description : "Description", + width : "Width", + height : "Height", + original : "Original W x H", + "float" : "Float", + floatNone : "None", + floatLeft : "Left", + floatRight : "Right", + submit : "Insert Image", + reset : "Cancel", + fileManagerIcon : "Select file from server" + }; + + formImageHtml = '
          ' + + '
          {preview}:
          {preview}
          ' + + '
          '; + + if ($.wysiwyg.fileManager && $.wysiwyg.fileManager.ready) { + // Add the File Manager icon: + formImageHtml += '
          '; + } + + formImageHtml += '
          ' + + '
          ' + + '
          ' + + '
          x
          ' + + '
          x ' + + '
          ' + + '
          ' + + '
          ' + + '
          '; + + for (key in dialogReplacements) { + if ($.wysiwyg.i18n) { + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs.image"); + + if (translation === dialogReplacements[key]) { // if not translated search in dialogs + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs"); + } + + dialogReplacements[key] = translation; + } + + regexp = new RegExp("{" + key + "}", "g"); + formImageHtml = formImageHtml.replace(regexp, dialogReplacements[key]); + } + + if (img.self) { + img.src = img.self.src ? img.self.src : ""; + img.alt = img.self.alt ? img.self.alt : ""; + img.title = img.self.title ? img.self.title : ""; + img.width = img.self.width ? img.self.width : ""; + img.height = img.self.height ? img.self.height : ""; + img.styleFloat = $(img.self).css("float"); + } + + adialog = new $.wysiwyg.dialog(Wysiwyg, { + "title" : dialogReplacements.legend, + "content" : formImageHtml + }); + + $(adialog).bind("afterOpen", function (e, dialog) { + dialog.find("form#wysiwyg-addImage").submit(function (e) { + e.preventDefault(); + self.processInsert(dialog.container, Wysiwyg, img); + + adialog.close(); + return false; + }); + + // File Manager (select file): + if ($.wysiwyg.fileManager) { + $("div.wysiwyg-fileManager").bind("click", function () { + $.wysiwyg.fileManager.init(function (selected) { + dialog.find("input[name=src]").val(selected); + dialog.find("input[name=src]").trigger("change"); + }); + }); + } + + $("input:reset", dialog).click(function (e) { + adialog.close(); + + return false; + }); + + $("fieldset", dialog).click(function (e) { + e.stopPropagation(); + }); + + self.makeForm(dialog, img); + }); + + adialog.open(); + + $(Wysiwyg.editorDoc).trigger("editorRefresh.wysiwyg"); + }, + + processInsert: function (context, Wysiwyg, img) { + var image, + url = $('input[name="src"]', context).val(), + title = $('input[name="imgtitle"]', context).val(), + description = $('input[name="description"]', context).val(), + width = $('input[name="width"]', context).val(), + height = $('input[name="height"]', context).val(), + styleFloat = $('select[name="float"]', context).val(), + styles = [], + style = "", + found, + baseUrl; + + if (Wysiwyg.options.controlImage && Wysiwyg.options.controlImage.forceRelativeUrls) { + baseUrl = window.location.protocol + "//" + window.location.hostname + + (window.location.port ? ":" + window.location.port : ""); + if (0 === url.indexOf(baseUrl)) { + url = url.substr(baseUrl.length); + } + } + + if (img.self) { + // to preserve all img attributes + $(img.self).attr("src", url) + .attr("title", title) + .attr("alt", description) + .css("float", styleFloat); + + if (width.toString().match(/^[0-9]+(px|%)?$/)) { + $(img.self).css("width", width); + } else { + $(img.self).css("width", ""); + } + + if (height.toString().match(/^[0-9]+(px|%)?$/)) { + $(img.self).css("height", height); + } else { + $(img.self).css("height", ""); + } + + Wysiwyg.saveContent(); + } else { + found = width.toString().match(/^[0-9]+(px|%)?$/); + if (found) { + if (found[1]) { + styles.push("width: " + width + ";"); + } else { + styles.push("width: " + width + "px;"); + } + } + + found = height.toString().match(/^[0-9]+(px|%)?$/); + if (found) { + if (found[1]) { + styles.push("height: " + height + ";"); + } else { + styles.push("height: " + height + "px;"); + } + } + + if (styleFloat.length > 0) { + styles.push("float: " + styleFloat + ";"); + } + + if (styles.length > 0) { + style = ' style="' + styles.join(" ") + '"'; + } + + image = "" + description + ""; + Wysiwyg.insertHtml(image); + } + }, + + makeForm: function (form, img) { + form.find("input[name=src]").val(img.src); + form.find("input[name=imgtitle]").val(img.title); + form.find("input[name=description]").val(img.alt); + form.find('input[name="width"]').val(img.width); + form.find('input[name="height"]').val(img.height); + form.find('select[name="float"]').val(img.styleFloat); + form.find('img').attr("src", img.src); + + form.find('img').bind("load", function () { + if (form.find('img').get(0).naturalWidth) { + form.find('input[name="naturalWidth"]').val(form.find('img').get(0).naturalWidth); + form.find('input[name="naturalHeight"]').val(form.find('img').get(0).naturalHeight); + } else if (form.find('img').attr("naturalWidth")) { + form.find('input[name="naturalWidth"]').val(form.find('img').attr("naturalWidth")); + form.find('input[name="naturalHeight"]').val(form.find('img').attr("naturalHeight")); + } + }); + + form.find("input[name=src]").bind("change", function () { + form.find('img').attr("src", this.value); + }); + + return form; + } + }; + + $.wysiwyg.insertImage = function (object, url, attributes) { + return object.each(function () { + var Wysiwyg = $(this).data("wysiwyg"), + image, + attribute; + + if (!Wysiwyg) { + return this; + } + + if (!url || url.length === 0) { + return this; + } + + if ($.browser.msie) { + Wysiwyg.ui.focus(); + } + + if (attributes) { + Wysiwyg.editorDoc.execCommand("insertImage", false, "#jwysiwyg#"); + image = Wysiwyg.getElementByAttributeValue("img", "src", "#jwysiwyg#"); + + if (image) { + image.src = url; + + for (attribute in attributes) { + if (attributes.hasOwnProperty(attribute)) { + image.setAttribute(attribute, attributes[attribute]); + } + } + } + } else { + Wysiwyg.editorDoc.execCommand("insertImage", false, url); + } + + Wysiwyg.saveContent(); + + $(Wysiwyg.editorDoc).trigger("editorRefresh.wysiwyg"); + + return this; + }); + }; +})(jQuery); diff --git a/referencia/template/js/plugins/wysiwyg/wysiwyg.link.js b/referencia/template/js/plugins/wysiwyg/wysiwyg.link.js new file mode 100644 index 0000000..be8a885 --- /dev/null +++ b/referencia/template/js/plugins/wysiwyg/wysiwyg.link.js @@ -0,0 +1,251 @@ +/** + * Controls: Link plugin + * + * Depends on jWYSIWYG + * + * By: Esteban Beltran (academo) + */ +(function ($) { + "use strict"; + + if (undefined === $.wysiwyg) { + throw "wysiwyg.link.js depends on $.wysiwyg"; + } + + if (!$.wysiwyg.controls) { + $.wysiwyg.controls = {}; + } + + /* + * Wysiwyg namespace: public properties and methods + */ + $.wysiwyg.controls.link = { + init: function (Wysiwyg) { + var self = this, elements, dialog, url, a, selection, + formLinkHtml, dialogReplacements, key, translation, regexp, + baseUrl, img; + + dialogReplacements = { + legend: "Insert Link", + url : "Link URL", + title : "Link Title", + target: "Link Target", + submit: "Insert Link", + reset: "Cancel" + }; + + formLinkHtml = '
          ' + + '

          ' + + '

          ' + + '

          ' + + '

          ' + + '

          '; + + for (key in dialogReplacements) { + if ($.wysiwyg.i18n) { + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs.link"); + + if (translation === dialogReplacements[key]) { // if not translated search in dialogs + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs"); + } + + dialogReplacements[key] = translation; + } + + regexp = new RegExp("{" + key + "}", "g"); + formLinkHtml = formLinkHtml.replace(regexp, dialogReplacements[key]); + } + + a = { + self: Wysiwyg.dom.getElement("a"), // link to element node + href: "http://", + title: "", + target: "" + }; + + if (a.self) { + a.href = a.self.href ? a.self.href : a.href; + a.title = a.self.title ? a.self.title : ""; + a.target = a.self.target ? a.self.target : ""; + } + + if ($.fn.dialog) { + elements = $(formLinkHtml); + elements.find("input[name=linkhref]").val(a.href); + elements.find("input[name=linktitle]").val(a.title); + elements.find("input[name=linktarget]").val(a.target); + + if ($.browser.msie) { + try { + dialog = elements.appendTo(Wysiwyg.editorDoc.body); + } catch (err) { + dialog = elements.appendTo("body"); + } + } else { + dialog = elements.appendTo("body"); + } + + dialog.dialog({ + modal: true, + title: 'Insert Link', + closeText: 'x', + open: function (ev, ui) { + $("input:submit", dialog).click(function (e) { + e.preventDefault(); + + var url = $('input[name="linkhref"]', dialog).val(), + title = $('input[name="linktitle"]', dialog).val(), + target = $('input[name="linktarget"]', dialog).val(), + baseUrl, + img; + + if (Wysiwyg.options.controlLink.forceRelativeUrls) { + baseUrl = window.location.protocol + "//" + window.location.hostname; + if (0 === url.indexOf(baseUrl)) { + url = url.substr(baseUrl.length); + } + } + + if (a.self) { + if ("string" === typeof (url)) { + if (url.length > 0) { + // to preserve all link attributes + $(a.self).attr("href", url).attr("title", title).attr("target", target); + } else { + $(a.self).replaceWith(a.self.innerHTML); + } + } + } else { + if ($.browser.msie) { + Wysiwyg.ui.returnRange(); + } + + //Do new link element + selection = Wysiwyg.getRangeText(); + img = Wysiwyg.dom.getElement("img"); + + if ((selection && selection.length > 0) || img) { + if ($.browser.msie) { + Wysiwyg.ui.focus(); + } + + if ("string" === typeof (url)) { + if (url.length > 0) { + Wysiwyg.editorDoc.execCommand("createLink", false, url); + } else { + Wysiwyg.editorDoc.execCommand("unlink", false, null); + } + } + + a.self = Wysiwyg.dom.getElement("a"); + + $(a.self).attr("href", url).attr("title", title); + + /** + * @url https://github.com/akzhan/jwysiwyg/issues/16 + */ + $(a.self).attr("target", target); + } else if (Wysiwyg.options.messages.nonSelection) { + window.alert(Wysiwyg.options.messages.nonSelection); + } + } + + Wysiwyg.saveContent(); + + $(dialog).dialog("close"); + }); + $("input:reset", dialog).click(function (e) { + e.preventDefault(); + $(dialog).dialog("close"); + }); + }, + close: function (ev, ui) { + dialog.dialog("destroy"); + dialog.remove(); + } + }); + } else { + if (a.self) { + url = window.prompt("URL", a.href); + + if (Wysiwyg.options.controlLink.forceRelativeUrls) { + baseUrl = window.location.protocol + "//" + window.location.hostname; + if (0 === url.indexOf(baseUrl)) { + url = url.substr(baseUrl.length); + } + } + + if ("string" === typeof (url)) { + if (url.length > 0) { + $(a.self).attr("href", url); + } else { + $(a.self).replaceWith(a.self.innerHTML); + } + } + } else { + //Do new link element + selection = Wysiwyg.getRangeText(); + img = Wysiwyg.dom.getElement("img"); + + if ((selection && selection.length > 0) || img) { + if ($.browser.msie) { + Wysiwyg.ui.focus(); + Wysiwyg.editorDoc.execCommand("createLink", true, null); + } else { + url = window.prompt(dialogReplacements.url, a.href); + + if (Wysiwyg.options.controlLink.forceRelativeUrls) { + baseUrl = window.location.protocol + "//" + window.location.hostname; + if (0 === url.indexOf(baseUrl)) { + url = url.substr(baseUrl.length); + } + } + + if ("string" === typeof (url)) { + if (url.length > 0) { + Wysiwyg.editorDoc.execCommand("createLink", false, url); + } else { + Wysiwyg.editorDoc.execCommand("unlink", false, null); + } + } + } + } else if (Wysiwyg.options.messages.nonSelection) { + window.alert(Wysiwyg.options.messages.nonSelection); + } + } + + Wysiwyg.saveContent(); + } + + $(Wysiwyg.editorDoc).trigger("editorRefresh.wysiwyg"); + } + }; + + $.wysiwyg.createLink = function (object, url) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"), + selection; + + if (!oWysiwyg) { + return this; + } + + if (!url || url.length === 0) { + return this; + } + + selection = oWysiwyg.getRangeText(); + + if (selection && selection.length > 0) { + if ($.browser.msie) { + oWysiwyg.ui.focus(); + } + oWysiwyg.editorDoc.execCommand("unlink", false, null); + oWysiwyg.editorDoc.execCommand("createLink", false, url); + } else if (oWysiwyg.options.messages.nonSelection) { + window.alert(oWysiwyg.options.messages.nonSelection); + } + return this; + }); + }; +})(jQuery); diff --git a/referencia/template/js/plugins/wysiwyg/wysiwyg.table.js b/referencia/template/js/plugins/wysiwyg/wysiwyg.table.js new file mode 100644 index 0000000..d8372de --- /dev/null +++ b/referencia/template/js/plugins/wysiwyg/wysiwyg.table.js @@ -0,0 +1,129 @@ +/** + * Controls: Table plugin + * + * Depends on jWYSIWYG + */ +(function ($) { + "use strict"; + + if (undefined === $.wysiwyg) { + throw "wysiwyg.table.js depends on $.wysiwyg"; + } + + if (!$.wysiwyg.controls) { + $.wysiwyg.controls = {}; + } + + var insertTable = function (colCount, rowCount, filler) { + if (isNaN(rowCount) || isNaN(colCount) || rowCount === null || colCount === null) { + return; + } + + var i, j, html = ['']; + + colCount = parseInt(colCount, 10); + rowCount = parseInt(rowCount, 10); + + if (filler === null) { + filler = " "; + } + filler = ""; + + for (i = rowCount; i > 0; i -= 1) { + html.push(""); + for (j = colCount; j > 0; j -= 1) { + html.push(filler); + } + html.push(""); + } + html.push("
          " + filler + "
          "); + + return this.insertHtml(html.join("")); + }; + + /* + * Wysiwyg namespace: public properties and methods + */ + $.wysiwyg.controls.table = function (Wysiwyg) { + var adialog, dialog, colCount, rowCount, formTableHtml, dialogReplacements, key, translation, regexp; + + dialogReplacements = { + legend: "Insert table", + cols : "Count of columns", + rows : "Count of rows", + submit: "Insert table", + reset: "Cancel" + }; + + formTableHtml = '
          ' + + '

          ' + + '

          ' + + '

          ' + + '

          '; + + for (key in dialogReplacements) { + if ($.wysiwyg.i18n) { + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs.table"); + + if (translation === dialogReplacements[key]) { // if not translated search in dialogs + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs"); + } + + dialogReplacements[key] = translation; + } + + regexp = new RegExp("{" + key + "}", "g"); + formTableHtml = formTableHtml.replace(regexp, dialogReplacements[key]); + } + + if (!Wysiwyg.insertTable) { + Wysiwyg.insertTable = insertTable; + } + + adialog = new $.wysiwyg.dialog(Wysiwyg, { + "title" : dialogReplacements.legend, + "content" : formTableHtml, + "open" : function (e, dialog) { + dialog.find("form#wysiwyg-tableInsert").submit(function (e) { + e.preventDefault(); + rowCount = dialog.find("input[name=rowCount]").val(); + colCount = dialog.find("input[name=colCount]").val(); + + Wysiwyg.insertTable(colCount, rowCount, Wysiwyg.defaults.tableFiller); + + adialog.close(); + return false; + }); + + dialog.find("input:reset").click(function (e) { + e.preventDefault(); + adialog.close(); + return false; + }); + } + }); + + adialog.open(); + + $(Wysiwyg.editorDoc).trigger("editorRefresh.wysiwyg"); + }; + + $.wysiwyg.insertTable = function (object, colCount, rowCount, filler) { + return object.each(function () { + var Wysiwyg = $(this).data("wysiwyg"); + + if (!Wysiwyg.insertTable) { + Wysiwyg.insertTable = insertTable; + } + + if (!Wysiwyg) { + return this; + } + + Wysiwyg.insertTable(colCount, rowCount, filler); + $(Wysiwyg.editorDoc).trigger("editorRefresh.wysiwyg"); + + return this; + }); + }; +})(jQuery); diff --git a/referencia/template/pages/info.html b/referencia/template/pages/info.html new file mode 100644 index 0000000..54216b7 --- /dev/null +++ b/referencia/template/pages/info.html @@ -0,0 +1,41 @@ +
          +

          Notifications

          + + +
          \ No newline at end of file diff --git a/referencia/template/pages/message.html b/referencia/template/pages/message.html new file mode 100644 index 0000000..5602c49 --- /dev/null +++ b/referencia/template/pages/message.html @@ -0,0 +1,21 @@ +
          +

          Messages

          + + +
          \ No newline at end of file diff --git a/referencia/template/php/connector.php b/referencia/template/php/connector.php new file mode 100644 index 0000000..b95dc4f --- /dev/null +++ b/referencia/template/php/connector.php @@ -0,0 +1,89 @@ + '../files', // path to root directory + 'URL' => 'http://localhost/files/', // root directory URL + 'rootAlias' => 'Home', // display this instead of root directory name + //'uploadAllow' => array('images/*'), + //'uploadDeny' => array('all'), + //'uploadOrder' => 'deny,allow' + // 'disabled' => array(), // list of not allowed commands + // 'dotFiles' => false, // display dot files + // 'dirSize' => true, // count total directories sizes + // 'fileMode' => 0666, // new files mode + // 'dirMode' => 0777, // new folders mode + // 'mimeDetect' => 'internal', // files mimetypes detection method (finfo, mime_content_type, linux (file -ib), bsd (file -Ib), internal (by extensions)) + // 'uploadAllow' => array(), // mimetypes which allowed to upload + // 'uploadDeny' => array(), // mimetypes which not allowed to upload + // 'uploadOrder' => 'deny,allow', // order to proccess uploadAllow and uploadAllow options + // 'imgLib' => 'mogrify', // image manipulation library (imagick, mogrify, gd) + // 'tmbDir' => '.tmb', // directory name for image thumbnails. Set to "" to avoid thumbnails generation + // 'tmbCleanProb' => 1, // how frequiently clean thumbnails dir (0 - never, 100 - every init request) + // 'tmbAtOnce' => 5, // number of thumbnails to generate per request + // 'tmbSize' => 48, // images thumbnails size (px) + // 'fileURL' => true, // display file URL in "get info" + // 'dateFormat' => 'j M Y H:i', // file modification date format + // 'logger' => null, // object logger + // 'defaults' => array( // default permisions + // 'read' => true, + // 'write' => true, + // 'rm' => true + // ), + // 'perms' => array(), // individual folders/files permisions + // 'debug' => true, // send debug to client + // 'archiveMimes' => array(), // allowed archive's mimetypes to create. Leave empty for all available types. + // 'archivers' => array() // info about archivers to use. See example below. Leave empty for auto detect + // 'archivers' => array( + // 'create' => array( + // 'application/x-gzip' => array( + // 'cmd' => 'tar', + // 'argc' => '-czf', + // 'ext' => 'tar.gz' + // ) + // ), + // 'extract' => array( + // 'application/x-gzip' => array( + // 'cmd' => 'tar', + // 'argc' => '-xzf', + // 'ext' => 'tar.gz' + // ), + // 'application/x-bzip2' => array( + // 'cmd' => 'tar', + // 'argc' => '-xjf', + // 'ext' => 'tar.bz' + // ) + // ) + // ) +); + +$fm = new elFinder($opts); +$fm->run(); + +?> diff --git a/referencia/template/php/elFinder.class.php b/referencia/template/php/elFinder.class.php new file mode 100644 index 0000000..badba75 --- /dev/null +++ b/referencia/template/php/elFinder.class.php @@ -0,0 +1,1995 @@ + '', // path to root directory + 'URL' => '', // root directory URL + 'rootAlias' => 'Home', // display this instead of root directory name + 'disabled' => array(), // list of not allowed commands + 'dotFiles' => false, // display dot files + 'dirSize' => true, // count total directories sizes + 'fileMode' => 0666, // new files mode + 'dirMode' => 0777, // new folders mode + 'mimeDetect' => 'auto', // files mimetypes detection method (finfo, mime_content_type, linux (file -ib), bsd (file -Ib), internal (by extensions)) + 'uploadAllow' => array(), // mimetypes which allowed to upload + 'uploadDeny' => array(), // mimetypes which not allowed to upload + 'uploadOrder' => 'deny,allow', // order to proccess uploadAllow and uploadAllow options + 'imgLib' => 'auto', // image manipulation library (imagick, mogrify, gd) + 'tmbDir' => '.tmb', // directory name for image thumbnails. Set to "" to avoid thumbnails generation + 'tmbCleanProb' => 1, // how frequiently clean thumbnails dir (0 - never, 200 - every init request) + 'tmbAtOnce' => 5, // number of thumbnails to generate per request + 'tmbSize' => 48, // images thumbnails size (px) + 'tmbCrop' => true, // crop thumbnails (true - crop, false - scale image to fit thumbnail size) + 'tmbBgColor' => '#ffffff', // thumbnail background color + 'fileURL' => true, // display file URL in "get info" + 'dateFormat' => 'j M Y H:i', // file modification date format + 'logger' => null, // object logger + 'aclObj' => null, // acl object (not implemented yet) + 'aclRole' => 'user', // role for acl + 'defaults' => array( // default permisions + 'read' => true, + 'write' => true, + 'rm' => true + ), + 'perms' => array(), // individual folders/files permisions + 'debug' => false, // send debug to client + 'archiveMimes' => array(), // allowed archive's mimetypes to create. Leave empty for all available types. + 'archivers' => array() // info about archivers to use. See example below. Leave empty for auto detect + // 'archivers' => array( + // 'create' => array( + // 'application/x-gzip' => array( + // 'cmd' => 'tar', + // 'argc' => '-czf', + // 'ext' => 'tar.gz' + // ) + // ), + // 'extract' => array( + // 'application/x-gzip' => array( + // 'cmd' => 'tar', + // 'argc' => '-xzf', + // 'ext' => 'tar.gz' + // ), + // 'application/x-bzip2' => array( + // 'cmd' => 'tar', + // 'argc' => '-xjf', + // 'ext' => 'tar.bz' + // ) + // ) + // ) + ); + + /** + * mapping $_GET['cmd]/$_POST['cmd] to class methods + * + * @var array + **/ + protected $_commands = array( + 'open' => '_open', + 'reload' => '_reload', + 'mkdir' => '_mkdir', + 'mkfile' => '_mkfile', + 'rename' => '_rename', + 'upload' => '_upload', + 'paste' => '_paste', + 'rm' => '_rm', + 'duplicate' => '_duplicate', + 'read' => '_fread', + 'edit' => '_edit', + 'archive' => '_archive', + 'extract' => '_extract', + 'resize' => '_resize', + 'tmb' => '_thumbnails', + 'ping' => '_ping' + ); + + /** + * List of commands to log + * + * @var string + **/ + public $_loggedCommands = array('mkdir', 'mkfile', 'rename', 'upload', 'paste', 'rm', 'duplicate', 'edit', 'resize'); + + /** + * Context to log command + * + * @var string + **/ + protected $_logContext = array(); + + /** + * extensions/mimetypes for _mimetypeDetect = 'internal' + * + * @var array + **/ + protected $_mimeTypes = array( + //applications + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'exe' => 'application/octet-stream', + 'doc' => 'application/vnd.ms-word', + 'xls' => 'application/vnd.ms-excel', + 'ppt' => 'application/vnd.ms-powerpoint', + 'pps' => 'application/vnd.ms-powerpoint', + 'pdf' => 'application/pdf', + 'xml' => 'application/xml', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'swf' => 'application/x-shockwave-flash', + // archives + 'gz' => 'application/x-gzip', + 'tgz' => 'application/x-gzip', + 'bz' => 'application/x-bzip2', + 'bz2' => 'application/x-bzip2', + 'tbz' => 'application/x-bzip2', + 'zip' => 'application/zip', + 'rar' => 'application/x-rar', + 'tar' => 'application/x-tar', + '7z' => 'application/x-7z-compressed', + // texts + 'txt' => 'text/plain', + 'php' => 'text/x-php', + 'html' => 'text/html', + 'htm' => 'text/html', + 'js' => 'text/javascript', + 'css' => 'text/css', + 'rtf' => 'text/rtf', + 'rtfd' => 'text/rtfd', + 'py' => 'text/x-python', + 'java' => 'text/x-java-source', + 'rb' => 'text/x-ruby', + 'sh' => 'text/x-shellscript', + 'pl' => 'text/x-perl', + 'sql' => 'text/x-sql', + // images + 'bmp' => 'image/x-ms-bmp', + 'jpg' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'gif' => 'image/gif', + 'png' => 'image/png', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'tga' => 'image/x-targa', + 'psd' => 'image/vnd.adobe.photoshop', + //audio + 'mp3' => 'audio/mpeg', + 'mid' => 'audio/midi', + 'ogg' => 'audio/ogg', + 'mp4a' => 'audio/mp4', + 'wav' => 'audio/wav', + 'wma' => 'audio/x-ms-wma', + // video + 'avi' => 'video/x-msvideo', + 'dv' => 'video/x-dv', + 'mp4' => 'video/mp4', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mov' => 'video/quicktime', + 'wm' => 'video/x-ms-wmv', + 'flv' => 'video/x-flv', + 'mkv' => 'video/x-matroska' + ); + + /** + * undocumented class variable + * + * @var string + **/ + protected $_time = 0; + + /** + * Additional data about error + * + * @var array + **/ + protected $_errorData = array(); + + /** + * undocumented class variable + * + * @var string + **/ + protected $_fakeRoot = ''; + + /** + * Command result to send to client + * + * @var array + **/ + protected $_result = array(); + + /** + * undocumented class variable + * + * @var string + **/ + protected $_today = 0; + + /** + * undocumented class variable + * + * @var string + **/ + protected $_yesterday = 0; + + /** + * constructor + * + * @param array object options + * @return void + **/ + public function __construct($options=array()) { + foreach ($this->_options as $k=>$v) { + if (isset($options[$k])) { + $this->_options[$k] = is_array($this->_options[$k]) + ? array_merge($this->_options[$k], $options[$k]) + : $options[$k]; + } + } + + if (substr($this->_options['root'], -1) == DIRECTORY_SEPARATOR) { + $this->_options['root'] = substr($this->_options['root'], 0, -1); + } + + $this->_time = $this->_options['debug'] ? $this->_utime() : 0; + + $this->_fakeRoot = !$this->_options['rootAlias'] + ? $this->_options['root'] + : dirname($this->_options['root']).DIRECTORY_SEPARATOR.$this->_options['rootAlias']; + + if (!empty($this->_options['disabled'])) { + $no = array('open', 'reload', 'tmb', 'ping'); + foreach ($this->_options['disabled'] as $k => $c) { + if (!isset($this->_commands[$c]) || in_array($c, $no)) { + unset($this->_options['disabled'][$k]); + } else { + unset($this->_commands[$c]); + } + } + } + + if ($this->_options['tmbDir']) { + $tmbDir = $this->_options['root'].DIRECTORY_SEPARATOR.$this->_options['tmbDir']; + $this->_options['tmbDir'] = is_dir($tmbDir) || @mkdir($tmbDir, $this->_options['dirMode']) ? $tmbDir : ''; + } + if ($this->_options['tmbDir']) { + if (!in_array($this->_options['imgLib'], array('imagick', 'mogrify', 'gd'))) { + $this->_options['imgLib'] = $this->_getImgLib(); + } + } + $this->_today = mktime(0,0,0, date('m'), date('d'), date('Y')); + $this->_yesterday = $this->_today-86400; + } + + /** + * Proccess client request and output json + * + * @return void + **/ + public function run() { + if (!function_exists('json_encode')) { + exit('{"error":"PHP JSON module not installed"}'); + } + if (empty($this->_options['root']) || !is_dir($this->_options['root'])) { + exit(json_encode(array('error' => 'Invalid backend configuration'))); + } + if (!$this->_isAllowed($this->_options['root'], 'read')) { + exit(json_encode(array('error' => 'Access denied'))); + } + + $cmd = ''; + if (!empty($_POST['cmd'])) { + $cmd = trim($_POST['cmd']); + } elseif (!empty($_GET['cmd'])) { + $cmd = trim($_GET['cmd']); + } + if (!$cmd && $_SERVER["REQUEST_METHOD"] == 'POST') { + header("Content-Type: text/html"); + $this->_result['error'] = 'Data exceeds the maximum allowed size'; + exit(json_encode($this->_result)); + } + + if ($cmd && (empty($this->_commands[$cmd]) || !method_exists($this, $this->_commands[$cmd]))) { + exit(json_encode(array('error' => 'Unknown command'))); + } + + if (isset($_GET['init'])) { + + $ts = $this->_utime(); + $this->_result['disabled'] = array_values($this->_options['disabled']); + + $this->_result['params'] = array( + 'dotFiles' => $this->_options['dotFiles'], + 'uplMaxSize' => ini_get('upload_max_filesize'), + 'archives' => array(), + 'extract' => array(), + 'url' => $this->_options['fileURL'] ? $this->_options['URL'] : '' + ); + if (isset($this->_commands['archive']) || isset($this->_commands['extract'])) { + $this->_checkArchivers(); + if (isset($this->_commands['archive'])) { + $this->_result['params']['archives'] = $this->_options['archiveMimes']; + } + if (isset($this->_commands['extract'])) { + $this->_result['params']['extract'] = array_keys($this->_options['archivers']['extract']); + } + } + // clean thumbnails dir + if ($this->_options['tmbDir']) { + srand((double) microtime() * 1000000); + if (rand(1, 200) <= $this->_options['tmbCleanProb']) { + $ts2 = $this->_utime(); + $ls = scandir($this->_options['tmbDir']); + for ($i=0, $s = count($ls); $i < $s; $i++) { + if ('.' != $ls[$i] && '..' != $ls[$i]) { + @unlink($this->_options['tmbDir'].DIRECTORY_SEPARATOR.$ls[$i]); + } + } + } + } + + } + + if ($this->_options['debug']) { + $this->_result['debug'] = array( + 'time' => $this->_utime() - $this->_time, + 'mimeDetect' => $this->_options['mimeDetect'], + 'imgLib' => $this->_options['imgLib'] + ); + if ($this->_options['dirSize']) { + $this->_result['debug']['dirSize'] = true; + $this->_result['debug']['du'] = @$this->_options['du']; + } + } + + if ($cmd) { + $this->{$this->_commands[$cmd]}(); + } else { + $this->_open(); + } + + header("Content-Type: ".($cmd == 'upload' ? 'text/html' : 'application/json')); + header("Connection: close"); + echo json_encode($this->_result); + + if (!empty($this->_options['logger']) && in_array($cmd, $this->_loggedCommands)) { + $this->_options['logger']->log($cmd, empty($this->_result['error']), $this->_logContext, !empty($this->_result['error']) ? $this->_result['error'] : '', !empty($this->_result['errorData']) ? $this->_result['errorData'] : array()); + } + exit(); + } + + + /************************************************************/ + /** elFinder commands **/ + /************************************************************/ + + /** + * Return current dir content to client or output file content to browser + * + * @return void + **/ + protected function _open() + { + if (isset($_GET['current'])) { // read file + if (empty($_GET['current']) + || empty($_GET['target']) + || false == ($dir = $this->_findDir(trim($_GET['current']))) + || false == ($file = $this->_find(trim($_GET['target']), $dir)) + || is_dir($file) + ) { + header('HTTP/1.x 404 Not Found'); + exit('File not found'); + } + if (!$this->_isAllowed($dir, 'read') || !$this->_isAllowed($file, 'read')) { + header('HTTP/1.x 403 Access Denied'); + exit('Access denied'); + } + + if (filetype($file) == 'link') { + $file = $this->_readlink($file); + if (!$file || is_dir($file)) { + header('HTTP/1.x 404 Not Found'); + exit('File not found'); + } + if (!$this->_isAllowed(dirname($file), 'read') || !$this->_isAllowed($file, 'read')) { + header('HTTP/1.x 403 Access Denied'); + exit('Access denied'); + } + } + + $mime = $this->_mimetype($file); + $parts = explode('/', $mime); + $disp = $parts[0] == 'image' || $parts[0] == 'text' ? 'inline' : 'attachments'; + + header("Content-Type: ".$mime); + header("Content-Disposition: ".$disp."; filename=".basename($file)); + header("Content-Location: ".str_replace($this->_options['root'], '', $file)); + header('Content-Transfer-Encoding: binary'); + header("Content-Length: ".filesize($file)); + header("Connection: close"); + readfile($file); + exit(); + + } else { // enter directory + $path = $this->_options['root']; + if (!empty($_GET['target'])) { + if (false == ($p = $this->_findDir(trim($_GET['target'])))) { + if (!isset($_GET['init'])) { + $this->_result['error'] = 'Invalid parameters'; + } + } elseif (!$this->_isAllowed($p, 'read')) { + if (!isset($_GET['init'])) { + $this->_result['error'] = 'Access denied'; + } + } else { + $path = $p; + } + } + $this->_content($path, isset($_GET['tree'])); + } + } + + + /** + * Rename file/folder + * + * @return void + **/ + protected function _rename() + { + if (empty($_GET['current']) + || empty($_GET['target']) + || false == ($dir = $this->_findDir(trim($_GET['current']))) + || false == ($target = $this->_find(trim($_GET['target']), $dir)) + ) { + $this->_result['error'] = 'File not found'; + } elseif (false == ($name = $this->_checkName($_GET['name'])) ) { + $this->_result['error'] = 'Invalid name'; + } elseif (!$this->_isAllowed($dir, 'write')) { + $this->_result['error'] = 'Access denied'; + } elseif (file_exists($dir.DIRECTORY_SEPARATOR.$name)) { + $this->_result['error'] = 'File or folder with the same name already exists'; + } elseif (!rename($target, $dir.DIRECTORY_SEPARATOR.$name)) { + $this->_result['error'] = 'Unable to rename file'; + } else { + $this->_rmTmb($target); + $this->_logContext['from'] = $target; + $this->_logContext['to'] = $dir.DIRECTORY_SEPARATOR.$name; + $this->_result['select'] = array($this->_hash($dir.DIRECTORY_SEPARATOR.$name)); + $this->_content($dir, is_dir($dir.DIRECTORY_SEPARATOR.$name)); + } + } + + + /** + * Create new folder + * + * @return void + **/ + protected function _mkdir() + { + if (empty($_GET['current']) || false == ($dir = $this->_findDir(trim($_GET['current'])))) { + return $this->_result['error'] = 'Invalid parameters'; + } + $this->_logContext['dir'] = $dir.DIRECTORY_SEPARATOR.$_GET['name']; + if (!$this->_isAllowed($dir, 'write')) { + $this->_result['error'] = 'Access denied'; + } elseif (false == ($name = $this->_checkName($_GET['name'])) ) { + $this->_result['error'] = 'Invalid name'; + } elseif (file_exists($dir.DIRECTORY_SEPARATOR.$name)) { + $this->_result['error'] = 'File or folder with the same name already exists'; + } elseif (!@mkdir($dir.DIRECTORY_SEPARATOR.$name, $this->_options['dirMode'])) { + $this->_result['error'] = 'Unable to create folder'; + } else { + $this->_logContext['dir'] = $dir.DIRECTORY_SEPARATOR.$name; + $this->_result['select'] = array($this->_hash($dir.DIRECTORY_SEPARATOR.$name)); + $this->_content($dir, true); + } + } + + /** + * Create new empty file + * + * @return void + **/ + protected function _mkfile() + { + if (empty($_GET['current']) + || false == ($dir = $this->_findDir(trim($_GET['current'])))) { + return $this->_result['error'] = 'Invalid parameters'; + } + $this->_logContext['file'] = $dir.DIRECTORY_SEPARATOR.$_GET['name']; + if (!$this->_isAllowed($dir, 'write')) { + $this->_result['error'] = 'Access denied'; + } elseif (false == ($name = $this->_checkName($_GET['name'])) ) { + $this->_result['error'] = 'Invalid name'; + } elseif (file_exists($dir.DIRECTORY_SEPARATOR.$name)) { + $this->_result['error'] = 'File or folder with the same name already exists'; + } else { + $f = $dir.DIRECTORY_SEPARATOR.$name; + $this->_logContext['file'] = $f; + if (false != ($fp = @fopen($f, 'wb'))) { + fwrite($fp, ""); + fclose($fp); + $this->_result['select'] = array($this->_hash($dir.DIRECTORY_SEPARATOR.$name)); + $this->_content($dir); + } else { + $this->_result['error'] = 'Unable to create file'; + } + } + } + + /** + * Remove files/folders + * + * @return void + **/ + protected function _rm() + { + if (empty($_GET['current']) + || false == ($dir = $this->_findDir(trim($_GET['current']))) + || (empty($_GET['targets']) || !is_array($_GET['targets']))) { + return $this->_result['error'] = 'Invalid parameters'; + } + + $this->_logContext['targets'] = array(); + foreach ($_GET['targets'] as $hash) { + if (false != ($f = $this->_find($hash, $dir))) { + $this->_remove($f); + $this->_logContext['targets'][] = $f; + } + } + if (!empty($this->_result['errorData'])) { + $this->_result['error'] = 'Unable to remove file'; + } + $this->_content($dir, true); + } + + /** + * Upload files + * + * @return void + **/ + protected function _upload() + { + + if (empty($_POST['current']) + || false == ($dir = $this->_findDir(trim($_POST['current'])))) { + return $this->_result['error'] = 'Invalid parameters'; + } + if (!$this->_isAllowed($dir, 'write')) { + return $this->_result['error'] = 'Access denied'; + } + if (empty($_FILES['upload'])) + { + return $this->_result['error'] = 'No file to upload'; + } + + $this->_logContext['upload'] = array(); + $this->_result['select'] = array(); + $total = 0; + for ($i=0, $s = count($_FILES['upload']['name']); $i < $s; $i++) { + if (!empty($_FILES['upload']['name'][$i])) { + $total++; + $this->_logContext['upload'][] = $_FILES['upload']['name'][$i]; + if ($_FILES['upload']['error'][$i] > 0) { + $error = 'Unable to upload file'; + switch ($_FILES['upload']['error'][$i]) { + case UPLOAD_ERR_INI_SIZE: + case UPLOAD_ERR_FORM_SIZE: + $error = 'File exceeds the maximum allowed filesize'; + break; + case UPLOAD_ERR_EXTENSION: + $error = 'Not allowed file type'; + break; + } + $this->_errorData($_FILES['upload']['name'][$i], $error); + } elseif (false == ($name = $this->_checkName($_FILES['upload']['name'][$i]))) { + $this->_errorData($_FILES['upload']['name'][$i], 'Invalid name'); + } elseif (!$this->_isUploadAllow($_FILES['upload']['name'][$i], $_FILES['upload']['tmp_name'][$i])) { + $this->_errorData($_FILES['upload']['name'][$i], 'Not allowed file type'); + } else { + $name = $this->_checkName($_FILES['upload']['name'][$i]); + $file = $dir.DIRECTORY_SEPARATOR.$name; + if (!@move_uploaded_file($_FILES['upload']['tmp_name'][$i], $file)) { + $this->_errorData($_FILES['upload']['name'][$i], 'Unable to save uploaded file'); + } else { + @chmod($file, $this->_options['fileMode']); + $this->_result['select'][] = $this->_hash($file); + } + } + } + } + + $errCnt = !empty($this->_result['errorData']) ? count($this->_result['errorData']) : 0; + + if ($errCnt == $total) { + $this->_result['error'] = 'Unable to upload files'; + } else { + if ($errCnt>0) { + $this->_result['error'] = 'Some files was not uploaded'; + } + $this->_content($dir); + } + + } + + /** + * Copy/move files/folders + * + * @return void + **/ + protected function _paste() + { + if (empty($_GET['current']) + || false == ($current = $this->_findDir(trim($_GET['current']))) + || empty($_GET['src']) + || false == ($src = $this->_findDir(trim($_GET['src']))) + || empty($_GET['dst']) + || false == ($dst = $this->_findDir(trim($_GET['dst']))) + || empty($_GET['targets']) || !is_array($_GET['targets']) + ) { + return $this->_result['error'] = 'Invalid parameters'; + } + $cut = !empty($_GET['cut']); + $this->_logContext['src'] = array(); + $this->_logContext['dest'] = $dst; + $this->_logContext['cut'] = $cut; + + + if (!$this->_isAllowed($dst, 'write') || !$this->_isAllowed($src, 'read')) { + return $this->_result['error'] = 'Access denied'; + } + + foreach ($_GET['targets'] as $hash) { + if (false == ($f = $this->_find($hash, $src))) { + return $this->_result['error'] = 'File not found' && $this->_content($current, true); + } + $this->_logContext['src'][] = $f; + $_dst = $dst.DIRECTORY_SEPARATOR.basename($f); + + if (0 === strpos($dst, $f)) { + return $this->_result['error'] = 'Unable to copy into itself' && $this->_content($current, true); + } elseif (file_exists($_dst)) { + return $this->_result['error'] = 'File or folder with the same name already exists' && $this->_content($current, true); + } elseif ($cut && !$this->_isAllowed($f, 'rm')) { + return $this->_result['error'] = 'Access denied' && $this->_content($current, true); + } + + if ($cut) { + if (!@rename($f, $_dst)) { + return $this->_result['error'] = 'Unable to move files' && $this->_content($current, true); + } elseif (!is_dir($f)) { + $this->_rmTmb($f); + } + } elseif (!$this->_copy($f, $_dst)) { + return $this->_result['error'] = 'Unable to copy files' && $this->_content($current, true); + } + } + $this->_content($current, true); + } + + /** + * Create file/folder copy with suffix - "copy" + * + * @return void + **/ + protected function _duplicate() + { + if (empty($_GET['current']) + || false == ($current = $this->_findDir(trim($_GET['current']))) + || empty($_GET['target']) + || false == ($target = $this->_find(trim($_GET['target']), $current)) + ) { + return $this->_result['error'] = 'Invalid parameters'; + } + $this->_logContext['target'] = $target; + if (!$this->_isAllowed($current, 'write') || !$this->_isAllowed($target, 'read')) { + return $this->_result['error'] = 'Access denied'; + } + $dup = $this->_uniqueName($target); + if (!$this->_copy($target, $dup)) { + return $this->_result['error'] = 'Unable to create file copy'; + } + $this->_result['select'] = array($this->_hash($dup)); + $this->_content($current, is_dir($target)); + } + + /** + * Resize image + * + * @return void + **/ + protected function _resize() + { + if (empty($_GET['current']) + || false == ($current = $this->_findDir(trim($_GET['current']))) + || empty($_GET['target']) + || false == ($target = $this->_find(trim($_GET['target']), $current)) + || empty($_GET['width']) || 0 >= ($width = intval($_GET['width'])) + || empty($_GET['height']) || 0 >= ($height = intval($_GET['height'])) + ) { + return $this->_result['error'] = 'Invalid parameters'; + } + $this->_logContext = array( + 'target' => $target, + 'width' => $width, + 'height' => $height + ); + if (!$this->_isAllowed($target, 'write')) { + return $this->_result['error'] = 'Access denied'; + } + if (0 !== strpos($this->_mimetype($target), 'image')) { + return $this->_result['error'] = 'File is not an image'; + } + if (!$this->_resizeImg($target, $width, $height)) { + return $this->_result['error'] = 'Unable to resize image'; + } + $this->_result['select'] = array($this->_hash($target)); + $this->_content($current); + } + + /** + * Create images thumbnails + * + * @return void + **/ + protected function _thumbnails() + { + if (!empty($this->_options['tmbDir']) && !empty($_GET['current']) && false != ($current = $this->_findDir(trim($_GET['current'])))) { + $this->_result['current'] = $this->_hash($current); + $this->_result['images'] = array(); + $ls = scandir($current); + $cnt = 0; + $max = $this->_options['tmbAtOnce'] > 0 ? intval($this->_options['tmbAtOnce']) : 5; + for ($i=0; $i < count($ls); $i++) { + if ($this->_isAccepted($ls[$i])) { + $path = $current.DIRECTORY_SEPARATOR.$ls[$i]; + if (is_readable($path) && $this->_canCreateTmb($this->_mimetype($path))) { + $tmb = $this->_tmbPath($path); + if (!file_exists($tmb)) { + if ($cnt>=$max) { + return $this->_result['tmb'] = true; + } elseif ($this->_tmb($path, $tmb)) { + $this->_result['images'][$this->_hash($path)] = $this->_path2url($tmb); + $cnt++; + } + } + } + } + } + } + } + + /** + * Return file content to client + * + * @return void + **/ + protected function _fread() + { + if (empty($_GET['current']) + || false == ($current = $this->_findDir(trim($_GET['current']))) + || empty($_GET['target']) + || false == ($target = $this->_find(trim($_GET['target']), $current)) + ) { + return $this->_result['error'] = 'Invalid parameters'; + } + if (!$this->_isAllowed($target, 'read')) { + return $this->_result['error'] = 'Access denied'; + } + $this->_result['content'] = @file_get_contents($target); + } + + /** + * Save data into text file. + * + * @return void + **/ + protected function _edit() + { + if (empty($_POST['current']) + || false == ($current = $this->_findDir(trim($_POST['current']))) + || empty($_POST['target']) + || false == ($target = $this->_find(trim($_POST['target']), $current)) + || !isset($_POST['content']) + ) { + return $this->_result['error'] = 'Invalid parameters'; + } + $this->_logContext['target'] = $target; + if (!$this->_isAllowed($target, 'write')) { + return $this->_result['error'] = 'Access denied'; + } + if (false === file_put_contents($target, trim($_POST['content']))) { + return $this->_result['error'] = 'Unable to write to file'; + } + $this->_result['target'] = $this->_info($target); + // $this->_result['select'] = array($this->_hash($target)); + } + + /** + * Create archive of selected type + * + * @return void + **/ + protected function _archive() + { + $this->_checkArchivers(); + if (empty($this->_options['archivers']['create']) + || empty($_GET['type']) + || empty($this->_options['archivers']['create'][$_GET['type']]) + || !in_array($_GET['type'], $this->_options['archiveMimes'])) { + return $this->_result['error'] = 'Invalid parameters'; + } + + if (empty($_GET['current']) + || empty($_GET['targets']) + || !is_array($_GET['targets']) + || false == ($dir = $this->_findDir(trim($_GET['current']))) + || !$this->_isAllowed($dir, 'write') + ) { + return $this->_result['error'] = 'Invalid parameters'; + } + + $files = array(); + $argc = ''; + foreach ($_GET['targets'] as $hash) { + if (false == ($f = $this->_find($hash, $dir))) { + return $this->_result['error'] = 'File not found'; + } + $files[] = $f; + $argc .= escapeshellarg(basename($f)).' '; + } + $arc = $this->_options['archivers']['create'][$_GET['type']]; + $name = count($files) == 1 ? basename($files[0]) : $_GET['name']; + $name = basename($this->_uniqueName($name.'.'.$arc['ext'], '')); + + $cwd = getcwd(); + chdir($dir); + $cmd = $arc['cmd'].' '.$arc['argc'].' '.escapeshellarg($name).' '.$argc; + exec($cmd, $o, $c); + chdir($cwd); + if (file_exists($dir.DIRECTORY_SEPARATOR.$name)) { + $this->_content($dir); + $this->_result['select'] = array($this->_hash($dir.DIRECTORY_SEPARATOR.$name)); + } else { + $this->_result['error'] = 'Unable to create archive'; + } + } + + /** + * Extract files from archive + * + * @return void + **/ + protected function _extract() + { + if (empty($_GET['current']) + || false == ($current = $this->_findDir(trim($_GET['current']))) + || empty($_GET['target']) + || false == ($file = $this->_find(trim($_GET['target']), $current)) + || !$this->_isAllowed($current, 'write') + ) { + return $this->_result['error'] = 'Invalid parameters'; + } + $this->_checkArchivers(); + $mime = $this->_mimetype($file); + if (empty($this->_options['archivers']['extract'][$mime])) { + return $this->_result['error'] = 'Invalid parameters'; + } + $cwd = getcwd(); + $arc = $this->_options['archivers']['extract'][$mime]; + $cmd = $arc['cmd'].' '.$arc['argc'].' '.escapeshellarg(basename($file)); + chdir(dirname($file)); + exec($cmd, $o, $c); + chdir($cwd); + if ($c == 0) { + $this->_content($current, true); + } else { + $this->_result['error'] = 'Unable to extract files from archive'; + } + } + + + /** + * Send header Connection: close. Required by safari to fix bug http://www.webmasterworld.com/macintosh_webmaster/3300569.htm + * + * @return void + **/ + protected function _ping() + { + exit(header("Connection: close")); + } + /************************************************************/ + /** "content" methods **/ + /************************************************************/ + /** + * Set current dir info, content and [dirs tree] + * + * @param string $path current dir path + * @param bool $tree set dirs tree? + * @return void + **/ + protected function _content($path, $tree=false) + { + $this->_cwd($path); + $this->_cdc($path); + if ($tree) { + $this->_result['tree'] = $this->_tree($this->_options['root']); + } + } + + /** + * Set current dir info + * + * @param string $path current dir path + * @return void + **/ + protected function _cwd($path) + { + $rel = $this->_options['rootAlias'] ? $this->_options['rootAlias'] : basename($this->_options['root']); + if ($path == $this->_options['root']) { + $name = $rel; + } else { + $name = basename($path); + $rel .= DIRECTORY_SEPARATOR.substr($path, strlen($this->_options['root'])+1); + } + $this->_result['cwd'] = array( + 'hash' => $this->_hash($path), + 'name' => $name, + 'mime' => 'directory', + 'rel' => $rel, + 'size' => 0, + 'date' => date($this->_options['dateFormat'], filemtime($path)), + 'read' => true, + 'write' => $this->_isAllowed($path, 'write'), + 'rm' => $path == $this->_options['root'] ? false : $this->_isAllowed($path, 'rm') + ); + } + + + /** + * Set current dir content + * + * @param string $path current dir path + * @return void + **/ + protected function _cdc($path) + { + $dirs = $files = array(); + $ls = scandir($path); + for ($i=0; $i < count($ls); $i++) { + if ($this->_isAccepted($ls[$i])) { + $info = $this->_info($path.DIRECTORY_SEPARATOR.$ls[$i]); + if ($info['mime'] == 'directory') { + $dirs[] = $info; + } else { + $files[] = $info; + } + } + } + $this->_result['cdc'] = array_merge($dirs, $files); + } + + /** + * Return file/folder info + * + * @param string $path file path + * @return array + **/ + protected function _info($path) + { + $type = filetype($path); + $stat = $type == 'link' ? lstat($path) : stat($path); + + if ($stat['mtime'] > $this->_today) { + $d = 'Today '.date('H:i', $stat['mtime']); + } elseif ($stat['mtime'] > $this->_yesterday) { + $d = 'Yesterday '.date('H:i', $stat['mtime']); + } else { + $d = date($this->_options['dateFormat'], $stat['mtime']); + } + + $info = array( + 'name' => htmlspecialchars(basename($path)), + 'hash' => $this->_hash($path), + 'mime' => $type == 'dir' ? 'directory' : $this->_mimetype($path), + 'date' => $d, + 'size' => $type == 'dir' ? $this->_dirSize($path) : $stat['size'], + 'read' => $this->_isAllowed($path, 'read'), + 'write' => $this->_isAllowed($path, 'write'), + 'rm' => $this->_isAllowed($path, 'rm'), + ); + + if ($type == 'link') { + if (false == ($lpath = $this->_readlink($path))) { + $info['mime'] = 'symlink-broken'; + return $info; + } + if (is_dir($lpath)) { + $info['mime'] = 'directory'; + } else { + $info['parent'] = $this->_hash(dirname($lpath)); + $info['mime'] = $this->_mimetype($lpath); + } + $info['link'] = $this->_hash($lpath); + $info['linkTo'] = ($this->_options['rootAlias'] ? $this->_options['rootAlias'] : basename($this->_options['root'])).substr($lpath, strlen($this->_options['root'])); + $info['read'] = $this->_isAllowed($lpath, 'read'); + $info['write'] = $this->_isAllowed($lpath, 'write'); + $info['rm'] = $this->_isAllowed($lpath, 'rm'); + } else { + $lpath = ''; + } + + if ($info['mime'] != 'directory') { + if ($this->_options['fileURL'] && $info['read']) { + $info['url'] = $this->_path2url($lpath ? $lpath : $path); + } + + if (0 === ($p = strpos($info['mime'], 'image'))) { + if (false != ($s = getimagesize($path))) { + $info['dim'] = $s[0].'x'.$s[1]; + } + if ($info['read']) { + $info['resize'] = isset($info['dim']) && $this->_canCreateTmb($info['mime']); + $tmb = $this->_tmbPath($path); + + if (file_exists($tmb)) { + $info['tmb'] = $this->_path2url($tmb); + } elseif ($info['resize']) { + $this->_result['tmb'] = true; + } + + } + } + } + return $info; + } + + /** + * Return directory tree (multidimensional array) + * + * @param string $path directory path + * @return array + **/ + protected function _tree($path) + { + $dir = array( + 'hash' => $this->_hash($path), + 'name' => $path == $this->_options['root'] && $this->_options['rootAlias'] ? $this->_options['rootAlias'] : basename($path), + 'read' => $this->_isAllowed($path, 'read'), + 'write' => $this->_isAllowed($path, 'write'), + 'dirs' => array() + ); + + if ($dir['read'] && (false != ($ls = scandir($path)))) { + for ($i=0; $i < count($ls); $i++) { + $p = $path.DIRECTORY_SEPARATOR.$ls[$i]; + if ($this->_isAccepted($ls[$i]) && is_dir($p) && !is_link($p)) { + $dir['dirs'][] = $this->_tree($p); + } + } + } + return $dir; + } + + /************************************************************/ + /** fs methods **/ + /************************************************************/ + + /** + * Return name for duplicated file/folder or new archive + * + * @param string $f file/folder name + * @param string $suffix file name suffix + * @return string + **/ + protected function _uniqueName($f, $suffix=' copy') + { + $dir = dirname($f); + $name = basename($f); + $ext = ''; + + if (!is_dir($f)) { + if (preg_match('/\.(tar\.gz|tar\.bz|tar\.bz2|[a-z0-9]{1,4})$/i', $name, $m)) { + $ext = '.'.$m[1]; + $name = substr($name, 0, strlen($name)-strlen($m[0])); + } + } + + if (preg_match('/('.$suffix.')(\d*)$/i', $name, $m)) { + $i = (int)$m[2]; + $name = substr($name, 0, strlen($name)-strlen($m[2])); + } else { + $name .= $suffix; + $i = 0; + $n = $dir.DIRECTORY_SEPARATOR.$name.$ext; + if (!file_exists($n)) { + return $n; + } + } + + while ($i++ <= 10000) { + $n = $dir.DIRECTORY_SEPARATOR.$name.$i.$ext; + if (!file_exists($n)) { + return $n; + } + } + return $dir.DIRECTORY_SEPARATOR.$name.md5($f).$ext; + } + + /** + * Remove file or folder (recursively) + * + * @param string $path fole/folder path + * @return void + **/ + protected function _remove($path) + { + if (!$this->_isAllowed($path, 'rm')) { + return $this->_errorData($path, 'Access denied'); + } + if (!is_dir($path)) { + if (!@unlink($path)) { + $this->_errorData($path, 'Unable to remove file'); + } else { + $this->_rmTmb($path); + } + } else { + $ls = scandir($path); + for ($i=0; $i < count($ls); $i++) { + if ('.' != $ls[$i] && '..' != $ls[$i]) { + $this->_remove($path.DIRECTORY_SEPARATOR.$ls[$i]); + } + } + if (!@rmdir($path)) { + return $this->_errorData($path, 'Unable to remove file'); + } + } + return true; + } + + /** + * Copy file/folder (recursively) + * + * @param string $src file/folder to copy + * @param string $trg destination name + * @return bool + **/ + protected function _copy($src, $trg) + { + if (!$this->_isAllowed($src, 'read')) { + return $this->_errorData($src, 'Access denied'); + } + + $dir = dirname($trg); + + if (!$this->_isAllowed($dir, 'write')) { + return $this->_errorData($dir, 'Access denied'); + } + if (file_exists($trg)) { + return $this->_errorData($src, 'File or folder with the same name already exists'); + } + + if (!is_dir($src)) { + if (!@copy($src, $trg)) { + return $this->_errorData($src, 'Unable to copy files'); + } + @chmod($trg, $this->_options['fileMode']); + } else { + + if (!@mkdir($trg, $this->_options['dirMode'])) { + return $this->_errorData($src, 'Unable to copy files'); + } + + $ls = scandir($src); + for ($i=0; $i < count($ls); $i++) { + if ('.' != $ls[$i] && '..' != $ls[$i]) { + $_src = $src.DIRECTORY_SEPARATOR.$ls[$i]; + $_trg = $trg.DIRECTORY_SEPARATOR.$ls[$i]; + if (is_dir($_src)) { + if (!$this->_copy($_src, $_trg)) { + return $this->_errorData($_src, 'Unable to copy files'); + } + } else { + if (!@copy($_src, $_trg)) { + return $this->_errorData($_src, 'Unable to copy files'); + } + @chmod($_trg, $this->_options['fileMode']); + } + } + } + } + return true; + } + + /** + * Check new file name for invalid simbols. Return name if valid + * + * @return string $n file name + * @return string + **/ + protected function _checkName($n) + { + $n = strip_tags(trim($n)); + if (!$this->_options['dotFiles'] && '.' == substr($n, 0, 1)) { + return false; + } + return preg_match('|^[^\\/\<\>:]+$|', $n) ? $n : false; + } + + /** + * Find folder by hash in required folder and subfolders + * + * @param string $hash folder hash + * @param string $path folder path to search in + * @return string + **/ + protected function _findDir($hash, $path='') + { + if (!$path) { + $path = $this->_options['root']; + if ($this->_hash($path) == $hash) { + return $path; + } + } + + if (false != ($ls = scandir($path))) { + for ($i=0; $i < count($ls); $i++) { + $p = $path.DIRECTORY_SEPARATOR.$ls[$i]; + if (is_link($p)) + { + $link = $this->_readlink($p); + //$this->_result['debug']['findDir_'.$p] = 'link to '.$link; + } + if ($this->_isAccepted($ls[$i]) && is_dir($p) && (!is_link($p))) { + if ($this->_hash($p) == $hash || false != ($p = $this->_findDir($hash, $p))) { + return $p; + } + } + } + } + } + + /** + * Find file/folder by hash in required folder + * + * @param string $hash file/folder hash + * @param string $path folder path to search in + **/ + protected function _find($hash, $path) + { + if (false != ($ls = scandir($path))) { + for ($i=0; $i < count($ls); $i++) { + if ($this->_isAccepted($ls[$i])) { + $p = $path.DIRECTORY_SEPARATOR.$ls[$i]; + if ($this->_hash($p) == $hash) { + return $p; + } + } + } + } + } + + + /** + * Return path of file on which link point to, if exists in root directory + * + * @param string $path symlink path + * @return string + **/ + protected function _readlink($path) + { + $target = readlink($path); + if ('/' != substr($target, 0, 1)) { + $target = dirname($path).DIRECTORY_SEPARATOR.$target; + } + $target = $this->_normpath($target); + $root = $this->_normpath($this->_options['root']); + return $target && file_exists($target) && 0 === strpos($target, $root) ? $target : false; + } + + /** + * Count total directory size if this allowed in options + * + * @param string $path directory path + * @return int + **/ + protected function _dirSize($path) + { + $size = 0; + if (!$this->_options['dirSize'] || !$this->_isAllowed($path, 'read')) { + return filesize($path); + } + if (!isset($this->_options['du'])) { + $this->_options['du'] = function_exists('exec') + ? exec('du -h '.escapeshellarg(__FILE__), $o, $s) > 0 && $s == 0 + : false; + } + if ($this->_options['du']) { + $size = intval(exec('du -k '.escapeshellarg($path)))*1024; + } else { + $ls = scandir($path); + for ($i=0; $i < count($ls); $i++) { + if ($this->_isAccepted($ls[$i])) { + $p = $path.DIRECTORY_SEPARATOR.$ls[$i]; + $size += filetype($p) == 'dir' && $this->_isAllowed($p, 'read') ? $this->_dirSize($p) : filesize($p); + } + } + } + return $size; + } + + /** + * Return file mimetype + * + * @param string $path file path + * @return string + **/ + protected function _mimetype($path) + { + if (empty($this->_options['mimeDetect']) || $this->_options['mimeDetect'] == 'auto') { + $this->_options['mimeDetect'] = $this->_getMimeDetect(); + } + + switch ($this->_options['mimeDetect']) { + case 'finfo': + if (empty($this->_finfo)) { + $this->_finfo = finfo_open(FILEINFO_MIME); + } + $type = @finfo_file($this->_finfo, $path); + break; + case 'php': + $type = mime_content_type($path); + break; + case 'linux': + $type = exec('file -ib '.escapeshellarg($path)); + break; + case 'bsd': + $type = exec('file -Ib '.escapeshellarg($path)); + break; + default: + $pinfo = pathinfo($path); + $ext = isset($pinfo['extension']) ? strtolower($pinfo['extension']) : ''; + $type = isset($this->_mimeTypes[$ext]) ? $this->_mimeTypes[$ext] : 'unknown;'; + } + $type = explode(';', $type); + + if ($this->_options['mimeDetect'] != 'internal' && $type[0] == 'application/octet-stream') { + $pinfo = pathinfo($path); + $ext = isset($pinfo['extension']) ? strtolower($pinfo['extension']) : ''; + if (!empty($ext) && !empty($this->_mimeTypes[$ext])) { + $type[0] = $this->_mimeTypes[$ext]; + } + } + + return $type[0]; + } + + /************************************************************/ + /** image manipulation **/ + /************************************************************/ + + /** + * Create image thumbnail + * + * @param string $img image file + * @param string $tmb thumbnail name + * @return bool + **/ + protected function _tmb($img, $tmb) + { + if (false == ($s = getimagesize($img))) { + return false; + } + $tmbSize = $this->_options['tmbSize']; + + if ($this->_options['tmbCrop'] == false) { + + /* Calculating image scale width and height */ + $xscale = $s[0] / $tmbSize; + $yscale = $s[1] / $tmbSize; + + if ($yscale > $xscale) { + $newwidth = round($s[0] * (1 / $yscale)); + $newheight = round($s[1] * (1 / $yscale)); + } else { + $newwidth = round($s[0] * (1 / $xscale)); + $newheight = round($s[1] * (1 / $xscale)); + } + + /* Keeping original dimensions if image fitting into thumbnail without scale */ + if ($s[0] <= $tmbSize && $s[1] <= $tmbSize) { + $newwidth = $s[0]; + $newheight = $s[1]; + } + + /* Calculating coordinates for aligning thumbnail */ + $align_y = ceil(($tmbSize - $newheight) / 2); + $align_x = ceil(($tmbSize - $newwidth) / 2); + } + + + + switch ($this->_options['imgLib']) { + case 'imagick': + try { + $_img = new imagick($img); + } catch (Exception $e) { + return false; + } + + $_img->contrastImage(1); + + if ($this->_options['tmbCrop'] == false) { + $img1 = new Imagick(); + $img1->newImage($tmbSize, $tmbSize, new ImagickPixel($this->_options['tmbBgColor'])); + $img1->setImageFormat('png'); + $_img->resizeImage($newwidth, $newheight, NULL, true); + $img1->compositeImage( $_img, imagick::COMPOSITE_OVER, $align_x, $align_y ); + return $img1->writeImage($tmb); + } else { + return $_img->cropThumbnailImage($tmbSize, $tmbSize) && $_img->writeImage($tmb); + } + break; + + case 'mogrify': + if (@copy($img, $tmb)) { + list($x, $y, $size) = $this->_cropPos($s[0], $s[1]); + // exec('mogrify -crop '.$size.'x'.$size.'+'.$x.'+'.$y.' -scale '.$tmbSize.'x'.$tmbSize.'! '.escapeshellarg($tmb), $o, $c); + + $mogrifyArgs = 'mogrify -resize ' . $tmbSize . 'x' . $tmbSize; + + if ($this->_options['tmbCrop'] == false) { + $mogrifyArgs .= ' -gravity center -background "' . $this->_options['tmbBgColor'] . '" -extent ' . $tmbSize . 'x' . $tmbSize; + } + + if ($this->_options['tmbCrop'] == false) { + $mogrifyArgs .= ' ' . escapeshellarg($tmb); + } + + exec($mogrifyArgs, $o, $c); + + if (file_exists($tmb)) { + return true; + } elseif ($c == 0) { + // find tmb for psd and animated gif + $mime = $this->_mimetype($img); + if ($mime == 'image/vnd.adobe.photoshop' || $mime = 'image/gif') { + $pinfo = pathinfo($tmb); + $test = $pinfo['dirname'].DIRECTORY_SEPARATOR.$pinfo['filename'].'-0.'.$pinfo['extension']; + if (file_exists($test)) { + return rename($test, $tmb); + } + } + } + } + break; + + case 'gd': + if ($s['mime'] == 'image/jpeg') { + $_img = imagecreatefromjpeg($img); + } elseif ($s['mime'] == 'image/png') { + $_img = imagecreatefrompng($img); + } elseif ($s['mime'] == 'image/gif') { + $_img = imagecreatefromgif($img); + } + if (!$_img || false == ($_tmb = imagecreatetruecolor($tmbSize, $tmbSize))) { + return false; + } + + if ($this->_options['tmbCrop'] == false) { + + list($r,$g,$b) = sscanf($this->_options['tmbBgColor'], "#%02x%02x%02x"); + + imagefill($_tmb, 0, 0, imagecolorallocate($_tmb, $r, $g, $b)); + + if (!imagecopyresampled($_tmb, $_img, $align_x, $align_y, 0, 0, $newwidth, $newheight, $s[0], $s[1])) { + return false; + } + + } else { + list($x, $y, $size) = $this->_cropPos($s[0], $s[1]); + if (!imagecopyresampled($_tmb, $_img, 0, 0, $x, $y, $tmbSize, $tmbSize, $size, $size)) { + return false; + } + } + + $r = imagepng($_tmb, $tmb, 7); + imagedestroy($_img); + imagedestroy($_tmb); + return $r; + break; + } + } + + /** + * Remove image thumbnail + * + * @param string $img image file + * @return void + **/ + protected function _rmTmb($img) + { + if ($this->_options['tmbDir'] && false != ($tmb = $this->_tmbPath($img)) && file_exists($tmb)) { + @unlink($tmb); + } + } + + /** + * Return x/y coord for crop image thumbnail + * + * @param int $w image width + * @param int $h image height + * @return array + **/ + protected function _cropPos($w, $h) + { + $x = $y = 0; + $size = min($w, $h); + if ($w > $h) { + $x = ceil(($w - $h)/2); + } else { + $y = ceil(($h - $w)/2); + } + return array($x, $y, $size); + } + + /** + * Resize image + * + * @param string $img image path + * @param int $w image width + * @param int $h image height + * @return bool + **/ + protected function _resizeImg($img, $w, $h) + { + if (false == ($s = getimagesize($img))) { + return false; + } + + switch ($this->_options['imgLib']) { + case 'imagick': + if (false != ($_img = new imagick($img))) { + return $_img->cropThumbnailImage($w, $h) && $_img->writeImage($img); + } + break; + case 'mogrify': + exec('mogrify -scale '.$w.'x'.$h.'! '.escapeshellarg($img), $o, $c); + return 0 == $c; + break; + case 'gd': + if ($s['mime'] == 'image/jpeg') { + $_img = imagecreatefromjpeg($img); + } elseif ($s['mime'] = 'image/png') { + $_img = imagecreatefrompng($img); + } elseif ($s['mime'] = 'image/gif') { + $_img = imagecreatefromgif($img); + } + if (!$_img || false == ($_out = imagecreatetruecolor($w, $h))) { + return false; + } + if (!imagecopyresampled($_out, $_img, 0, 0, 0, 0, $w, $h, $s[0], $s[1])) { + return false; + } + if ($s['mime'] == 'image/jpeg') { + $r = imagejpeg($_out, $img, 100); + } else if ($s['mime'] = 'image/png') { + $r = imagepng($_out, $img, 7); + } else { + $r = imagegif($_out, $img, 7); + } + imagedestroy($_img); + imagedestroy($_out); + return $r; + break; + } + + + } + + /** + * Return true if we can create thumbnail for file with this mimetype + * + * @param string $mime file mimetype + * @return bool + **/ + protected function _canCreateTmb($mime) + { + if ($this->_options['tmbDir'] && $this->_options['imgLib'] && 0 === strpos($mime, 'image')) { + if ('gd' == $this->_options['imgLib']) { + return $mime == 'image/jpeg' || $mime == 'image/png' || $mime == 'image/gif'; + } + return true; + } + } + + /** + * Return image thumbnail path. For thumbnail return itself + * + * @param string $path image path + * @return string + **/ + protected function _tmbPath($path) + { + $tmb = ''; + if ($this->_options['tmbDir']) { + $tmb = dirname($path) != $this->_options['tmbDir'] + ? $this->_options['tmbDir'].DIRECTORY_SEPARATOR.$this->_hash($path).'.png' + : $path; + } + return $tmb; + } + + /************************************************************/ + /** access control **/ + /************************************************************/ + + /** + * Return true if file's mimetype is allowed for upload + * + * @param string $name file name + * @param string $tmpName uploaded file tmp name + * @return bool + **/ + protected function _isUploadAllow($name, $tmpName) + { + $allow = false; + $deny = false; + $mime = $this->_mimetype($this->_options['mimeDetect'] != 'internal' ? $tmpName : $name); + + if (in_array('all', $this->_options['uploadAllow'])) { + $allow = true; + } else { + foreach ($this->_options['uploadAllow'] as $type) { + if (0 === strpos($mime, $type)) { + $allow = true; + } + } + } + + if (in_array('all', $this->_options['uploadDeny'])) { + $deny = true; + } else { + foreach ($this->_options['uploadDeny'] as $type) { + if (0 === strpos($mime, $type)) { + $deny = true; + } + } + } + + $this->_result['debug']['_isUploadAllow'][$name] = $mime; + + if (0 === strpos($this->_options['uploadOrder'], 'allow')) { // ,deny + if ($deny == true) { + return false; + } elseif ($allow == true) { + return true; + } else { + return false; + } + } else { // deny,allow + if ($allow == true) { + return true; + } elseif ($deny == true) { + return false; + } else { + return true; + } + } + } + + /** + * Return true if file name is not . or .. + * If file name begins with . return value according to $this->_options['dotFiles'] + * + * @param string $file file name + * @return bool + **/ + protected function _isAccepted($file) + { + if ('.' == $file || '..' == $file) { + return false; + } + if (!$this->_options['dotFiles'] && '.' == substr($file, 0, 1)) { + return false; + } + return true; + } + + /** + * Return true if requeired action allowed to file/folder + * + * @param string $path file/folder path + * @param string $action action name (read/write/rm) + * @return void + **/ + protected function _isAllowed($path, $action) { + + switch ($action) { + case 'read': + if (!is_readable($path)) { + return false; + } + break; + case 'write': + if (!is_writable($path)) { + return false; + } + break; + case 'rm': + if (!is_writable(dirname($path))) { + return false; + } + break; + } + + // if ($this->_options['aclObj']) { + // + // } + $path = substr($path, strlen($this->_options['root'])+1); + // echo "$path\n"; + foreach ($this->_options['perms'] as $regex => $rules) { + + if (preg_match($regex, $path)) { + if (isset($rules[$action])) { + return $rules[$action]; + } + } + } + return isset($this->_options['defaults'][$action]) ? $this->_options['defaults'][$action] : false; + } + + /************************************************************/ + /** utilites **/ + /************************************************************/ + + /** + * Return image manipalation library name + * + * @return string + **/ + protected function _getImgLib() + { + if (extension_loaded('imagick')) { + return 'imagick'; + } elseif (function_exists('exec')) { + exec('mogrify --version', $o, $c); + if ($c == 0) { + return 'mogrify'; + } + } + return function_exists('gd_info') ? 'gd' : ''; + } + + /** + * Return list of available archivers + * + * @return array + **/ + protected function _checkArchivers() + { + if (!function_exists('exec')) { + $this->_options['archivers'] = $this->_options['archive'] = array(); + return; + } + $arcs = array( + 'create' => array(), + 'extract' => array() + ); + + exec('tar --version', $o, $ctar); + if ($ctar == 0) { + $arcs['create']['application/x-tar'] = array('cmd' => 'tar', 'argc' => '-cf', 'ext' => 'tar'); + $arcs['extract']['application/x-tar'] = array('cmd' => 'tar', 'argc' => '-xf', 'ext' => 'tar'); + $test = exec('gzip --version', $o, $c); + if ($c == 0) { + $arcs['create']['application/x-gzip'] = array('cmd' => 'tar', 'argc' => '-czf', 'ext' => 'tgz'); + $arcs['extract']['application/x-gzip'] = array('cmd' => 'tar', 'argc' => '-xzf', 'ext' => 'tgz'); + } + $test = exec('bzip2 --version', $o, $c); + if ($c == 0) { + $arcs['create']['application/x-bzip2'] = array('cmd' => 'tar', 'argc' => '-cjf', 'ext' => 'tbz'); + $arcs['extract']['application/x-bzip2'] = array('cmd' => 'tar', 'argc' => '-xjf', 'ext' => 'tbz'); + } + } + + exec('zip --version', $o, $c); + if ($c == 0) { + $arcs['create']['application/zip'] = array('cmd' => 'zip', 'argc' => '-r9', 'ext' => 'zip'); + } + + exec('unzip --help', $o, $c); + if ($c == 0) { + $arcs['extract']['application/zip'] = array('cmd' => 'unzip', 'argc' => '', 'ext' => 'zip'); + } + + exec('rar --version', $o, $c); + if ($c == 0 || $c == 7) { + $arcs['create']['application/x-rar'] = array('cmd' => 'rar', 'argc' => 'a -inul', 'ext' => 'rar'); + $arcs['extract']['application/x-rar'] = array('cmd' => 'rar', 'argc' => 'x -y', 'ext' => 'rar'); + } else { + $test = exec('unrar', $o, $c); + if ($c==0 || $c == 7) { + $arcs['extract']['application/x-rar'] = array('cmd' => 'unrar', 'argc' => 'x -y', 'ext' => 'rar'); + } + } + + exec('7za --help', $o, $c); + if ($c == 0) { + $arcs['create']['application/x-7z-compressed'] = array('cmd' => '7za', 'argc' => 'a', 'ext' => '7z'); + $arcs['extract']['application/x-7z-compressed'] = array('cmd' => '7za', 'argc' => 'e -y', 'ext' => '7z'); + + if (empty($arcs['create']['application/x-gzip'])) { + $arcs['create']['application/x-gzip'] = array('cmd' => '7za', 'argc' => 'a -tgzip', 'ext' => 'tar.gz'); + } + if (empty($arcs['extract']['application/x-gzip'])) { + $arcs['extract']['application/x-gzip'] = array('cmd' => '7za', 'argc' => 'e -tgzip -y', 'ext' => 'tar.gz'); + } + if (empty($arcs['create']['application/x-bzip2'])) { + $arcs['create']['application/x-bzip2'] = array('cmd' => '7za', 'argc' => 'a -tbzip2', 'ext' => 'tar.bz'); + } + if (empty($arcs['extract']['application/x-bzip2'])) { + $arcs['extract']['application/x-bzip2'] = array('cmd' => '7za', 'argc' => 'a -tbzip2 -y', 'ext' => 'tar.bz'); + } + if (empty($arcs['create']['application/zip'])) { + $arcs['create']['application/zip'] = array('cmd' => '7za', 'argc' => 'a -tzip -l', 'ext' => 'zip'); + } + if (empty($arcs['extract']['application/zip'])) { + $arcs['extract']['application/zip'] = array('cmd' => '7za', 'argc' => 'e -tzip -y', 'ext' => 'zip'); + } + if (empty($arcs['create']['application/x-tar'])) { + $arcs['create']['application/x-tar'] = array('cmd' => '7za', 'argc' => 'a -ttar -l', 'ext' => 'tar'); + } + if (empty($arcs['extract']['application/x-tar'])) { + $arcs['extract']['application/x-tar'] = array('cmd' => '7za', 'argc' => 'e -ttar -y', 'ext' => 'tar'); + } + } + + $this->_options['archivers'] = $arcs; + foreach ($this->_options['archiveMimes'] as $k=>$mime) { + if (!isset($this->_options['archivers']['create'][$mime])) { + unset($this->_options['archiveMimes'][$k]); + } + } + if (empty($this->_options['archiveMimes'])) { + $this->_options['archiveMimes'] = array_keys($this->_options['archivers']['create']); + } + } + + + /** + * Return mimetype detect method name + * + * @return string + **/ + protected function _getMimeDetect() + { + if (class_exists('finfo')) { + return 'finfo'; + } elseif (function_exists('mime_content_type') && (mime_content_type(__FILE__) == 'text/x-php' || mime_content_type(__FILE__) == 'text/x-c++')) { + return 'mime_content_type'; + } elseif (function_exists('exec')) { + $type = exec('file -ib '.escapeshellarg(__FILE__)); + if (0 === strpos($type, 'text/x-php') || 0 === strpos($type, 'text/x-c++')) + { + return 'linux'; + } + $type = exec('file -Ib '.escapeshellarg(__FILE__)); + if (0 === strpos($type, 'text/x-php') || 0 === strpos($type, 'text/x-c++')) + { + return 'bsd'; + } + } + return 'internal'; + } + + + /** + * Return file path hash + * + * @param string $path + * @return string + **/ + protected function _hash($path) + { + return md5($path); + } + + /** + * Return file URL + * + * @param string $path + * @return string + **/ + protected function _path2url($path) + { + $dir = substr(dirname($path), strlen($this->_options['root'])+1); + $file = rawurlencode(basename($path)); + return $this->_options['URL'].($dir ? str_replace(DIRECTORY_SEPARATOR, '/', $dir).'/' : '').$file; + } + + /** + * Return normalized path, this works the same as os.path.normpath() in Python + * + * @param string $path path + * @return string + **/ + protected function _normpath($path) + { + if (empty($path)) + return '.'; + + if (strpos($path, '/') === 0) + $initial_slashes = true; + else + $initial_slashes = false; + if ( + ($initial_slashes) && + (strpos($path, '//') === 0) && + (strpos($path, '///') === false) + ) + $initial_slashes = 2; + $initial_slashes = (int) $initial_slashes; + + $comps = explode('/', $path); + $new_comps = array(); + foreach ($comps as $comp) + { + if (in_array($comp, array('', '.'))) + continue; + if ( + ($comp != '..') || + (!$initial_slashes && !$new_comps) || + ($new_comps && (end($new_comps) == '..')) + ) + array_push($new_comps, $comp); + elseif ($new_comps) + array_pop($new_comps); + } + $comps = $new_comps; + $path = implode('/', $comps); + if ($initial_slashes) + $path = str_repeat('/', $initial_slashes) . $path; + if ($path) + return $path; + else + return '.'; + } + + /** + * Pack error message in $this->_result['errorData'] + * + * @param string $path path to file + * @param string $msg error message + * @return bool always false + **/ + protected function _errorData($path, $msg) + { + $path = preg_replace('|^'.preg_quote($this->_options['root']).'|', $this->_fakeRoot, $path); + if (!isset($this->_result['errorData'])) { + $this->_result['errorData'] = array(); + } + $this->_result['errorData'][$path] = $msg; + return false; + } + + protected function _utime() + { + $time = explode(" ", microtime()); + return (double)$time[1] + (double)$time[0]; + } + +} diff --git a/referencia/template/reports.html b/referencia/template/reports.html new file mode 100644 index 0000000..98a6124 --- /dev/null +++ b/referencia/template/reports.html @@ -0,0 +1,253 @@ + + + + +Reports | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + + + + + +
          + +
          + + + + + + + + Logo + + + +
          + Avatar +
          +

          John Doe

          + youremail@domain.com +

          + Account Settings Logout +

          +
          +
          +
          + + + + + +
          + + + +
          +
          + +
          +

          Sample Chart

          +
          +
          +
          +
          + +
          +

          Annotation

          +
          +
          +
          +
          + +
          +

          Real Time Chart

          +
          +
          +

          You can update a chart periodically to get a real-time effect + by using a timer to insert the new data in the plot and redraw it.

          +
          +
          + + +
          + +
          +
          + +
          +
          + +
          +

          EARNINGS

          +
          + +

          $232.45

          +

          Estimate earnings by the end of the day: $300.00

          + +
          + +
          +

          $412.30

          + Yesterday's earnings +
          + +
          +

          $2,796.98

          + This month's earnings +
          + + +
          +
          + +
          +

          Pie Chart

          +
          +
          +
          +
          + +
          +

          PROGRESS BAR

          +
          + +
          + Storage (60%) +
          +
          + +
          + Bandwidth (86%) +
          +
          + +
          + Impression (34%) +
          +
          + +
          +
          + + +
          +

          Another Progress Bar

          +
          + +
          + Storage +
          60%
          +
          + +
          + Bandwidth +
          86%
          +
          + +
          + Impressions +
          34%
          +
          + +
          +
          + +
          +
          + +
          + +
          + +
          + + + + diff --git a/referencia/template/tables.html b/referencia/template/tables.html new file mode 100644 index 0000000..edac372 --- /dev/null +++ b/referencia/template/tables.html @@ -0,0 +1,683 @@ + + + + +Table Styling | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + +
          + +
          + + + + + + + + Logo + + + +
          + Avatar +
          +

          John Doe

          + youremail@domain.com +

          + Account Settings Logout +

          +
          +
          +
          + + + + + +
          + + + +
          + +

          Table Styling

          + +
          +

          Default table using colgroup

          +
          + + + + + + + + + + + + + + + + + +
          Column 1Column 2Column 3ImpressionsPercentageColumn 6
          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
          Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
          Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
          Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
          Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
          +
          + +
          + +
          +

          Static Table

          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          Column 1Column 2Column 3ImpressionsPercentageColumn 6
          Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
          Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
          Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
          Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
          Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
          + +

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          Rendering engineBrowserPlatform(s)Engine versionCSS grade
          Trident + Internet + Explorer + 4.0 + Win 95+4X
          TridentInternet + Explorer 5.0Win 95+5C
          TridentInternet + Explorer 5.5Win 95+5.5A
          TridentInternet + Explorer 6Win 98+6A
          TridentInternet Explorer 7Win XP SP2+7A
          TridentAOL browser (AOL desktop)Win XP6A
          GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
          GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
          GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
          GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
          GeckoCamino 1.0OSX.2+1.8A
          GeckoCamino 1.5OSX.3+1.8A
          GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
          GeckoNetscape Browser 8Win 98SE+1.7A
          GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
          GeckoMozilla 1.0Win 95+ / OSX.1+1A
          GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
          GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
          GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
          GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
          GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
          GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
          GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
          GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
          GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
          GeckoEpiphany 2.20Gnome1.8A
          WebkitSafari 1.2OSX.3125.5A
          WebkitSafari 1.3OSX.3312.8A
          WebkitSafari 2.0OSX.4+419.3A
          WebkitSafari 3.0OSX.4+522.1A
          WebkitOmniWeb 5.5OSX.4+420A
          WebkitiPod Touch / iPhoneiPod420.1A
          WebkitS60S60413A
          PrestoOpera 7.0Win 95+ / OSX.1+-A
          PrestoOpera 7.5Win 95+ / OSX.2+-A
          PrestoOpera 8.0Win 95+ / OSX.2+-A
          PrestoOpera 8.5Win 95+ / OSX.2+-A
          PrestoOpera 9.0Win 95+ / OSX.3+-A
          PrestoOpera 9.2Win 88+ / OSX.3+-A
          PrestoOpera 9.5Win 88+ / OSX.3+-A
          PrestoOpera for WiiWii-A
          PrestoNokia N800N800-A
          PrestoNintendo DS browserNintendo DS8.5C/A1
          KHTMLKonqureror 3.1KDE 3.13.1C
          KHTMLKonqureror 3.3KDE 3.33.3A
          KHTMLKonqureror 3.5KDE 3.53.5A
          TasmanInternet Explorer 4.5Mac OS 8-9-X
          TasmanInternet Explorer 5.1Mac OS 7.6-91C
          TasmanInternet Explorer 5.2Mac OS 8-X1C
          MiscNetFront 3.1Embedded devices-C
          MiscNetFront 3.4Embedded devices-A
          Rendering engineBrowserPlatform(s)Engine versionCSS grade
          + + +
          + +
          + +
          + +
          + + + + diff --git a/referencia/template/users.html b/referencia/template/users.html new file mode 100644 index 0000000..a994f55 --- /dev/null +++ b/referencia/template/users.html @@ -0,0 +1,236 @@ + + + + +Users | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + +
          + +
          + + + + + + + + Logo + + + +
          + Avatar +
          +

          John Doe

          + youremail@domain.com +

          + Account Settings Logout +

          +
          +
          +
          + + + + + +
          + + + +
          + +

          Manage Users

          + + Add New User + + + +
          + +
          + + + + Delete + +
          + + + + + + + + + + + + + + + +
          NameEmailLocationAction
          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          Mienard Lumaadname@yourdomain.comPhilippinesEdit   Delete
          Rolando Palosoname@yourdomain.comPhilippinesEdit   Delete
          Hazel Nuttxyz@yourdomain.comLondonEdit   Delete
          Melody Sunshinemed@yourdomain.comUnited StatesEdit   Delete
          Justino Mellejorjusme@yourdomain.comAustraliaEdit   Delete
          +
          + +
          + +
          + +
          + +
          + + + + diff --git a/src/404.html b/src/404.html new file mode 100644 index 0000000..3434298 --- /dev/null +++ b/src/404.html @@ -0,0 +1,104 @@ + + + + +404 Page Not Found | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + +
          + +
          + + + + + + + + Logo + + + +
          + Avatar +
          +

          John Doe

          + youremail@domain.com +

          + Account Settings Logout +

          +
          +
          +
          + +
          +

          Page Not Found

          +
          +

          The page you are looking for is not found.

          +
          + +
          + + + + diff --git a/src/buttons.html b/src/buttons.html new file mode 100644 index 0000000..82c5a87 --- /dev/null +++ b/src/buttons.html @@ -0,0 +1,255 @@ + + + + +Buttons & Icons | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + +
          + +
          + + + + + + + + Logo + + + +
          + Avatar +
          +

          John Doe

          + youremail@domain.com +

          + Account Settings Logout +

          +
          +
          +
          + + + + + +
          + + + +
          + +

          Buttons & Icons

          + +
          +
          +

          Small Icons

          +
          + + + + + + + + + + + + + + + + + + + + +

          + + + + + + + + + + + + + + + + + + + + + +
          +
          +
          + +
          + + + + + +
          + +
          + +
          + +
          + + + + + diff --git a/src/calendar.html b/src/calendar.html new file mode 100644 index 0000000..42dbfcb --- /dev/null +++ b/src/calendar.html @@ -0,0 +1,165 @@ + + + + +Calendar | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + + +
          + +
          + + + + + + + + Logo + + + +
          + Avatar +
          +

          John Doe

          + youremail@domain.com +

          + Account Settings Logout +

          +
          +
          +
          + + + + + +
          + + + +
          + +
          +
          +
          +
          +
          +
          + +
          +
          +
          +

          Draggable Events

          +
          + +
          +
          My friend's birthday event
          +
          My wedding
          +
          Company party
          +
          Island hopping event
          +
          Fun run event
          +
          +

          Drag the events to the calendar to set a schedule.

          +
          +
          +
          +
          + +
          + +
          + +
          + + + + diff --git a/src/css/custom.css b/src/css/custom.css new file mode 100644 index 0000000..85de91f --- /dev/null +++ b/src/css/custom.css @@ -0,0 +1,63 @@ +@charset "utf-8"; +/* CSS Document */ + +span.timestamp { + float: right; + font-size: 93%; + color: #808080; +} + +.imgleft2 { float: left; margin: 0 10px 0 0; padding: 5px;} +.imgleft2 { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } + + +.column-filter-widgets { + padding: 10px 10px; +} +.column-filter-widget { + display: inline-block; + padding-right: 5px; +} + +.borrador { + background: none repeat scroll 0 0 #FF9C00; + border-radius: 5px 5px 5px 5px; + color: #FFFFFF; + padding: 2px 5px; + cursor: pointer; +} + +.rechazado { + background: none repeat scroll 0 0 #5B5B5B; + border-radius: 5px 5px 5px 5px; + color: #FFFFFF; + padding: 2px 5px; + cursor: pointer; + +} + +.proceso { + background: none repeat scroll 0 0 #7AC212; + border-radius: 5px 5px 5px 5px; + color: #FFFFFF; + padding: 2px 5px; + cursor: pointer; + +} + +.asignado { + background: none repeat scroll 0 0 #C21179; + border-radius: 5px 5px 5px 5px; + color: #FFFFFF; + padding: 2px 5px; + cursor: pointer; +} + +.gris { + color: #999; +} + + +.form_default label { + color: #006699 !important; +} \ No newline at end of file diff --git a/src/css/ie7.css b/src/css/ie7.css new file mode 100644 index 0000000..9105ce7 --- /dev/null +++ b/src/css/ie7.css @@ -0,0 +1,7 @@ +.header { z-index: 10; } +.tabmenu { top: 52px; z-index: -1; } +.topheader ul li { position: relative; } +.loginbox button { padding: 5px 8px; } +#search input { padding-top: 6px; } +.dropbox ul { position: relative; z-index: 100; } +.notification { position: relative; z-index: 100; } \ No newline at end of file diff --git a/src/css/ie8.css b/src/css/ie8.css new file mode 100644 index 0000000..b2f7746 --- /dev/null +++ b/src/css/ie8.css @@ -0,0 +1,2 @@ +.loginbox button { padding: 7px 14px; } +#search input { padding-top: 6px; } diff --git a/src/css/ie9.css b/src/css/ie9.css new file mode 100644 index 0000000..2d30423 --- /dev/null +++ b/src/css/ie9.css @@ -0,0 +1 @@ +.loginbox button { padding: 7px 14px; } diff --git a/src/css/plugins/colorbox.css b/src/css/plugins/colorbox.css new file mode 100644 index 0000000..7edc339 --- /dev/null +++ b/src/css/plugins/colorbox.css @@ -0,0 +1,37 @@ +/* + ColorBox Core Style: + The following CSS is consistent between example themes and should not be altered. +*/ +#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} +#cboxOverlay{position:fixed; width:100%; height:100%;} +#cboxMiddleLeft, #cboxBottomLeft{clear:left;} +#cboxContent{position:relative;} +#cboxLoadedContent{overflow:auto;} +#cboxTitle{margin:0;} +#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;} +#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} +.cboxPhoto{float:left; margin:auto; border:0; display:block;} +.cboxIframe{width:100%; height:100%; display:block; border:0;} + +/* + User Style: + Change the following styles to modify the appearance of ColorBox. They are + ordered & tabbed in a way that represents the nesting of the generated HTML. +*/ +#cboxOverlay{background:#000;} +#colorbox{} + #cboxContent{margin-top:20px;} + .cboxIframe{background:#fff;} + #cboxError{padding:50px; border:1px solid #ccc;} + #cboxLoadedContent{border:5px solid #000; background:#fff;} + #cboxTitle{position:absolute; top:-20px; left:0; color:#ccc;} + #cboxCurrent{position:absolute; top:-20px; right:0px; color:#ccc;} + #cboxSlideshow{position:absolute; top:-20px; right:90px; color:#fff;} + #cboxPrevious{position:absolute; top:50%; left:5px; margin-top:-32px; background:url(../../images/colorbox/controls.png) no-repeat top left; width:28px; height:65px; text-indent:-9999px;} + #cboxPrevious:hover{background-position:bottom left;} + #cboxNext{position:absolute; top:50%; right:5px; margin-top:-32px; background:url(../../images/colorbox/controls.png) no-repeat top right; width:28px; height:65px; text-indent:-9999px;} + #cboxNext:hover{background-position:bottom right;} + #cboxLoadingOverlay{background:#000;} + #cboxLoadingGraphic{background:url(../../images/colorbox/loading.gif) no-repeat center center;} + #cboxClose{position:absolute; top:5px; right:5px; display:block; background:url(../../images/colorbox/controls.png) no-repeat top center; width:38px; height:19px; text-indent:-9999px;} + #cboxClose:hover{background-position:bottom center;} \ No newline at end of file diff --git a/src/css/plugins/colorpicker.css b/src/css/plugins/colorpicker.css new file mode 100644 index 0000000..268db0e --- /dev/null +++ b/src/css/plugins/colorpicker.css @@ -0,0 +1,161 @@ +.colorpicker { + width: 356px; + height: 176px; + overflow: hidden; + position: absolute; + background: url(../../images/colorpicker/colorpicker_background.png); + font-family: Arial, Helvetica, sans-serif; + display: none; +} +.colorpicker_color { + width: 150px; + height: 150px; + left: 14px; + top: 13px; + position: absolute; + background: #f00; + overflow: hidden; + cursor: crosshair; +} +.colorpicker_color div { + position: absolute; + top: 0; + left: 0; + width: 150px; + height: 150px; + background: url(../../images/colorpicker/colorpicker_overlay.png); +} +.colorpicker_color div div { + position: absolute; + top: 0; + left: 0; + width: 11px; + height: 11px; + overflow: hidden; + background: url(../../images/colorpicker/colorpicker_select.gif); + margin: -5px 0 0 -5px; +} +.colorpicker_hue { + position: absolute; + top: 13px; + left: 171px; + width: 35px; + height: 150px; + cursor: n-resize; +} +.colorpicker_hue div { + position: absolute; + width: 35px; + height: 9px; + overflow: hidden; + background: url(../../images/colorpicker/colorpicker_indic.gif) left top; + margin: -4px 0 0 0; + left: 0px; +} +.colorpicker_new_color { + position: absolute; + width: 60px; + height: 30px; + left: 213px; + top: 13px; + background: #f00; +} +.colorpicker_current_color { + position: absolute; + width: 60px; + height: 30px; + left: 283px; + top: 13px; + background: #f00; +} +.colorpicker input { + background-color: transparent; + border: 1px solid transparent; + position: absolute; + font-size: 10px; + font-family: Arial, Helvetica, sans-serif; + color: #898989; + top: 4px; + right: 11px; + text-align: right; + margin: 0; + padding: 0; + height: 11px; +} +.colorpicker_hex { + position: absolute; + width: 72px; + height: 22px; + background: url(../../images/colorpicker/colorpicker_hex.png) top; + left: 212px; + top: 142px; +} +.colorpicker_hex input { + right: 6px; +} +.colorpicker_field { + height: 22px; + width: 62px; + background-position: top; + position: absolute; +} +.colorpicker_field span { + position: absolute; + width: 12px; + height: 22px; + overflow: hidden; + top: 0; + right: 0; + cursor: n-resize; +} +.colorpicker_rgb_r { + background-image: url(../../images/colorpicker/colorpicker_rgb_r.png); + top: 52px; + left: 212px; +} +.colorpicker_rgb_g { + background-image: url(../../images/colorpicker/colorpicker_rgb_g.png); + top: 82px; + left: 212px; +} +.colorpicker_rgb_b { + background-image: url(../../images/colorpicker/colorpicker_rgb_b.png); + top: 112px; + left: 212px; +} +.colorpicker_hsb_h { + background-image: url(../../images/colorpicker/colorpicker_hsb_h.png); + top: 52px; + left: 282px; +} +.colorpicker_hsb_s { + background-image: url(../../images/colorpicker/colorpicker_hsb_s.png); + top: 82px; + left: 282px; +} +.colorpicker_hsb_b { + background-image: url(../../images/colorpicker/colorpicker_hsb_b.png); + top: 112px; + left: 282px; +} +.colorpicker_submit { + position: absolute; + width: 22px; + height: 22px; + background: url(../../images/colorpicker/colorpicker_submit.png) top; + left: 322px; + top: 142px; + overflow: hidden; +} +.colorpicker_focus { + background-position: center; +} +.colorpicker_hex.colorpicker_focus { + background-position: bottom; +} +.colorpicker_submit.colorpicker_focus { + background-position: bottom; +} +.colorpicker_slider { + background-position: bottom; +} diff --git a/src/css/plugins/elfinder.css b/src/css/plugins/elfinder.css new file mode 100644 index 0000000..6b5cb18 --- /dev/null +++ b/src/css/plugins/elfinder.css @@ -0,0 +1,834 @@ + +/* file manager window */ + +.el-finder { + width:100%; + min-width:400px; + background-color:#eee; + font-size: 12px; + font-family: DroidSansRegular, Arial, Helvetica, sans-serif; +} + +.el-finder-undocked { + position:absolute; + min-width:400px; + border:1px solid #ccc; + padding:5px; +} + +/* error messages */ +.el-finder-err { + padding: 15px; + text-align:center; + background: #fee; + color: #cc0509; + border: 2px #844 solid; + border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px; +} + +/* disabled */ +.el-finder-disabled .el-finder-toolbar li, +.el-finder-disabled .el-finder-nav, +.el-finder-disabled .el-finder-cwd { + opacity:0.35; filter:Alpha(Opacity=35); +} + +.el-finder .el-finder-droppable { + background-color:#99ccff; +} +.el-finder .ui-selected { + background-color:#ccc; +/* background-color:#c5e4f9;*/ +} + +.el-finder input { + margin:0; + padding:0; + outline:none; + border:1px solid #ccc; +} + +/************************************/ +/* toolbar */ +/************************************/ + +.el-finder-toolbar ul { + padding:5px 7px; + margin:0; + list-style:none; +} + +.el-finder-toolbar ul li { + display: -moz-inline-stack; + display: inline-block; + zoom: 1; + *display: inline; + vertical-align: top; + height:22px; + width:23px; + margin:0 2px; + padding:0; + background:url('../../images/filemanager/toolbar.png') no-repeat; + border:1px solid #ccc; + border-radius:3px; + -moz-border-radius:3px; + -webkit-border-radius:3px; +} +.el-finder-toolbar ul li.delim { + border:none; + width:3px; + background-position: 1px -610px; +} + +.el-finder-toolbar ul li.el-finder-tb-hover { + border:1px solid #fff; + background-color:#ccc; +} + +.el-finder-toolbar ul li.disabled { opacity:0.35; filter:Alpha(Opacity=35); } + +.el-finder-toolbar ul li.back { background-position: 3px -171px; } +.el-finder-toolbar ul li.reload { background-position: 3px -192px; } +.el-finder-toolbar ul li.select { background-position: 3px -214px; } +.el-finder-toolbar ul li.open { background-position: 4px -235px; } +.el-finder-toolbar ul li.mkdir { background-position: 4px -258px; } +.el-finder-toolbar ul li.mkfile { background-position: 4px -280px; } +.el-finder-toolbar ul li.upload { background-position: 3px -305px; } +.el-finder-toolbar ul li.rm { background-position: 3px -330px; } +.el-finder-toolbar ul li.copy { background-position: 3px -356px; } +.el-finder-toolbar ul li.paste { background-position: 3px -381px; } +.el-finder-toolbar ul li.rename { background-position: 3px -407px; } +.el-finder-toolbar ul li.edit { background-position: 4px -435px; } +.el-finder-toolbar ul li.info { background-position: 3px -462px; } +.el-finder-toolbar ul li.help { background-position: 3px -487px; } +.el-finder-toolbar ul li.icons { background-position: 3px -537px; } +.el-finder-toolbar ul li.list { background-position: 3px -557px; } +.el-finder-toolbar ul li.uncompress { background-position: 3px -583px; } +.el-finder-toolbar ul li.resize { background-position: 3px -656px; } +.el-finder-toolbar ul li.quicklook { background-position: 3px -726px; } + +.el-finder-dock-button { + width:19px; + height:19px; + float:right; + margin: 2px; + border:1px solid #ccc; + border-radius:3px; + -moz-border-radius:3px; + -webkit-border-radius:3px; + background:url('../../images/filemanager/toolbar.png') 2px -705px no-repeat; +} + +.ui-dialog .el-finder-dock-button { + background-position:2px -681px; +} + +.el-finder-dock-button-hover { + background-color:#ccc; + border:1px solid #fff; +} + +/**********************************************************/ +/* workzone, container for navigation and current folder */ +/**********************************************************/ + +.el-finder-workzone { + background-color:#f7f7f7; + border-top:1px solid #ccc; + border-bottom:1px solid #ccc; + position:relative; +} + +.el-finder-spinner { + position:absolute; + top:37%; + left:37%; + width:250px; + height:50px; + background:transparent url(../../images/filemanager/spinner.gif) 50% 50% no-repeat; + display:none; +} + +/* error in workzone */ +.el-finder-workzone p.el-finder-err { + display:none; + position:absolute; + left:37%; + top:20px; +} + +/* navigation and current directory */ +.el-finder-nav, .el-finder-cwd { + height:350px; + overflow:auto; +} + +/************************************/ +/* navigation */ +/************************************/ + +.el-finder-nav { + float:left; + width : 200px; + background:#fff; +} + +.el-finder-nav .ui-resizable-e { + right:0; +} + +/* folders tree */ +.el-finder-nav ul { + list-style:none; + margin:0; + padding:0; +} + +.el-finder-nav ul li { + clear:both; +} + +ul.el-finder-tree, ul.el-finder-places { + margin-bottom:1em; +} + +.el-finder-nav ul li ul { + margin-left:12px; +} + +.el-finder-nav ul div { + width:12px; + height:20px; + float:left; + margin-right:23px; +} + +.el-finder-nav a, .el-finder-nav div.collapsed { + background-image:url(../../images/filemanager/toolbar.png); + background-repeat:no-repeat; +} +.el-finder-nav div.collapsed { + background-position: -1px 7px; +} +.el-finder-nav div.expanded { + background-position: -1px -9px; +} + +.el-finder-nav a { + display: block; + white-space:nowrap; + line-height:20px; + color:#444; + cursor:default; + text-decoration:none; + outline:none; + background-position: 15px -56px; + font-size: 11px; +} + +.el-finder-nav a.dropbox { + background-position: 15px -80px; +} +.el-finder-nav a.readonly { + background-position: 15px -104px; +} +.el-finder-nav a.noaccess { + background-position: 15px -750px; +} + +.el-finder-nav a.selected { +/* background-color:#ccc;*/ + background-color:#c5e4f9; + background-position: 15px -128px; +} + +.el-finder-nav a.el-finder-tree-root { + background-position: 15px -30px; + font-weight:bold; + font-size: 11px; +} + +.el-finder-nav a.el-finder-places-root { + background-position: 15px -152px; + font-weight:bold; + font-size: 11px; + margin-top: 5px; +} + +.el-finder-nav ul.el-finder-tree .el-finder-droppable { + background-position: 15px -237px; +} + + +/***********************************/ +/* current working directory */ +/************************************/ + +.el-finder-cwd { + border-left:1px solid #ddd; + padding:10px; +} + +/********** view: icons ************/ +.el-finder-cwd div { + width: 81px; + display: -moz-inline-stack; + display: inline-block; + vertical-align: top; + zoom: 1; + *display: inline; + margin:0 3px 3px 0; + padding:1px 0; + text-align:center; + border-radius:2px; + -moz-border-radius:2px; + -webkit-border-radius:2px; + color:#333; + background-color:transparent; +} + + +.el-finder-cwd p, +.el-finder-ql p { + width:48px; + height:48px; + margin:1px auto; + padding:0; + border-radius:5px; + -moz-border-radius:5px; + -webkit-border-radius:5px; + background: url('../../images/filemanager/icons-big.png') -1px 1px no-repeat; +} + +/* mimetypes */ + +.directory p { background-position: 0 -50px; } +.application p,.x-java p { background-position: -1px -150px; } +.audio p { background-position: -1px -300px; } +.image p { background-position: -1px -250px; } +.text p, .x-empty p { background-position: -1px -200px; } +.video p { background-position: -1px -350px; } +.vnd-adobe-photoshop p, .postscript p { background-position: 0 -250px; } +/* texts */ +.rtf p, .rtfd p { background-position: 0 -400px; } +.html p { background-position: 0 -550px; } +.css p { background-position: 0 -600px; } +.javascript p, .x-javascript p { background-position: 0 -650px; } +.x-perl p { background-position: 0 -700px; } +.x-python p { background-position: 0 -750px; } +.x-ruby p { background-position: 0 -800px; } +.x-sh p, .x-shellscript p { background-position: 0 -850px; } +.x-c p, .x-java-source p { background-position: 0 -900px; } +.x-php p { background-position: 0 -950px; } +.xml p { background-position: 0 -1000px; } +/* applications */ +.vnd-ms-office p, +.msword p, +.vnd-ms-word p, +.vnd-oasis-opendocument-text p, +.ms-excel p, +.vnd-ms-excel p, +.vnd-oasis-opendocument-spreadsheet p, +.vnd-ms-powerpoint p, +.vnd-oasis-opendocument-presentation p { background-position: 0 -500px; } +.pdf p { background-position: 0 -450px; } +.x-shockwave-flash p { background-position: 0 -1250px; } +/* archives */ +.zip p, .x-7z-compressed p { background-position: 0 -1050px; } +.x-gzip p, .x-tar p { background-position: 0 -1100px; } +.x-bzip p, .x-bzip2 p { background-position: 0 -1150px; } +.x-rar p, .x-rar-compressed p { background-position: 0 -1200px; } + + +.el-finder-cwd div.el-finder-droppable p { + background-position: 0 -98px; +} + +.el-finder-cwd label { + display:block; + font-size:11px; + line-height:13px; + padding:0 1px; + margin:0; + height:25px; + overflow:hidden; + cursor:default; +} + +.el-finder-cwd div input { + background:#fff; + color:#000; + width:81px; + margin-left:-2px; + outline:none; + border:1px solid #ccc; + text-align:center; +} + +.el-finder-cwd div em { + float:left; + margin-top:-40px; + margin-left:9px; + width:15px; + height:16px; + background:url(../../images/filemanager/icons-big.png) -17px -1310px no-repeat; +} + +.el-finder-cwd div em.dropbox { + float:right; + margin-right:9px; + background-position: 0 -1308px; +} +.el-finder-cwd div em.noread { + float:right; + margin-right:9px; + background-position: 0 -1310px; +} +.el-finder-cwd div em.readonly { + float:right; + margin-right:9px; + background-position: -34px -1306px; +} + +.el-finder-cwd div em.noaccess { + float:right; + margin-right:9px; + background-position: 0 -1430px; +} + +/********** view: list ************/ + +.el-finder-cwd table { + width:100%; +/* *width:99%;*/ + border-collapse: collapse; + border-spacing: 0; + border:1px solid #ccc; + border-top:0 solid; + border-left:0 solid; + margin:-3px -3px; +} + +.el-finder-cwd table tr { + background:transparent; +} + +.el-finder-cwd table tr.el-finder-row-odd { + background-color:#eee; +} + +.el-finder-cwd table tr.ui-selected { + background-color:#ccc; +} + +.el-finder-cwd table th, +.el-finder-cwd table td { + padding:3px 5px; + border-left:1px solid #ccc; + cursor:default; + white-space:nowrap; + color:#000; + +} + +.el-finder-cwd table th { + text-align:left; + background:#fbf9ee; + font-size:.86em; +} + +.el-finder-cwd table td.icon { + width:24px; +} + +.el-finder-cwd table p { + width:24px; + height:16px; + margin:0; + padding:0; + background:url(../../images/filemanager/icons-small.png) 4px 0 no-repeat; +} + +.el-finder-cwd table .size { + text-align:right; +} + +tr.directory p { background-position:4px -16px; } +tr.text p { background-position:5px -34px; } +tr.image p { background-position:4px -51px; } +tr.audio p { background-position:4px -70px; } +tr.video p { background-position:5px -89px; } +tr.application p { background-position:4px -108px; } +/* text */ +tr.html p { background-position:5px -188px; } +tr.javascript p, +tr.x-javascript p, +tr.css p, +tr.x-sql p, +tr.xml p, +tr.x-python p, +tr.x-java-source p, +tr.x-perl p, +tr.x-ruby p { background-position:5px -228px; } +tr.x-php p { background-position:5px -247px; } +tr.x-c p { background-position:5px -208px; } +tr.x-shellscript p, +tr.x-sh p { background-position:5px -168px; } +tr.rtf p, tr.rtfd p { background-position:5px -148px; } +/* application */ +tr.x-shockwave-flash p { background-position:4px -266px; } +tr.pdf p { background-position:4px -285px; } +tr.vnd-ms-office p { background-position:4px -325px; } +tr.msword p, +tr.vnd-oasis-opendocument-text p, +tr.vnd-ms-word p { background-position:4px -346px; } +tr.vnd-ms-excel p, +tr.ms-excel p, +tr.vnd-oasis-opendocument-spreadsheet { background-position:4px -365px; } +tr.vnd-ms-powerpoint p, +tr.vnd-oasis-opendocument-presentation { background-position:4px -385px; } +/* archives */ +tr.x-tar p, +tr.x-gzip p, +tr.x-bzip p, +tr.x-bzip2 p, +tr.zip p, +tr.x-rar p, +tr.x-rar-compressed p, +tr.x-7z-compressed p { background-position:4px -305px; } + +tr.el-finder-droppable td.icon p { background-position:5px -450px; } + +.el-finder-cwd table td p em { + float:left; + width:10px; + height:12px; + margin-top:5px; + background:url(../../images/filemanager/icons-small.png) 0px -405px no-repeat; +} + +.el-finder-cwd table p em.readonly { background-position:0px -433px; } +.el-finder-cwd table p em.dropbox { background-position:0px -418px; } +.el-finder-cwd table p em.noread, +.el-finder-cwd table p em.noaccess { background-position:0px -470px; } + +/************************************/ +/* statusbar */ +/************************************/ + +.el-finder-statusbar { + height:25px; +} + +.el-finder-stat, +.el-finder-path, +.el-finder-sel { + padding:3px 9px 1px 9px; + font-size:11px; + color:#555; +} +/* current directory path */ +.el-finder-path { + float:left; +} +/* number folders/files in current directory and size */ +.el-finder-stat { + float:right; +} +/* info about selected files */ +.el-finder-sel { + text-align:center; +} + +/************************************/ +/* dialog window */ +/************************************/ +.el-finder-dialog { + font-size:.84em; +} +.el-finder-dialog form p, .el-finder-dialog .ui-tabs p { + margin:.5em; +} +.el-finder-dialog .ui-dialog-titlebar { + padding: .2em .1em .1em .8em; +} +.el-finder-dialog .ui-dialog-buttonpane { + padding: .1em 1em .1em .4em; + font-size:.9em; +} +.el-finder-dialog .ui-dialog-content { + padding:5px; +} + +.el-finder-dialog hr { + border:0; + border-bottom: 1px #ccc solid; + clear:both +} +.el-finder-dialog ul { + margin-top:0; +} + +.el-finder-dialog kbd { font-size:1.2em;} +.el-finder-dialog a { outline: none;} + +.el-finder-dialog textarea { + width:98.9%; + height:400px; + outline:none; + border:1px solid #ccc; + font-family: Arial, Helvetica, sans-serif; +} + +.ui-state-error { + margin: 5px 0; + padding:.5em; + clear:both; +} + +.el-finder-dialog .ui-state-error .ui-icon { + float: left; + margin-right: .3em; +} + +.el-finder-add-field { + cursor:pointer; +} + +.el-finder-add-field span { + float:left; + margin-right:.7em; +} + +.el-finder-dialog table { + width : 100%; +} + +.el-finder-dialog table td { + padding:2px 5px; + +} + +.el-finder-dialog .ui-tabs { + font-size:.98em; +} + +.el-finder-dialog .ui-tabs div { + padding:0 .5em; +} +.el-finder-dialog .ui-tabs-nav li a { + padding:.2em 1em; +} + +/************************************/ +/* contextmenu */ +/************************************/ + +.el-finder-contextmenu { + position:absolute; + width:200px; + background:#fff; + color:#000; + cursor:default; + border:1px solid #ccc; + padding:5px 0; + +} + +.el-finder-contextmenu div { + position:relative; + display:block; + margin:0; + padding:2px 29px; + white-space:nowrap; + font-size:11px; + font-family: Arial, Helvetica, sans-serif; + background:url('../../images/filemanager/toolbar.png') 0 0 no-repeat; +} + +.el-finder-contextmenu span { + float:right; + width:9px; + height:18px; + margin-right:-27px; + background:url(../../images/filemanager/toolbar.png) -4px 5px no-repeat; +} + +.el-finder-contextmenu div.el-finder-contextmenu-sub { + position:absolute; + top:0; + display:none; + margin:0; + padding:5px 0; + background:#fff; + border:1px solid #ccc; + border-radius:5px; + -moz-border-radius:5px; + -webkit-border-radius:5px; +} + + +.el-finder-contextmenu div.reload { background-position: 5px -192px; } +.el-finder-contextmenu div.select { background-position: 5px -214px; } +.el-finder-contextmenu div.open { background-position: 6px -235px; } +.el-finder-contextmenu div.mkdir { background-position: 6px -258px; } +.el-finder-contextmenu div.mkfile { background-position: 6px -280px; } +.el-finder-contextmenu div.upload { background-position: 5px -305px; } +.el-finder-contextmenu div.rm { background-position: 5px -330px; } +.el-finder-contextmenu div.copy { background-position: 5px -356px; } +.el-finder-contextmenu div.cut { background-position: 5px -631px; } +.el-finder-contextmenu div.duplicate { background-position: 5px -356px; } +.el-finder-contextmenu div.paste { background-position: 5px -381px; } +.el-finder-contextmenu div.rename { background-position: 5px -407px; } +.el-finder-contextmenu div.edit { background-position: 6px -435px; } +.el-finder-contextmenu div.info { background-position: 5px -462px; } +.el-finder-contextmenu div.help { background-position: 5px -487px; } +.el-finder-contextmenu div.icons { background-position: 5px -537px; } +.el-finder-contextmenu div.list { background-position: 5px -557px; } +.el-finder-contextmenu div.archive { background-position: 5px -583px; } +.el-finder-contextmenu div.extract { background-position: 5px -583px; } +.el-finder-contextmenu div.resize { background-position: 5px -655px; } +.el-finder-contextmenu div.quicklook { background-position: 5px -727px; } + +.el-finder-contextmenu div.delim { + margin:0; + padding:0; + height:1px; + border-top:1px solid #eee; + background:transparent; + display:block; +} +.el-finder-contextmenu div.hover { background-color:#99ccff; } + +.el-finder-places { + margin-top:.5em; +} + + +.el-finder-drag-helper { + padding:0; + cursor:move; + zoom:1; +} + +.el-finder-drag-helper div { + border:0 solid; + margin-left:-57px; + +} + +.el-finder-drag-copy { + background:url('../../images/filemanager/toolbar.png') 0 -771px no-repeat; +} + +.el-finder-drag-helper label { + border:1px solid #ccc; + background-color:#eee; + border-radius:5px; + -moz-border-radius:5px; + -webkit-border-radius:5px; +} + + +/************************************/ +/* QuickLook */ +/************************************/ + +.el-finder-ql { + position:absolute; + width:420px; + height:auto; + padding:12px 9px; + text-align:center; + border-radius:9px; + -moz-border-radius:9px; + -webkit-border-radius:9px; + background:url(../../images/filemanager/ql.png); + overflow: inherit !important; +} + +.el-finder-ql.directory p { background-position: 0 -50px; } + +/* toolbar */ +.el-finder-ql div.el-finder-ql-drag-handle { + height:18px; + font-size:14px; + background-color:#777; + margin:-12px -9px 12px -9px; + padding:3px 0 0 19px; + opacity:.8; + text-align:center; + white-space: nowrap; + overflow:hidden; + -moz-border-radius-topleft:9px; + -moz-border-radius-topright:9px; + -webkit-border-top-left-radius: 9px; + -webkit-border-top-right-radius: 9px; + border-top-left-radius: 9px; + border-top-right-radius: 9px; +} +/* close button */ +.el-finder-ql div.el-finder-ql-drag-handle span { + float:left; + margin:0 19px 0 -15px; +} +/* title in tolbar */ +.el-finder-ql div.el-finder-ql-drag-handle strong { + line-height:18px; + margin-left:-17px; + color:#fff; +} + +.el-finder-ql div.el-finder-ql-media { + width:100%; + padding:0; +} + +.el-finder-ql div.el-finder-ql-content { + width:100%; + font-size:.82em/1.3em; + font-family: Arial, Helvetica, sans-serif; + padding:5px 0; + overflow:hidden; +} + +.el-finder-ql div.el-finder-ql-content span, +.el-finder-ql div.el-finder-ql-content a { + display:block; + color: #fff; +} + +/* text files preview */ +.el-finder-ql iframe { + background:#fff; + width:100%; + height:315px; + padding:0; + margin:0; + border:none; + outline:none; +} + + +/* images preview */ +.el-finder-ql img { + margin:0 auto; + border:1px solid #fff; +} + +/* button help */ +.el-finder-help-std { + background: url(../../images/filemanager/icons-big.png) 0 -1380px no-repeat; + width:48px; + height:48px; + float:right; +} + +.el-finder-logo { + background: url(../../images/filemanager/icons-big.png) 0 -1329px no-repeat; + width:48px; + height:48px; + float:left; +} + +.el-finder-ql .ui-resizable-e, .el-finder-ql .ui-resizable-s { background:transparent !important;} diff --git a/src/css/plugins/fullcalendar.css b/src/css/plugins/fullcalendar.css new file mode 100644 index 0000000..dde5014 --- /dev/null +++ b/src/css/plugins/fullcalendar.css @@ -0,0 +1,578 @@ +/* + * FullCalendar v1.5.2 Stylesheet + * + * Copyright (c) 2011 Adam Shaw + * Dual licensed under the MIT and GPL licenses, located in + * MIT-LICENSE.txt and GPL-LICENSE.txt respectively. + * + * Date: Sun Aug 21 22:06:09 2011 -0700 + * + */ + + +.fc { + direction: ltr; + text-align: left; + } + +.fc table { + border-collapse: collapse; + border-spacing: 0; + } + +html .fc, +.fc table { + font-size: 1em; + } + +.fc td, +.fc th { + padding: 0; + vertical-align: top; + } + + + +/* Header +------------------------------------------------------------------------*/ + +.fc-header td { + white-space: nowrap; + } + +.fc-header-left { + width: 25%; + text-align: left; + } + +.fc-header-center { + text-align: center; + } + +.fc-header-right { + width: 25%; + text-align: right; + } + +.fc-header-title { + display: inline-block; + vertical-align: top; + } + +.fc-header-title h2 { + margin-top: 5px; + white-space: nowrap; + } + +.fc .fc-header-space { + padding-left: 10px; + display: none; + } + +.fc-header .fc-button { + margin-bottom: 1em; + vertical-align: top; + } + +/* buttons edges butting together */ + +.fc-header .fc-button { + margin-right: -1px; + } + +.fc-header .fc-corner-right { + margin-right: 1px; /* back to normal */ + } + +.fc-header .ui-corner-right { + margin-right: 0; /* back to normal */ + } + +/* button layering (for border precedence) */ + +.fc-header .fc-state-hover, +.fc-header .ui-state-hover { + z-index: 2; + } + +.fc-header .fc-state-down { + z-index: 3; + } + +.fc-header .fc-state-active, +.fc-header .ui-state-active { + z-index: 4; + } + + + +/* Content +------------------------------------------------------------------------*/ + +.fc-content { + clear: both; + background: #fcfcfc; + } + +.fc-view { + width: 100%; /* needed for view switching (when view is absolute) */ + overflow: hidden; + } + + + +/* Cell Styles +------------------------------------------------------------------------*/ + +.fc-widget-header, /* , usually */ +.fc-widget-content { /* , usually */ + border: 1px solid #ccc; + } + +.fc-state-highlight { /* today cell */ /* TODO: add .fc-today to */ + background: #ffc; + } + +.fc-cell-overlay { /* semi-transparent rectangle while dragging */ + background: #9cf; + opacity: .2; + filter: alpha(opacity=20); /* for IE */ + } + + + +/* Buttons +------------------------------------------------------------------------*/ + +.fc-button { + position: relative; + display: inline-block; + cursor: pointer; + } + + +.fc-button-inner { + position: relative; + float: left; + overflow: hidden; + } +/* +.fc-state-default .fc-button-inner { + border-style: solid; + border-width: 0 1px; + } */ + +.fc-button-content { + position: relative; + float: left; + height: 1.9em; + line-height: 1.9em; + padding: 0 .6em; + white-space: nowrap; + display: none; + } + +/* icon (for jquery ui) */ + +.fc-button-content .fc-icon-wrap { + position: relative; + float: left; + top: 50%; + } + +.fc-button-content .ui-icon { + position: relative; + float: left; + margin-top: -50%; + *margin-top: 0; + *top: -50%; + } + +/* gloss effect */ + +.fc-state-default .fc-button-effect { + display: none; + } + + + +/* Global Event Styles +------------------------------------------------------------------------*/ + +.fc-event { + font-size: .85em; + cursor: default; + background: url(../../images/blacktrans1.png) !important; /* default BACKGROUND color */ + } + +a.fc-event, +.fc-event-draggable { + cursor: pointer; + } + +a.fc-event { + text-decoration: none; + } + +.fc-rtl .fc-event { + text-align: right; + } + +.fc-event-skin { + color: #fff; /* default TEXT color */ + border: 0; + } + +.fc-event-inner { + position: relative; + width: 100%; + height: 100%; + border-style: solid; + border-width: 0; + overflow: hidden; + } + +.fc-event-time, +.fc-event-title { + padding: 0 5px; + display: inline-block; + } + +.fc .ui-resizable-handle { /*** TODO: don't use ui-resizable anymore, change class ***/ + display: block; + position: absolute; + z-index: 99999; + overflow: hidden; /* hacky spaces (IE6/7) */ + font-size: 300%; /* */ + line-height: 50%; /* */ + } + + + +/* Horizontal Events +------------------------------------------------------------------------*/ + +.fc-event-hori { + border-width: 1px 0; + margin-bottom: 1px; + } + +/* resizable */ + +.fc-event-hori .ui-resizable-e { + top: 0 !important; /* importants override pre jquery ui 1.7 styles */ + right: -3px !important; + width: 7px !important; + height: 100% !important; + cursor: e-resize; + } + +.fc-event-hori .ui-resizable-w { + top: 0 !important; + left: -3px !important; + width: 7px !important; + height: 100% !important; + cursor: w-resize; + } + +.fc-event-hori .ui-resizable-handle { + _padding-bottom: 14px; /* IE6 had 0 height */ + } + + + +/* Fake Rounded Corners (for buttons and events) +------------------------------------------------------------*/ + +.fc-corner-left { + margin-left: 1px; + } + +.fc-corner-left .fc-button-inner, +.fc-corner-left .fc-event-inner { + margin-left: -1px; + } + +.fc-corner-right { + margin-right: 1px; + } + +.fc-corner-right .fc-button-inner, +.fc-corner-right .fc-event-inner { + margin-right: -1px; + } + +.fc-corner-top { + margin-top: 1px; + } + +.fc-corner-top .fc-event-inner { + margin-top: -1px; + } + +.fc-corner-bottom { + margin-bottom: 1px; + } + +.fc-corner-bottom .fc-event-inner { + margin-bottom: -1px; + } + + + +/* Fake Rounded Corners SPECIFICALLY FOR EVENTS +-----------------------------------------------------------------*/ + +.fc-corner-left .fc-event-inner { + border-left-width: 1px; + } + +.fc-corner-right .fc-event-inner { + border-right-width: 1px; + } + +.fc-corner-top .fc-event-inner { + border-top-width: 1px; + } + +.fc-corner-bottom .fc-event-inner { + border-bottom-width: 1px; + } + + + +/* Reusable Separate-border Table +------------------------------------------------------------*/ + +table.fc-border-separate { + border-collapse: separate; + } + +.fc-border-separate th { text-transform: uppercase; font-weight: normal; background: url(../../images/thead.png) repeat-x top left; } + +.fc-border-separate th, +.fc-border-separate td { + border-width: 1px 0 0 1px; + padding: 5px; + } + +.fc-border-separate th.fc-last, +.fc-border-separate td.fc-last { + border-right-width: 1px; + } + +.fc-border-separate tr.fc-last th, +.fc-border-separate tr.fc-last td { + border-bottom-width: 1px; + } + +.fc-border-separate tbody tr.fc-first td, +.fc-border-separate tbody tr.fc-first th { + border-top-width: 0; + } + + + +/* Month View, Basic Week View, Basic Day View +------------------------------------------------------------------------*/ + +.fc-grid th { + text-align: center; + } + +.fc-grid .fc-day-number { + float: right; + padding: 0 2px; + } + +.fc-grid .fc-other-month .fc-day-number { + opacity: 0.3; + filter: alpha(opacity=30); /* for IE */ + /* opacity with small font can sometimes look too faded + might want to set the 'color' property instead + making day-numbers bold also fixes the problem */ + } + +.fc-grid .fc-day-content { + clear: both; + padding: 2px 2px 1px; /* distance between events and day edges */ + } + +/* event styles */ + +.fc-grid .fc-event-time { + font-weight: bold; + } + +/* right-to-left */ + +.fc-rtl .fc-grid .fc-day-number { + float: left; + } + +.fc-rtl .fc-grid .fc-event-time { + float: right; + } + + + +/* Agenda Week View, Agenda Day View +------------------------------------------------------------------------*/ + +.fc-agenda table { + border-collapse: separate; + } + +.fc-agenda-days th { + text-align: center; + } + +.fc-agenda .fc-agenda-axis { + width: 50px; + padding: 0 4px; + vertical-align: middle; + text-align: right; + white-space: nowrap; + font-weight: normal; + } + +.fc-agenda .fc-day-content { + padding: 2px 2px 1px; + } + +/* make axis border take precedence */ + +.fc-agenda-days .fc-agenda-axis { + border-right-width: 1px; + } + +.fc-agenda-days .fc-col0 { + border-left-width: 0; + } + +/* all-day area */ + +.fc-agenda-allday th { + border-width: 0 1px; + } + +.fc-agenda-allday .fc-day-content { + min-height: 34px; /* TODO: doesnt work well in quirksmode */ + _height: 34px; + } + +/* divider (between all-day and slots) */ + +.fc-agenda-divider-inner { + height: 2px; + overflow: hidden; + } + +.fc-widget-header .fc-agenda-divider-inner { + background: #eee; + } + +/* slot rows */ + +.fc-agenda-slots th { + border-width: 1px 1px 0; + } + +.fc-agenda-slots td { + border-width: 1px 0 0; + background: none; + } + +.fc-agenda-slots td div { + height: 20px; + } + +.fc-agenda-slots tr.fc-slot0 th, +.fc-agenda-slots tr.fc-slot0 td { + border-top-width: 0; + } + +.fc-agenda-slots tr.fc-minor th, +.fc-agenda-slots tr.fc-minor td { + border-top-style: dotted; + } + +.fc-agenda-slots tr.fc-minor th.ui-widget-header { + *border-top-style: solid; /* doesn't work with background in IE6/7 */ + } + + + +/* Vertical Events +------------------------------------------------------------------------*/ + +.fc-event-vert { + border-width: 0 1px; + } + +.fc-event-vert .fc-event-head, +.fc-event-vert .fc-event-content { + position: relative; + z-index: 2; + width: 100%; + overflow: hidden; + } + +.fc-event-vert .fc-event-time { + white-space: nowrap; + font-size: 10px; + } + +.fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */ + position: absolute; + z-index: 1; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: #fff; + opacity: .3; + filter: alpha(opacity=30); + } + +.fc .ui-draggable-dragging .fc-event-bg, /* TODO: something nicer like .fc-opacity */ +.fc-select-helper .fc-event-bg { + display: none\9; /* for IE6/7/8. nested opacity filters while dragging don't work */ + } + +/* resizable */ + +.fc-event-vert .ui-resizable-s { + bottom: 0 !important; /* importants override pre jquery ui 1.7 styles */ + width: 100% !important; + height: 8px !important; + overflow: hidden !important; + line-height: 8px !important; + font-size: 11px !important; + font-family: monospace; + text-align: center; + cursor: s-resize; + } + +.fc-agenda .ui-resizable-resizing { /* TODO: better selector */ + _overflow: hidden; + } + +/** custom **/ +.fc-button { border: 1px solid #ccc; height: 30px; display: inline-block; background: url(../../images/buttonbg6.png) repeat-x 0 -30px; } +.fc-button-prev { width: 30px; background: url(../../images/prevnext.png) no-repeat 0 -30px; } +.fc-button-next { width: 30px; background: url(../../images/prevnext.png) no-repeat -30px -30px; } +.fc-button-prev:active { background-position: 0 0; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } +.fc-button-next:active { background-position: -30px 0; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } + +.fc-button-month .fc-button-content, .fc-button-agendaWeek .fc-button-content, +.fc-button-agendaDay .fc-button-content, .fc-button-today .fc-button-content { display: block; padding: 3px 10px; } +.fc-button-today { margin-left: 10px; } + +.fc-button-prev:hover, .fc-button-next:hover, .fc-button-month:hover, +.fc-button-agendaWeek:hover, .fc-button-agendaDay:hover, +.fc-button-today:hover { -moz-box-shadow: 0 0 1px #849ebd; -webkit-box-shadow: 0 0 1px #849ebd; box-shadow: 0 0 1px #849ebd; } + +.fc-button-month:active, +.fc-button-agendaWeek:active, .fc-button-agendaDay:active, +.fc-button-today:active { background-position: 0 0; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } diff --git a/src/css/plugins/jquery.alerts.css b/src/css/plugins/jquery.alerts.css new file mode 100644 index 0000000..64bf2cb --- /dev/null +++ b/src/css/plugins/jquery.alerts.css @@ -0,0 +1,71 @@ +#popup_container { + font-family: DroidSansRegular, Arial, sans-serif; + font-size: 12px; + min-width: 300px; /* Dialog will be no smaller than this */ + max-width: 600px; /* Dialog will wrap after this width */ + background: url(../../images/blacktrans1.png); + padding: 5px !important; + color: #666; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +#popup_title { + font-size: 14px; + line-height: 21px; + font-weight: normal; + color: #333; + background: #eee url(../../images/thead.png) repeat-x top left; + border-bottom: solid 1px #ccc; + cursor: default; + padding: 10px; + margin: 0em; +} + +#popup_content { + /*background: 16px 16px no-repeat url(../../images/info.gif);*/ + padding: 10px; + margin: 0em; + background: #fcfcfc; +} +/* +#popup_content.alert { + background-image: url(../../images/info.gif); +} + +#popup_content.confirm { + background-image: url(../../images/important.gif); +} + +#popup_content.prompt { + background-image: url(../../images/help.gif); +} + +#popup_message { + padding-left: 48px; +}*/ + +#popup_panel { + text-align: center; + margin: 1em 0em 0em 1em; +} + +#popup_prompt { + margin: .5em 0em; +} + +#popup_overlay { background: #000 !important; opacity: 0.5 !important; } + +#popup_ok, #popup_cancel { padding: 5px 15px; font-size: 12px; display: inline-block; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +#popup_ok, #popup_cancel { -moz-box-shadow: 1px 1px 2px #eee; -webkit-box-shadow: 1px 1px 2px #eee; box-shadow: 1px 1px 2px #eee; cursor: pointer; } +#popup_ok:hover, #popup_ok:active, #popup_cancel:hover, #popup_cancel:active { background-position: 0 -39px; } + +#popup_ok { border: 1px solid #39537f; background: #eee url(../../images/buttons/button_blue.png) repeat-x top left; text-shadow: 1px 1px #39537f; color: #fff; } +#popup_ok:active { -moz-box-shadow: inset 2px 2px 2px #12274c; -webkit-box-shadow: inset 2px 2px 2px #12274c; box-shadow: inset 2px 2px 2px #12274c; } + +#popup_cancel { border: 1px solid #ccc; background: #eee url(../../images/buttons/button_white.png) repeat-x top left; text-shadow: 1px 1px #f7f7f7; color: #333; } +#popup_cancel:active { -moz-box-shadow: inset 2px 2px 2px #ccc; -webkit-box-shadow: inset 2px 2px 2px #ccc; box-shadow: inset 2px 2px 2px #ccc; } + + +#popup_prompt { width: 270px !important; } \ No newline at end of file diff --git a/src/css/plugins/jquery.jgrowl.css b/src/css/plugins/jquery.jgrowl.css new file mode 100644 index 0000000..d82ebf6 --- /dev/null +++ b/src/css/plugins/jquery.jgrowl.css @@ -0,0 +1,141 @@ + +div.jGrowl { + z-index: 9999; + color: #fff; + font-size: 12px; +} + +/** Special IE6 Style Positioning **/ +div.ie6 { + position: absolute; +} + +div.ie6.top-right { + right: auto; + bottom: auto; + left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.top-left { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.bottom-right { + left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.bottom-left { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.center { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); + width: 100%; +} + +/** Normal Style Positions **/ +div.jGrowl { + position: absolute; +} + +body > div.jGrowl { + position: fixed; +} + +div.jGrowl.top-left { + left: 0px; + top: 0px; +} + +div.jGrowl.top-right { + right: 0px; + top: 0px; +} + +div.jGrowl.customtop-right { + right: 0; + top: 100px; +} + +div.jGrowl.bottom-left { + left: 0px; + bottom: 0px; +} + +div.jGrowl.bottom-right { + right: 0px; + bottom: 0px; +} + +div.jGrowl.center { + top: 0px; + width: 50%; + left: 25%; +} + +/** Cross Browser Styling **/ +div.center div.jGrowl-notification, div.center div.jGrowl-closer { + margin-left: auto; + margin-right: auto; +} + +div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer { + background-color: #000; + opacity: .85; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85); + zoom: 1; + width: 235px; + padding: 10px; + margin-top: 5px; + margin-bottom: 5px; + font-family: Tahoma, Arial, Helvetica, sans-serif; + font-size: 1em; + text-align: left; + display: none; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; +} + +div.jGrowl div.jGrowl-notification { + min-height: 40px; +} + +div.jGrowl div.jGrowl-notification, +div.jGrowl div.jGrowl-closer { + margin: 10px; +} + +div.jGrowl div.jGrowl-notification div.jGrowl-header { + font-weight: bold; + font-size: .85em; +} + +div.jGrowl div.jGrowl-notification div.jGrowl-close { + z-index: 99; + float: right; + font-weight: bold; + font-size: 1em; + cursor: pointer; +} + +div.jGrowl div.jGrowl-closer { + padding-top: 4px; + padding-bottom: 4px; + cursor: pointer; + font-size: .9em; + font-weight: bold; + text-align: center; +} + +/** Hide jGrowl when printing **/ +@media print { + div.jGrowl { + display: none; + } +} \ No newline at end of file diff --git a/src/css/plugins/jquery.ui.css b/src/css/plugins/jquery.ui.css new file mode 100644 index 0000000..50007c3 --- /dev/null +++ b/src/css/plugins/jquery.ui.css @@ -0,0 +1,95 @@ +/** DATE PICKER **/ +.ui-datepicker { background: url(../../images/blacktrans.png); -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px;} +.ui-datepicker { z-index: 100 !important; display: none; padding: 5px; } +.ui-datepicker-header { position: relative; text-align: center; background: url(../../images/blacktrans1.png); padding: 5px; color: #fff; } +.ui-datepicker-calendar { border-collapse: collapse; border: 1px solid #ccc; border-top: 0; } +.ui-datepicker-calendar thead th { font-weight: normal; font-size: 10px; text-transform: uppercase; color: #666; } +.ui-datepicker-calendar thead th { background: url(../../images/thead.png) repeat-x top left; border-bottom: 1px solid #ccc; } +.ui-datepicker-calendar td { border-left: 1px solid #ccc; border-top: 1px solid #ccc; text-align: right; } +.ui-datepicker-calendar td { padding: 1px; background: url(../../images/thead.png) repeat-x top left; } +.ui-datepicker-calendar td a { display: block; padding: 2px 8px; color: #666; text-shadow: 1px 1px #f7f7f7; } +.ui-datepicker-calendar td a:hover { background: #c8d9ed; text-decoration: none; color: #333; } +.ui-datepicker-calendar td:first-child { border-left: 1px solid #ccc; } +.ui-datepicker-prev, .ui-datepicker-next { display: inline-block; width: 14px; height: 14px; } +.ui-datepicker-prev span, .ui-datepicker-next span { display: none; } +.ui-datepicker-prev { position: absolute; top: 9px; left: 5px; background: url(../../images/icons/calarrow.png) no-repeat 3px -39px; } +.ui-datepicker-next { position: absolute; top: 9px; right: 5px; background: url(../../images/icons/calarrow.png) no-repeat 3px 1px; } + +/** TABS **/ +.ui-tabs { border: 1px solid #ccc; background: #fcfcfc; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +.ui-tabs { -moz-box-shadow: 1px 1px 2px #ddd; -webkit-box-shadow: 1px 1px 2px #ddd; box-shadow: 1px 1px 2px #ddd; } +.ui-tabs-nav { list-style: none; background: #eee url(../../images/thead.png) repeat-x top left; border-bottom: 1px solid #ccc; } +.ui-tabs-nav { position: relative; height: 41px; -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; } +.ui-tabs-nav li { display: inline-block; float: left; } +.ui-tabs-nav li:first-child a { -moz-border-radius: 3px 0 0 0; -webkit-border-radius: 3px 0 0 0; border-radius: 3px 0 0 0; } +.ui-tabs-nav li a { display: block; padding: 10px 20px; background: #eee; color: #333; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; } +.ui-tabs-nav li a:hover { text-decoration: none; background: #e7e7e7; } +.ui-tabs-nav li.ui-state-active a { background: #fcfcfc; color: #069; border-bottom: 1px solid #fcfcfc; } +.ui-tabs-hide { display: none; } +.ui-tabs-panel { padding: 15px; } + +/* +.tabs2 { border: 0; } +.tabs2 .ui-tabs-nav { padding: 5px 0 0 5px; border: 1px solid #6082AD; background: #688AB5 url(../../images/titlebg.png) repeat-x top left; } +.tabs2 .ui-tabs-nav li:last-child a { -moz-border-radius: 0 3px 0 0; -webkit-border-radius: 0 3px 0 0; border-radius: 0 3px 0 0; } +.tabs2 .ui-tabs-panel { border: 1px solid #ccc; border-top: 0; } +.tabs2 .ui-tabs-nav li a { background: #a8c0df; border: 0; color: #fff; margin-right: 1px; } +.tabs2 .ui-tabs-nav li.ui-state-active a { background: #fcfcfc; color: #688AB5; border-bottom: 1px solid #fcfcfc; } +*/ + +/** ACCORDION **/ +.accordion { border: 1px solid #ccc; background: #fcfcfc; overflow: hidden; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +.accordion { -moz-box-shadow: 1px 1px 3px #ddd; -webkit-box-shadow: 1px 1px 3px #ddd; box-shadow: 1px 1px 3px #ddd; } +.ui-accordion-header { background: #eee url(../../images/thead.png) repeat-x top left; border-top: 1px solid #ccc; position: relative; } +.ui-accordion-header { font-size: 12px; text-shadow: 1px 1px #f7f7f7; text-transform: uppercase; font-weight: normal; cursor: pointer; } +.ui-accordion-header:first-child { border-top: 0; } +.ui-accordion-header a { color: #333; padding: 10px; display: block; } +.ui-accordion-header a:hover { color: #069; text-decoration: none; } +.ui-accordion-content { padding: 10px; border-top: 1px solid #ccc; color: #666; overflow: hidden; } +.ui-accordion-header .ui-icon { position: absolute; display: inline-block; background: url(../../images/arrow.png) no-repeat 0 0; top: 18px; right: 10px; width: 10px; height: 10px; } +.ui-state-active .ui-icon { position: absolute; display: inline-block; background: url(../../images/arrow.png) no-repeat 0 -45px; top: 18px; right: 10px; width: 10px; height: 5px; } + + +/** SLIDER **/ +.ui-slider { border: 1px solid #ccc; background: #eee; position: relative; margin: 10px 0; } +.ui-slider { -moz-box-shadow: inset 1px 1px 2px #ccc; -webit-box-shadow: inset 1px 1px 2px #ccc; box-shadow: inset 1px 1px 2px #ccc; } +.ui-slider { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } +.ui-slider a { display: inline-block; z-index: 2; } +.ui-slider-range { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } + +.ui-slider-horizontal { display: block; height: 4px; } +.ui-slider-horizontal a { position: absolute; top: -4px; } +.ui-slider-horizontal a { width: 15px; height: 12px; background: url(../../images/icons/hbutton.png) no-repeat 0 0; } +.ui-slider-horizontal a.ui-slider-handle { margin-left: -8px; } +.ui-slider-horizontal a.ui-state-active { -moz-box-shadow: 0 0 2px #09f; -webkit-box-shadow: 0 0 2px #09f; box-shadow: 0 0 2px #09f; } + +.ui-slider-horizontal .ui-slider-range { background: #39f; height: 5px; position: absolute; } +.ui-slider-horizontal .ui-slider-range { -moz-box-shadow: inset 1px 1px 2px #069; -webkit-box-shadow: inset 1px 1px 2px #069; box-shadow: inset 1px 1px 2px #069; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: 5px; } +.ui-slider-vertical a { position: absolute; left: -3px; } +.ui-slider-vertical a { width: 11px; height: 15px; background: url(../../images/icons/vbutton.png) no-repeat 0 0; } +.ui-slider-vertical a.ui-slider-handle { margin-bottom: -8px; } +.ui-slider-vertical a.ui-state-active { -moz-box-shadow: 0 0 2px #09f; -webkit-box-shadow: 0 0 2px #09f; box-shadow: 0 0 2px #09f; } + +.ui-slider-vertical .ui-slider-range { background: #39f; width: 7px; position: absolute; left: -1px; } +.ui-slider-vertical .ui-slider-range { -moz-box-shadow: inset 1px 1px 2px #069; -webkit-box-shadow: inset 1px 1px 2px #069; box-shadow: inset 1px 1px 2px #069; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { right: 0; } + + +/**DIALOG**/ +.ui-dialog { background: url(../../images/blacktrans1.png); padding: 5px; } +.ui-dialog { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; position: relative; } +.ui-dialog-titlebar { padding: 8px 10px; color: #fff; background: #eee url(../../images/thead.png) repeat-x top left; border-bottom: 1px solid #ccc; } +.ui-dialog-content { background: #fff; padding: 10px; } +.ui-dialog-titlebar { color: #069; font-weight: bold; } +.ui-dialog-titlebar-close { position: absolute; top: 12px; right: 15px; font-size: 11px; font-weight: normal; color: #666; } +.ui-dialog-titlebar-close:hover { text-decoration: none; color: #333; } + +.ui-dialog .wysiwyg legend { position: absolute; top: 13px; left: 15px; font-size: 11px; text-transform: uppercase; } +.ui-dialog .wysiwyg p { margin: 8px 0; } +.ui-dialog .wysiwyg input.submit { background: url(../../images/buttonbg3.png) repeat-x top left; border: 1px solid #314a78; color: #fff; font-size: 11px; } +.ui-dialog .wysiwyg input.reset { background: url(../../images/thead.png) repeat-x top left; border: 1px solid #bbb; color: #333; font-size: 11px; } +.ui-dialog .wysiwyg label { float: left; width: 100px; } diff --git a/src/css/plugins/jquery.wysiwyg.css b/src/css/plugins/jquery.wysiwyg.css new file mode 100644 index 0000000..10a2eed --- /dev/null +++ b/src/css/plugins/jquery.wysiwyg.css @@ -0,0 +1,96 @@ +div.wysiwyg { background: #f7f7f7; } +div.wysiwyg * { margin: 0; padding: 0; } + +div.wysiwyg ul.toolbar li.jwysiwyg-custom-command { overflow: hidden; } + +div.wysiwyg ul.toolbar { border-bottom: 1px solid #ccc; float: left; width: 100%; padding: 10px; background: #eee url(../../images/thead.png) repeat-x top left; } +div.wysiwyg ul.toolbar li { list-style: none; float: left; margin: 1px 2px 3px 0; background: rgb(240, 240, 240); -moz-user-select: none; -webkit-user-select: none; user-select: none; clear: none; padding: 0 } +div.wysiwyg ul.toolbar li.separator { width: 1px; height: 16px; margin: 0 4px; border-left: 1px solid #ccc; } +div.wysiwyg ul.toolbar li { text-indent: -5000px; opacity: 0.85; filter: alpha(opacity=85); display: block; width: 16px; height: 16px; background: url('../../images/jquery.wysiwyg.gif') no-repeat -64px -80px; border: 1px dotted rgb(240, 240, 240); cursor: pointer; margin: 0px; } +div.wysiwyg ul.toolbar li.wysiwyg-button-hover, div.wysiwyg ul.toolbar li.active { opacity: 1.00; filter:alpha(opacity=100); border: 1px solid #ccc; background-color: #fcfcfc; } +div.wysiwyg ul.toolbar li.active { background-color: #c8d9ed; border: 1px solid #86aad4; margin: 0; } + +div.wysiwyg ul.toolbar li.disabled, div.wysiwyg ul.toolbar li.wysiwyg-button-hover.disabled, div.wysiwyg ul.toolbar li.active.disabled { opacity: 0.5; filter:alpha(opacity=50); border: 0px none transparent; padding: 1px; cursor: auto; } + + +div.wysiwyg ul.toolbar li.bold { background-position: 0 -16px; } +div.wysiwyg ul.toolbar li.italic { background-position: -16px -16px; } +div.wysiwyg ul.toolbar li.strikeThrough { background-position: -32px -16px; } +div.wysiwyg ul.toolbar li.underline { background-position: -48px -16px; } +div.wysiwyg ul.toolbar li.highlight { background-position: -48px -96px; } + +div.wysiwyg ul.toolbar li.justifyLeft { background-position: 0 0; } +div.wysiwyg ul.toolbar li.justifyCenter { background-position: -16px 0; } +div.wysiwyg ul.toolbar li.justifyRight { background-position: -32px 0; } +div.wysiwyg ul.toolbar li.justifyFull { background-position: -48px 0; } + +div.wysiwyg ul.toolbar li.indent { background-position: -64px 0; } +div.wysiwyg ul.toolbar li.outdent { background-position: -80px 0; } + +div.wysiwyg ul.toolbar li.subscript { background-position: -64px -16px; } +div.wysiwyg ul.toolbar li.superscript { background-position: -80px -16px; } + +div.wysiwyg ul.toolbar li.undo { background-position: 0 -64px; } +div.wysiwyg ul.toolbar li.redo { background-position: -16px -64px; } + +div.wysiwyg ul.toolbar li.insertOrderedList { background-position: -32px -48px; } +div.wysiwyg ul.toolbar li.insertUnorderedList { background-position: -16px -48px; } +div.wysiwyg ul.toolbar li.insertHorizontalRule { background-position: 0 -48px; } + +div.wysiwyg ul.toolbar li.h1 { background-position: 0 -32px; } +div.wysiwyg ul.toolbar li.h2 { background-position: -16px -32px; } +div.wysiwyg ul.toolbar li.h3 { background-position: -32px -32px; } +div.wysiwyg ul.toolbar li.h4 { background-position: -48px -32px; } +div.wysiwyg ul.toolbar li.h5 { background-position: -64px -32px; } +div.wysiwyg ul.toolbar li.h6 { background-position: -80px -32px; } + +div.wysiwyg ul.toolbar li.paragraph { background-position: 0px -96px; } +div.wysiwyg ul.toolbar li.colorpicker { background-position: -16px -96px; } +div.wysiwyg ul.toolbar li.fullscreen { background-position: -32px -96px; } + +div.wysiwyg ul.toolbar li.cut { background-position: -32px -64px; } +div.wysiwyg ul.toolbar li.copy { background-position: -48px -64px; } +div.wysiwyg ul.toolbar li.paste { background-position: -64px -64px; } +div.wysiwyg ul.toolbar li.insertTable { background-position: -64px -48px; } + +div.wysiwyg ul.toolbar li.increaseFontSize { background-position: -16px -80px; } +div.wysiwyg ul.toolbar li.decreaseFontSize { background-position: -32px -80px; } + +div.wysiwyg ul.toolbar li.createLink { background-position: -80px -48px; } +div.wysiwyg ul.toolbar li.insertImage { background-position: -80px -80px; } + +div.wysiwyg ul.toolbar li.html { background-position: -48px -48px; } +div.wysiwyg ul.toolbar li.removeFormat { background-position: -80px -64px; } + +div.wysiwyg ul.toolbar li.empty { background-position: -64px -80px; } + +div.wysiwyg ul.toolbar li.code { background-position: -64px -96px; } +div.wysiwyg ul.toolbar li.cssWrap { background-position: -80px -96px; } + +div.wysiwyg-dialogRow { float:left; width:100%; font-size: 16px; } + +div.wysiwyg iframe { clear: left; +background-color:#f7f7f7; padding:0; margin:5px; display:block; width: 90%; } + +/* dialog */ +.wysiwyg-dialog { position:fixed; top:50px; left:50px; width:450px; height:300px; background:transparent; font:12px "Helvetic Neue", Helvetica,Arial,sans-serif; } +.wysiwyg-dialog .wysiwyg-dialog-topbar { background:#333; color:white; padding: 7px 10px; position:relative; } +.wysiwyg-dialog .wysiwyg-dialog-topbar { -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; } +.wysiwyg-dialog .wysiwyg-dialog-topbar .wysiwyg-dialog-close-wrapper .wysiwyg-dialog-close-button { color:white; text-decoration:none; display:block; padding:2px 2px; position:absolute; right:12px; top:50%; font-size: 10px; paddding: 0 5px; margin-top:-12px; } +.wysiwyg-dialog .wysiwyg-dialog-topbar .wysiwyg-dialog-close-wrapper a.wysiwyg-dialog-close-button:hover { background:#666; } +.wysiwyg-dialog .wysiwyg-dialog-topbar .wysiwyg-dialog-title { font-size:12px; font-weight:bold; padding:5px; } +.wysiwyg-dialog .wysiwyg-dialog-content { padding:10px; background:#fcfcfc; -moz-border-radius: 0 0 3px 3px; -webkit-border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px; } +.wysiwyg-dialog-modal-div { position:absolute; top:0px; left:0px; width:100%; height:100%; background-color:rgb(255,255,255); background-color:rgba(0,0,0,0.5); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000); -ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";} +.wysiwyg-dialog-content form.wysiwyg fieldset { } +.wysiwyg-dialog-content form.wysiwyg legend { padding:7px; } +.wysiwyg-dialog-content form.wysiwyg .form-row { clear:both; padding:4px 0; } +.wysiwyg-dialog-content form.wysiwyg .form-row label, .wysiwyg-dialog form.wysiwyg .form-row .form-row-key { display:block; float:left; width:35%; text-align:right; padding:4px 5px; } +.wysiwyg-dialog-content form.wysiwyg .form-row .form-row-value { display:block; float:left; width:55%; } +.wysiwyg-dialog-content form.wysiwyg .form-row .form-row-value input { padding: 7px 10px; } +.wysiwyg-dialog-content form.wysiwyg .form-row input.width-auto { width:auto; } +.wysiwyg-dialog-content form.wysiwyg input.width-small { width:50px; min-width:50px; max-width:50px; } +.wysiwyg-dialog-content form.wysiwyg input, .wysiwyg-dialog form.wysiwyg select { padding:2px; width:100%; margin:2px; } +.wysiwyg-dialog-content form.wysiwyg input[type=submit], .wysiwyg-dialog form.wysiwyg input[type=reset] { padding:2px 7px; width:auto; } +.wysiwyg-dialog-content input.submit { background: url(../../images/buttonbg3.png) repeat-x top left; border: 1px solid #314a78; color: #fff; } +.wysiwyg-dialog-content input.reset { background: url(../../images/thead.png) repeat-x top left; border: 1px solid #bbb; color: #333; } +.wysiwyg-dialog-content label { float: left; width: 120px; } \ No newline at end of file diff --git a/src/css/style.css b/src/css/style.css new file mode 100644 index 0000000..437bedb --- /dev/null +++ b/src/css/style.css @@ -0,0 +1,596 @@ +/*** + * Created by: Mienard Lumaad + * Date: Nov 26, 2011 + * Website: http://themepixels.com/ +***/ + +@import url('plugins/colorbox.css'); +@import url('plugins/colorpicker.css'); +@import url('plugins/jquery.ui.css'); +@import url('plugins/jquery.jgrowl.css'); +@import url('plugins/jquery.alerts.css'); +@import url('plugins/fullcalendar.css'); + +@import url('custom.css'); + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + background: transparent; + border: 0; + margin: 0; + padding: 0; + vertical-align: baseline; +} + +/***@FONT FACE***/ +@font-face { + font-family: 'DroidSansRegular'; + src: url('../fonts/droidsans-webfont.eot'); + src: url('../fonts/droidsans-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/droidsans-webfont.woff') format('woff'), + url('../fonts/droidsans-webfont.ttf') format('truetype'), + url('../fonts/droidsans-webfont.svg#DroidSansRegular') format('svg'); + font-weight: normal; + font-style: normal; + +} + +/***GENERAL STYLES***/ +body { font-family: DroidSansRegular, "Segoe UI", "Lucida Sans Unicode", "Lucida Grande", sans-serif; font-size: 12px; } +body { background: #333 url(../images/texturebg.png); line-height: 21px; } +input, select, textarea, button { outline: none; font-family: DroidSansRegular, "Lucida Sans Unicode", "Lucida Grande", sans-serif; font-size: 12px; } +input, select, textarea, button { border: 1px solid #ccc; padding: 5px; } + +a { text-decoration: none; outline: none; color: #069; } +a:hover { text-decoration: underline; } +button { margin: 0; outline: 0; } +small { font-size: 11px; line-height: 12px; } + +.bodywhite { background: #fff; } +.bodygrey { background: #eee url(../images/leftbg.png) repeat-y top left; } +.page404 { background: #eee; } + +h1.prize { font-size: 28px; color: #000; font-family: Arial, Helvetica, sans-serif; margin-bottom: 5px; } +h2.prize { font-size: 20px; color: #000; font-family: Arial, Helvetica, sans-serif; margin-bottom: 5px; } + +/***NOTIFICATION MESSAGES (login.html, dashboard.html)***/ +.notification { padding: 10px 10px 10px 45px; margin: 0 0 20px 0; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; position: relative; } +.notification .close { position: absolute; right: 5px; top: 5px; display: inline-block; width: 8px; height: 8px; cursor: pointer; } +.notification .close { background: url(../images/icons/close.png) no-repeat 0 0; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; } +.notifyError { border: 1px solid #ff0000; background: #FFECEC; color: #ff0000; font-size: 11px; } + +.msgalert { border: 1px solid #eac572; background: #ffe9ad url(../images/icons/warning.png) no-repeat 10px center; } +.msginfo { border: 1px solid #99c4ea; background: #d1e4f3 url(../images/icons/info.png) no-repeat 10px center; } +.msgsuccess { border: 1px solid #c1d779; background: #effeb9 url(../images/icons/success.png) no-repeat 10px center; } +.msgerror { border: 1px solid #e18b7c; background: #fad5cf url(../images/icons/error.png) no-repeat 10px center; } + +/***LOGIN PAGE (index.html)***/ +.loginlogo { width: 279px; height: 50px; margin: 80px auto 20px auto; padding: 75px 50px; } +.loginbox { width: 580px; height: 62px; margin: 10px auto; background: url(../images/loginbox.png) no-repeat right -62px; padding-right: 11px; } +.loginbox_inner { background: url(../images/loginbox.png) no-repeat 0 0; height: 62px; padding-left: 11px; } +.loginbox_content { background: url(../images/loginbox.png) repeat-x 0 -124px; height: 62px; overflow: hidden; padding: 15px 2px; } + +.loginbox .username { border: 0; background: #eee url(../images/usernamefield.png) no-repeat; background-position: top left; width: 190px; margin-right: 10px; } +.loginbox .username { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; padding: 7px 5px 6px 40px; display: inline-block; font-size: 14px; } +.loginbox .username:focus { background-color: #fff; background-position: 0 -32px; } +.loginbox .password { border: 0; background: #eee url(../images/passwordfield.png) no-repeat; background-position: top left; width: 190px; margin-right: 10px; } +.loginbox .password { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; padding: 7px 5px 6px 40px; display: inline-block; font-size: 14px; } +.loginbox .password:focus { background-color: #fff; background-position: 0 -32px; } +.loginbox button { background: #4b6592 url(../images/buttonbg.png) repeat-x top left; font-size: 13px; padding: 6px 14px; width: 67px; font-weight: bold;} +.loginbox button { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; cursor: pointer; color: #fff; text-shadow: 1px 1px #333; border: 0; } +.loginbox button:active { -moz-box-shadow: inset 1px 1px 2px #000; -webkit-box-shadow: inset 1px 1px 2px #000; box-shadow: inset 1px 1px 2px #000;} +.loginbox button:hover { background: #364f7e url(../images/buttonbg.png) repeat-x 0 -34px; } + +.loginoption { width: 570px; margin: 10px auto; background: url(../images/blacktrans.png); padding: 7px 10px; font-size: 11px; color: #ccc; } +.loginoption { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +.loginoption input { margin: 0; padding: 0; vertical-align: middle; } +.loginoption a { float: right; font-size: 11px; color: #ccc; } + +.loginNotify { display: none; padding: 7px; border: 0; width: 580px; margin: auto; background: url(../images/blacktrans.png); } +.loginNotify { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; text-align: center; } + +/***TOP HEADER (all page)***/ +.header, .topheader { min-width: 980px; } +.headerspace { height: 10px; background: #222; border-bottom: 1px solid #111; } +.topheader .msgicon { position: absolute; top: 7px; left: 8px; width: 15px; height: 15px; background-image: url(../images/icons/message.png); } +.topheader .infoicon { position: absolute; top: 7px; left: 8px; width: 14px; height: 15px; background-image: url(../images/icons/notification.png); } +.topheader .msgicon, .topheader .infoicon { background-repeat: no-repeat; background-position: 0 0; } +.topheader .thiconhover { background-position: 0 -15px !important; } + +.topheader > ul { list-style: none; position: absolute; top: 10px; left: 287px; } +.topheader > ul > li { display: inline-block; float: left; margin-right: 8px; line-height: 14px; position: relative; } +.topheader > ul > li > a { font-size: 11px; color: #fff; padding-right: 4px; position: relative; } +.topheader > ul > li > a { display: inline-block; background: url(../images/headbutton.png) no-repeat right -29px; } +.topheader > ul > li > a .wrap { display: block; padding: 7px 11px 7px 26px; color: #fff; background: url(../images/headbutton.png) no-repeat 0 0; height: 15px; } +.topheader > ul > li > a .wrap span.count { padding: 1px 5px 0 5px; display: block; position: absolute; top: -3px; right: -3px; font-size: 10px; } +.topheader > ul > li > a .wrap span.count { background: #cc0000; color: #fff; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +.topheader > ul > li > a:hover { background-position: right -88px; text-decoration: none; } +.topheader > ul > li > a:hover .wrap { background-position: 0 -59px; } +.topheader > ul > li.note a .wrap { padding-right: 0; } + +.dropbox { width: 250px; min-height: 100px; background: #fcfcfc; position: absolute; z-index: 5; } +.dropbox { top: 29px; left: -1px; border: 1px solid #333; border-top: 0; } +.dropbox { -moz-box-shadow: 3px 3px 2px #333; -webkit-box-shadow: 3px 3px 2px #333; box-shadow: 3px 3px 2px #333; } +.dropbox { -moz-border-radius: 0 3px 3px 3px; } + +.showmsg { -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; } +.showmsg .wrap { -moz-border-radius: 0 0 0; -webkit-border-radius: 3px 0 0 0; border-radius: 3px 0 0 0; } +.showmsg, .showmsg .wrap { background: #fcfcfc !important; } + + +/***TOP HEADER: SEARCH (all page)***/ +#search { position: absolute; top: 10px; left: 49px; } +#search input { color: #999; font-size: 11px; float: left; margin: 0; outline: 0; } +#search input { background: #333 url(../images/searchbar.png) no-repeat 0 0; border: 0; height: 25px; padding: 2px 3px 3px 75px; } +#search button { float: left; border: 0; margin: 0; background: #333 url(../images/searchicon.png) no-repeat 0 0; width: 27px; height: 30px; cursor: pointer; } + +/***HEADER (all page)***/ +.header { background: #333 url(../images/texturebg.png); padding: 20px 10px 11px 10px; position: relative; } +.header { border-top: 1px solid #444; border-bottom: 3px solid #272727; } +.accountinfo { position: absolute; right: 10px; top: 6px; background: url(../images/blacktrans.png); padding: 10px; overflow: hidden; line-height: 15px; } +.accountinfo { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +.accountinfo img { float: left; } +.accountinfo .info { float: left; margin-left: 10px; } +.accountinfo h3 { font-size: 12px; color: #fff; font-weight: normal; } +.accountinfo small { font-size: 11px; color: #999; } +.accountinfo p { margin-top: 5px; } +.accountinfo p a { font-size: 11px; color: #ccc; display: inline-block; color: #bbd0e8; } +.accountinfo p a:hover { text-decoration: underline; } +.accountinfo p a:first-child { margin-right: 5px; border-right: 1px solid #666; padding-right: 7px; } + +/***TAB MENU (all page)***/ +.tabmenu { line-height: 21px; position: absolute; top: 49px; left: 50px; } +.tabmenu ul { list-style: none; } +.tabmenu ul li { display: inline-block; float: left; position: relative; background: #4b6592 url(../images/tabmenubg.png) repeat-x top left; } +.tabmenu ul li:first-child { -moz-border-radius: 3px 0 0 0; -webkit-border-radius: 3px 0 0 0; border-radius: 3px 0 0 0; } +.tabmenu ul li:last-child { -moz-border-radius: 0 3px 0 0; -webkit-border-radius: 0 3px 0 0; border-radius: 0 3px 0 0; } +.tabmenu ul li a { display: inline-block; color: #fff; background: url(../images/separator.png) no-repeat right center; } +.tabmenu ul li a:hover { text-decoration: none; } +.tabmenu ul li:last-child a { background: none; } +.tabmenu ul li:hover { background: #37507f url(../images/tabmenubg.png) repeat-x 0 -68px; } +.tabmenu ul li a span { display: block; padding: 9px 15px 9px 40px; text-transform: uppercase; font-size: 12px; text-shadow: 1px 1px #224e82; } +.tabmenu ul li.current { background: #eee; text-shadow: 1px 1px #fff; } +.tabmenu ul li.current a { color: #333; background: none; } +.tabmenu ul li.current a span { text-shadow: 1px 1px #fcfcfc; } + +.tabmenu ul li a.dashboard span { background: url(../images/icons/home.png) no-repeat 15px 12px; } +.tabmenu ul li.current a.dashboard span { background: url(../images/icons/home.png) no-repeat 15px 12px; } +.tabmenu ul li a.elements span { background: url(../images/icons/elements.png) no-repeat 15px 12px; } +.tabmenu ul li.current a.elements span { background: url(../images/icons/elements.png) no-repeat 15px -57px; } +.tabmenu ul li a.reports span { background: url(../images/icons/reports.png) no-repeat 15px 12px; } +.tabmenu ul li.current a.reports span { background: url(../images/icons/reports.png) no-repeat 15px -57px; } +.tabmenu ul li a.users span { background: url(../images/icons/users.png) no-repeat 15px 14px; } +.tabmenu ul li.current a.users span { background: url(../images/icons/users.png) no-repeat 15px -59px; } + +.tabmenu ul li a.candidatos span { background: url(../images/icons/candidatos.png) no-repeat 15px 12px; } +.tabmenu ul li.current a.candidatos span { background: url(../images/icons/candidatos.png) no-repeat 15px -57px; } +.tabmenu ul li a.ofertas span { background: url(../images/icons/elements.png) no-repeat 15px 12px; } +.tabmenu ul li.current a.ofertas span { background: url(../images/icons/elements.png) no-repeat 15px -57px; } +.tabmenu ul li a.solicitudes span { background: url(../images/icons/elements.png) no-repeat 15px 12px; } +.tabmenu ul li.current a.solicitudes span { background: url(../images/icons/elements.png) no-repeat 15px -57px; } +.tabmenu ul li a.sistema span { background: url(../images/icons/dashboard.png) no-repeat 15px 12px; } +.tabmenu ul li.current a.sistema span { background: url(../images/icons/dashboard.png) no-repeat 15px 12px; } + + +.tabmenu ul li .subnav { + position: absolute; min-width: 200px; top: 39px; left: 0; display: none; z-index: 100; border: 1px solid #6785b0; border-bottom: 0; } +.tabmenu ul li .subnav li { display: block; float: none; background: none; } +.tabmenu ul li .subnav li a { display: block; background: #83a3ca; border-bottom: 1px solid #6785b0; color: #fff; } +.tabmenu ul li .subnav li:last-child a { background: #83a3ca; } +.tabmenu ul li .subnav li a:hover { background: #7293c1; color: #fff; } +.tabmenu ul li .subnav a span { padding: 5px 15px; text-transform: capitalize; text-shadow: 1px 1px #6785b0; } +.tabmenu ul li.current .subnav { border-color: #ccc; border-top: 0; } +.tabmenu ul li.current .subnav li a { background: #eee; border-bottom: 1px solid #ccc; color: #333; } +.tabmenu ul li.current .subnav li a:hover { background: #c8d9ed; } +.tabmenu ul li.current .subnav li a span { text-shadow: 1px 1px #f7f7f7; } + +/***SIDEBAR (all page)***/ +.sidebar { padding: 20px 0 20px 0; width: 50px; display: block; float: left; } + +#accordion h3 { background: url(../images/arrow.png) no-repeat 10px 6px; padding-left: 30px; } +#accordion h3 { cursor: pointer; font-size: 12px; color: #333; text-transform: uppercase; } +#accordion h3.open { background: url(../images/arrow.png) no-repeat 10px -37px; } +#accordion .content { display: none; margin: 10px 0 20px 0; } +#accordion .content:last-child { padding: 0 15px; color: #333; } + + +.leftmenu { list-style: none; } +.leftmenu li { display: block; margin-bottom: 1px; } +.leftmenu li a { font-size: 12px; display: block; padding: 5px 0 5px 40px; color: #333; } +.leftmenu li a:hover { } +.leftmenu li.current a { background-color: #eee; border-right: 0; color: #333; border-top: 1px solid #a6c0de; border-bottom: 1px solid #a6c0de; } +.leftmenu li.current a:hover { text-decoration: none; } + +.leftmenu li a.form { background-image: url(../images/icons/form.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.table { background-image: url(../images/icons/table.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.gallery { background-image: url(../images/icons/gallery.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.home { background-image: url(../images/icons/home.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.grid { background-image: url(../images/icons/grid.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.calendar { background-image: url(../images/icons/cal.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.buttons { background-image: url(../images/icons/buttons.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.editor { background-image: url(../images/icons/editor.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.file { background-image: url(../images/icons/file.png); background-repeat: no-repeat; background-position: 15px center; } +.leftmenu li a.error { background-image: url(../images/icons/404.png); background-repeat: no-repeat; background-position: 15px center; } + +/***COLUMNS***/ +.one_half{ width:48%; } +.one_third{ width:30.66%; } +.two_third{ width:65.33%; } +.one_fourth{ width:22%; } +.three_fourth{ width:74%; } +.one_fifth{ width:16.8%; } +.two_fifth{ width:37.6%; } +.three_fifth{ width:58.4%; } +.four_fifth{ width:67.2%; } +.one_sixth{ width:13.33%; } +.five_sixth{ width:82.67%; } + +.one_half,.one_third,.two_third,.three_fourth,.one_fourth,.one_fifth, +.two_fifth,.three_fifth,.four_fifth,.one_sixth,.five_sixth{ position:relative; margin-right:4%; float:left; } + +.last{ margin-right:0 !important; clear:right; } + +/***MAIN CONTENT (dashboard.html)***/ +.maincontent { margin-left: 50px; min-width: 1028px; position: relative; color: #333; } +.maincontent .left { padding: 20px 15px; overflow: hidden; } +.maincontent .right { padding: 20px 0; padding-right: 15px; overflow: hidden; } +.maincontent .right .widgetbox:last-child { margin-bottom: 0; border-bottom: 0; } + +.maincontent_inner { width:68.33%; margin-right: 1%; } + +.breadcrumbs { font-size: 11px; padding: 0 15px 0 30px; margin: 20px 15px 0 15px; border: 1px solid #ddd; } +.breadcrumbs { -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; background: #f7f7f7 url(../images/icons/homesmall.png) no-repeat 10px 9px; } +.breadcrumbs { -moz-box-shadow: 1px 1px 0 #f3f3f3; } +.breadcrumbs a { display: inline-block; color: #069; padding: 5px 20px 5px 0; } +.breadcrumbs a { background: url(../images/separator2.png) no-repeat right center; margin-right: 10px; } +.breadcrumbs a:hover { text-decoration: none; } +.breadcrumbs span { color: #666; } + +.widgetlist { list-style: none; } +.widgetlist li { display: inline-block; float: left; width: 130px; margin: 0 10px 10px 0; } +.widgetlist li a { display: block; padding: 15px; border: 1px solid #ccc; color: #333; text-align: center; background: #f7f7f7; } +.widgetlist li a { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; -moz-box-shadow: 1px 1px 0 #fff; color: #069; } +.widgetlist li a span { font-size: 12px; display: block; margin-top: 10px; } +.widgetlist li a:hover { -moz-box-shadow: 0 0 4px #ddd; background: #fcfcfc; text-decoration: none; } + + +/***MAIN CONTENT: BUTTONS(elements.html)***/ +button.button { padding: 7px 15px; font-size: 12px; display: inline-block; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +button.button { -moz-box-shadow: 1px 1px 2px #eee; -webkit-box-shadow: 1px 1px 2px #eee; box-shadow: 1px 1px 2px #eee; cursor: pointer; } +button.button:hover, .button:active { background-position: 0 -39px; } + +.anchorbutton { padding: 7px 15px; font-size: 12px; display: inline-block; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +.anchorbutton { -moz-box-shadow: 1px 1px 2px #eee; -webkit-box-shadow: 1px 1px 2px #eee; box-shadow: 1px 1px 2px #eee; cursor: pointer; } +.anchorbutton:hover, .anchorbutton:active { background-position: 0 -39px; text-decoration: none; } + +.button_white { border: 1px solid #ccc; background: #eee url(../images/buttons/button_white.png) repeat-x top left; text-shadow: 1px 1px #f7f7f7; color: #333; } +.button_white:active { -moz-box-shadow: inset 2px 2px 2px #ccc; -webkit-box-shadow: inset 2px 2px 2px #ccc; box-shadow: inset 2px 2px 2px #ccc; } + +.button_blue { border: 1px solid #39537f; background: #eee url(../images/buttons/button_blue.png) repeat-x top left; text-shadow: 1px 1px #39537f; color: #fff; } +.button_blue:active { -moz-box-shadow: inset 2px 2px 2px #12274c; -webkit-box-shadow: inset 2px 2px 2px #12274c; box-shadow: inset 2px 2px 2px #12274c; } + +.button_black { border: 1px solid #333; background: #333 url(../images/buttons/button_black.png) repeat-x top left; text-shadow: 1px 1px #333; color: #fff; } +.button_black:active { -moz-box-shadow: inset 2px 2px 2px #12274c; -webkit-box-shadow: inset 2px 2px 2px #12274c; box-shadow: inset 2px 2px 2px #12274c; } + +.button_red { border: 1px solid #b22407; background: #333 url(../images/buttons/button_red.png) repeat-x top left; text-shadow: 1px 1px #b22407; color: #fff; } +.button_red:active { -moz-box-shadow: inset 2px 2px 2px #b22407; -webkit-box-shadow: inset 2px 2px 2px #b22407; box-shadow: inset 2px 2px 2px #b22407; } + +.button_yellow { border: 1px solid #c67601; background: #333 url(../images/buttons/button_yellow.png) repeat-x top left; text-shadow: 1px 1px #c67601;color: #fff; } +.button_yellow:active { -moz-box-shadow: inset 2px 2px 2px #c67601; -webkit-box-shadow: inset 2px 2px 2px #c67601; box-shadow: inset 2px 2px 2px #c67601; } + +.button_green { border: 1px solid #507e0c; background: #333 url(../images/buttons/button_green.png) repeat-x top left; text-shadow: 1px 1px #507e0c;color: #fff; } +.button_green:active { -moz-box-shadow: inset 2px 2px 2px #507e0c; -webkit-box-shadow: inset 2px 2px 2px #507e0c; box-shadow: inset 2px 2px 2px #507e0c; } + +.button_brown { border: 1px solid #574128; background: #333 url(../images/buttons/button_brown.png) repeat-x top left; text-shadow: 1px 1px #574128; color: #fff; } +.button_brown:active { -moz-box-shadow: inset 2px 2px 2px #574128; -webkit-box-shadow: inset 2px 2px 2px #574128; box-shadow: inset 2px 2px 2px #574128; } + +.button_lblue { border: 1px solid #7197bd; background: #333 url(../images/buttons/button_lblue.png) repeat-x top left; text-shadow: 1px 1px #fff; color: #2161a0; } +.button_lblue:active { -moz-box-shadow: inset 2px 2px 2px #7197bd; -webkit-box-shadow: inset 2px 2px 2px #7197bd; box-shadow: inset 2px 2px 2px #7197bd; } + +/***MAIN CONTENT: WIDGET BOX (dashboard.html)***/ +.widgetbox { margin-bottom: 20px; -moz-box-shadow: 1px 1px 2px #ccc; -webkit-box-shadow: 1px 1px 2px #ccc; box-shadow: 1px 1px 2px #ccc; } +.widgetbox h3 { font-size: 12px; text-transform: uppercase; color: #fff; font-weight: normal; text-shadow: 1px 1px #4b6592; } +.widgetbox h3 { -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; } +.widgetbox h3 { border: 1px solid #6082ad; background: #688ab5 url(../images/titlebg.png) repeat-x top left; } +.widgetbox h3 span { padding: 10px 15px; display: block; } +.widgetbox h3.arrow span { background: url(../images/toggle.png) no-repeat right center; } +.widgetbox .content { background: #fcfcfc; padding: 20px 15px; color: #666; overflow: hidden; border: 1px solid #ccc; border-top: 0; } +.widgetbox .content { -moz-border-radius: 0 0 3px 3px; -webkit-border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px; } +.widgetbox .content p { margin: 5px auto; } +.widgetbox .content p:first-child { margin-top: 0; } + +.widgetbox2 { margin-bottom: 20px; -moz-box-shadow: 1px 1px 2px #ddd; -webkit-box-shadow: 1px 1px 2px #ddd; box-shadow: 1px 1px 2px #ddd; } +.widgetbox2 h3 { font-size: 12px; color: #333; font-weight: normal; text-shadow: 1px 1px #fff; } +.widgetbox2 h3 { -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; } +.widgetbox2 h3 { border: 1px solid #ddd; background: #eee url(../images/thead.png) repeat-x top left; } +.widgetbox2 h3 span { padding: 10px 15px; display: block; } +.widgetbox2 h3.arrow span { background: url(../images/toggle2.png) no-repeat right center; } +.widgetbox2 .content { background: #fcfcfc; padding: 20px 15px; color: #666; overflow: hidden; border: 1px solid #ddd; border-top: 0; } +.widgetbox2 .content { -moz-border-radius: 0 0 3px 3px; -webkit-border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px; } +.widgetbox2 .content p { margin: 5px 0; } +.widgetbox2 .content p:first-child { margin-top: 0; } +.widgetbox2 .content label { display: block; padding: 0; width: 120px; margin-right: 15px; float: left; } + +/***PROGRESS BAR (dashboard.html)***/ +.progress { margin: 5px 0; } +.progress .bar { background: #ddd; -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; padding: 2px; } +.progress .bar { -moz-box-shadow: inset 2px 2px 3px #999; -webkit-box-shadow: inset 2px 2px 3px #999; box-shadow: inset 2px 2px 3px #999; } +.progress .bar .value { height: 5px; -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; } + +.progress .bar2 { background: #ddd; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; padding: 2px; } +.progress .bar2 { -moz-box-shadow: inset 2px 2px 3px #999; -webkit-box-shadow: inset 2px 2px 3px #999; box-shadow: inset 2px 2px 3px #999; } +.progress .bar2 .value { padding: 3px 0; text-align: center; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; color: #fff; } +.progress .bar2 .value { background-image: url(../images/barbg.png); background-repeat: repeat-x; background-position: 0 0; } + +.progress .bluebar { background-color: #069; } +.progress .orangebar { background-color: #F90; } +.progress .redbar { background-color: #cc0000; } + + +/***MAIN CONTENT:FULL PAGE***/ +.fullpage { margin: 20px 15px; } +.pageTitle { font-size: 24px; margin-bottom: 20px; text-shadow: 1px 1px #fff; } + +/***MAIN CONTENT: SUB MENU (users.html)***/ +.submenu { list-style: none; overflow: hidden; float:right; } +.submenu li { display: inline-block; float: left; } +.submenu li a { display: block; padding: 5px 10px; border: 1px solid #bbb; background: url(../images/bgbutton4.png) repeat-x top left; border-left: 0; } +.submenu li a { color: #333; text-shadow: 1px 1px #eee; -moz-box-shadow: 1px 1px 0 #fcfcfc; -webkit-box-shadow: 1px 1px 0 #fcfcfc; box-shadow: 1px 1px 0 #fcfcfc; } +.submenu li a:hover { -moz-box-shadow: inset 1px 1px 2px #ccc; -webkit-box-shadow: inset 1px 1px 2px #ccc; box-shadow: inset 1px 1px 2px #ccc; } +.submenu li a:hover { text-decoration: none; } +.submenu li.current a { background: #f7f7f7; color: #069; text-shadow: none; } +.submenu li.current a:hover { -moz-box-shadow: none; webkit-box-shadow: none; box-shadow: none; } +.submenu li:last-child a { -moz-border-radius: 0 3px 3px 0; -webkit-border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0; } +.submenu li:first-child a { -moz-border-radius: 3px 0 0 3px; -webkit-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; border-left: 1px solid #bbb; } + +/***MAIN CONTENT: FORM STYLING (forms.html)***/ +.sf { width: 250px; } +.mf { width: 350px; } +.lf { width: 450px; } +textarea.mf { height: 100px; } +input[type=radio], input[type=checkbox] { margin: 0; padding: 0; vertical-align: middle; } + +.form_default fieldset { border: 1px solid #ccc; padding: 20px; background: #f7f7f7; } +.form_default legend { text-transform: uppercase; } +.form_default p { margin: 20px 0 !important; } +.form_default label { width: 150px; float: left; text-align: right; padding-top: 5px; margin-right: 20px; } + +.form_default input[type=text] { font-size: 12px; padding: 8px 5px; border: 1px solid #ccc; background: #fcfcfc; outline: none; } +.form_default input[type=text] { -moz-box-shadow: inset 1px 1px 3px #ccc; -webkit-box-shadow: inset 1px 1px 3px #ccc; box-shadow: inset 1px 1px 3px #ccc; } +.form_default input[type=text] { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; margin-right: 10px; } + +.form_default textarea { font-size: 12px; padding: 8px 5px; border: 1px solid #ccc; background: #fcfcfc; outline: none; } +.form_default textarea { -moz-box-shadow: inset 1px 1px 3px #ccc; -webkit-box-shadow: inset 1px 1px 3px #ccc; box-shadow: inset 1px 1px 3px #ccc; } +.form_default textarea { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; margin-right: 10px; } + +.form_default select { font-size: 12px; padding: 5px; border: 1px solid #ccc; background: #fcfcfc; outline: none; } +.form_default select { -moz-box-shadow: inset 1px 1px 3px #ccc; -webkit-box-shadow: inset 1px 1px 3px #ccc; box-shadow: inset 1px 1px 3px #ccc; } +.form_default select { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; margin-right: 10px; } + +.form_default input[type=text]:focus, .form_default textarea:focus { background: #fff; } + +.form_default button { background: #4b6592 url(../images/buttonbg3.png) repeat-x top left; color: #fff; padding: 7px 20px; cursor: pointer; } +.form_default button { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; border: 1px solid #395380; font-size: 12px; } +.form_default button { text-transform: uppercase; text-shadow: 1px 1px #395380; margin-left: 170px; } +.form_default button { -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; } +.form_default button:hover { background: #005681 url(../images/buttonbg3.png) repeat-x 0 -36px; } +.form_default button:active { -moz-box-shadow: inset 2px 2px 2px #12274c; -webkit-box-shadow: inset 2px 2px 2px #12274c; box-shadow: inset 2px 2px 2px #12274c; } + +.form_default input.error, .form_default textarea.error, .form_default select.error { border: 1px solid #ff0000; } +.form_default label.error { float: none; width: auto; color: #ff0000; font-size: 11px; display: inline-block; } + +/***MAIN CONTENT: STANDARD TABLE (users.html)***/ +.addNewButton { float: left; border: 1px solid #ccc; background: #4b6592 url(../images/buttonbg3.png) repeat-x top left; color: #fff; padding: 5px 20px; } +.addNewButton { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; border: 1px solid #395380; font-size: 12px; } +.addNewButton { text-transform: uppercase; text-shadow: 1px 1px #395380; margin-right: 10px; } +.addNewButton { -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; } +.addNewButton:hover { background: #005681 url(../images/buttonbg3.png) repeat-x 0 -36px; text-decoration: none; } + +.sTableOptions { padding: 12px 10px; border: 1px solid #bbb; border-bottom: 0; background: #eee url(../images/thead.png) repeat-x top left; } +.sTableOptions { -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; position: relative; } +.sTableOptions .button { display: inline-block; border: 1px solid #999; background: url(../images/buttonbg5.png) repeat-x bottom left; } +.sTableOptions .button { text-transform: uppercase; color: #333; text-shadow: 1px 1px #fcfcfc; -webkit-box-shadow: 0 1px 0 #ddd; box-shadow: 0 1px 0 #ddd; } +.sTableOptions .button { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; -moz-box-shadow: 0 1px 0 #ddd; } +.sTableOptions .button:hover { cursor: pointer; text-decoration: none; background-position: top left; } +.sTableOptions .button:active { -moz-box-shadow: inset 1px 1px 2px #999; -webkit-box-shadow: inset 1px 1px 2px #999; box-shadow: inset 1px 1px 2px #999; } +.sTableOptions .button:active { background: #eee; } +.sTableOptions .button span { padding: 5px 10px; display: block; } +.sTableOptions h4 { font-size: 12px; font-weight: normal; color: #333; } + +.sTableOptions .delete span { background: url(../images/icons/trash.png) no-repeat 8px center; padding-left: 30px; } + +/***(tables.html)***/ +.sTableOptions2 { padding: 12px 10px; border: 1px solid #ccc; border-bottom: 0; background: #ddd url(../images/bgbutton5.png) repeat-x top left; } +.sTableOptions2 { -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; position: relative; } +.sTableOptions2 .button { display: inline-block; border: 1px solid #999; background: url(../images/buttonbg5.png) repeat-x bottom left; } +.sTableOptions2 .button { text-transform: uppercase; color: #333; text-shadow: 1px 1px #fcfcfc; -webkit-box-shadow: 0 1px 0 #ddd; box-shadow: 0 1px 0 #ddd; } +.sTableOptions2 .button { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; -moz-box-shadow: 0 1px 0 #ddd; } +.sTableOptions2 .button:hover { cursor: pointer; text-decoration: none; background-position: top left; } +.sTableOptions2 .button:active { -moz-box-shadow: inset 1px 1px 2px #999; -webkit-box-shadow: inset 1px 1px 2px #999; box-shadow: inset 1px 1px 2px #999; } +.sTableOptions2 .button:active { background: #eee; } +.sTableOptions2 .button span { padding: 5px 10px; display: block; } +.sTableOptions2 h4 { font-size: 12px; font-weight: normal; color: #333; } + +.sTableHead { border-collapse: collapse; } +.sTableHead td { padding: 8px 10px; color: #ccc; text-shadow: 1px 1px #444; font-size: 12px; text-transform: uppercase; border-right: 1px solid #777; } +.sTableHead .head0 { background: #666; } +.sTableHead .head1 { background: #555; } + +.sTableWrapper { border: 1px solid #bbb; border-top: 0; } + +.sTable { border-collapse: collapse; } +.sTable tr td { padding: 8px 10px; border-right: 1px solid #fff; border-bottom: 1px solid #ddd; vertical-align: top; } +.sTable thead th { padding: 8px 10px; color: #ccc; text-shadow: 1px 1px #444; font-size: 12px; text-transform: uppercase; border-right: 1px solid #777; } +.sTable thead th { font-weight: normal; text-align: left; } +.sTable tr td:last-child { border-right: 0; } +.sTable tr:last-child td { border-bottom: 0; } +.sTable tr:hover { background: #ddd; } +.sTable tr.selected { background: #fffccc; } +.sTable .head0 { background: #666; } +.sTable .head1 { background: #555; } +.sTable .con1 { background: #eee; } +.sTable .con0 { background: #f7f7f7; } + +/***(tables.html)***/ +.sTable2 { border-collapse: collapse; border: 1px solid #ccc; } +.sTable2 thead td { padding: 5px 10px; background: #eee url(../images/thead.png) repeat-x top left; border: 1px solid #ccc; } +.sTable2 thead th { padding: 5px 10px; background: #eee url(../images/thead.png) repeat-x top left; border: 1px solid #ccc; } +.sTable2 tbody tr td { padding: 10px; background: #fff; border-top: 1px solid #eee; border-left: 1px solid #eee; } +.sTable2 tbody tr td:first-child { border-left: 1px solid #ccc; } +.sTable2 tbody tr.even td { background: #fcfcfc; } + +.sTable3 { border-collapse: collapse; } +.sTable3 thead td { padding: 5px 10px; background: #eee url(../images/thead.png) repeat-x top left; border-bottom: 1px solid #ccc; } +.sTable3 tbody tr td { padding: 10px; background: #fff; border-top: 1px solid #eee; border-left: 1px solid #eee; } +.sTable3 tbody tr.even td { background: #fcfcfc; } + +/**dynamic table***/ +.dataTables_wrapper { border: 1px solid #ccc; background: #eee url(../images/thead.png) repeat-x top left; +-moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; position: relative; } +.dataTables_filter { position: absolute; top: 11px; right: 5px; } +.dataTables_length { padding: 10px 10px; } +.dataTables_wrapper label { display: inline-block; margin-right: 5px; } +.dyntable { width: 100%; background: #fcfcfc; } +.dyntable thead th, .dyntable tfoot th { padding: 5px 10px; color: #fff; font-weight: normal; text-align: left; } +.dyntable thead th.head0, .dyntable tfoot th.head0 { background: #666; } +.dyntable thead th.head1, .dyntable tfoot th.head1 { background: #555; } +.dyntable tbody tr td { padding: 5px 10px; border-top: 1px solid #ddd; } +.dyntable tbody tr:first-child td { border-top: 0; } +.dyntable .con1 { background: #eee; } +.dyntable .con0 { background: #f7f7f7; } +.dyntable thead th.sorting { background-image: url(../images/sort_both.png); background-repeat: no-repeat; background-position: right 5px; } +.dyntable thead th.sorting_asc { background-image: url(../images/sort_asc.png); background-repeat: no-repeat; background-position: right 6px; } +.dyntable thead th.sorting_desc { background-image: url(../images/sort_desc.png); background-repeat: no-repeat; background-position: right 6px; } + +.dataTables_info { padding: 10px; } +.paging_full_numbers { position: absolute; bottom: 7px; right: 8px; } +.paging_full_numbers .paginate_button { + display: inline-block; padding: 2px 8px; border: 1px solid #ccc; margin-left: 5px; + background: #eee url(../images/buttonbg5.png) repeat-x top left; cursor: pointer; + -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; +} +.paging_full_numbers .paginate_button:hover { + background: #eee; -moz-box-shadow: inset 1px 1px 2px #ccc; -webkit-box-shadow: inset 1px 1px 2px #ccc; + box-shadow: inset 1px 1px 2px #ccc; +} +.paging_full_numbers .paginate_active, .paging_full_numbers .paginate_button:active { + display: inline-block; padding: 2px 8px; border: 1px solid #405A87; margin-left: 5px; + background: #405A87 url(../images/buttonbg3.png) repeat-x top left; color: #fff; + -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; +} +.paging_full_numbers .paginate_button_disabled { color: #999; } + +/***PAGINATION (users.html)***/ +.pagination a { display: inline-block; padding: 5px 10px; color: #333; border: 1px solid #bbb; background: url(../images/buttonbg5.png) repeat-x bottom left; } +.pagination a { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } +.pagination a { -moz-box-shadow: 1px 1px 0 #f7f7f7; -webkit-box-shadow: 1px 1px 0 #f7f7f7; box-shadow: 1px 1px 0 #f7f7f7; } +.pagination a:hover { -moz-box-shadow: inset 1px 1px 3px #eee; -webkit-box-shadow: inset 1px 1px 3px #eee; } +.pagination a:hover { text-decoration: none; background: #eee; box-shadow: inset 1px 1px 3px #eee; } +.pagination a.disabled { color: #999; border: 1px solid #ccc; } +.pagination a.disabled:hover { background: url(../images/buttonbg5.png) repeat-x bottom left; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } +.pagination a.current { background: #333 url(../images/buttonbg3.png) repeat-x top left; color: #fff; border: 1px solid #405a87; } +.pagination a.current:hover { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } + +.pgright { position: absolute; right: 10px; top: 12px; } +.pgright a.disabled { border: 1px solid #ccc; } + +/***MAINCONTENT: GALLERY (galery.html)***/ +.gallery .thumbview ul { list-style: none; } +.gallery .thumbview ul li { float: left; display: inline-block; margin-right: 20px; margin-bottom: 20px; } +.gallery .thumbview .thumb { border: 1px solid #ccc; padding: 10px; background: #fcfcfc; -moz-box-shadow: 1px 1px 2px #ddd; box-shadow: 1px 1px 2px #ddd; } +.gallery .thumbview .thumb { -moz-border-radius: 3px; -webit-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 1px 1px 2px #ddd; position: relative; } +.gallery .thumbview .thumb img { cursor: pointer; } +.gallery .thumbview .info { width: 230px; height: 130px; position: absolute; top: 10px; left: 10px; font-size: 12px; line-height: 18px; } +.gallery .thumbview .info { padding: 10px; background: url(../images/blacktrans1.png); display: none; cursor: pointer; } +.gallery .thumbview .info label { width: 70px; display: inline-block; color: #ccc; } +.gallery .thumbview .info span { color: #fff; } +.gallery .thumbview .info .menu { margin-top: 10px; } +.gallery .thumbview .info .menu a { display: inline-block; margin-right: 5px; width: 22px; height: 22px; } +.gallery .thumbview .info .menu a { -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; } +.gallery .thumbview .info .menu a.view { background: #83a3ca url(../images/viewdelete.png) no-repeat 5px 5px; } +.gallery .thumbview .info .menu a.delete { background: #83a3ca url(../images/viewdelete.png) no-repeat 5px -15px; } +.gallery .thumbview .info .menu a:hover { text-decoration: none; background-color: #6385ae; } + +.gallery .listview { display: none; } + +/***PAGES: message.html, info.html***/ +.messagelist h4 { font-size: 11px; color: #333; font-weight: normal; padding: 8px 10px; border-bottom: 1px solid #ccc; text-transform: uppercase; } +.messagelist .link { padding: 8px 10px; background: #eee; font-size: 11px; border-top: 1px solid #ccc; } +.messagelist ul { list-style: none; } +.messagelist ul li { display: block; border-bottom: 1px dotted #ccc; padding: 5px 10px; } +.messagelist ul li:last-child { border-bottom: 0; } +.messagelist ul li.current { background: #fff; color: #333; } +.messagelist ul li.current a { color: #6385ae; font-weight: bold; } +.messagelist ul li a { display: block; color: #333; } +.messagelist ul li a:hover { text-decoration: none; } +.messagelist ul li span { color: #666; display: block; font-size: 11px; } +.messagelist ul li small { font-size: 11px; color: #666; } +.messagelist ul li:hover { background: #e8f3fe; } + +/***MAIN CONTENT: ELEMENTS (elements.html)***/ +.imgleft { float: left; margin: 0 10px 0 0; padding: 5px; border: 1px solid #ccc; } +.imgleft { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } + +/**BUTTONS & ICONS**/ +.iconlink { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; color: #fff; text-shadow: 1px 1px #304978; margin-bottom: 5px; } +.iconlink { -moz-box-shadow: 1px 1px 0 #f7f7f7; -webkit-box-shadow: 1px 1px 0 #f7f7f7; box-shadow: 1px 1px 0 #f7f7f7; } +.iconlink { display: inline-block; padding: 5px 7px; border: 1px solid #304978; background: url(../images/buttonbg3.png) repeat-x top left; } +.iconlink:hover { background-position: 0 -36px; text-decoration: none; } +.iconlink:active { -moz-box-shadow: inset 1px 1px 2px #304978; -webkit-box-shadow: inset 1px 1px 2px #304978; box-shadow: inset 1px 1px 2px #304978; } +.iconlink img { vertical-align: middle; display: inline-block; } + +.iconlink2 { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; color: #333; margin-bottom: 5px; } +.iconlink2 { -moz-box-shadow: 1px 1px 0 #f7f7f7; -webkit-box-shadow: 1px 1px 0 #f7f7f7; box-shadow: 1px 1px 0 #f7f7f7; } +.iconlink2 { display: inline-block; padding: 5px 7px; border: 1px solid #ccc; background: url(../images/bgbutton4.png) repeat-x top left; } +.iconlink2:active { -moz-box-shadow: inset 1px 1px 2px #ccc; -webkit-box-shadow: inset 1px 1px 2px #ccc; box-shadow: inset 1px 1px 2px #ccc; } +.iconlink2:hover { background-position: 0 -37px; text-decoration: none; } +.iconlink2 img { vertical-align: middle; display: inline-block; } + +/**INVOICE**/ +.invoice { border: 1px solid #ccc; background: #f7f7f7; -moz-box-shadow: 1px 1px 3px #ddd; -webkit-box-shadow: 1px 1px 3px #ddd; box-shadow: 1px 1px 3px #ddd; } +.invoice_inner { padding: 20px; position: relative; overflow: hidden; } +.invoice .title { font-size: 18px; float: right; } +.invoicetable { border-collape: collapse; } +.invoicetable thead td { border-bottom: 1px solid #ccc; padding: 5px 0; font-weight: bold; } +.invoicetable .subtotal td { font-weight: bold; } +.invoicetable tr td.line { border-bottom: 1px solid #ccc; } + +/** FOOTER**/ +.footer { background: #333; padding: 10px 0; } +.footerinner { padding: 0 20px; text-align: right; font-size: 11px; color: #ccc; } +.footer_float { position: fixed; bottom: 0; left: 0; width: 100%; } + +/***MAIN CONTENT: CUSTOM STYLES***/ +.errorpage { padding: 20px; } +.widgetbox .content .bright { border-right: 1px solid #ddd; width: 47%; } +.clear { clear: both; height: 15px; } +.nopadding { padding: 0 !important; } +.loaders img { vertical-align: middle; display: inline-block; margin-right: 10px; } +.padding15 { padding: 15px; overflow: hidden; } +.padding1020 { padding: 10px 20px; } +.padding20 { padding: 20px; overflow: hidden; } +.borderbottom { border-bottom: 1px solid #eee; } +.floatleft { float: left; } +.width50 { width: 50px; } +.ohidden { overflow: hidden; } +.overflownone { overflow: none !important; } +.marginleft150 { margin-left: 150px; } +.marginbottom20 { margin-bottom: 20px; } +.color069 { color: #069; } +.tooltipflot { background: url(../images/blacktrans1.png); padding: 2px 10px; color: #fff; font-size: 11px; } +.tooltipflot { -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; } +#colorselector { width: 16px; height: 16px; border: 2px solid #ccc; display: inline-block; } +#colorselector { background: url(../images/colorpicker.png) no-repeat top left; cursor: pointer; } +.pie { height: 200px; width: 290px; } +.external-event { border: 1px solid #a6bdd8; padding: 7px 10px; color: #333; margin-bottom: 5px; background: #c8d9ed; cursor: move; } +.mgright5 { margin-right: 5px; } +.inlineblock { display: inline-block; } +.alignright { text-align: right; } +.bordertop { border-top: 1px solid #ccc; } diff --git a/src/dashboard.html b/src/dashboard.html new file mode 100644 index 0000000..6e4dfd0 --- /dev/null +++ b/src/dashboard.html @@ -0,0 +1,415 @@ + + + + +Dashboard | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + +
          + +
          + + + + + + + + Logo + + + +
          + Avatar +
          +

          Rafael Salazar

          + correo@dominio.com +

          + Preferencias Salir +

          +
          +
          +
          + + + + + +
          +
          +
          + +
          + + There are 3 submitted items from users. Click to approve +
          + + + + + + + +
          +

          Actividad reciente

          +
          + + El 2012-01-09 a las 13:37:18 por Supervisor +

          Fulanito de tal: Cambio de estado (Borrador a Rechazado)

          + + + El 2012-01-09 a las 13:37:18 por Supervisor +

          Menganito de tal: Cambio de estado (Borrador a Sin capacidades)

          + + + El 2012-01-09 a las 13:37:18 por Supervisor +

          Menganito de tal: Estado inicial ( Borrador )

          + + + El 2012-01-09 a las 13:37:18 por Supervisor +

          Fulanito de tal: Cambio de estado (Sin capacidades a En proceso: Disponible)

          + + + + El 2012-01-09 a las 13:37:18 por Supervisor +

          Menganito de tal: Nuevo candidato

          +
          +
          +
          +
          +
          + + +
          +

          Sample Chart

          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          Column 1Column 2Column 3ImpressionsPercentageColumn 6
          Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
          Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
          Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
          Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
          Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
          +
          +
          + +
          +

          Sample Chart

          +
          +
          +
          +
          + +
          +

          Buttons

          +
          +   +   +   +   +   +   +   +
          +
          +
          + +
          + +
          +
          + +
          +
          + +
          +

          RESUMEN

          +
          + +

          78 candidatos

          +

          Estimate earnings by the end of the day: $300.00

          + +
          + +
          +

          9 ofertas

          + Yesterday's earnings +
          + +
          +

          2 solicitudes de oferta

          + This month's earnings +
          + + +
          +
          + +
          +

          Form with validation

          +
          +
          + +
          + +

          + + +

          + +

          + + +

          + +

          + + +

          + +

          + + Male      Female +

          + +

          + + English      + Mandarin      + German +

          + +

          + + +

          + +

          + +

          + +
          +
          + +
          +
          + +
          +

          PROGRESS BAR

          +
          + +
          + Storage (60%) +
          +
          + +
          + Bandwidth (86%) +
          +
          + +
          + Impression (34%) +
          +
          + +
          +
          + +
          +

          Widget Box 2

          +
          + +

          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium.

          + + +
          +
          + +
          + +
          +

          Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

          +
          +
          +

          Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.

          +
          +
          +

          Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.

          +
          + +
          + +
          + +
          +

          First header

          +
          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
          +

          Second header

          +
          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
          +

          Third header

          +
          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
          +
          + +
          +
          + +
          + +
          + +
          + + + + diff --git a/src/editor.html b/src/editor.html new file mode 100644 index 0000000..ca4ca23 --- /dev/null +++ b/src/editor.html @@ -0,0 +1,165 @@ + + + + +WYSIWYG Editor | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + + + + + +
          + +
          + + + + + + + + Logo + + + +
          + Avatar +
          +

          John Doe

          + youremail@domain.com +

          + Account Settings Logout +

          +
          +
          +
          + + + + + +
          + + + +
          + +

          WYSIWYG Editor

          + +
          +

          Editor

          +
          + +
          +
          + +
          + +
          + +
          + +
          + + + + diff --git a/src/elements.html b/src/elements.html new file mode 100644 index 0000000..049a66a --- /dev/null +++ b/src/elements.html @@ -0,0 +1,363 @@ + + + + +Interface Elements | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + + + + +
          + +
          + + + + + + + + Logo + + + +
          + Avatar +
          +

          John Doe

          + youremail@domain.com +

          + Account Settings Logout +

          +
          +
          +
          + + + + + +
          + + + +
          + +

          Interface Elements

          + +
          +
          +

          Image Loaders

          +
          + + + + + + + + + + +

          + You can create your own loader images by going to ajaxload.info +
          +
          +
          + +
          + +
          +
          +

          Buttons

          +
          +   +   +   +   +   +   +   +
          +
          +
          +
          + +
          + +
          +
          +

          Pickers

          +
          +
          + +
          + +

          + +
          +
          +
          +

          + + +

          +
          +
          + +
          + +
          +

          Sliders

          +
          +
          + +
          +
          +
          +
          + +
          + +
          + +
          + Sales earning: +
          +
          +
          + +
          + +
          + +
          + Price Range: +
          +
          +
          + +
          + +
          + Maximum price: +
          +
          +
          + +
          + +
          + Minimum price: +
          +
          +
          + +
          + +
          +
          + Volume:
          +
          +
          + +
          + Price Range:
          +
          +
          +
          +
          + +
          +
          + +
          + +
          + +
          +
          +

          Growl Notification

          + +
          +
          + +
          + +
          +
          + +
          +

          Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

          +
          +
          +

          Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.

          +
          +
          +

          Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.

          +

          Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.

          +
          + +
          +
          + +

          + +
          +
          +

          Modal Alert Boxes

          +
          +   +   +   + +
          +
          +
          + +

          + +
          +
          +

          First header

          +
          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
          +

          Second header

          +
          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
          +

          Third header

          +
          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
          +
          +
          + +

          + +
          +
          + +

          This is an information message, can be any general information.

          +
          + +
          + +

          This is a success message. You can use this for any successful process.

          +
          + +
          + +

          This is an alert message. You can use this for any reminders or alerts.

          +
          + +
          + +

          This is an error message. If there is a failure or something.

          +
          + +
          + +
          + +
          + +
          + +
          + + + + + diff --git a/src/filemanager.html b/src/filemanager.html new file mode 100644 index 0000000..4a23c00 --- /dev/null +++ b/src/filemanager.html @@ -0,0 +1,158 @@ + + + + +File Manager | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + + +
          + +
          + + + + + + + + Logo + + + +
          + Avatar +
          +

          John Doe

          + youremail@domain.com +

          + Account Settings Logout +

          +
          +
          +
          + + + + + +
          + + + +
          + +

          File Manager

          + +
          +

          File Manager

          +
          +
          +
          +
          + +
          + +
          + +
          + +
          + + + + diff --git a/src/fonts/droidsans-webfont.eot b/src/fonts/droidsans-webfont.eot new file mode 100644 index 0000000..c80ca00 Binary files /dev/null and b/src/fonts/droidsans-webfont.eot differ diff --git a/src/fonts/droidsans-webfont.svg b/src/fonts/droidsans-webfont.svg new file mode 100644 index 0000000..5662210 --- /dev/null +++ b/src/fonts/droidsans-webfont.svg @@ -0,0 +1,231 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Digitized data copyright 2006 Google Corporation +Foundry : Ascender Corporation +Foundry URL : httpwwwascendercorpcom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/fonts/droidsans-webfont.ttf b/src/fonts/droidsans-webfont.ttf new file mode 100644 index 0000000..43c3c02 Binary files /dev/null and b/src/fonts/droidsans-webfont.ttf differ diff --git a/src/fonts/droidsans-webfont.woff b/src/fonts/droidsans-webfont.woff new file mode 100644 index 0000000..642c381 Binary files /dev/null and b/src/fonts/droidsans-webfont.woff differ diff --git a/src/fonts/index.html b/src/fonts/index.html new file mode 100644 index 0000000..c942a79 --- /dev/null +++ b/src/fonts/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

          Directory access is forbidden.

          + + + \ No newline at end of file diff --git a/src/forms.html b/src/forms.html new file mode 100644 index 0000000..c0e6eb4 --- /dev/null +++ b/src/forms.html @@ -0,0 +1,323 @@ + + + + + Dashboard | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + +
          +
          + +
          + + +
          + + + Logo + + +
          + Avatar +
          +

          Rafael Salazar

          + correo@dominio.com +

          + Preferencias Salir +

          +
          + +
          + +
          + + + +
          + + +
          +

          Candidato #1

          + + + Borrar candidato + + + + Importar candidatos + +
          +
          +

          + + Datos personales + +

          +
          +
          +
          + +
          + +
          + +
          + +
          + + Hombre      Mujer +
          + +
          +
          +
          +
          + + +
          + +
          + +
          + +
          +
          + +
          +
          +
          +
          + + +
          + +
          + + +
          + +
          + + +
          + +
          +
          +
          +
          + + +
          + +
          +
          + +
          +
          + +
          +
          +
          +
          + + +
          + +
          + + +
          + +
          +
          + +
          +
          +
          +
          +
          +
          +

          + + Datos adicionales + +

          +
          +
          +
          +

          + +
          + +
          + + +
          + +
          + + +
          + +
          +
          +
          +
          +
          +
          +

          Observaciones

          +
          + +
          +
          + +
          +
          + + +
          + +
          +

          Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

          +
          +
          +

          Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.

          +
          +
          +

          Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.

          +

          Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.

          +
          + +
          + + +
          + +
          +
          + + + + +
          + + + + \ No newline at end of file diff --git a/src/gallery.html b/src/gallery.html new file mode 100644 index 0000000..733df8a --- /dev/null +++ b/src/gallery.html @@ -0,0 +1,538 @@ + + + + +Gallery | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + +
          + +
          + + + + + + + + Logo + + + +
          + Avatar +
          +

          John Doe

          + youremail@domain.com +

          + Account Settings Logout +

          +
          +
          +
          + + + + + +
          + + + +
          + +

          Gallery

          + + + + +
          + + + + +
          + +
          + +
          + +
          + + + + + diff --git a/src/grid.html b/src/grid.html new file mode 100644 index 0000000..5442fcd --- /dev/null +++ b/src/grid.html @@ -0,0 +1,217 @@ + + + + +Grid | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + +
          + +
          + + + + + + + + Logo + + + +
          + Avatar +
          +

          John Doe

          + youremail@domain.com +

          + Account Settings Logout +

          +
          +
          +
          + + + + + +
          + + + +
          + +

          Grid

          + +
          +

          One Half

          +

          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.

          +
          + +
          +

          One Half

          +

          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.

          +
          + +

          + +
          +

          One Third

          +

          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

          +
          + +
          +

          One Third

          +

          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

          +
          + +
          +

          One Third

          +

          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

          +
          + +

          + +
          +

          One Fourth

          +

          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

          +
          + +
          +

          One Fourth

          +

          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

          +
          + +
          +

          One Fourth

          +

          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

          +
          + +
          +

          One Fourth

          +

          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

          +
          + +

          + +
          +

          One Fifth

          +

          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

          +
          + +
          +

          One Fifth

          +

          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

          +
          + +
          +

          One Fifth

          +

          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

          +
          + +
          +

          One Fifth

          +

          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

          +
          + +
          +

          One Fifth

          +

          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

          +
          + +
          + +
          + +
          + +
          + + + + diff --git a/src/images/arrow.png b/src/images/arrow.png new file mode 100644 index 0000000..4a1a064 Binary files /dev/null and b/src/images/arrow.png differ diff --git a/src/images/assets/image1.png b/src/images/assets/image1.png new file mode 100644 index 0000000..e3f0817 Binary files /dev/null and b/src/images/assets/image1.png differ diff --git a/src/images/assets/thumb/large/thumb1.png b/src/images/assets/thumb/large/thumb1.png new file mode 100644 index 0000000..31642e6 Binary files /dev/null and b/src/images/assets/thumb/large/thumb1.png differ diff --git a/src/images/assets/thumb/large/thumb2.png b/src/images/assets/thumb/large/thumb2.png new file mode 100644 index 0000000..a8ceecd Binary files /dev/null and b/src/images/assets/thumb/large/thumb2.png differ diff --git a/src/images/assets/thumb/large/thumb3.png b/src/images/assets/thumb/large/thumb3.png new file mode 100644 index 0000000..8b4919a Binary files /dev/null and b/src/images/assets/thumb/large/thumb3.png differ diff --git a/src/images/assets/thumb/large/thumb4.png b/src/images/assets/thumb/large/thumb4.png new file mode 100644 index 0000000..fdaeee3 Binary files /dev/null and b/src/images/assets/thumb/large/thumb4.png differ diff --git a/src/images/assets/thumb/large/thumb5.png b/src/images/assets/thumb/large/thumb5.png new file mode 100644 index 0000000..68604b3 Binary files /dev/null and b/src/images/assets/thumb/large/thumb5.png differ diff --git a/src/images/assets/thumb/large/thumb6.png b/src/images/assets/thumb/large/thumb6.png new file mode 100644 index 0000000..b4a0a0b Binary files /dev/null and b/src/images/assets/thumb/large/thumb6.png differ diff --git a/src/images/assets/thumb/large/thumb7.png b/src/images/assets/thumb/large/thumb7.png new file mode 100644 index 0000000..8aaecf5 Binary files /dev/null and b/src/images/assets/thumb/large/thumb7.png differ diff --git a/src/images/assets/thumb/large/thumb8.png b/src/images/assets/thumb/large/thumb8.png new file mode 100644 index 0000000..3e46745 Binary files /dev/null and b/src/images/assets/thumb/large/thumb8.png differ diff --git a/src/images/assets/thumb/large/thumb9.png b/src/images/assets/thumb/large/thumb9.png new file mode 100644 index 0000000..36bc787 Binary files /dev/null and b/src/images/assets/thumb/large/thumb9.png differ diff --git a/src/images/assets/thumb/medium/thumb1.png b/src/images/assets/thumb/medium/thumb1.png new file mode 100644 index 0000000..90e20d2 Binary files /dev/null and b/src/images/assets/thumb/medium/thumb1.png differ diff --git a/src/images/assets/thumb/medium/thumb2.png b/src/images/assets/thumb/medium/thumb2.png new file mode 100644 index 0000000..93424c3 Binary files /dev/null and b/src/images/assets/thumb/medium/thumb2.png differ diff --git a/src/images/assets/thumb/medium/thumb3.png b/src/images/assets/thumb/medium/thumb3.png new file mode 100644 index 0000000..bafbe22 Binary files /dev/null and b/src/images/assets/thumb/medium/thumb3.png differ diff --git a/src/images/assets/thumb/medium/thumb4.png b/src/images/assets/thumb/medium/thumb4.png new file mode 100644 index 0000000..10e4182 Binary files /dev/null and b/src/images/assets/thumb/medium/thumb4.png differ diff --git a/src/images/assets/thumb/medium/thumb5.png b/src/images/assets/thumb/medium/thumb5.png new file mode 100644 index 0000000..8bc2afd Binary files /dev/null and b/src/images/assets/thumb/medium/thumb5.png differ diff --git a/src/images/assets/thumb/medium/thumb6.png b/src/images/assets/thumb/medium/thumb6.png new file mode 100644 index 0000000..063e5f2 Binary files /dev/null and b/src/images/assets/thumb/medium/thumb6.png differ diff --git a/src/images/assets/thumb/medium/thumb7.png b/src/images/assets/thumb/medium/thumb7.png new file mode 100644 index 0000000..f25df11 Binary files /dev/null and b/src/images/assets/thumb/medium/thumb7.png differ diff --git a/src/images/assets/thumb/medium/thumb8.png b/src/images/assets/thumb/medium/thumb8.png new file mode 100644 index 0000000..2b5580d Binary files /dev/null and b/src/images/assets/thumb/medium/thumb8.png differ diff --git a/src/images/assets/thumb/medium/thumb9.png b/src/images/assets/thumb/medium/thumb9.png new file mode 100644 index 0000000..cb7aad9 Binary files /dev/null and b/src/images/assets/thumb/medium/thumb9.png differ diff --git a/src/images/assets/thumb/small/thumb1.png b/src/images/assets/thumb/small/thumb1.png new file mode 100644 index 0000000..8adb0f4 Binary files /dev/null and b/src/images/assets/thumb/small/thumb1.png differ diff --git a/src/images/assets/thumb/small/thumb2.png b/src/images/assets/thumb/small/thumb2.png new file mode 100644 index 0000000..07d33ba Binary files /dev/null and b/src/images/assets/thumb/small/thumb2.png differ diff --git a/src/images/assets/thumb/small/thumb3.png b/src/images/assets/thumb/small/thumb3.png new file mode 100644 index 0000000..b235cb8 Binary files /dev/null and b/src/images/assets/thumb/small/thumb3.png differ diff --git a/src/images/assets/thumb/small/thumb4.png b/src/images/assets/thumb/small/thumb4.png new file mode 100644 index 0000000..3e3bd26 Binary files /dev/null and b/src/images/assets/thumb/small/thumb4.png differ diff --git a/src/images/assets/thumb/small/thumb5.png b/src/images/assets/thumb/small/thumb5.png new file mode 100644 index 0000000..1c00331 Binary files /dev/null and b/src/images/assets/thumb/small/thumb5.png differ diff --git a/src/images/assets/thumb/small/thumb6.png b/src/images/assets/thumb/small/thumb6.png new file mode 100644 index 0000000..1bfbdaf Binary files /dev/null and b/src/images/assets/thumb/small/thumb6.png differ diff --git a/src/images/assets/thumb/small/thumb7.png b/src/images/assets/thumb/small/thumb7.png new file mode 100644 index 0000000..d0f5a37 Binary files /dev/null and b/src/images/assets/thumb/small/thumb7.png differ diff --git a/src/images/assets/thumb/small/thumb8.png b/src/images/assets/thumb/small/thumb8.png new file mode 100644 index 0000000..09a5665 Binary files /dev/null and b/src/images/assets/thumb/small/thumb8.png differ diff --git a/src/images/assets/thumb/small/thumb9.png b/src/images/assets/thumb/small/thumb9.png new file mode 100644 index 0000000..7586512 Binary files /dev/null and b/src/images/assets/thumb/small/thumb9.png differ diff --git a/src/images/avatar.png b/src/images/avatar.png new file mode 100644 index 0000000..ea1b4a7 Binary files /dev/null and b/src/images/avatar.png differ diff --git a/src/images/barbg.png b/src/images/barbg.png new file mode 100644 index 0000000..cf46147 Binary files /dev/null and b/src/images/barbg.png differ diff --git a/src/images/bgbutton4.png b/src/images/bgbutton4.png new file mode 100644 index 0000000..6cef0f8 Binary files /dev/null and b/src/images/bgbutton4.png differ diff --git a/src/images/bgbutton5.png b/src/images/bgbutton5.png new file mode 100644 index 0000000..347d122 Binary files /dev/null and b/src/images/bgbutton5.png differ diff --git a/src/images/blacktrans.png b/src/images/blacktrans.png new file mode 100644 index 0000000..61cb1b4 Binary files /dev/null and b/src/images/blacktrans.png differ diff --git a/src/images/blacktrans1.png b/src/images/blacktrans1.png new file mode 100644 index 0000000..7b50aff Binary files /dev/null and b/src/images/blacktrans1.png differ diff --git a/src/images/blacktrans2.png b/src/images/blacktrans2.png new file mode 100644 index 0000000..528d21c Binary files /dev/null and b/src/images/blacktrans2.png differ diff --git a/src/images/bluetrans.png b/src/images/bluetrans.png new file mode 100644 index 0000000..b77487f Binary files /dev/null and b/src/images/bluetrans.png differ diff --git a/src/images/borderwhite.png b/src/images/borderwhite.png new file mode 100644 index 0000000..7d7452b Binary files /dev/null and b/src/images/borderwhite.png differ diff --git a/src/images/buttonbg.png b/src/images/buttonbg.png new file mode 100644 index 0000000..fd78fd0 Binary files /dev/null and b/src/images/buttonbg.png differ diff --git a/src/images/buttonbg2.png b/src/images/buttonbg2.png new file mode 100644 index 0000000..dc0a82f Binary files /dev/null and b/src/images/buttonbg2.png differ diff --git a/src/images/buttonbg3.png b/src/images/buttonbg3.png new file mode 100644 index 0000000..d7ad79e Binary files /dev/null and b/src/images/buttonbg3.png differ diff --git a/src/images/buttonbg5.png b/src/images/buttonbg5.png new file mode 100644 index 0000000..9d847f2 Binary files /dev/null and b/src/images/buttonbg5.png differ diff --git a/src/images/buttonbg6.png b/src/images/buttonbg6.png new file mode 100644 index 0000000..1fef736 Binary files /dev/null and b/src/images/buttonbg6.png differ diff --git a/src/images/buttons/button_black.png b/src/images/buttons/button_black.png new file mode 100644 index 0000000..4c5681a Binary files /dev/null and b/src/images/buttons/button_black.png differ diff --git a/src/images/buttons/button_blue.png b/src/images/buttons/button_blue.png new file mode 100644 index 0000000..26d71bc Binary files /dev/null and b/src/images/buttons/button_blue.png differ diff --git a/src/images/buttons/button_brown.png b/src/images/buttons/button_brown.png new file mode 100644 index 0000000..42896bd Binary files /dev/null and b/src/images/buttons/button_brown.png differ diff --git a/src/images/buttons/button_green.png b/src/images/buttons/button_green.png new file mode 100644 index 0000000..5b47586 Binary files /dev/null and b/src/images/buttons/button_green.png differ diff --git a/src/images/buttons/button_lblue.png b/src/images/buttons/button_lblue.png new file mode 100644 index 0000000..9856957 Binary files /dev/null and b/src/images/buttons/button_lblue.png differ diff --git a/src/images/buttons/button_red.png b/src/images/buttons/button_red.png new file mode 100644 index 0000000..128fe82 Binary files /dev/null and b/src/images/buttons/button_red.png differ diff --git a/src/images/buttons/button_white.png b/src/images/buttons/button_white.png new file mode 100644 index 0000000..daf6eee Binary files /dev/null and b/src/images/buttons/button_white.png differ diff --git a/src/images/buttons/button_yellow.png b/src/images/buttons/button_yellow.png new file mode 100644 index 0000000..0d44cb2 Binary files /dev/null and b/src/images/buttons/button_yellow.png differ diff --git a/src/images/colorbox/controls.png b/src/images/colorbox/controls.png new file mode 100644 index 0000000..e1e9798 Binary files /dev/null and b/src/images/colorbox/controls.png differ diff --git a/src/images/colorbox/loading.gif b/src/images/colorbox/loading.gif new file mode 100644 index 0000000..19c67bb Binary files /dev/null and b/src/images/colorbox/loading.gif differ diff --git a/src/images/colorpicker.png b/src/images/colorpicker.png new file mode 100644 index 0000000..ff3dfe9 Binary files /dev/null and b/src/images/colorpicker.png differ diff --git a/src/images/colorpicker/Thumbs.db b/src/images/colorpicker/Thumbs.db new file mode 100644 index 0000000..d396c36 Binary files /dev/null and b/src/images/colorpicker/Thumbs.db differ diff --git a/src/images/colorpicker/blank.gif b/src/images/colorpicker/blank.gif new file mode 100644 index 0000000..75b945d Binary files /dev/null and b/src/images/colorpicker/blank.gif differ diff --git a/src/images/colorpicker/colorpicker_background.png b/src/images/colorpicker/colorpicker_background.png new file mode 100644 index 0000000..8401572 Binary files /dev/null and b/src/images/colorpicker/colorpicker_background.png differ diff --git a/src/images/colorpicker/colorpicker_hex.png b/src/images/colorpicker/colorpicker_hex.png new file mode 100644 index 0000000..4e532d7 Binary files /dev/null and b/src/images/colorpicker/colorpicker_hex.png differ diff --git a/src/images/colorpicker/colorpicker_hsb_b.png b/src/images/colorpicker/colorpicker_hsb_b.png new file mode 100644 index 0000000..dfac595 Binary files /dev/null and b/src/images/colorpicker/colorpicker_hsb_b.png differ diff --git a/src/images/colorpicker/colorpicker_hsb_h.png b/src/images/colorpicker/colorpicker_hsb_h.png new file mode 100644 index 0000000..3977ed9 Binary files /dev/null and b/src/images/colorpicker/colorpicker_hsb_h.png differ diff --git a/src/images/colorpicker/colorpicker_hsb_s.png b/src/images/colorpicker/colorpicker_hsb_s.png new file mode 100644 index 0000000..a2a6997 Binary files /dev/null and b/src/images/colorpicker/colorpicker_hsb_s.png differ diff --git a/src/images/colorpicker/colorpicker_indic.gif b/src/images/colorpicker/colorpicker_indic.gif new file mode 100644 index 0000000..f9fa95e Binary files /dev/null and b/src/images/colorpicker/colorpicker_indic.gif differ diff --git a/src/images/colorpicker/colorpicker_overlay.png b/src/images/colorpicker/colorpicker_overlay.png new file mode 100644 index 0000000..561cdd9 Binary files /dev/null and b/src/images/colorpicker/colorpicker_overlay.png differ diff --git a/src/images/colorpicker/colorpicker_rgb_b.png b/src/images/colorpicker/colorpicker_rgb_b.png new file mode 100644 index 0000000..dfac595 Binary files /dev/null and b/src/images/colorpicker/colorpicker_rgb_b.png differ diff --git a/src/images/colorpicker/colorpicker_rgb_g.png b/src/images/colorpicker/colorpicker_rgb_g.png new file mode 100644 index 0000000..72b3276 Binary files /dev/null and b/src/images/colorpicker/colorpicker_rgb_g.png differ diff --git a/src/images/colorpicker/colorpicker_rgb_r.png b/src/images/colorpicker/colorpicker_rgb_r.png new file mode 100644 index 0000000..4855fe0 Binary files /dev/null and b/src/images/colorpicker/colorpicker_rgb_r.png differ diff --git a/src/images/colorpicker/colorpicker_select.gif b/src/images/colorpicker/colorpicker_select.gif new file mode 100644 index 0000000..599f7f1 Binary files /dev/null and b/src/images/colorpicker/colorpicker_select.gif differ diff --git a/src/images/colorpicker/colorpicker_submit.png b/src/images/colorpicker/colorpicker_submit.png new file mode 100644 index 0000000..7f4c082 Binary files /dev/null and b/src/images/colorpicker/colorpicker_submit.png differ diff --git a/src/images/colorpicker/custom_background.png b/src/images/colorpicker/custom_background.png new file mode 100644 index 0000000..cf55ffd Binary files /dev/null and b/src/images/colorpicker/custom_background.png differ diff --git a/src/images/colorpicker/custom_hex.png b/src/images/colorpicker/custom_hex.png new file mode 100644 index 0000000..888f444 Binary files /dev/null and b/src/images/colorpicker/custom_hex.png differ diff --git a/src/images/colorpicker/custom_hsb_b.png b/src/images/colorpicker/custom_hsb_b.png new file mode 100644 index 0000000..2f99dae Binary files /dev/null and b/src/images/colorpicker/custom_hsb_b.png differ diff --git a/src/images/colorpicker/custom_hsb_h.png b/src/images/colorpicker/custom_hsb_h.png new file mode 100644 index 0000000..a217e92 Binary files /dev/null and b/src/images/colorpicker/custom_hsb_h.png differ diff --git a/src/images/colorpicker/custom_hsb_s.png b/src/images/colorpicker/custom_hsb_s.png new file mode 100644 index 0000000..7826b41 Binary files /dev/null and b/src/images/colorpicker/custom_hsb_s.png differ diff --git a/src/images/colorpicker/custom_indic.gif b/src/images/colorpicker/custom_indic.gif new file mode 100644 index 0000000..222fb94 Binary files /dev/null and b/src/images/colorpicker/custom_indic.gif differ diff --git a/src/images/colorpicker/custom_rgb_b.png b/src/images/colorpicker/custom_rgb_b.png new file mode 100644 index 0000000..80764e5 Binary files /dev/null and b/src/images/colorpicker/custom_rgb_b.png differ diff --git a/src/images/colorpicker/custom_rgb_g.png b/src/images/colorpicker/custom_rgb_g.png new file mode 100644 index 0000000..fc9778b Binary files /dev/null and b/src/images/colorpicker/custom_rgb_g.png differ diff --git a/src/images/colorpicker/custom_rgb_r.png b/src/images/colorpicker/custom_rgb_r.png new file mode 100644 index 0000000..91b0cd4 Binary files /dev/null and b/src/images/colorpicker/custom_rgb_r.png differ diff --git a/src/images/colorpicker/custom_submit.png b/src/images/colorpicker/custom_submit.png new file mode 100644 index 0000000..cd202cd Binary files /dev/null and b/src/images/colorpicker/custom_submit.png differ diff --git a/src/images/colorpicker/select.png b/src/images/colorpicker/select.png new file mode 100644 index 0000000..21213bf Binary files /dev/null and b/src/images/colorpicker/select.png differ diff --git a/src/images/colorpicker/select2.png b/src/images/colorpicker/select2.png new file mode 100644 index 0000000..2cd2cab Binary files /dev/null and b/src/images/colorpicker/select2.png differ diff --git a/src/images/colorpicker/slider.png b/src/images/colorpicker/slider.png new file mode 100644 index 0000000..8b03da9 Binary files /dev/null and b/src/images/colorpicker/slider.png differ diff --git a/src/images/filemanager/icons-big.png b/src/images/filemanager/icons-big.png new file mode 100644 index 0000000..923a832 Binary files /dev/null and b/src/images/filemanager/icons-big.png differ diff --git a/src/images/filemanager/icons-small.png b/src/images/filemanager/icons-small.png new file mode 100644 index 0000000..746c399 Binary files /dev/null and b/src/images/filemanager/icons-small.png differ diff --git a/src/images/filemanager/ql.png b/src/images/filemanager/ql.png new file mode 100644 index 0000000..aedeadd Binary files /dev/null and b/src/images/filemanager/ql.png differ diff --git a/src/images/filemanager/spinner.gif b/src/images/filemanager/spinner.gif new file mode 100644 index 0000000..d84f653 Binary files /dev/null and b/src/images/filemanager/spinner.gif differ diff --git a/src/images/filemanager/toolbar.png b/src/images/filemanager/toolbar.png new file mode 100644 index 0000000..ef48931 Binary files /dev/null and b/src/images/filemanager/toolbar.png differ diff --git a/src/images/gradcircle.png b/src/images/gradcircle.png new file mode 100644 index 0000000..97df141 Binary files /dev/null and b/src/images/gradcircle.png differ diff --git a/src/images/headbutton.png b/src/images/headbutton.png new file mode 100644 index 0000000..1722778 Binary files /dev/null and b/src/images/headbutton.png differ diff --git a/src/images/help.gif b/src/images/help.gif new file mode 100644 index 0000000..3b51425 Binary files /dev/null and b/src/images/help.gif differ diff --git a/src/images/icons/404.png b/src/images/icons/404.png new file mode 100644 index 0000000..d5fcf76 Binary files /dev/null and b/src/images/icons/404.png differ diff --git a/src/images/icons/buttons.png b/src/images/icons/buttons.png new file mode 100644 index 0000000..bf602e9 Binary files /dev/null and b/src/images/icons/buttons.png differ diff --git a/src/images/icons/cal.png b/src/images/icons/cal.png new file mode 100644 index 0000000..364baa4 Binary files /dev/null and b/src/images/icons/cal.png differ diff --git a/src/images/icons/calarrow.png b/src/images/icons/calarrow.png new file mode 100644 index 0000000..41d7307 Binary files /dev/null and b/src/images/icons/calarrow.png differ diff --git a/src/images/icons/calendar.png b/src/images/icons/calendar.png new file mode 100644 index 0000000..a2bb3a4 Binary files /dev/null and b/src/images/icons/calendar.png differ diff --git a/src/images/icons/candidatos.png b/src/images/icons/candidatos.png new file mode 100644 index 0000000..a5a4449 Binary files /dev/null and b/src/images/icons/candidatos.png differ diff --git a/src/images/icons/close.png b/src/images/icons/close.png new file mode 100644 index 0000000..1b20e8b Binary files /dev/null and b/src/images/icons/close.png differ diff --git a/src/images/icons/createreport.png b/src/images/icons/createreport.png new file mode 100644 index 0000000..5b021b8 Binary files /dev/null and b/src/images/icons/createreport.png differ diff --git a/src/images/icons/dashboard.png b/src/images/icons/dashboard.png new file mode 100644 index 0000000..37dc71a Binary files /dev/null and b/src/images/icons/dashboard.png differ diff --git a/src/images/icons/document.png b/src/images/icons/document.png new file mode 100644 index 0000000..1237ceb Binary files /dev/null and b/src/images/icons/document.png differ diff --git a/src/images/icons/editor.png b/src/images/icons/editor.png new file mode 100644 index 0000000..0327f06 Binary files /dev/null and b/src/images/icons/editor.png differ diff --git a/src/images/icons/elements.png b/src/images/icons/elements.png new file mode 100644 index 0000000..60f2ac8 Binary files /dev/null and b/src/images/icons/elements.png differ diff --git a/src/images/icons/error.png b/src/images/icons/error.png new file mode 100644 index 0000000..44a7dd6 Binary files /dev/null and b/src/images/icons/error.png differ diff --git a/src/images/icons/file.png b/src/images/icons/file.png new file mode 100644 index 0000000..6f64195 Binary files /dev/null and b/src/images/icons/file.png differ diff --git a/src/images/icons/form.png b/src/images/icons/form.png new file mode 100644 index 0000000..5a8909e Binary files /dev/null and b/src/images/icons/form.png differ diff --git a/src/images/icons/gallery.png b/src/images/icons/gallery.png new file mode 100644 index 0000000..15600f3 Binary files /dev/null and b/src/images/icons/gallery.png differ diff --git a/src/images/icons/grid.png b/src/images/icons/grid.png new file mode 100644 index 0000000..62b0c4a Binary files /dev/null and b/src/images/icons/grid.png differ diff --git a/src/images/icons/hbutton.png b/src/images/icons/hbutton.png new file mode 100644 index 0000000..c4c006f Binary files /dev/null and b/src/images/icons/hbutton.png differ diff --git a/src/images/icons/home.png b/src/images/icons/home.png new file mode 100644 index 0000000..a05243a Binary files /dev/null and b/src/images/icons/home.png differ diff --git a/src/images/icons/homesmall.png b/src/images/icons/homesmall.png new file mode 100644 index 0000000..39ff2ea Binary files /dev/null and b/src/images/icons/homesmall.png differ diff --git a/src/images/icons/info.png b/src/images/icons/info.png new file mode 100644 index 0000000..66b0da2 Binary files /dev/null and b/src/images/icons/info.png differ diff --git a/src/images/icons/mail.png b/src/images/icons/mail.png new file mode 100644 index 0000000..e478d24 Binary files /dev/null and b/src/images/icons/mail.png differ diff --git a/src/images/icons/media.png b/src/images/icons/media.png new file mode 100644 index 0000000..edb6a15 Binary files /dev/null and b/src/images/icons/media.png differ diff --git a/src/images/icons/message.png b/src/images/icons/message.png new file mode 100644 index 0000000..e90330a Binary files /dev/null and b/src/images/icons/message.png differ diff --git a/src/images/icons/notification.png b/src/images/icons/notification.png new file mode 100644 index 0000000..4dcfc30 Binary files /dev/null and b/src/images/icons/notification.png differ diff --git a/src/images/icons/reports.png b/src/images/icons/reports.png new file mode 100644 index 0000000..568699b Binary files /dev/null and b/src/images/icons/reports.png differ diff --git a/src/images/icons/small/black/calendar.png b/src/images/icons/small/black/calendar.png new file mode 100644 index 0000000..2eeb514 Binary files /dev/null and b/src/images/icons/small/black/calendar.png differ diff --git a/src/images/icons/small/black/chat.png b/src/images/icons/small/black/chat.png new file mode 100644 index 0000000..971d204 Binary files /dev/null and b/src/images/icons/small/black/chat.png differ diff --git a/src/images/icons/small/black/check.png b/src/images/icons/small/black/check.png new file mode 100644 index 0000000..79ffbe4 Binary files /dev/null and b/src/images/icons/small/black/check.png differ diff --git a/src/images/icons/small/black/close.png b/src/images/icons/small/black/close.png new file mode 100644 index 0000000..7a666b0 Binary files /dev/null and b/src/images/icons/small/black/close.png differ diff --git a/src/images/icons/small/black/contact.png b/src/images/icons/small/black/contact.png new file mode 100644 index 0000000..8713b85 Binary files /dev/null and b/src/images/icons/small/black/contact.png differ diff --git a/src/images/icons/small/black/document.png b/src/images/icons/small/black/document.png new file mode 100644 index 0000000..59b9bca Binary files /dev/null and b/src/images/icons/small/black/document.png differ diff --git a/src/images/icons/small/black/edit.png b/src/images/icons/small/black/edit.png new file mode 100644 index 0000000..6ea45f2 Binary files /dev/null and b/src/images/icons/small/black/edit.png differ diff --git a/src/images/icons/small/black/mail.png b/src/images/icons/small/black/mail.png new file mode 100644 index 0000000..a1128ad Binary files /dev/null and b/src/images/icons/small/black/mail.png differ diff --git a/src/images/icons/small/black/minus.png b/src/images/icons/small/black/minus.png new file mode 100644 index 0000000..f4c3b4a Binary files /dev/null and b/src/images/icons/small/black/minus.png differ diff --git a/src/images/icons/small/black/music.png b/src/images/icons/small/black/music.png new file mode 100644 index 0000000..278912b Binary files /dev/null and b/src/images/icons/small/black/music.png differ diff --git a/src/images/icons/small/black/people.png b/src/images/icons/small/black/people.png new file mode 100644 index 0000000..83729b7 Binary files /dev/null and b/src/images/icons/small/black/people.png differ diff --git a/src/images/icons/small/black/plus.png b/src/images/icons/small/black/plus.png new file mode 100644 index 0000000..2ec3d31 Binary files /dev/null and b/src/images/icons/small/black/plus.png differ diff --git a/src/images/icons/small/black/save.png b/src/images/icons/small/black/save.png new file mode 100644 index 0000000..6a3aa1a Binary files /dev/null and b/src/images/icons/small/black/save.png differ diff --git a/src/images/icons/small/black/search.png b/src/images/icons/small/black/search.png new file mode 100644 index 0000000..44c031d Binary files /dev/null and b/src/images/icons/small/black/search.png differ diff --git a/src/images/icons/small/black/settings.png b/src/images/icons/small/black/settings.png new file mode 100644 index 0000000..51e89a0 Binary files /dev/null and b/src/images/icons/small/black/settings.png differ diff --git a/src/images/icons/small/black/star.png b/src/images/icons/small/black/star.png new file mode 100644 index 0000000..59ec25a Binary files /dev/null and b/src/images/icons/small/black/star.png differ diff --git a/src/images/icons/small/black/tag.png b/src/images/icons/small/black/tag.png new file mode 100644 index 0000000..854af40 Binary files /dev/null and b/src/images/icons/small/black/tag.png differ diff --git a/src/images/icons/small/black/user.png b/src/images/icons/small/black/user.png new file mode 100644 index 0000000..e9e73af Binary files /dev/null and b/src/images/icons/small/black/user.png differ diff --git a/src/images/icons/small/black/video.png b/src/images/icons/small/black/video.png new file mode 100644 index 0000000..befbfe3 Binary files /dev/null and b/src/images/icons/small/black/video.png differ diff --git a/src/images/icons/small/white/calendar.png b/src/images/icons/small/white/calendar.png new file mode 100644 index 0000000..0b64bfb Binary files /dev/null and b/src/images/icons/small/white/calendar.png differ diff --git a/src/images/icons/small/white/chat.png b/src/images/icons/small/white/chat.png new file mode 100644 index 0000000..0a13f72 Binary files /dev/null and b/src/images/icons/small/white/chat.png differ diff --git a/src/images/icons/small/white/check.png b/src/images/icons/small/white/check.png new file mode 100644 index 0000000..724a564 Binary files /dev/null and b/src/images/icons/small/white/check.png differ diff --git a/src/images/icons/small/white/close.png b/src/images/icons/small/white/close.png new file mode 100644 index 0000000..be88245 Binary files /dev/null and b/src/images/icons/small/white/close.png differ diff --git a/src/images/icons/small/white/contact.png b/src/images/icons/small/white/contact.png new file mode 100644 index 0000000..e6f510d Binary files /dev/null and b/src/images/icons/small/white/contact.png differ diff --git a/src/images/icons/small/white/document.png b/src/images/icons/small/white/document.png new file mode 100644 index 0000000..04b492b Binary files /dev/null and b/src/images/icons/small/white/document.png differ diff --git a/src/images/icons/small/white/edit.png b/src/images/icons/small/white/edit.png new file mode 100644 index 0000000..62ed626 Binary files /dev/null and b/src/images/icons/small/white/edit.png differ diff --git a/src/images/icons/small/white/mail.png b/src/images/icons/small/white/mail.png new file mode 100644 index 0000000..4840a5c Binary files /dev/null and b/src/images/icons/small/white/mail.png differ diff --git a/src/images/icons/small/white/minus.png b/src/images/icons/small/white/minus.png new file mode 100644 index 0000000..7152a70 Binary files /dev/null and b/src/images/icons/small/white/minus.png differ diff --git a/src/images/icons/small/white/music.png b/src/images/icons/small/white/music.png new file mode 100644 index 0000000..042a01a Binary files /dev/null and b/src/images/icons/small/white/music.png differ diff --git a/src/images/icons/small/white/people.png b/src/images/icons/small/white/people.png new file mode 100644 index 0000000..d934670 Binary files /dev/null and b/src/images/icons/small/white/people.png differ diff --git a/src/images/icons/small/white/plus.png b/src/images/icons/small/white/plus.png new file mode 100644 index 0000000..9f939cf Binary files /dev/null and b/src/images/icons/small/white/plus.png differ diff --git a/src/images/icons/small/white/save.png b/src/images/icons/small/white/save.png new file mode 100644 index 0000000..561470f Binary files /dev/null and b/src/images/icons/small/white/save.png differ diff --git a/src/images/icons/small/white/search.png b/src/images/icons/small/white/search.png new file mode 100644 index 0000000..e4af1d9 Binary files /dev/null and b/src/images/icons/small/white/search.png differ diff --git a/src/images/icons/small/white/settings.png b/src/images/icons/small/white/settings.png new file mode 100644 index 0000000..78b26b9 Binary files /dev/null and b/src/images/icons/small/white/settings.png differ diff --git a/src/images/icons/small/white/star.png b/src/images/icons/small/white/star.png new file mode 100644 index 0000000..79fcafd Binary files /dev/null and b/src/images/icons/small/white/star.png differ diff --git a/src/images/icons/small/white/tag.png b/src/images/icons/small/white/tag.png new file mode 100644 index 0000000..89fb71d Binary files /dev/null and b/src/images/icons/small/white/tag.png differ diff --git a/src/images/icons/small/white/user.png b/src/images/icons/small/white/user.png new file mode 100644 index 0000000..c459a6a Binary files /dev/null and b/src/images/icons/small/white/user.png differ diff --git a/src/images/icons/small/white/video.png b/src/images/icons/small/white/video.png new file mode 100644 index 0000000..2df8c5a Binary files /dev/null and b/src/images/icons/small/white/video.png differ diff --git a/src/images/icons/statistics.png b/src/images/icons/statistics.png new file mode 100644 index 0000000..1e62bb3 Binary files /dev/null and b/src/images/icons/statistics.png differ diff --git a/src/images/icons/success.png b/src/images/icons/success.png new file mode 100644 index 0000000..f036793 Binary files /dev/null and b/src/images/icons/success.png differ diff --git a/src/images/icons/table.png b/src/images/icons/table.png new file mode 100644 index 0000000..bffeba1 Binary files /dev/null and b/src/images/icons/table.png differ diff --git a/src/images/icons/trash.png b/src/images/icons/trash.png new file mode 100644 index 0000000..a23787b Binary files /dev/null and b/src/images/icons/trash.png differ diff --git a/src/images/icons/users.png b/src/images/icons/users.png new file mode 100644 index 0000000..b464426 Binary files /dev/null and b/src/images/icons/users.png differ diff --git a/src/images/icons/vbutton.png b/src/images/icons/vbutton.png new file mode 100644 index 0000000..a80b000 Binary files /dev/null and b/src/images/icons/vbutton.png differ diff --git a/src/images/icons/warning.png b/src/images/icons/warning.png new file mode 100644 index 0000000..948b59f Binary files /dev/null and b/src/images/icons/warning.png differ diff --git a/src/images/imghover.png b/src/images/imghover.png new file mode 100644 index 0000000..0b73c7f Binary files /dev/null and b/src/images/imghover.png differ diff --git a/src/images/important.gif b/src/images/important.gif new file mode 100644 index 0000000..41d4943 Binary files /dev/null and b/src/images/important.gif differ diff --git a/src/images/info.gif b/src/images/info.gif new file mode 100644 index 0000000..c81828d Binary files /dev/null and b/src/images/info.gif differ diff --git a/src/images/jquery.wysiwyg.gif b/src/images/jquery.wysiwyg.gif new file mode 100644 index 0000000..3daed50 Binary files /dev/null and b/src/images/jquery.wysiwyg.gif differ diff --git a/src/images/leftbg.png b/src/images/leftbg.png new file mode 100644 index 0000000..535c652 Binary files /dev/null and b/src/images/leftbg.png differ diff --git a/src/images/loaders/loader1.gif b/src/images/loaders/loader1.gif new file mode 100644 index 0000000..26bb9e7 Binary files /dev/null and b/src/images/loaders/loader1.gif differ diff --git a/src/images/loaders/loader10.gif b/src/images/loaders/loader10.gif new file mode 100644 index 0000000..b327795 Binary files /dev/null and b/src/images/loaders/loader10.gif differ diff --git a/src/images/loaders/loader2.gif b/src/images/loaders/loader2.gif new file mode 100644 index 0000000..54b54a9 Binary files /dev/null and b/src/images/loaders/loader2.gif differ diff --git a/src/images/loaders/loader3.gif b/src/images/loaders/loader3.gif new file mode 100644 index 0000000..c111c62 Binary files /dev/null and b/src/images/loaders/loader3.gif differ diff --git a/src/images/loaders/loader4.gif b/src/images/loaders/loader4.gif new file mode 100644 index 0000000..4df287b Binary files /dev/null and b/src/images/loaders/loader4.gif differ diff --git a/src/images/loaders/loader5.gif b/src/images/loaders/loader5.gif new file mode 100644 index 0000000..c1b8624 Binary files /dev/null and b/src/images/loaders/loader5.gif differ diff --git a/src/images/loaders/loader6.gif b/src/images/loaders/loader6.gif new file mode 100644 index 0000000..bd6ea7b Binary files /dev/null and b/src/images/loaders/loader6.gif differ diff --git a/src/images/loaders/loader7.gif b/src/images/loaders/loader7.gif new file mode 100644 index 0000000..9669d83 Binary files /dev/null and b/src/images/loaders/loader7.gif differ diff --git a/src/images/loaders/loader8.gif b/src/images/loaders/loader8.gif new file mode 100644 index 0000000..9256b2c Binary files /dev/null and b/src/images/loaders/loader8.gif differ diff --git a/src/images/loaders/loader9.gif b/src/images/loaders/loader9.gif new file mode 100644 index 0000000..075a436 Binary files /dev/null and b/src/images/loaders/loader9.gif differ diff --git a/src/images/loginbox.png b/src/images/loginbox.png new file mode 100644 index 0000000..6cd4e11 Binary files /dev/null and b/src/images/loginbox.png differ diff --git a/src/images/logo.png b/src/images/logo.png new file mode 100644 index 0000000..7808a37 Binary files /dev/null and b/src/images/logo.png differ diff --git a/src/images/logo2.png b/src/images/logo2.png new file mode 100644 index 0000000..22dfb11 Binary files /dev/null and b/src/images/logo2.png differ diff --git a/src/images/passwordfield.png b/src/images/passwordfield.png new file mode 100644 index 0000000..7aa477d Binary files /dev/null and b/src/images/passwordfield.png differ diff --git a/src/images/prevnext.png b/src/images/prevnext.png new file mode 100644 index 0000000..00091e2 Binary files /dev/null and b/src/images/prevnext.png differ diff --git a/src/images/searchbar.png b/src/images/searchbar.png new file mode 100644 index 0000000..08d2a18 Binary files /dev/null and b/src/images/searchbar.png differ diff --git a/src/images/searchicon.png b/src/images/searchicon.png new file mode 100644 index 0000000..8ac2534 Binary files /dev/null and b/src/images/searchicon.png differ diff --git a/src/images/separator.png b/src/images/separator.png new file mode 100644 index 0000000..1b3e3c9 Binary files /dev/null and b/src/images/separator.png differ diff --git a/src/images/separator2.png b/src/images/separator2.png new file mode 100644 index 0000000..f60a514 Binary files /dev/null and b/src/images/separator2.png differ diff --git a/src/images/sort_asc.png b/src/images/sort_asc.png new file mode 100644 index 0000000..3ff9d44 Binary files /dev/null and b/src/images/sort_asc.png differ diff --git a/src/images/sort_asc_disabled.png b/src/images/sort_asc_disabled.png new file mode 100644 index 0000000..b5ebfea Binary files /dev/null and b/src/images/sort_asc_disabled.png differ diff --git a/src/images/sort_both.png b/src/images/sort_both.png new file mode 100644 index 0000000..be7f07e Binary files /dev/null and b/src/images/sort_both.png differ diff --git a/src/images/sort_desc.png b/src/images/sort_desc.png new file mode 100644 index 0000000..e192841 Binary files /dev/null and b/src/images/sort_desc.png differ diff --git a/src/images/sort_desc_disabled.png b/src/images/sort_desc_disabled.png new file mode 100644 index 0000000..d642f31 Binary files /dev/null and b/src/images/sort_desc_disabled.png differ diff --git a/src/images/tabmenubg.png b/src/images/tabmenubg.png new file mode 100644 index 0000000..29f018c Binary files /dev/null and b/src/images/tabmenubg.png differ diff --git a/src/images/texturebg.png b/src/images/texturebg.png new file mode 100644 index 0000000..72c4001 Binary files /dev/null and b/src/images/texturebg.png differ diff --git a/src/images/thead.png b/src/images/thead.png new file mode 100644 index 0000000..9dbbd08 Binary files /dev/null and b/src/images/thead.png differ diff --git a/src/images/title.gif b/src/images/title.gif new file mode 100644 index 0000000..f92b596 Binary files /dev/null and b/src/images/title.gif differ diff --git a/src/images/titlebg.png b/src/images/titlebg.png new file mode 100644 index 0000000..c23f628 Binary files /dev/null and b/src/images/titlebg.png differ diff --git a/src/images/toggle.png b/src/images/toggle.png new file mode 100644 index 0000000..fa2d44b Binary files /dev/null and b/src/images/toggle.png differ diff --git a/src/images/toggle2.png b/src/images/toggle2.png new file mode 100644 index 0000000..07ace62 Binary files /dev/null and b/src/images/toggle2.png differ diff --git a/src/images/usernamefield.png b/src/images/usernamefield.png new file mode 100644 index 0000000..eed0a57 Binary files /dev/null and b/src/images/usernamefield.png differ diff --git a/src/images/viewdelete.png b/src/images/viewdelete.png new file mode 100644 index 0000000..dc8de38 Binary files /dev/null and b/src/images/viewdelete.png differ diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..5cf886f --- /dev/null +++ b/src/index.html @@ -0,0 +1,48 @@ + + + + +Login Page | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + +
          Usuario no válido
          + +
          +
          +
          +
          + + + +
          +
          +
          + +
          + + Recordar contraseña en este equipo +
          +
          + + + diff --git a/src/invoice.html b/src/invoice.html new file mode 100644 index 0000000..336954a --- /dev/null +++ b/src/invoice.html @@ -0,0 +1,320 @@ + + + + +Invoice | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + + +
          + +
          + + + + + + + + Logo + + + +
          + Avatar +
          +

          John Doe

          + youremail@domain.com +

          + Account Settings Logout +

          +
          +
          +
          + + + + + +
          + + + +
          + +

          Invoice

          + +
          +
          + + [Logo here] + +

          Invoice

          + +

          + +
          + John Doe
          + Company Name
          + Attn: Accounts Receivable MS 22
          + 20121 Owen Business Park
          + Mountain View, CA 32423 +
          + +
          +
          + + Number:
          + Date:
          + Job Number:
          + PO #
          + Charge #
          +
          + +
          + 2323
          + December 5, 2011
          + 54-GH-23D6-L23
          + 43344
          + 1-232-456-354654-6 +
          +
          + +

          + +
          + + Job Name:
          + Agency Contact:
          + Description:
          +
          + +
          + Web Development
          + Justin Miller
          + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sed tristique diam. Suspendisse tempus nibh ac velit interdum rutrum. Aliquam ullamcorper bibendum elit eget egestas. Pellentesque sodales, justo at feugiat sagittis, quam massa luctus leo, et facilisis tortor nibh mollis nulla. Nulla facilisis sem et dolor congue nec porta enim varius. Quisque ac dolor felis, in laoreet est. Sed a urna est. Phasellus sed elementum ipsum. +
          + +

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          DescriptionHours BilledAmount
           
          Logo Design12.5$ 500.00
          PSD Layout22.5$ 980.00
          Design Subtotal122.5$ 1 675.00
           
          HTML/CSS40$ 3 000.00
          Backend Integration55$ 4 980.00
          Database Design18$ 1 480.00
          Coding Subtotal233$ 6 175.00
           
          Domain2 years$ 22.00
          Hosting3 years$ 300.00
          Server Subtotaln/a$ 322.00
           
           
          SUB-TOTAL32$ 8 322.00
          *4.5% Sales Tax $ 122.00
           
          TOTAL $ 8 622.00
          + +
          + +
          +
          + DUE DATE
          + PAYMENT TERMS
          +
          +
          + January 01, 2011
          + NET +
          +
          + + +
          + +
          + + +
          + +
          + +
          + +
          + + + + diff --git a/src/js/custom/calendar.js b/src/js/custom/calendar.js new file mode 100644 index 0000000..0babdbd --- /dev/null +++ b/src/js/custom/calendar.js @@ -0,0 +1,55 @@ +jQuery(document).ready(function() { + /* initialize the external events */ + jQuery('#external-events div.external-event').each(function() { + + // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/) + // it doesn't need to have a start or end + var eventObject = { + title: jQuery.trim(jQuery(this).text()) // use the element's text as the event title + }; + + // store the Event Object in the DOM element so we can get to it later + jQuery(this).data('eventObject', eventObject); + + // make the event draggable using jQuery UI + jQuery(this).draggable({ + zIndex: 999, + revert: true, // will cause the event to go back to its + revertDuration: 0 // original position after the drag + }); + + }); + + + /* initialize the calendar */ + jQuery('#calendar').fullCalendar({ + header: { + left: 'prev,next today', + center: 'title', + right: 'month,agendaWeek,agendaDay' + }, + editable: true, + droppable: true, // this allows things to be dropped onto the calendar !!! + drop: function(date, allDay) { // this function is called when something is dropped + + // retrieve the dropped element's stored Event Object + var originalEventObject = jQuery(this).data('eventObject'); + + // we need to copy it, so that multiple events don't have a reference to the same object + var copiedEventObject = jQuery.extend({}, originalEventObject); + + // assign it the date that was reported + copiedEventObject.start = date; + copiedEventObject.allDay = allDay; + + // render the event on the calendar + // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/) + jQuery('#calendar').fullCalendar('renderEvent', copiedEventObject, true); + + // is the "remove after drop" checkbox checked? + + jQuery(this).remove(); + + } + }); +}); diff --git a/src/js/custom/dashboard.js b/src/js/custom/dashboard.js new file mode 100644 index 0000000..f59fa3b --- /dev/null +++ b/src/js/custom/dashboard.js @@ -0,0 +1,85 @@ + jQuery(document).ready(function () { + + + //////////// CHARTS ///////////////// + var flash = [], html5 = []; + for (var i = 0; i < 14; i += 0.5) { + flash.push([i, Math.sin(i)]); + html5.push([i, Math.cos(i)]); + } + + function showTooltip(x, y, contents) { + jQuery('
          ' + contents + '
          ').css( { + position: 'absolute', + display: 'none', + top: y + 5, + left: x + 5 + }).appendTo("body").fadeIn(200); + } + + + var plot = jQuery.plot(jQuery("#chartplace"), + [ { data: flash, label: "Flash(x)", color: "#069"}, { data: html5, label: "HTML5(x)", color: "#ff0000"} ], { + series: { + lines: { show: true }, + points: { show: true } + }, + grid: { hoverable: true, clickable: true }, + yaxis: { min: -1.2, max: 1.2 } + }); + + var previousPoint = null; + jQuery("#chartplace").bind("plothover", function (event, pos, item) { + jQuery("#x").text(pos.x.toFixed(2)); + jQuery("#y").text(pos.y.toFixed(2)); + + if(item) { + if (previousPoint != item.dataIndex) { + previousPoint = item.dataIndex; + + jQuery("#tooltip").remove(); + var x = item.datapoint[0].toFixed(2), + y = item.datapoint[1].toFixed(2); + + showTooltip(item.pageX, item.pageY, + item.series.label + " of " + x + " = " + y); + } + } + else { + jQuery("#tooltip").remove(); + previousPoint = null; + } + + }); + + jQuery("#chartplace").bind("plotclick", function (event, pos, item) { + if (item) { + jQuery("#clickdata").text("You clicked point " + item.dataIndex + " in " + item.series.label + "."); + plot.highlight(item.series, item.datapoint); + } + }); + + //////////// TABS ///////////////// + jQuery( "#tabs" ).tabs(); + + //////////// ACCORDION ///////////////// + jQuery( ".accordion" ).accordion(); + + //////////// FORM VALIDATION ///////////////// + jQuery("#form").validate({ + rules: { + name: "required", + email: { + required: true, + email: true, + }, + occupation: "required" + }, + messages: { + name: "Please enter your name", + email: "Please enter a valid email address", + occupation: "Please select your occupation" + } + }); + +}); diff --git a/src/js/custom/elements.js b/src/js/custom/elements.js new file mode 100644 index 0000000..8e7f4d7 --- /dev/null +++ b/src/js/custom/elements.js @@ -0,0 +1,185 @@ +jQuery.noConflict(); + +jQuery(document).ready(function(){ + /** + * Color Picker + **/ + jQuery('#colorpicker').ColorPicker({ + onSubmit: function(hsb, hex, rgb, el) { + jQuery(el).val(hex); + jQuery(el).ColorPickerHide(); + }, + onBeforeShow: function () { + jQuery(this).ColorPickerSetColor(this.value); + } + }) + .bind('keyup', function(){ + jQuery(this).ColorPickerSetColor(this.value); + }); + + jQuery('#colorselector').ColorPicker({ + color: '#0000ff', + onShow: function (colpkr) { + jQuery(colpkr).fadeIn(500); + return false; + }, + onHide: function (colpkr) { + jQuery(colpkr).fadeOut(500); + return false; + }, + onChange: function (hsb, hex, rgb) { + jQuery('#colorselector').css('backgroundColor', '#' + hex); + } + }); + + /** + * Date picker + **/ + jQuery( "#datepicker" ).datepicker(); + + + /** + * Growl Notification + **/ + jQuery('.growl').click(function(){ + jQuery.jGrowl("Hello world!"); + return false; + }); + + jQuery('.growl2').click(function(){ + var msg = "This notification will live a little longer."; + var position = "top-right"; + var scrollpos = jQuery(document).scrollTop(); + if(scrollpos < 50) position = "customtop-right"; + jQuery.jGrowl(msg, { life: 5000, position: position}); + return false; + }); + + //this will prevent growl box to show on top of the header when + //scroll event is fired + jQuery(document).scroll(function(){ + if(jQuery('.jGrowl').length != 0) { + var pos = jQuery(document).scrollTop(); + if(pos < 50) jQuery('.jGrowl').css({top: '100px'}); else jQuery('.jGrowl').css({top: '0'}); + } + }); + + + /** + * Tab + **/ + jQuery( "#tabs" ).tabs(); + + /** + * Accordion + **/ + jQuery( ".accordion" ).accordion(); + + + /** + * Modal Alert Boxes + **/ + jQuery('.alertboxbutton').click(function(){ + jAlert('This is a custom alert box', 'Alert Dialog'); + }); + + jQuery('.confirmbutton').click(function(){ + jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) { + jAlert('Confirmed: ' + r, 'Confirmation Results'); + }); + }); + + jQuery('.promptbutton').click(function(){ + jPrompt('Type something:', 'Prefilled value', 'Prompt Dialog', function(r) { + if( r ) alert('You entered ' + r); + }); + }); + + jQuery('.alerthtmlbutton').click(function(){ + jAlert('You can use HTML, such as bold, italics, and underline!'); + }); + + + /** + * Slider + **/ + jQuery("#slider").slider({value: 40}); + + //Slider that snap to increments + jQuery("#slider2").slider({ + value:100, + min: 0, + max: 500, + step: 50, + slide: function(event, ui) { + jQuery("#amount").text("$"+ui.value); + } + }); + jQuery("#amount").text("$" + jQuery("#slider").slider("value")); + + + //Slider with range + jQuery("#slider3").slider({ + range: true, + min: 0, + max: 500, + values: [ 75, 300 ], + slide: function( event, ui ) { + jQuery("#amount2").text("$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ]); + } + }); + jQuery("#amount2").text("$" + jQuery("#slider3").slider("values", 0) + + " - $" + jQuery("#slider3").slider("values", 1)); + + // Slider with fixed minimum + jQuery("#slider4").slider({ + range: "min", + value: 37, + min: 1, + max: 100, + slide: function( event, ui ) { + jQuery("#amount4").text("$" + ui.value); + } + }); + jQuery("#amount4").text("$"+jQuery("#slider4").slider("value")); + + //Slider with fixed maximum + jQuery("#slider5").slider({ + range: "max", + value: 60, + min: 1, + max: 100, + slide: function(event, ui) { + jQuery("#amount5").text("$"+ui.value); + } + }); + jQuery("#amount5").text("$"+jQuery("#slider5").slider("value")); + + //Slider vertical + jQuery("#slider6").slider({ + orientation: "vertical", + range: "min", + min: 0, + max: 100, + value: 60, + slide: function( event, ui ) { + jQuery("#amount6").text(ui.value); + } + }); + jQuery("#amount6").text( jQuery("#slider6").slider("value")); + + + //Slider vertical with range + jQuery("#slider7").slider({ + orientation: "vertical", + range: true, + values: [17, 67], + slide: function(event, ui) { + jQuery("#amount7").text("$"+ui.values[0]+"-$"+ui.values[1]); + } + }); + jQuery("#amount7").text("$"+jQuery("#slider7").slider("values",0) + + " - $"+jQuery("#slider7").slider("values",1)); + + +}); \ No newline at end of file diff --git a/src/js/custom/gallery.js b/src/js/custom/gallery.js new file mode 100644 index 0000000..be0cd50 --- /dev/null +++ b/src/js/custom/gallery.js @@ -0,0 +1,55 @@ +jQuery(document).ready(function(){ + + /** + * Add an hover effect in images (gallery.html) + **/ + jQuery('.thumbview .thumb').hover(function(){ + var t = jQuery(this); + t.find('.info').stop(true,true).fadeIn('slow'); + },function(){ + var t = jQuery(this); + t.find('.info').stop(true,true).fadeOut('slow'); + }); + + /** + * Sub Menu + **/ + jQuery('.submenu a').click(function(){ + var id = jQuery(this).attr('href'); + jQuery('.submenu a').each(function(){ + jQuery(this).parent().removeClass('current'); + jQuery(jQuery(this).attr('href')).hide(); + }); + jQuery(this).parent().addClass('current'); + jQuery(id).fadeIn(); + }); + + + /** + * Gallery Colorbox + **/ + jQuery(".thumb .view").colorbox({rel:'view'}); + jQuery(".listview .view").colorbox({rel:'listview'}); + + + /** + * Thumb delete image + **/ + jQuery('.thumb .delete').click(function(){ + var c = confirm('Continue delete?'); + if(c) jQuery(this).parents('li').remove(); + return false; + }); + + /** + * Delete a single image in a row + **/ + jQuery('.deleteimage').click(function(){ + var c = confirm("Are you sure you want to delete this image?"); + if(c) { + jQuery(this).parents('tr').fadeOut(); + } + return false; + }); + +}); diff --git a/src/js/custom/general.js b/src/js/custom/general.js new file mode 100644 index 0000000..d7cef2a --- /dev/null +++ b/src/js/custom/general.js @@ -0,0 +1,145 @@ +jQuery.noConflict(); + +jQuery(document).ready(function(){ + + /** + * This will remove username/password text in the login form fields + **/ + jQuery('.username, .password').focusout(function(){ + if(jQuery(this).val() != '') { + jQuery(this).css({backgroundPosition: "0 -32px"}); + } else { + jQuery(this).css({backgroundPosition: "0 0"}); + } + }); + + jQuery('.username, .password').focusin(function(){ + if(jQuery(this).val() == '') { + jQuery(this).css({backgroundPosition: "0 -32px"}); + } + }); + + + /** + * Message Notify Drop Down + **/ + jQuery('.messagenotify .wrap, .alertnotify .wrap').click(function(){ + var t = jQuery(this).parent(); + var url = t.attr('href'); + if(t.hasClass('showmsg')) { + t.removeClass('showmsg'); + t.find('.thicon').removeClass('thiconhover'); + t.parent().find('.dropbox').remove(); + + } else { + + jQuery('.topheader li').each(function(){ + jQuery(this).find('.showmsg').removeClass('showmsg'); + jQuery(this).find('.thicon').removeClass('thiconhover'); + jQuery(this).find('.dropbox').remove(); + }); + + t.addClass('showmsg'); + t.find('.thicon').addClass('thiconhover'); + t.parent().append('
          '); + + jQuery.post(url,function(data){ + jQuery('.dropbox').append(data); + }); + } + return false; + + }); + + jQuery(document).click(function(event) { + var msglist = jQuery('.dropbox'); + if(!jQuery(event.target).is('.dropbox')) { + if(msglist.is(":visible")) { + msglist.prev().removeClass('showmsg'); + msglist.prev().find('.thicon').removeClass('thiconhover'); + msglist.remove(); + } + } + }); + + + /** + * Login form validation + **/ + jQuery('#loginform').submit(function(){ + var username = jQuery('.username').val(); + var password = jQuery('.password').val(); + if(username == '' && password == '') { + jQuery('.loginNotify').slideDown('fast'); + return false; + } else { + return true; + } + }); + + + /** + * Sidebar accordion + **/ + jQuery('#accordion h3').click(function() { + if(jQuery(this).hasClass('open')) { + jQuery(this).removeClass('open'); + jQuery(this).next().slideUp('fast'); + } else { + jQuery(this).addClass('open'); + jQuery(this).next().slideDown('fast'); + } return false; + }); + + + /** + * Widget Box Toggle + **/ + jQuery('.widgetbox h3, .widgetbox2 h3').hover(function(){ + jQuery(this).addClass('arrow'); + return false; + },function(){ + jQuery(this).removeClass('arrow'); + return false; + }); + + jQuery('.widgetbox h3, .widgetbox2 h3').toggle(function(){ + jQuery(this).next().slideUp('fast'); + jQuery(this).css({MozBorderRadius: '3px', + WebkitBorderRadius: '3px', + borderRadius: '3px'}); + return false; + },function(){ + jQuery(this).next().slideDown('fast'); + jQuery(this).css({MozBorderRadius: '3px 3px 0 0', + WebkitBorderRadius: '3px 3px 0 0', + borderRadius: '3px 3px 0 0'}); + return false; + }); + + + /** + * Notification + **/ + jQuery('.notification .close').click(function(){ + jQuery(this).parent().fadeOut(); + }); + + + /** Make footer always at the bottom**/ + if(jQuery('body').height() > jQuery(window).height()) { + jQuery('.footer').removeClass('footer_float'); + } + + + + /**DROP DOWN MENU**/ + jQuery(".subnav").css({display: "none"}); // Opera Fix + jQuery(".tabmenu li").hover(function(){ + jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400); + },function(){ + jQuery(this).find('ul:first').css({visibility: "hidden"}); + }); + + +}); \ No newline at end of file diff --git a/src/js/custom/reports.js b/src/js/custom/reports.js new file mode 100644 index 0000000..604f8e1 --- /dev/null +++ b/src/js/custom/reports.js @@ -0,0 +1,195 @@ +jQuery(document).ready(function () { + + /***START OF SIMPLE CHART***/ + + var flash = [], html5 = []; + for (var i = 0; i < 14; i += 0.5) { + flash.push([i, Math.sin(i)]); + html5.push([i, Math.cos(i)]); + } + + function showTooltip(x, y, contents) { + jQuery('
          ' + contents + '
          ').css( { + position: 'absolute', + display: 'none', + top: y + 5, + left: x + 5 + }).appendTo("body").fadeIn(200); + } + + + var plot = jQuery.plot(jQuery("#chartplace"), + [ { data: flash, label: "Flash(x)", color: "#ff7200"}, { data: html5, label: "HTML5(x)", color: "#39870a"} ], { + series: { + lines: { show: true }, + points: { show: true } + }, + grid: { hoverable: true, clickable: true, borderColor: '#ccc', borderWidth: 1 }, + yaxis: { min: -1.2, max: 1.2 } + }); + + var previousPoint = null; + jQuery("#chartplace").bind("plothover", function (event, pos, item) { + jQuery("#x").text(pos.x.toFixed(2)); + jQuery("#y").text(pos.y.toFixed(2)); + + if(item) { + if (previousPoint != item.dataIndex) { + previousPoint = item.dataIndex; + + jQuery("#tooltip").remove(); + var x = item.datapoint[0].toFixed(2), + y = item.datapoint[1].toFixed(2); + + showTooltip(item.pageX, item.pageY, + item.series.label + " of " + x + " = " + y); + } + + } else { + jQuery("#tooltip").remove(); + previousPoint = null; + } + + }); + + jQuery("#chartplace").bind("plotclick", function (event, pos, item) { + if (item) { + jQuery("#clickdata").text("You clicked point " + item.dataIndex + " in " + item.series.label + "."); + plot.highlight(item.series, item.datapoint); + } + }); + + + + + /**ANNOTATING CHART**/ + + // generate a dataset + var d1 = []; + for (var i = 0; i < 20; ++i) + d1.push([i, Math.sin(i)]); + + var data = [{ data: d1, label: "Pressure", color: "#333" }]; + + // setup background areas + var markings = [ + { color: '#eee', yaxis: { from: 1 } }, + { color: '#eee', yaxis: { to: -1 } }, + { color: '#ccc', lineWidth: 1, xaxis: { from: 2, to: 2 } }, + { color: '#ccc', lineWidth: 1, xaxis: { from: 8, to: 8 } } + ]; + + var placeholder = jQuery("#annotation"); + + // plot it + var plot = jQuery.plot(placeholder, data, { + bars: { show: true, barWidth: 0.5, lineWidth: 0, fill: 0.9, fillColor: "#069"}, + xaxis: { ticks: [], autoscaleMargin: 0.02 }, + yaxis: { min: -2, max: 2 }, + grid: { markings: markings, borderColor: '#ccc', borderWidth: 1} + }); + + // add labels + var o; + + o = plot.pointOffset({ x: 2, y: -1.2}); + // we just append it to the placeholder which Flot already uses + // for positioning + placeholder.append('
          Warming up
          '); + + o = plot.pointOffset({ x: 8, y: -1.2}); + placeholder.append('
          Actual measurements
          '); + + // draw a little arrow on top of the last label to demonstrate + // canvas drawing + var ctx = plot.getCanvas().getContext("2d"); + ctx.beginPath(); + o.left += 4; + ctx.moveTo(o.left, o.top); + ctx.lineTo(o.left, o.top - 10); + ctx.lineTo(o.left + 10, o.top - 5); + ctx.lineTo(o.left, o.top); + ctx.fillStyle = "#000"; + ctx.fill(); + + + /**PIE CHART**/ + var data = []; + var series = 5; + for( var i = 0; i 0) + data = data.slice(1); + + // do a random walk + while (data.length < totalPoints) { + var prev = data.length > 0 ? data[data.length - 1] : 50; + var y = prev + Math.random() * 10 - 5; + if (y < 0) + y = 0; + if (y > 100) + y = 100; + data.push(y); + } + + // zip the generated y values with the x values + var res = []; + for (var i = 0; i < data.length; ++i) + res.push([i, data[i]]) + return res; + } + + // setup control widget + var updateInterval = 500; + jQuery("#updateInterval").val(updateInterval).change(function () { + var v = jQuery(this).val(); + if (v && !isNaN(+v)) { + updateInterval = +v; + if (updateInterval < 1) + updateInterval = 1; + if (updateInterval > 2000) + updateInterval = 2000; + jQuery(this).val("" + updateInterval); + } + }); + + // setup plot + var options = { + series: { lines: { fill: true, fillColor: '#fffccc' }, shadowSize: 0, }, // drawing is faster without shadows + yaxis: { min: 0, max: 100 }, + xaxis: { show: false }, + grid: { borderColor: '#ccc', borderWidth: 1}, + + }; + var plot = jQuery.plot(jQuery("#realtime"), [ getRandomData() ], options); + + function update() { + plot.setData([ getRandomData() ]); + // since the axes don't change, we don't need to call plot.setupGrid() + plot.draw(); + + setTimeout(update, updateInterval); + } + + update(); + + + +}); \ No newline at end of file diff --git a/src/js/custom/users.js b/src/js/custom/users.js new file mode 100644 index 0000000..723cb3d --- /dev/null +++ b/src/js/custom/users.js @@ -0,0 +1,70 @@ +jQuery(document).ready(function(){ + + /** + * Highlight selected table row + **/ + jQuery('.sTable input').click(function(){ + + if(jQuery(this).is(':checked')) { + jQuery(this).parents('tr').addClass('selected'); + } else { + jQuery(this).parents('tr').removeClass('selected'); + } + }); + + + /** + * Delete a single user in a row + **/ + jQuery('.deleteuser').click(function(){ + var c = confirm("Are you sure you want to delete this user?"); + if(c) { + jQuery(this).parents('tr').fadeOut(); + } + return false; + }); + + /** + * Check/Uncheck all items in a table + **/ + jQuery('.checkall').click(function(){ + if(!jQuery(this).is(':checked')) { + jQuery('.sTable input[type=checkbox]').each(function(){ + jQuery(this).attr('checked',false); + jQuery(this).parents('tr').removeClass('selected'); + }); + } else { + jQuery('.sTable input[type=checkbox]').each(function(){ + jQuery(this).attr('checked',true); + jQuery(this).parents('tr').addClass('selected'); + }); + } + }); + + + + /** + * Delete selected items in a table + **/ + jQuery('.sTableOptions .delete').click(function(){ + var empt = true; + jQuery('.sTable input[type=checkbox]').each(function(){ + if(jQuery(this).is(':checked')) { + empt = false; + } + }); + if(empt == true) { + alert('No item selected'); + } else { + var c = confirm('Are you sure you want to delete this user?'); + if(c) { + jQuery('.sTable input[type=checkbox]').each(function(){ + if(jQuery(this).is(':checked')) { + jQuery(this).parents('tr').fadeOut(); + } + }); + } + } + }); + +}); \ No newline at end of file diff --git a/src/js/plugins/ColumnFilterWidgets.js b/src/js/plugins/ColumnFilterWidgets.js new file mode 100644 index 0000000..53d3ecc --- /dev/null +++ b/src/js/plugins/ColumnFilterWidgets.js @@ -0,0 +1,300 @@ +/* + * File: ColumnFilterWidgets.js + * Version: 1.0.2 + * Description: Controls for filtering based on unique column values in DataTables + * Author: Dylan Kuhn (www.cyberhobo.net) + * Language: Javascript + * License: GPL v2 or BSD 3 point style + * Contact: cyberhobo@cyberhobo.net + * + * Copyright 2011 Dylan Kuhn (except fnGetColumnData by Benedikt Forchhammer), all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD style license, available at: + * http://datatables.net/license_gpl2 + * http://datatables.net/license_bsd + */ + +(function($) { + /* + * Function: fnGetColumnData + * Purpose: Return an array of table values from a particular column. + * Returns: array string: 1d data array + * Inputs: object:oSettings - dataTable settings object. This is always the last argument past to the function + * int:iColumn - the id of the column to extract the data from + * bool:bUnique - optional - if set to false duplicated values are not filtered out + * bool:bFiltered - optional - if set to false all the table data is used (not only the filtered) + * bool:bIgnoreEmpty - optional - if set to false empty values are not filtered from the result array + * Author: Benedikt Forchhammer + */ + + $.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) { + // check that we have a column id + if ( typeof iColumn == "undefined" ) return new Array(); + + // by default we only wany unique data + if ( typeof bUnique == "undefined" ) bUnique = true; + + // by default we do want to only look at filtered data + if ( typeof bFiltered == "undefined" ) bFiltered = true; + + // by default we do not wany to include empty values + if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true; + + // list of rows which we're going to loop through + var aiRows; + + // use only filtered rows + if (bFiltered == true) aiRows = oSettings.aiDisplay; + // use all rows + else aiRows = oSettings.aiDisplayMaster; // all row numbers + + // set up data array + var asResultData = new Array(); + + for (var i=0,c=aiRows.length; i -1) continue; + + // else push the value onto the result data array + else asResultData.push(sValue); + } + + return asResultData; + }; + + /** + * Add backslashes to regular expression symbols in a string. + * + * Allows a regular expression to be constructed to search for + * variable text. + * + * @param string sText The text to escape. + * @return string The escaped string. + */ + var fnRegExpEscape = function( sText ) { + return sText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + }; + + /** + * Menu-based filter widgets based on distinct column values for a table. + * + * @class ColumnFilterWidgets + * @constructor + * @param {object} oDataTableSettings Settings for the target table. + */ + var ColumnFilterWidgets = function( oDataTableSettings ) { + var me = this; + var sExcludeList = ''; + me.$WidgetContainer = $( '
          ' ); + me.$MenuContainer = me.$WidgetContainer; + me.$TermContainer = null; + me.aoWidgets = []; + me.sSeparator = ''; + if ( 'oColumnFilterWidgets' in oDataTableSettings.oInit ) { + if ( 'aiExclude' in oDataTableSettings.oInit.oColumnFilterWidgets ) { + sExcludeList = '|' + oDataTableSettings.oInit.oColumnFilterWidgets.aiExclude.join( '|' ) + '|'; + } + if ( 'bGroupTerms' in oDataTableSettings.oInit.oColumnFilterWidgets && oDataTableSettings.oInit.oColumnFilterWidgets.bGroupTerms ) { + me.$MenuContainer = $( '
          ' ); + me.$TermContainer = $( '
          ' ).hide(); + } + } + + // Add a widget for each visible and filtered column + $.each( oDataTableSettings.aoColumns, function ( i, oColumn ) { + var $columnTh = $( oColumn.nTh ); + var $WidgetElem = $( '
          ' ); + if ( oColumn.bVisible && sExcludeList.indexOf( '|' + i + '|' ) < 0 ) { + me.aoWidgets.push( new ColumnFilterWidget( $WidgetElem, oDataTableSettings, i, me ) ); + } + me.$MenuContainer.append( $WidgetElem ); + } ); + if ( me.$TermContainer ) { + me.$WidgetContainer.append( me.$MenuContainer ); + me.$WidgetContainer.append( me.$TermContainer ); + } + oDataTableSettings.aoDrawCallback.push( { + name: 'ColumnFilterWidgets', + fn: function() { + $.each( me.aoWidgets, function( i, oWidget ) { + oWidget.fnDraw(); + } ); + } + } ); + + return me; + }; + + /** + * Get the container node of the column filter widgets. + * + * @method + * @return {Node} The container node. + */ + ColumnFilterWidgets.prototype.getContainer = function() { + return this.$WidgetContainer.get( 0 ); + } + + /** + * A filter widget based on data in a table column. + * + * @class ColumnFilterWidget + * @constructor + * @param {object} $Container The jQuery object that should contain the widget. + * @param {object} oSettings The target table's settings. + * @param {number} i The numeric index of the target table column. + * @param {object} widgets The ColumnFilterWidgets instance the widget is a member of. + */ + var ColumnFilterWidget = function( $Container, oDataTableSettings, i, widgets ) { + var widget = this; + widget.iColumn = i; + widget.oColumn = oDataTableSettings.aoColumns[i]; + widget.$Container = $Container; + widget.oDataTable = oDataTableSettings.oInstance; + widget.asFilters = []; + widget.sSeparator = ''; + widget.iMaxSelections = -1; + if ( 'oColumnFilterWidgets' in oDataTableSettings.oInit ) { + if ( 'sSeparator' in oDataTableSettings.oInit.oColumnFilterWidgets ) { + widget.sSeparator = oDataTableSettings.oInit.oColumnFilterWidgets.sSeparator; + } + if ( 'iMaxSelections' in oDataTableSettings.oInit.oColumnFilterWidgets ) { + widget.iMaxSelections = oDataTableSettings.oInit.oColumnFilterWidgets.iMaxSelections; + } + } + widget.$Select = $( '' ).change( function() { + var sSelected = widget.$Select.val(), sText, $TermLink, $SelectedOption; + if ( '' === sSelected ) { + // The blank option is a default, not a filter, and is re-selected after filtering + return; + } + sText = $( '
          ' + sSelected + '
          ' ).text(); + $TermLink = $( '' ).text( sText ).click( function() { + // Remove from current filters array + widget.asFilters = $.grep( widget.asFilters, function( sFilter ) { + return sFilter != sSelected; + } ); + $TermLink.remove(); + if ( widgets.$TermContainer && 0 === widgets.$TermContainer.find( '.filter-term' ).length ) { + widgets.$TermContainer.hide(); + } + // Add it back to the select + widget.$Select.append( $( '' ).attr( 'value', sSelected ).text( sText ) ); + if ( widget.iMaxSelections > 0 && widget.iMaxSelections > widget.asFilters.length ) { + widget.$Select.attr( 'disabled', false ); + } + widget.fnFilter(); + return false; + } ); + widget.asFilters.push( sSelected ); + if ( widgets.$TermContainer ) { + widgets.$TermContainer.show(); + widgets.$TermContainer.prepend( $TermLink ); + } else { + widget.$Select.after( $TermLink ); + } + $SelectedOption = widget.$Select.children( 'option:selected' ); + widget.$Select.val( '' ); + $SelectedOption.remove(); + if ( widget.iMaxSelections > 0 && widget.iMaxSelections <= widget.asFilters.length ) { + widget.$Select.attr( 'disabled', true ); + } + widget.fnFilter(); + } ); + widget.$Container.append( widget.$Select ); + widget.fnDraw(); + }; + + /** + * Perform filtering on the target column. + * + * @method fnFilter + */ + ColumnFilterWidget.prototype.fnFilter = function() { + var widget = this; + var asEscapedFilters = []; + var sFilterStart, sFilterEnd; + if ( widget.asFilters.length > 0 ) { + // Filters must have RegExp symbols escaped + $.each( widget.asFilters, function( i, sFilter ) { + asEscapedFilters.push( fnRegExpEscape( sFilter ) ); + } ); + // This regular expression filters by either whole column values or an item in a comma list + sFilterStart = widget.sSeparator ? '(^|' + widget.sSeparator + ')(' : '^('; + sFilterEnd = widget.sSeparator ? ')(' + widget.sSeparator + '|$)' : ')$'; + widget.oDataTable.fnFilter( sFilterStart + asEscapedFilters.join('|') + sFilterEnd, widget.iColumn, true, false ); + } else { + // Clear any filters for this column + widget.oDataTable.fnFilter( '', widget.iColumn ); + } + }; + + /** + * On each table draw, update filter menu items as needed. This allows any process to + * update the table's column visiblity and menus will still be accurate. + * + * @method fnDraw + */ + ColumnFilterWidget.prototype.fnDraw = function() { + var widget = this; + var oDistinctOptions = {}; + var aDistinctOptions = []; + var aData; + if ( widget.asFilters.length === 0 ) { + // Find distinct column values + aData = widget.oDataTable.fnGetColumnData( widget.iColumn ); + $.each( aData, function( i, sValue ) { + var asValues = widget.sSeparator ? sValue.split( new RegExp( widget.sSeparator ) ) : [ sValue ]; + $.each( asValues, function( j, sOption ) { + if ( !oDistinctOptions.hasOwnProperty( sOption ) ) { + oDistinctOptions[sOption] = true; + aDistinctOptions.push( sOption ); + } + } ); + } ); + // Build the menu + widget.$Select.empty().append( $( '' ).attr( 'value', '' ).text( widget.oColumn.sTitle ) ); + aDistinctOptions.sort(); + $.each( aDistinctOptions, function( i, sOption ) { + var sText; + sText = $( '
          ' + sOption + '
          ' ).text(); + widget.$Select.append( $( '' ).attr( 'value', sOption ).text( sText ) ); + } ); + if ( aDistinctOptions.length > 1 ) { + // Enable the menu + widget.$Select.attr( 'disabled', false ); + } else { + // One option is not a useful menu, disable it + widget.$Select.attr( 'disabled', true ); + } + } + }; + + /* + * Register a new feature with DataTables + */ + if ( typeof $.fn.dataTable === 'function' && typeof $.fn.dataTableExt.fnVersionCheck === 'function' && $.fn.dataTableExt.fnVersionCheck('1.7.0') ) { + + $.fn.dataTableExt.aoFeatures.push( { + 'fnInit': function( oDTSettings ) { + var oWidgets = new ColumnFilterWidgets( oDTSettings ); + return oWidgets.getContainer(); + }, + 'cFeature': 'W', + 'sFeature': 'ColumnFilterWidgets' + } ); + + } else { + throw 'Warning: ColumnFilterWidgets requires DataTables 1.7 or greater - www.datatables.net/download'; + } + + +}(jQuery)); diff --git a/src/js/plugins/FixedHeader.js b/src/js/plugins/FixedHeader.js new file mode 100644 index 0000000..945fdc5 --- /dev/null +++ b/src/js/plugins/FixedHeader.js @@ -0,0 +1,876 @@ +/* + * File: FixedHeader.js + * Version: 2.0.4 + * Description: "Fix" a header at the top of the table, so it scrolls with the table + * Author: Allan Jardine (www.sprymedia.co.uk) + * Created: Wed 16 Sep 2009 19:46:30 BST + * Language: Javascript + * License: LGPL + * Project: Just a little bit of fun - enjoy :-) + * Contact: www.sprymedia.co.uk/contact + * + * Copyright 2009-2010 Allan Jardine, all rights reserved. + */ + +/* + * Function: FixedHeader + * Purpose: Provide 'fixed' header, footer and columns on an HTML table + * Returns: object:FixedHeader - must be called with 'new' + * Inputs: mixed:mTable - target table + * 1. DataTable object - when using FixedHeader with DataTables, or + * 2. HTML table node - when using FixedHeader without DataTables + * object:oInit - initialisation settings, with the following properties (each optional) + * bool:top - fix the header (default true) + * bool:bottom - fix the footer (default false) + * bool:left - fix the left most column (default false) + * bool:right - fix the right most column (default false) + * int:zTop - fixed header zIndex + * int:zBottom - fixed footer zIndex + * int:zLeft - fixed left zIndex + * int:zRight - fixed right zIndex + */ +var FixedHeader = function ( mTable, oInit ) { + /* Sanity check - you just know it will happen */ + if ( typeof this.fnInit != 'function' ) + { + alert( "FixedHeader warning: FixedHeader must be initialised with the 'new' keyword." ); + return; + } + + var that = this; + var oSettings = { + "aoCache": [], + "oSides": { + "top": true, + "bottom": false, + "left": false, + "right": false + }, + "oZIndexes": { + "top": 104, + "bottom": 103, + "left": 102, + "right": 101 + }, + "oMes": { + "iTableWidth": 0, + "iTableHeight": 0, + "iTableLeft": 0, + "iTableRight": 0, /* note this is left+width, not actually "right" */ + "iTableTop": 0, + "iTableBottom": 0 /* note this is top+height, not actually "bottom" */ + }, + "nTable": null, + "bUseAbsPos": false, + "bFooter": false + }; + + /* + * Function: fnGetSettings + * Purpose: Get the settings for this object + * Returns: object: - settings object + * Inputs: - + */ + this.fnGetSettings = function () { + return oSettings; + }; + + /* + * Function: fnUpdate + * Purpose: Update the positioning and copies of the fixed elements + * Returns: - + * Inputs: - + */ + this.fnUpdate = function () { + this._fnUpdateClones(); + this._fnUpdatePositions(); + }; + + /* Let's do it */ + this.fnInit( mTable, oInit ); +}; + + +/* + * Variable: FixedHeader + * Purpose: Prototype for FixedHeader + * Scope: global + */ +FixedHeader.prototype = { + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Initialisation + */ + + /* + * Function: fnInit + * Purpose: The "constructor" + * Returns: - + * Inputs: {as FixedHeader function} + */ + fnInit: function ( oTable, oInit ) + { + var s = this.fnGetSettings(); + var that = this; + + /* Record the user definable settings */ + this.fnInitSettings( s, oInit ); + + /* DataTables specific stuff */ + if ( typeof oTable.fnSettings == 'function' ) + { + if ( typeof oTable.fnVersionCheck == 'functon' && + oTable.fnVersionCheck( '1.6.0' ) !== true ) + { + alert( "FixedHeader 2 required DataTables 1.6.0 or later. "+ + "Please upgrade your DataTables installation" ); + return; + } + + var oDtSettings = oTable.fnSettings(); + + if ( oDtSettings.oScroll.sX != "" || oDtSettings.oScroll.sY != "" ) + { + alert( "FixedHeader 2 is not supported with DataTables' scrolling mode at this time" ); + return; + } + + s.nTable = oDtSettings.nTable; + oDtSettings.aoDrawCallback.push( { + "fn": function () { + FixedHeader.fnMeasure(); + that._fnUpdateClones.call(that); + that._fnUpdatePositions.call(that); + }, + "sName": "FixedHeader" + } ); + } + else + { + s.nTable = oTable; + } + + s.bFooter = (jQuery('>tfoot', s.nTable).length > 0) ? true : false; + + /* "Detect" browsers that don't support absolute positioing - or have bugs */ + s.bUseAbsPos = (jQuery.browser.msie && (jQuery.browser.version=="6.0"||jQuery.browser.version=="7.0")); + + /* Add the 'sides' that are fixed */ + if ( s.oSides.top ) + { + s.aoCache.push( that._fnCloneTable( "fixedHeader", "FixedHeader_Header", that._fnCloneThead ) ); + } + if ( s.oSides.bottom ) + { + s.aoCache.push( that._fnCloneTable( "fixedFooter", "FixedHeader_Footer", that._fnCloneTfoot ) ); + } + if ( s.oSides.left ) + { + s.aoCache.push( that._fnCloneTable( "fixedLeft", "FixedHeader_Left", that._fnCloneTLeft ) ); + } + if ( s.oSides.right ) + { + s.aoCache.push( that._fnCloneTable( "fixedRight", "FixedHeader_Right", that._fnCloneTRight ) ); + } + + /* Event listeners for window movement */ + FixedHeader.afnScroll.push( function () { + that._fnUpdatePositions.call(that); + } ); + + jQuery(window).resize( function () { + FixedHeader.fnMeasure(); + that._fnUpdateClones.call(that); + that._fnUpdatePositions.call(that); + } ); + + /* Get things right to start with */ + FixedHeader.fnMeasure(); + that._fnUpdateClones(); + that._fnUpdatePositions(); + }, + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Support functions + */ + + /* + * Function: fnInitSettings + * Purpose: Take the user's settings and copy them to our local store + * Returns: - + * Inputs: object:s - the local settings object + * object:oInit - the user's settings object + */ + fnInitSettings: function ( s, oInit ) + { + if ( typeof oInit != 'undefined' ) + { + if ( typeof oInit.top != 'undefined' ) { + s.oSides.top = oInit.top; + } + if ( typeof oInit.bottom != 'undefined' ) { + s.oSides.bottom = oInit.bottom; + } + if ( typeof oInit.left != 'undefined' ) { + s.oSides.left = oInit.left; + } + if ( typeof oInit.right != 'undefined' ) { + s.oSides.right = oInit.right; + } + + if ( typeof oInit.zTop != 'undefined' ) { + s.oZIndexes.top = oInit.zTop; + } + if ( typeof oInit.zBottom != 'undefined' ) { + s.oZIndexes.bottom = oInit.zBottom; + } + if ( typeof oInit.zLeft != 'undefined' ) { + s.oZIndexes.left = oInit.zLeft; + } + if ( typeof oInit.zRight != 'undefined' ) { + s.oZIndexes.right = oInit.zRight; + } + } + + /* Detect browsers which have poor position:fixed support so we can use absolute positions. + * This is much slower since the position must be updated for each scroll, but widens + * compatibility + */ + s.bUseAbsPos = (jQuery.browser.msie && + (jQuery.browser.version=="6.0"||jQuery.browser.version=="7.0")); + }, + + /* + * Function: _fnCloneTable + * Purpose: Clone the table node and do basic initialisation + * Returns: - + * Inputs: - + */ + _fnCloneTable: function ( sType, sClass, fnClone ) + { + var s = this.fnGetSettings(); + var nCTable; + + /* We know that the table _MUST_ has a DIV wrapped around it, because this is simply how + * DataTables works. Therefore, we can set this to be relatively position (if it is not + * alreadu absolute, and use this as the base point for the cloned header + */ + if ( jQuery(s.nTable.parentNode).css('position') != "absolute" ) + { + s.nTable.parentNode.style.position = "relative"; + } + + /* Just a shallow clone will do - we only want the table node */ + nCTable = s.nTable.cloneNode( false ); + + var nDiv = document.createElement( 'div' ); + nDiv.style.position = "absolute"; + nDiv.className += " FixedHeader_Cloned "+sType+" "+sClass; + + /* Set the zIndexes */ + if ( sType == "fixedHeader" ) + { + nDiv.style.zIndex = s.oZIndexes.top; + } + if ( sType == "fixedFooter" ) + { + nDiv.style.zIndex = s.oZIndexes.bottom; + } + if ( sType == "fixedLeft" ) + { + nDiv.style.zIndex = s.oZIndexes.left; + } + else if ( sType == "fixedRight" ) + { + nDiv.style.zIndex = s.oZIndexes.right; + } + + /* Insert the newly cloned table into the DOM, on top of the "real" header */ + nDiv.appendChild( nCTable ); + document.body.appendChild( nDiv ); + + return { + "nNode": nCTable, + "nWrapper": nDiv, + "sType": sType, + "sPosition": "", + "sTop": "", + "sLeft": "", + "fnClone": fnClone + }; + }, + + /* + * Function: _fnUpdatePositions + * Purpose: Get the current positioning of the table in the DOM + * Returns: - + * Inputs: - + */ + _fnMeasure: function () + { + var + s = this.fnGetSettings(), + m = s.oMes, + jqTable = jQuery(s.nTable), + oOffset = jqTable.offset(), + iParentScrollTop = this._fnSumScroll( s.nTable.parentNode, 'scrollTop' ), + iParentScrollLeft = this._fnSumScroll( s.nTable.parentNode, 'scrollLeft' ); + + m.iTableWidth = jqTable.outerWidth(); + m.iTableHeight = jqTable.outerHeight(); + m.iTableLeft = oOffset.left + s.nTable.parentNode.scrollLeft; + m.iTableTop = oOffset.top + iParentScrollTop; + m.iTableRight = m.iTableLeft + m.iTableWidth; + m.iTableRight = FixedHeader.oDoc.iWidth - m.iTableLeft - m.iTableWidth; + m.iTableBottom = FixedHeader.oDoc.iHeight - m.iTableTop - m.iTableHeight; + }, + + /* + * Function: _fnSumScroll + * Purpose: Sum node parameters all the way to the top + * Returns: int: sum + * Inputs: node:n - node to consider + * string:side - scrollTop or scrollLeft + */ + _fnSumScroll: function ( n, side ) + { + var i = n[side]; + while ( n = n.parentNode ) + { + if ( n.nodeName != 'HTML' && n.nodeName != 'BODY' ) + { + break; + } + i = n[side]; + } + return i; + }, + + /* + * Function: _fnUpdatePositions + * Purpose: Loop over the fixed elements for this table and update their positions + * Returns: - + * Inputs: - + */ + _fnUpdatePositions: function () + { + var s = this.fnGetSettings(); + this._fnMeasure(); + + for ( var i=0, iLen=s.aoCache.length ; i oWin.iScrollTop ) + { + /* Above the table */ + this._fnUpdateCache( oCache, 'sPosition', "absolute", 'position', nTable.style ); + this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style ); + this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style ); + } + else if ( oWin.iScrollTop > oMes.iTableTop+iTbodyHeight ) + { + /* At the bottom of the table */ + this._fnUpdateCache( oCache, 'sPosition', "absolute", 'position', nTable.style ); + this._fnUpdateCache( oCache, 'sTop', (oMes.iTableTop+iTbodyHeight)+"px", 'top', nTable.style ); + this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style ); + } + else + { + /* In the middle of the table */ + if ( s.bUseAbsPos ) + { + this._fnUpdateCache( oCache, 'sPosition', "absolute", 'position', nTable.style ); + this._fnUpdateCache( oCache, 'sTop', oWin.iScrollTop+"px", 'top', nTable.style ); + this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style ); + } + else + { + this._fnUpdateCache( oCache, 'sPosition', 'fixed', 'position', nTable.style ); + this._fnUpdateCache( oCache, 'sTop', "0px", 'top', nTable.style ); + this._fnUpdateCache( oCache, 'sLeft', (oMes.iTableLeft-oWin.iScrollLeft)+"px", 'left', nTable.style ); + } + } + }, + + /* + * Function: _fnUpdateCache + * Purpose: Check the cache and update cache and value if needed + * Returns: - + * Inputs: object:oCache - local cache object + * string:sCache - cache property + * string:sSet - value to set + * string:sProperty - object property to set + * object:oObj - object to update + */ + _fnUpdateCache: function ( oCache, sCache, sSet, sProperty, oObj ) + { + if ( oCache[sCache] != sSet ) + { + oObj[sProperty] = sSet; + oCache[sCache] = sSet; + } + }, + + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Cloning functions + */ + + /* + * Function: _fnCloneThead + * Purpose: Clone the thead element + * Returns: - + * Inputs: object:oCache - the cahced values for this fixed element + */ + _fnCloneThead: function ( oCache ) + { + var s = this.fnGetSettings(); + var nTable = oCache.nNode; + + /* Set the wrapper width to match that of the cloned table */ + oCache.nWrapper.style.width = jQuery(s.nTable).outerWidth()+"px"; + + /* Remove any children the cloned table has */ + while ( nTable.childNodes.length > 0 ) + { + jQuery('thead th', nTable).unbind( 'click' ); + nTable.removeChild( nTable.childNodes[0] ); + } + + /* Clone the DataTables header */ + var nThead = jQuery('thead', s.nTable).clone(true)[0]; + nTable.appendChild( nThead ); + + /* Copy the widths across - apparently a clone isn't good enough for this */ + jQuery("thead:eq(0)>tr th", s.nTable).each( function (i) { + jQuery("thead:eq(0)>tr th:eq("+i+")", nTable).width( jQuery(this).width() ); + } ); + + jQuery("thead:eq(0)>tr td", s.nTable).each( function (i) { + jQuery("thead:eq(0)>tr th:eq("+i+")", nTable)[0].style.width( jQuery(this).width() ); + } ); + }, + + /* + * Function: _fnCloneTfoot + * Purpose: Clone the tfoot element + * Returns: - + * Inputs: object:oCache - the cahced values for this fixed element + */ + _fnCloneTfoot: function ( oCache ) + { + var s = this.fnGetSettings(); + var nTable = oCache.nNode; + + /* Set the wrapper width to match that of the cloned table */ + oCache.nWrapper.style.width = jQuery(s.nTable).outerWidth()+"px"; + + /* Remove any children the cloned table has */ + while ( nTable.childNodes.length > 0 ) + { + nTable.removeChild( nTable.childNodes[0] ); + } + + /* Clone the DataTables footer */ + var nTfoot = jQuery('tfoot', s.nTable).clone(true)[0]; + nTable.appendChild( nTfoot ); + + /* Copy the widths across - apparently a clone isn't good enough for this */ + jQuery("tfoot:eq(0)>tr th", s.nTable).each( function (i) { + jQuery("tfoot:eq(0)>tr th:eq("+i+")", nTable).width( jQuery(this).width() ); + } ); + + jQuery("tfoot:eq(0)>tr td", s.nTable).each( function (i) { + jQuery("tfoot:eq(0)>tr th:eq("+i+")", nTable)[0].style.width( jQuery(this).width() ); + } ); + }, + + /* + * Function: _fnCloneTLeft + * Purpose: Clone the left column + * Returns: - + * Inputs: object:oCache - the cahced values for this fixed element + */ + _fnCloneTLeft: function ( oCache ) + { + var s = this.fnGetSettings(); + var nTable = oCache.nNode; + var iCols = jQuery('tbody tr:eq(0) td', s.nTable).length; + var bRubbishOldIE = ($.browser.msie && ($.browser.version == "6.0" || $.browser.version == "7.0")); + + /* Remove any children the cloned table has */ + while ( nTable.childNodes.length > 0 ) + { + nTable.removeChild( nTable.childNodes[0] ); + } + + /* Is this the most efficient way to do this - it looks horrible... */ + nTable.appendChild( jQuery("thead", s.nTable).clone(true)[0] ); + nTable.appendChild( jQuery("tbody", s.nTable).clone(true)[0] ); + if ( s.bFooter ) + { + nTable.appendChild( jQuery("tfoot", s.nTable).clone(true)[0] ); + } + + jQuery('thead tr th:gt(0)', nTable).remove(); + jQuery('tfoot tr th:gt(0)', nTable).remove(); + + /* Basically the same as used in FixedColumns - remove and copy heights */ + $('tbody tr', nTable).each( function (k) { + $('td:gt(0)', this).remove(); + + /* Can we use some kind of object detection here?! This is very nasty - damn browsers */ + if ( $.browser.mozilla || $.browser.opera ) + { + $('td', this).height( $('tbody tr:eq('+k+')', that.dom.body).outerHeight() ); + } + else + { + $('td', this).height( $('tbody tr:eq('+k+')', that.dom.body).outerHeight() - iBoxHack ); + } + + if ( !bRubbishOldIE ) + { + $('tbody tr:eq('+k+')', that.dom.body).height( $('tbody tr:eq('+k+')', that.dom.body).outerHeight() ); + } + } ); + + var iWidth = jQuery('thead tr th:eq(0)', s.nTable).outerWidth(); + nTable.style.width = iWidth+"px"; + oCache.nWrapper.style.width = iWidth+"px"; + }, + + /* + * Function: _fnCloneTRight + * Purpose: Clone the right most colun + * Returns: - + * Inputs: object:oCache - the cahced values for this fixed element + */ + _fnCloneTRight: function ( oCache ) + { + var s = this.fnGetSettings(); + var nTable = oCache.nNode; + var iCols = jQuery('tbody tr:eq(0) td', s.nTable).length; + var bRubbishOldIE = ($.browser.msie && ($.browser.version == "6.0" || $.browser.version == "7.0")); + + /* Remove any children the cloned table has */ + while ( nTable.childNodes.length > 0 ) + { + nTable.removeChild( nTable.childNodes[0] ); + } + + /* Is this the most efficient way to do this - it looks horrible... */ + nTable.appendChild( jQuery("thead", s.nTable).clone(true)[0] ); + nTable.appendChild( jQuery("tbody", s.nTable).clone(true)[0] ); + if ( s.bFooter ) + { + nTable.appendChild( jQuery("tfoot", s.nTable).clone(true)[0] ); + } + jQuery('thead tr th:not(:nth-child('+iCols+'n))', nTable).remove(); + jQuery('tfoot tr th:not(:nth-child('+iCols+'n))', nTable).remove(); + + /* Basically the same as used in FixedColumns - remove and copy heights */ + $('tbody tr', nTable).each( function (k) { + $('td:lt('+iCols-1+')', this).remove(); + + /* Can we use some kind of object detection here?! This is very nasty - damn browsers */ + if ( $.browser.mozilla || $.browser.opera ) + { + $('td', this).height( $('tbody tr:eq('+k+')', that.dom.body).outerHeight() ); + } + else + { + $('td', this).height( $('tbody tr:eq('+k+')', that.dom.body).outerHeight() - iBoxHack ); + } + + if ( !bRubbishOldIE ) + { + $('tbody tr:eq('+k+')', that.dom.body).height( $('tbody tr:eq('+k+')', that.dom.body).outerHeight() ); + } + } ); + + var iWidth = jQuery('thead tr th:eq('+(iCols-1)+')', s.nTable).outerWidth(); + nTable.style.width = iWidth+"px"; + oCache.nWrapper.style.width = iWidth+"px"; + } +}; + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Static properties and methods + * We use these for speed! This information is common to all instances of FixedHeader, so no + * point if having them calculated and stored for each different instance. + */ + +/* + * Variable: oWin + * Purpose: Store information about the window positioning + * Scope: FixedHeader + */ +FixedHeader.oWin = { + "iScrollTop": 0, + "iScrollRight": 0, + "iScrollBottom": 0, + "iScrollLeft": 0, + "iHeight": 0, + "iWidth": 0 +}; + +/* + * Variable: oDoc + * Purpose: Store information about the document size + * Scope: FixedHeader + */ +FixedHeader.oDoc = { + "iHeight": 0, + "iWidth": 0 +}; + +/* + * Variable: afnScroll + * Purpose: Array of functions that are to be used for the scrolling components + * Scope: FixedHeader + */ +FixedHeader.afnScroll = []; + +/* + * Function: fnMeasure + * Purpose: Update the measurements for the window and document + * Returns: - + * Inputs: - + */ +FixedHeader.fnMeasure = function () +{ + var + jqWin = jQuery(window), + jqDoc = jQuery(document), + oWin = FixedHeader.oWin, + oDoc = FixedHeader.oDoc; + + oDoc.iHeight = jqDoc.height(); + oDoc.iWidth = jqDoc.width(); + + oWin.iHeight = jqWin.height(); + oWin.iWidth = jqWin.width(); + oWin.iScrollTop = jqWin.scrollTop(); + oWin.iScrollLeft = jqWin.scrollLeft(); + oWin.iScrollRight = oDoc.iWidth - oWin.iScrollLeft - oWin.iWidth; + oWin.iScrollBottom = oDoc.iHeight - oWin.iScrollTop - oWin.iHeight; +}; + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Global processing + */ + +/* + * Just one 'scroll' event handler in FixedHeader, which calls the required components. This is + * done as an optimisation, to reduce calculation and proagation time + */ +jQuery(window).scroll( function () { + FixedHeader.fnMeasure(); + for ( var i=0, iLen=FixedHeader.afnScroll.length ; itfoot",c.nTable).length>0)?true:false;c.bUseAbsPos=(jQuery.browser.msie&&(jQuery.browser.version=="6.0"||jQuery.browser.version=="7.0")); +if(c.oSides.top){c.aoCache.push(d._fnCloneTable("fixedHeader","FixedHeader_Header",d._fnCloneThead)) +}if(c.oSides.bottom){c.aoCache.push(d._fnCloneTable("fixedFooter","FixedHeader_Footer",d._fnCloneTfoot)) +}if(c.oSides.left){c.aoCache.push(d._fnCloneTable("fixedLeft","FixedHeader_Left",d._fnCloneTLeft)) +}if(c.oSides.right){c.aoCache.push(d._fnCloneTable("fixedRight","FixedHeader_Right",d._fnCloneTRight)) +}FixedHeader.afnScroll.push(function(){d._fnUpdatePositions.call(d)});jQuery(window).resize(function(){FixedHeader.fnMeasure(); +d._fnUpdateClones.call(d);d._fnUpdatePositions.call(d)});FixedHeader.fnMeasure(); +d._fnUpdateClones();d._fnUpdatePositions()},fnInitSettings:function(b,a){if(typeof a!="undefined"){if(typeof a.top!="undefined"){b.oSides.top=a.top +}if(typeof a.bottom!="undefined"){b.oSides.bottom=a.bottom}if(typeof a.left!="undefined"){b.oSides.left=a.left +}if(typeof a.right!="undefined"){b.oSides.right=a.right}if(typeof a.zTop!="undefined"){b.oZIndexes.top=a.zTop +}if(typeof a.zBottom!="undefined"){b.oZIndexes.bottom=a.zBottom}if(typeof a.zLeft!="undefined"){b.oZIndexes.left=a.zLeft +}if(typeof a.zRight!="undefined"){b.oZIndexes.right=a.zRight}}b.bUseAbsPos=(jQuery.browser.msie&&(jQuery.browser.version=="6.0"||jQuery.browser.version=="7.0")) +},_fnCloneTable:function(f,e,d){var b=this.fnGetSettings();var a;if(jQuery(b.nTable.parentNode).css("position")!="absolute"){b.nTable.parentNode.style.position="relative" +}a=b.nTable.cloneNode(false);var c=document.createElement("div");c.style.position="absolute"; +c.className+=" FixedHeader_Cloned "+f+" "+e;if(f=="fixedHeader"){c.style.zIndex=b.oZIndexes.top +}if(f=="fixedFooter"){c.style.zIndex=b.oZIndexes.bottom}if(f=="fixedLeft"){c.style.zIndex=b.oZIndexes.left +}else{if(f=="fixedRight"){c.style.zIndex=b.oZIndexes.right}}c.appendChild(a);document.body.appendChild(c); +return{nNode:a,nWrapper:c,sType:f,sPosition:"",sTop:"",sLeft:"",fnClone:d}},_fnMeasure:function(){var d=this.fnGetSettings(),a=d.oMes,c=jQuery(d.nTable),b=c.offset(),f=this._fnSumScroll(d.nTable.parentNode,"scrollTop"),e=this._fnSumScroll(d.nTable.parentNode,"scrollLeft"); +a.iTableWidth=c.outerWidth();a.iTableHeight=c.outerHeight();a.iTableLeft=b.left+d.nTable.parentNode.scrollLeft; +a.iTableTop=b.top+f;a.iTableRight=a.iTableLeft+a.iTableWidth;a.iTableRight=FixedHeader.oDoc.iWidth-a.iTableLeft-a.iTableWidth; +a.iTableBottom=FixedHeader.oDoc.iHeight-a.iTableTop-a.iTableHeight},_fnSumScroll:function(c,b){var a=c[b]; +while(c=c.parentNode){if(c.nodeName!="HTML"&&c.nodeName!="BODY"){break}a=c[b]}return a +},_fnUpdatePositions:function(){var c=this.fnGetSettings();this._fnMeasure();for(var b=0,a=c.aoCache.length; +bb.iScrollTop){this._fnUpdateCache(g,"sPosition","absolute","position",c.style); +this._fnUpdateCache(g,"sTop",f.iTableTop+"px","top",c.style);this._fnUpdateCache(g,"sLeft",f.iTableLeft+"px","left",c.style) +}else{if(b.iScrollTop>f.iTableTop+e){this._fnUpdateCache(g,"sPosition","absolute","position",c.style); +this._fnUpdateCache(g,"sTop",(f.iTableTop+e)+"px","top",c.style);this._fnUpdateCache(g,"sLeft",f.iTableLeft+"px","left",c.style) +}else{if(d.bUseAbsPos){this._fnUpdateCache(g,"sPosition","absolute","position",c.style); +this._fnUpdateCache(g,"sTop",b.iScrollTop+"px","top",c.style);this._fnUpdateCache(g,"sLeft",f.iTableLeft+"px","left",c.style) +}else{this._fnUpdateCache(g,"sPosition","fixed","position",c.style);this._fnUpdateCache(g,"sTop","0px","top",c.style); +this._fnUpdateCache(g,"sLeft",(f.iTableLeft-b.iScrollLeft)+"px","left",c.style)}}}},_fnUpdateCache:function(e,c,b,d,a){if(e[c]!=b){a[d]=b; +e[c]=b}},_fnCloneThead:function(d){var c=this.fnGetSettings();var a=d.nNode;d.nWrapper.style.width=jQuery(c.nTable).outerWidth()+"px"; +while(a.childNodes.length>0){jQuery("thead th",a).unbind("click");a.removeChild(a.childNodes[0]) +}var b=jQuery("thead",c.nTable).clone(true)[0];a.appendChild(b);jQuery("thead:eq(0)>tr th",c.nTable).each(function(e){jQuery("thead:eq(0)>tr th:eq("+e+")",a).width(jQuery(this).width()) +});jQuery("thead:eq(0)>tr td",c.nTable).each(function(e){jQuery("thead:eq(0)>tr th:eq("+e+")",a)[0].style.width(jQuery(this).width()) +})},_fnCloneTfoot:function(d){var c=this.fnGetSettings();var a=d.nNode;d.nWrapper.style.width=jQuery(c.nTable).outerWidth()+"px"; +while(a.childNodes.length>0){a.removeChild(a.childNodes[0])}var b=jQuery("tfoot",c.nTable).clone(true)[0]; +a.appendChild(b);jQuery("tfoot:eq(0)>tr th",c.nTable).each(function(e){jQuery("tfoot:eq(0)>tr th:eq("+e+")",a).width(jQuery(this).width()) +});jQuery("tfoot:eq(0)>tr td",c.nTable).each(function(e){jQuery("tfoot:eq(0)>tr th:eq("+e+")",a)[0].style.width(jQuery(this).width()) +})},_fnCloneTLeft:function(f){var c=this.fnGetSettings();var b=f.nNode;var e=jQuery("tbody tr:eq(0) td",c.nTable).length; +var a=($.browser.msie&&($.browser.version=="6.0"||$.browser.version=="7.0"));while(b.childNodes.length>0){b.removeChild(b.childNodes[0]) +}b.appendChild(jQuery("thead",c.nTable).clone(true)[0]);b.appendChild(jQuery("tbody",c.nTable).clone(true)[0]); +if(c.bFooter){b.appendChild(jQuery("tfoot",c.nTable).clone(true)[0])}jQuery("thead tr th:gt(0)",b).remove(); +jQuery("tfoot tr th:gt(0)",b).remove();$("tbody tr",b).each(function(g){$("td:gt(0)",this).remove(); +if($.browser.mozilla||$.browser.opera){$("td",this).height($("tbody tr:eq("+g+")",that.dom.body).outerHeight()) +}else{$("td",this).height($("tbody tr:eq("+g+")",that.dom.body).outerHeight()-iBoxHack) +}if(!a){$("tbody tr:eq("+g+")",that.dom.body).height($("tbody tr:eq("+g+")",that.dom.body).outerHeight()) +}});var d=jQuery("thead tr th:eq(0)",c.nTable).outerWidth();b.style.width=d+"px"; +f.nWrapper.style.width=d+"px"},_fnCloneTRight:function(f){var c=this.fnGetSettings(); +var b=f.nNode;var e=jQuery("tbody tr:eq(0) td",c.nTable).length;var a=($.browser.msie&&($.browser.version=="6.0"||$.browser.version=="7.0")); +while(b.childNodes.length>0){b.removeChild(b.childNodes[0])}b.appendChild(jQuery("thead",c.nTable).clone(true)[0]); +b.appendChild(jQuery("tbody",c.nTable).clone(true)[0]);if(c.bFooter){b.appendChild(jQuery("tfoot",c.nTable).clone(true)[0]) +}jQuery("thead tr th:not(:nth-child("+e+"n))",b).remove();jQuery("tfoot tr th:not(:nth-child("+e+"n))",b).remove(); +$("tbody tr",b).each(function(g){$("td:lt("+e-1+")",this).remove();if($.browser.mozilla||$.browser.opera){$("td",this).height($("tbody tr:eq("+g+")",that.dom.body).outerHeight()) +}else{$("td",this).height($("tbody tr:eq("+g+")",that.dom.body).outerHeight()-iBoxHack) +}if(!a){$("tbody tr:eq("+g+")",that.dom.body).height($("tbody tr:eq("+g+")",that.dom.body).outerHeight()) +}});var d=jQuery("thead tr th:eq("+(e-1)+")",c.nTable).outerWidth();b.style.width=d+"px"; +f.nWrapper.style.width=d+"px"}};FixedHeader.oWin={iScrollTop:0,iScrollRight:0,iScrollBottom:0,iScrollLeft:0,iHeight:0,iWidth:0}; +FixedHeader.oDoc={iHeight:0,iWidth:0};FixedHeader.afnScroll=[];FixedHeader.fnMeasure=function(){var d=jQuery(window),c=jQuery(document),b=FixedHeader.oWin,a=FixedHeader.oDoc; +a.iHeight=c.height();a.iWidth=c.width();b.iHeight=d.height();b.iWidth=d.width();b.iScrollTop=d.scrollTop(); +b.iScrollLeft=d.scrollLeft();b.iScrollRight=a.iWidth-b.iScrollLeft-b.iWidth;b.iScrollBottom=a.iHeight-b.iScrollTop-b.iHeight +};jQuery(window).scroll(function(){FixedHeader.fnMeasure();for(var b=0,a=FixedHeader.afnScroll.length; +b charMin && pressedKey <= 90) || pressedKey == 32) { + return false; + } + var cal = $(this).parent().parent(); + if (cal.data('colorpicker').livePreview === true) { + change.apply(this); + } + }, + change = function (ev) { + var cal = $(this).parent().parent(), col; + if (this.parentNode.className.indexOf('_hex') > 0) { + cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value)); + } else if (this.parentNode.className.indexOf('_hsb') > 0) { + cal.data('colorpicker').color = col = fixHSB({ + h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10), + s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10), + b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10) + }); + } else { + cal.data('colorpicker').color = col = RGBToHSB(fixRGB({ + r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10), + g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10), + b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10) + })); + } + if (ev) { + fillRGBFields(col, cal.get(0)); + fillHexFields(col, cal.get(0)); + fillHSBFields(col, cal.get(0)); + } + setSelector(col, cal.get(0)); + setHue(col, cal.get(0)); + setNewColor(col, cal.get(0)); + cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]); + }, + blur = function (ev) { + var cal = $(this).parent().parent(); + cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus'); + }, + focus = function () { + charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65; + $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus'); + $(this).parent().addClass('colorpicker_focus'); + }, + downIncrement = function (ev) { + var field = $(this).parent().find('input').focus(); + var current = { + el: $(this).parent().addClass('colorpicker_slider'), + max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255), + y: ev.pageY, + field: field, + val: parseInt(field.val(), 10), + preview: $(this).parent().parent().data('colorpicker').livePreview + }; + $(document).bind('mouseup', current, upIncrement); + $(document).bind('mousemove', current, moveIncrement); + }, + moveIncrement = function (ev) { + ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10)))); + if (ev.data.preview) { + change.apply(ev.data.field.get(0), [true]); + } + return false; + }, + upIncrement = function (ev) { + change.apply(ev.data.field.get(0), [true]); + ev.data.el.removeClass('colorpicker_slider').find('input').focus(); + $(document).unbind('mouseup', upIncrement); + $(document).unbind('mousemove', moveIncrement); + return false; + }, + downHue = function (ev) { + var current = { + cal: $(this).parent(), + y: $(this).offset().top + }; + current.preview = current.cal.data('colorpicker').livePreview; + $(document).bind('mouseup', current, upHue); + $(document).bind('mousemove', current, moveHue); + }, + moveHue = function (ev) { + change.apply( + ev.data.cal.data('colorpicker') + .fields + .eq(4) + .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10)) + .get(0), + [ev.data.preview] + ); + return false; + }, + upHue = function (ev) { + fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + $(document).unbind('mouseup', upHue); + $(document).unbind('mousemove', moveHue); + return false; + }, + downSelector = function (ev) { + var current = { + cal: $(this).parent(), + pos: $(this).offset() + }; + current.preview = current.cal.data('colorpicker').livePreview; + $(document).bind('mouseup', current, upSelector); + $(document).bind('mousemove', current, moveSelector); + }, + moveSelector = function (ev) { + change.apply( + ev.data.cal.data('colorpicker') + .fields + .eq(6) + .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10)) + .end() + .eq(5) + .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10)) + .get(0), + [ev.data.preview] + ); + return false; + }, + upSelector = function (ev) { + fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + $(document).unbind('mouseup', upSelector); + $(document).unbind('mousemove', moveSelector); + return false; + }, + enterSubmit = function (ev) { + $(this).addClass('colorpicker_focus'); + }, + leaveSubmit = function (ev) { + $(this).removeClass('colorpicker_focus'); + }, + clickSubmit = function (ev) { + var cal = $(this).parent(); + var col = cal.data('colorpicker').color; + cal.data('colorpicker').origColor = col; + setCurrentColor(col, cal.get(0)); + cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el); + }, + show = function (ev) { + var cal = $('#' + $(this).data('colorpickerId')); + cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]); + var pos = $(this).offset(); + var viewPort = getViewport(); + var top = pos.top + this.offsetHeight; + var left = pos.left; + if (top + 176 > viewPort.t + viewPort.h) { + top -= this.offsetHeight + 176; + } + if (left + 356 > viewPort.l + viewPort.w) { + left -= 356; + } + cal.css({left: left + 'px', top: top + 'px'}); + if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) { + cal.show(); + } + $(document).bind('mousedown', {cal: cal}, hide); + return false; + }, + hide = function (ev) { + if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) { + if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) { + ev.data.cal.hide(); + } + $(document).unbind('mousedown', hide); + } + }, + isChildOf = function(parentEl, el, container) { + if (parentEl == el) { + return true; + } + if (parentEl.contains) { + return parentEl.contains(el); + } + if ( parentEl.compareDocumentPosition ) { + return !!(parentEl.compareDocumentPosition(el) & 16); + } + var prEl = el.parentNode; + while(prEl && prEl != container) { + if (prEl == parentEl) + return true; + prEl = prEl.parentNode; + } + return false; + }, + getViewport = function () { + var m = document.compatMode == 'CSS1Compat'; + return { + l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft), + t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop), + w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth), + h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight) + }; + }, + fixHSB = function (hsb) { + return { + h: Math.min(360, Math.max(0, hsb.h)), + s: Math.min(100, Math.max(0, hsb.s)), + b: Math.min(100, Math.max(0, hsb.b)) + }; + }, + fixRGB = function (rgb) { + return { + r: Math.min(255, Math.max(0, rgb.r)), + g: Math.min(255, Math.max(0, rgb.g)), + b: Math.min(255, Math.max(0, rgb.b)) + }; + }, + fixHex = function (hex) { + var len = 6 - hex.length; + if (len > 0) { + var o = []; + for (var i=0; i -1) ? hex.substring(1) : hex), 16); + return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)}; + }, + HexToHSB = function (hex) { + return RGBToHSB(HexToRGB(hex)); + }, + RGBToHSB = function (rgb) { + var hsb = { + h: 0, + s: 0, + b: 0 + }; + var min = Math.min(rgb.r, rgb.g, rgb.b); + var max = Math.max(rgb.r, rgb.g, rgb.b); + var delta = max - min; + hsb.b = max; + if (max != 0) { + + } + hsb.s = max != 0 ? 255 * delta / max : 0; + if (hsb.s != 0) { + if (rgb.r == max) { + hsb.h = (rgb.g - rgb.b) / delta; + } else if (rgb.g == max) { + hsb.h = 2 + (rgb.b - rgb.r) / delta; + } else { + hsb.h = 4 + (rgb.r - rgb.g) / delta; + } + } else { + hsb.h = -1; + } + hsb.h *= 60; + if (hsb.h < 0) { + hsb.h += 360; + } + hsb.s *= 100/255; + hsb.b *= 100/255; + return hsb; + }, + HSBToRGB = function (hsb) { + var rgb = {}; + var h = Math.round(hsb.h); + var s = Math.round(hsb.s*255/100); + var v = Math.round(hsb.b*255/100); + if(s == 0) { + rgb.r = rgb.g = rgb.b = v; + } else { + var t1 = v; + var t2 = (255-s)*v/255; + var t3 = (t1-t2)*(h%60)/60; + if(h==360) h = 0; + if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3} + else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3} + else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3} + else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3} + else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3} + else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3} + else {rgb.r=0; rgb.g=0; rgb.b=0} + } + return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)}; + }, + RGBToHex = function (rgb) { + var hex = [ + rgb.r.toString(16), + rgb.g.toString(16), + rgb.b.toString(16) + ]; + $.each(hex, function (nr, val) { + if (val.length == 1) { + hex[nr] = '0' + val; + } + }); + return hex.join(''); + }, + HSBToHex = function (hsb) { + return RGBToHex(HSBToRGB(hsb)); + }, + restoreOriginal = function () { + var cal = $(this).parent(); + var col = cal.data('colorpicker').origColor; + cal.data('colorpicker').color = col; + fillRGBFields(col, cal.get(0)); + fillHexFields(col, cal.get(0)); + fillHSBFields(col, cal.get(0)); + setSelector(col, cal.get(0)); + setHue(col, cal.get(0)); + setNewColor(col, cal.get(0)); + }; + return { + init: function (opt) { + opt = $.extend({}, defaults, opt||{}); + if (typeof opt.color == 'string') { + opt.color = HexToHSB(opt.color); + } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) { + opt.color = RGBToHSB(opt.color); + } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) { + opt.color = fixHSB(opt.color); + } else { + return this; + } + return this.each(function () { + if (!$(this).data('colorpickerId')) { + var options = $.extend({}, opt); + options.origColor = opt.color; + var id = 'collorpicker_' + parseInt(Math.random() * 1000); + $(this).data('colorpickerId', id); + var cal = $(tpl).attr('id', id); + if (options.flat) { + cal.appendTo(this).show(); + } else { + cal.appendTo(document.body); + } + options.fields = cal + .find('input') + .bind('keyup', keyDown) + .bind('change', change) + .bind('blur', blur) + .bind('focus', focus); + cal + .find('span').bind('mousedown', downIncrement).end() + .find('>div.colorpicker_current_color').bind('click', restoreOriginal); + options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector); + options.selectorIndic = options.selector.find('div div'); + options.el = this; + options.hue = cal.find('div.colorpicker_hue div'); + cal.find('div.colorpicker_hue').bind('mousedown', downHue); + options.newColor = cal.find('div.colorpicker_new_color'); + options.currentColor = cal.find('div.colorpicker_current_color'); + cal.data('colorpicker', options); + cal.find('div.colorpicker_submit') + .bind('mouseenter', enterSubmit) + .bind('mouseleave', leaveSubmit) + .bind('click', clickSubmit); + fillRGBFields(options.color, cal.get(0)); + fillHSBFields(options.color, cal.get(0)); + fillHexFields(options.color, cal.get(0)); + setHue(options.color, cal.get(0)); + setSelector(options.color, cal.get(0)); + setCurrentColor(options.color, cal.get(0)); + setNewColor(options.color, cal.get(0)); + if (options.flat) { + cal.css({ + position: 'relative', + display: 'block' + }); + } else { + $(this).bind(options.eventName, show); + } + } + }); + }, + showPicker: function() { + return this.each( function () { + if ($(this).data('colorpickerId')) { + show.apply(this); + } + }); + }, + hidePicker: function() { + return this.each( function () { + if ($(this).data('colorpickerId')) { + $('#' + $(this).data('colorpickerId')).hide(); + } + }); + }, + setColor: function(col) { + if (typeof col == 'string') { + col = HexToHSB(col); + } else if (col.r != undefined && col.g != undefined && col.b != undefined) { + col = RGBToHSB(col); + } else if (col.h != undefined && col.s != undefined && col.b != undefined) { + col = fixHSB(col); + } else { + return this; + } + return this.each(function(){ + if ($(this).data('colorpickerId')) { + var cal = $('#' + $(this).data('colorpickerId')); + cal.data('colorpicker').color = col; + cal.data('colorpicker').origColor = col; + fillRGBFields(col, cal.get(0)); + fillHSBFields(col, cal.get(0)); + fillHexFields(col, cal.get(0)); + setHue(col, cal.get(0)); + setSelector(col, cal.get(0)); + setCurrentColor(col, cal.get(0)); + setNewColor(col, cal.get(0)); + } + }); + } + }; + }(); + $.fn.extend({ + ColorPicker: ColorPicker.init, + ColorPickerHide: ColorPicker.hidePicker, + ColorPickerShow: ColorPicker.showPicker, + ColorPickerSetColor: ColorPicker.setColor + }); +})(jQuery) \ No newline at end of file diff --git a/src/js/plugins/elfinder.min.js b/src/js/plugins/elfinder.min.js new file mode 100644 index 0000000..bb7dcc7 --- /dev/null +++ b/src/js/plugins/elfinder.min.js @@ -0,0 +1 @@ +(function(a){elFinder=function(d,g){var b=this,h;this.log=function(i){window.console&&window.console.log&&window.console.log(i)};this.options=a.extend({},this.options,g||{});if(!this.options.url){alert("Invalid configuration! You have to set URL option.");return}this.id="";if((h=a(d).attr("id"))){this.id=h}else{}this.version="1.2";this.jquery=a.fn.jquery.split(".").join("");this.cwd={};this.cdc={};this.buffer={};this.selected=[];this.history=[];this.locked=false;this.zIndex=2;this.dialog=null;this.anchor=this.options.docked?a("
          ").hide().insertBefore(d):null;this.params={dotFiles:false,arc:"",uplMaxSize:""};this.vCookie="el-finder-view-"+this.id;this.pCookie="el-finder-places-"+this.id;this.lCookie="el-finder-last-"+this.id;this.view=new this.view(this,d);this.ui=new this.ui(this);this.eventsManager=new this.eventsManager(this);this.quickLook=new this.quickLook(this);this.cookie=function(j,l){if(typeof l=="undefined"){if(document.cookie&&document.cookie!=""){var k,p=document.cookie.split(";");j+="=";for(k=0;kp',b.view.cwd).css("background",' url("'+k.images[j]+'") 0 0 no-repeat')}}k.tmb&&b.tmb()}},{lock:false,silent:true})};this.getPlaces=function(){var i=[],j=this.cookie(this.pCookie);if(j.length){if(j.indexOf(":")!=-1){i=j.split(":")}else{i.push(j)}}return i};this.addPlace=function(j){var i=this.getPlaces();if(a.inArray(j,i)==-1){i.push(j);this.savePlaces(i);return true}};this.removePlace=function(j){var i=this.getPlaces();if(a.inArray(j,i)!=-1){this.savePlaces(a.map(i,function(k){return k==j?null:k}));return true}};this.savePlaces=function(i){this.cookie(this.pCookie,i.join(":"))};this.reload=function(m){var k;this.cwd=m.cwd;this.cdc={};for(k=0;k0){this.iID&&clearInterval(this.iID);this.iID=setInterval(function(){!b.locked&&b.ui.exec("reload")},this.options.autoReload*60000)}};this.updateCwd=function(){this.lockShortcuts(true);this.selected=[];this.view.renderCwd();this.eventsManager.updateCwd();this.view.tree.find('a[key="'+this.cwd.hash+'"]').trigger("select");this.lockShortcuts()};this.drop=function(l,j,k){if(j.helper.find('[key="'+k+'"]').length){return b.view.error("Unable to copy into itself")}var i=[];j.helper.find('div:not(.noaccess):has(>label):not(:has(em[class="readonly"],em[class=""]))').each(function(){i.push(a(this).hide().attr("key"))});if(!j.helper.find("div:has(>label):visible").length){j.helper.hide()}if(i.length){b.setBuffer(i,l.shiftKey?0:1,k);if(b.buffer.files){setTimeout(function(){b.ui.exec("paste");b.buffer={}},300)}}else{a(this).removeClass("el-finder-droppable")}};this.getSelected=function(j){var k,l=[];if(j>=0){return this.cdc[this.selected[j]]||{}}for(k=0;k:]+$/)};this.fileExists=function(k){for(var j in this.cdc){if(this.cdc[j].name==k){return j}}return false};this.uniqueName=function(m,l){m=b.i18n(m);var j=m,k=0,l=l||"";if(!this.fileExists(j+l)){return j+l}while(k++<100){if(!this.fileExists(j+k+l)){return j+k+l}}return j.replace("100","")+Math.random()+l};this.lastDir=function(i){if(this.options.rememberLastDir){return i?this.cookie(this.lCookie,i):this.cookie(this.lCookie)}};function c(i,j){i&&b.view.win.width(i);j&&b.view.nav.add(b.view.cwd).height(j)}function e(){c(null,b.dialog.height()-b.view.tlb.parent().height()-(a.browser.msie?47:32))}this.time=function(){return new Date().getMilliseconds()};this.setView(this.cookie(this.vCookie));c(b.options.width,b.options.height);if(this.options.dialog||this.options.docked){this.options.dialog=a.extend({width:570,dialogClass:"",minWidth:480,minHeight:330},this.options.dialog||{});this.options.dialog.open=function(){setTimeout(function(){a('').appendTo(b.view.win).focus().select().remove()},200)};this.options.dialog.dialogClass+="el-finder-dialog";this.options.dialog.resize=e;if(this.options.docked){this.options.dialog.close=function(){b.dock()};this.view.win.data("size",{width:this.view.win.width(),height:this.view.nav.height()})}else{this.options.dialog.close=function(){b.destroy()};this.dialog=a("
          ").append(this.view.win).dialog(this.options.dialog)}}this.ajax({cmd:"open",target:this.lastDir()||"",init:true,tree:true},function(i){if(i.cwd){b.eventsManager.init();b.reload(i);a.extend(b.params,i.params||{});a("*",document.body).each(function(){var j=parseInt(a(this).css("z-index"));if(j>=b.zIndex){b.zIndex=j+1}});b.ui.init(i.disabled)}},{force:true});this.open=function(){this.dialog?this.dialog.dialog("open"):this.view.win.show();this.eventsManager.lock=false};this.close=function(){this.quickLook.hide();if(this.options.docked&&this.view.win.attr("undocked")){this.dock()}else{this.dialog?this.dialog.dialog("close"):this.view.win.hide()}this.eventsManager.lock=true};this.destroy=function(){this.eventsManager.lock=true;this.quickLook.hide();this.quickLook.win.remove();if(this.dialog){this.dialog.dialog("destroy");this.view.win.parent().remove()}else{this.view.win.remove()}this.ui.menu.remove()};this.dock=function(){if(this.options.docked&&this.view.win.attr("undocked")){this.quickLook.hide();var i=this.view.win.data("size");this.view.win.insertAfter(this.anchor).removeAttr("undocked");c(i.width,i.height);this.dialog.dialog("destroy");this.dialog=null}};this.undock=function(){if(this.options.docked&&!this.view.win.attr("undocked")){this.quickLook.hide();this.dialog=a("
          ").append(this.view.win.css("width","100%").attr("undocked",true).show()).dialog(this.options.dialog);e()}}};elFinder.prototype.i18n=function(b){return this.options.i18n[this.options.lang]&&this.options.i18n[this.options.lang][b]?this.options.i18n[this.options.lang][b]:b};elFinder.prototype.options={url:"",lang:"en",cssClass:"",wrap:14,places:"Places",placesFirst:true,editorCallback:null,cutURL:"",closeOnEditorCallback:true,i18n:{},view:"icons",width:"",height:"",disableShortcuts:false,rememberLastDir:true,cookie:{expires:30,domain:"",path:"/",secure:false},toolbar:[["back","reload"],["select","open"],["mkdir","mkfile","upload"],["copy","paste","rm"],["rename","edit"],["info","quicklook","resize"],["icons","list"],["help"]],contextmenu:{cwd:["reload","delim","mkdir","mkfile","upload","delim","paste","delim","info"],file:["select","open","quicklook","delim","copy","cut","rm","delim","duplicate","rename","edit","resize","archive","extract","delim","info"],group:["select","copy","cut","rm","delim","archive","extract","delim","info"]},dialog:null,docked:false,autoReload:0,selectMultiple:false};a.fn.elfinder=function(b){return this.each(function(){var c=typeof(b)=="string"?b:"";if(!this.elfinder){this.elfinder=new elFinder(this,typeof(b)=="object"?b:{})}switch(c){case"close":case"hide":this.elfinder.close();break;case"open":case"show":this.elfinder.open();break;case"dock":this.elfinder.dock();break;case"undock":this.elfinder.undock();break;case"destroy":this.elfinder.destroy();break}})}})(jQuery);(function(a){elFinder.prototype.view=function(d,c){var b=this;this.fm=d;this.kinds={unknown:"Unknown",directory:"Folder",symlink:"Alias","symlink-broken":"Broken alias","application/x-empty":"Plain text","application/postscript":"Postscript document","application/octet-stream":"Application","application/vnd.ms-office":"Microsoft Office document","application/vnd.ms-word":"Microsoft Word document","application/vnd.ms-excel":"Microsoft Excel document","application/vnd.ms-powerpoint":"Microsoft Powerpoint presentation","application/pdf":"Portable Document Format (PDF)","application/vnd.oasis.opendocument.text":"Open Office document","application/x-shockwave-flash":"Flash application","application/xml":"XML document","application/x-bittorrent":"Bittorrent file","application/x-7z-compressed":"7z archive","application/x-tar":"TAR archive","application/x-gzip":"GZIP archive","application/x-bzip2":"BZIP archive","application/zip":"ZIP archive","application/x-rar":"RAR archive","application/javascript":"Javascript application","text/plain":"Plain text","text/x-php":"PHP source","text/html":"HTML document","text/javascript":"Javascript source","text/css":"CSS style sheet","text/rtf":"Rich Text Format (RTF)","text/rtfd":"RTF with attachments (RTFD)","text/x-c":"C source","text/x-c++":"C++ source","text/x-shellscript":"Unix shell script","text/x-python":"Python source","text/x-java":"Java source","text/x-ruby":"Ruby source","text/x-perl":"Perl script","text/xml":"XML document","image/x-ms-bmp":"BMP image","image/jpeg":"JPEG image","image/gif":"GIF Image","image/png":"PNG image","image/x-targa":"TGA image","image/tiff":"TIFF image","image/vnd.adobe.photoshop":"Adobe Photoshop image","audio/mpeg":"MPEG audio","audio/midi":"MIDI audio","audio/ogg":"Ogg Vorbis audio","audio/mp4":"MP4 audio","audio/wav":"WAV audio","video/x-dv":"DV video","video/mp4":"MP4 video","video/mpeg":"MPEG video","video/x-msvideo":"AVI video","video/quicktime":"Quicktime video","video/x-ms-wmv":"WM video","video/x-flv":"Flash video","video/x-matroska":"Matroska video"};this.tlb=a("
            ");this.nav=a('
            ').resizable({handles:"e",autoHide:true,minWidth:200,maxWidth:500});this.cwd=a('
            ').attr("unselectable","on");this.spn=a('
            ');this.err=a('

            ').click(function(){a(this).hide()});this.nfo=a('
            ');this.pth=a('
            ');this.sel=a('
            ');this.stb=a('
            ').append(this.pth).append(this.nfo).append(this.sel);this.wrz=a('
            ').append(this.nav).append(this.cwd).append(this.spn).append(this.err).append('
            ');this.win=a(c).empty().attr("id",this.fm.id).addClass("el-finder "+(d.options.cssClass||"")).append(a('
            ').append(this.tlb)).append(this.wrz).append(this.stb);this.tree=a('
              ').appendTo(this.nav);this.plc=a('
              • '+this.fm.i18n(this.fm.options.places)+"
                  ").hide();this.nav[this.fm.options.placesFirst?"prepend":"append"](this.plc);this.spinner=function(e){this.win.toggleClass("el-finder-disabled",e);this.spn.toggle(e)};this.fatal=function(e){b.error(e.status!="404"?"Invalid backend configuration":"Unable to connect to backend")};this.error=function(e,g){this.fm.lock();this.err.show().children("strong").html(this.fm.i18n(e)+"!"+this.formatErrorData(g));setTimeout(function(){b.err.fadeOut("slow")},4000)};this.renderNav=function(g){var i=g.dirs.length?h(g.dirs):"",e='
                • "+i+"
                • ";this.tree.html(e);this.fm.options.places&&this.renderPlaces();function h(j){var l,m,n,k='
                    ';for(l=0;l";if(j[l].dirs.length){k+=h(j[l].dirs)}k+=""}return k+"
                  "}};this.renderPlaces=function(){var g,j,h=this.fm.getPlaces(),e=this.plc.show().find("ul").empty().hide();a("div:first",this.plc).removeClass("collapsed expanded");if(h.length){h.sort(function(k,i){var m=b.tree.find('a[key="'+k+'"]').text()||"",l=b.tree.find('a[key="'+i+'"]').text()||"";return m.localeCompare(l)});for(g=0;g'+this.fm.i18n("Name")+""+this.fm.i18n("Permissions")+""+this.fm.i18n("Modified")+''+this.fm.i18n("Size")+""+this.fm.i18n("Kind")+""+g+"")}this.pth.text(d.cwd.rel);this.nfo.text(d.i18n("items")+": "+e+", "+this.formatSize(h));this.sel.empty()};this.renderIcon=function(e){var g="";if(e.link||e.mime=="symlink-broken"){g+=""}if(!e.read&&!e.write){g+=''}else{if(e.read&&!e.write){g+=''}else{if(!e.read&&e.write){g+=''}}}return'
                  '+g+"
                  "};this.renderRow=function(g,e){var h=g.link||g.mime=="symlink-broken"?"":"";if(!g.read&&!g.write){h+=''}else{if(g.read&&!g.write){h+=''}else{if(!g.read&&g.write){h+=''}}}return'

                  '+h+"

                  "+g.name+""+b.formatPermissions(g.read,g.write,g.rm)+""+b.formatDate(g.date)+''+b.formatSize(g.size)+""+b.mime2kind(g.link?"symlink":g.mime)+""};this.updateFile=function(g){var h=this.cwd.find('[key="'+g.hash+'"]');h.replaceWith(h[0].nodeName=="DIV"?this.renderIcon(g):this.renderRow(g))};this.selectedInfo=function(){var e,g=0,h;if(b.fm.selected.length){h=this.fm.getSelected();for(e=0;e0?this.fm.i18n("selected items")+": "+h.length+", "+this.formatSize(g):"")};this.formatName=function(g){var e=b.fm.options.wrap;if(e>0){if(g.length>e*2){return g.substr(0,e)+"­"+g.substr(e,e-5)+"…"+g.substr(g.length-3)}else{if(g.length>e){return g.substr(0,e)+"­"+g.substr(e)}}}return g};this.formatErrorData=function(h){var e,g="";if(typeof(h)=="object"){g="
                  ";for(e in h){g+=e+" "+b.fm.i18n(h[e])+"
                  "}}return g};this.mime2class=function(e){return e.replace("/"," ").replace(/\./g,"-")};this.formatDate=function(e){return e.replace(/([a-z]+)\s/i,function(h,g){return b.fm.i18n(g)+" "})};this.formatSize=function(g){var h=1,e="bytes";if(g>1073741824){h=1073741824;e="Gb"}else{if(g>1048576){h=1048576;e="Mb"}else{if(g>1024){h=1024;e="Kb"}}}return Math.round(g/h)+" "+e};this.formatPermissions=function(g,e,i){var h=[];g&&h.push(b.fm.i18n("read"));e&&h.push(b.fm.i18n("write"));i&&h.push(b.fm.i18n("remove"));return h.join("/")};this.mime2kind=function(e){return this.fm.i18n(this.kinds[e]||"unknown")}}})(jQuery);(function(a){elFinder.prototype.ui=function(c){var b=this;this.fm=c;this.cmd={};this.buttons={};this.menu=a('
                  ').appendTo(document.body).hide();this.dockButton=a('
                  ');this.exec=function(e,d){if(this.cmd[e]){if(e!="open"&&!this.cmd[e].isAllowed()){return this.fm.view.error("Command not allowed")}if(!this.fm.locked){this.fm.quickLook.hide();a(".el-finder-info").remove();this.cmd[e].exec(d);this.update()}}};this.cmdName=function(d){if(this.cmd[d]&&this.cmd[d].name){return d=="archive"&&this.fm.params.archives.length==1?this.fm.i18n("Create")+" "+this.fm.view.mime2kind(this.fm.params.archives[0]).toLowerCase():this.fm.i18n(this.cmd[d].name)}return d};this.isCmdAllowed=function(d){return b.cmd[d]&&b.cmd[d].isAllowed()};this.execIfAllowed=function(d){this.isCmdAllowed(d)&&this.exec(d)};this.includeInCm=function(e,d){return this.isCmdAllowed(e)&&this.cmd[e].cm(d)};this.showMenu=function(i){var g,h,d,k="";this.hideMenu();if(!b.fm.selected.length){g="cwd"}else{if(b.fm.selected.length==1){g="file"}else{g="group"}}j(g);h=a(window);d={height:h.height(),width:h.width(),sT:h.scrollTop(),cW:this.menu.width(),cH:this.menu.height()};this.menu.css({left:((i.clientX+d.cW)>d.width?(i.clientX-d.cW):i.clientX),top:((i.clientY+d.cH)>d.height&&i.clientY>d.cH?(i.clientY+d.sT-d.cH):i.clientY+d.sT)}).show().find("div[name]").hover(function(){var l=a(this),m=l.children("div"),e;l.addClass("hover");if(m.length){if(!m.attr("pos")){e=l.outerWidth();m.css(a(window).width()-e-l.offset().left>m.width()?"left":"right",e-5).attr("pos",true)}m.show()}},function(){a(this).removeClass("hover").children("div").hide()}).click(function(m){m.stopPropagation();var l=a(this);if(!l.children("div").length){b.hideMenu();b.exec(l.attr("name"),l.attr("argc"))}});function j(q){var p,n,m,o,e,r=b.fm.options.contextmenu[q]||[];for(p=0;p')}else{if(b.fm.ui.includeInCm(r[p],q)){m=b.cmd[r[p]].argc();o="";if(m.length){o='
                  ';for(var n=0;n'+m[n].text+"
                  "}o+="
                  "}b.menu.append('
                  '+o+b.cmdName(r[p])+"
                  ")}}}}};this.hideMenu=function(){this.menu.hide().empty()};this.update=function(){for(var d in this.buttons){this.buttons[d].toggleClass("disabled",!this.cmd[d].isAllowed())}};this.init=function(k){var h,d,o,m=false,g=2,l,e=this.fm.options.toolbar;if(!this.fm.options.editorCallback){k.push("select")}if(!this.fm.params.archives.length&&a.inArray("archive",k)==-1){k.push("archive")}for(h in this.commands){if(a.inArray(h,k)==-1){this.commands[h].prototype=this.command.prototype;this.cmd[h]=new this.commands[h](this.fm)}}for(h=0;h')}m=false;for(d=0;d').appendTo(this.fm.view.tlb).click(function(i){i.stopPropagation()}).bind("click",(function(i){return function(){!a(this).hasClass("disabled")&&i.exec(a(this).attr("name"))}})(this)).hover(function(){!a(this).hasClass("disabled")&&a(this).addClass("el-finder-tb-hover")},function(){a(this).removeClass("el-finder-tb-hover")})}}}this.update();this.menu.css("z-index",this.fm.zIndex);if(this.fm.options.docked){this.dockButton.hover(function(){a(this).addClass("el-finder-dock-button-hover")},function(){a(this).removeClass("el-finder-dock-button-hover")}).click(function(){b.fm.view.win.attr("undocked")?b.fm.dock():b.fm.undock();a(this).trigger("mouseout")}).prependTo(this.fm.view.tlb)}}};elFinder.prototype.ui.prototype.command=function(b){};elFinder.prototype.ui.prototype.command.prototype.isAllowed=function(){return true};elFinder.prototype.ui.prototype.command.prototype.cm=function(b){return false};elFinder.prototype.ui.prototype.command.prototype.argc=function(b){return[]};elFinder.prototype.ui.prototype.commands={back:function(c){var b=this;this.name="Back";this.fm=c;this.exec=function(){if(this.fm.history.length){this.fm.ajax({cmd:"open",target:this.fm.history.pop()},function(d){b.fm.reload(d)})}};this.isAllowed=function(){return this.fm.history.length}},reload:function(c){var b=this;this.name="Reload";this.fm=c;this.exec=function(){this.fm.ajax({cmd:"open",target:this.fm.cwd.hash,tree:true},function(d){b.fm.reload(d)})};this.cm=function(d){return d=="cwd"}},open:function(c){var b=this;this.name="Open";this.fm=c;this.exec=function(e){var g=null;if(e){g={hash:a(e).attr("key"),mime:"directory",read:!a(e).hasClass("noaccess")&&!a(e).hasClass("dropbox")}}else{g=this.fm.getSelected(0)}if(!g.hash){return}if(!g.read){return this.fm.view.error("Access denied")}if(g.type=="link"&&!g.link){return this.fm.view.error("Unable to open broken link")}if(g.mime=="directory"){h(g.link||g.hash)}else{d(g)}function h(i){b.fm.history.push(b.fm.cwd.hash);b.fm.ajax({cmd:"open",target:i},function(j){b.fm.reload(j)})}function d(k){var j,i="";if(k.dim){j=k.dim.split("x");i="width="+(parseInt(j[0])+20)+",height="+(parseInt(j[1])+20)+","}window.open(k.url||b.fm.options.url+"?cmd=open¤t="+(k.parent||b.fm.cwd.hash)+"&target="+(k.link||k.hash),false,"top=50,left=50,"+i+"scrollbars=yes,resizable=yes")}};this.isAllowed=function(){return this.fm.selected.length==1&&this.fm.getSelected(0).read};this.cm=function(d){return d=="file"}},select:function(b){this.name="Select file";this.fm=b;if(b.options.selectMultiple){this.exec=function(){var c=a(b.getSelected()).map(function(){return b.options.cutURL=="root"?this.url.substr(b.params.url.length):this.url.replace(new RegExp("^("+b.options.cutURL+")"),"")});b.options.editorCallback(c);if(b.options.closeOnEditorCallback){b.dock();b.close()}}}else{this.exec=function(){var c=this.fm.getSelected(0);if(!c.url){return this.fm.view.error("File URL disabled by connector config")}this.fm.options.editorCallback(this.fm.options.cutURL=="root"?c.url.substr(this.fm.params.url.length):c.url.replace(new RegExp("^("+this.fm.options.cutURL+")"),""));if(this.fm.options.closeOnEditorCallback){this.fm.dock();this.fm.close();this.fm.destroy()}}}this.isAllowed=function(){return((this.fm.options.selectMultiple&&this.fm.selected.length>=1)||this.fm.selected.length==1)&&!/(symlink\-broken|directory)/.test(this.fm.getSelected(0).mime)};this.cm=function(c){return c!="cwd"}},quicklook:function(c){var b=this;this.name="Preview with Quick Look";this.fm=c;this.exec=function(){b.fm.quickLook.toggle()};this.isAllowed=function(){return this.fm.selected.length==1};this.cm=function(){return true}},info:function(c){var b=this;this.name="Get info";this.fm=c;this.exec=function(){var j,i,e=this.fm.selected.length,d=a(window).width(),g=a(window).height();this.fm.lockShortcuts(true);if(!e){k(b.fm.cwd)}else{a.each(this.fm.getSelected(),function(){k(this)})}function k(m){var n=["50%","50%"],h,q,o,l='";if(m.link){l+=""}if(m.dim){l+=""}if(m.url){l+=""}if(e>1){o=a(".el-finder-dialog-info:last");if(!o.length){h=Math.round(((d-350)/2)-(e*10));q=Math.round(((g-300)/2)-(e*10));n=[h>20?h:20,q>20?q:20]}else{h=o.offset().left+10;q=o.offset().top+10;n=[h").append(l+"
                  '+b.fm.i18n("Name")+""+m.name+"
                  "+b.fm.i18n("Kind")+""+b.fm.view.mime2kind(m.link?"symlink":m.mime)+"
                  "+b.fm.i18n("Size")+""+b.fm.view.formatSize(m.size)+"
                  "+b.fm.i18n("Modified")+""+b.fm.view.formatDate(m.date)+"
                  "+b.fm.i18n("Permissions")+""+b.fm.view.formatPermissions(m.read,m.write,m.rm)+"
                  "+b.fm.i18n("Link to")+""+m.linkTo+"
                  "+b.fm.i18n("Dimensions")+""+m.dim+" px.
                  "+b.fm.i18n("URL")+''+m.url+"
                  ").dialog({dialogClass:"el-finder-dialog el-finder-dialog-info",width:390,position:n,title:b.fm.i18n(m.mime=="directory"?"Folder info":"File info"),close:function(){if(--e<=0){b.fm.lockShortcuts()}a(this).dialog("destroy")},buttons:{Ok:function(){a(this).dialog("close")}}})}};this.cm=function(d){return true}},rename:function(c){var b=this;this.name="Rename";this.fm=c;this.exec=function(){var i=this.fm.getSelected(),h,l,e,j,k;if(i.length==1){j=i[0];h=this.fm.view.cwd.find('[key="'+j.hash+'"]');l=this.fm.options.view=="icons"?h.children("label"):h.find("td").eq(1);k=l.html();e=a('').val(j.name).appendTo(l.empty()).bind("change blur",d).keydown(function(m){m.stopPropagation();if(m.keyCode==27){g()}else{if(m.keyCode==13){if(j.name==e.val()){g()}else{a(this).trigger("change")}}}}).click(function(m){m.stopPropagation()}).select().focus();this.fm.lockShortcuts(true)}function g(){l.html(k);b.fm.lockShortcuts()}function d(){if(!b.fm.locked){var n,m=e.val();if(j.name==e.val()){return g()}if(!b.fm.isValidName(m)){n="Invalid name"}else{if(b.fm.fileExists(m)){n="File or folder with the same name already exists"}}if(n){b.fm.view.error(n);h.addClass("ui-selected");b.fm.lockShortcuts(true);return e.select().focus()}b.fm.ajax({cmd:"rename",current:b.fm.cwd.hash,target:j.hash,name:m},function(o){if(o.error){g()}else{j.mime=="directory"&&b.fm.removePlace(j.hash)&&b.fm.addPlace(o.target);b.fm.reload(o)}},{force:true})}}};this.isAllowed=function(){return this.fm.cwd.write&&this.fm.getSelected(0).write};this.cm=function(d){return d=="file"}},copy:function(b){this.name="Copy";this.fm=b;this.exec=function(){this.fm.setBuffer(this.fm.selected)};this.isAllowed=function(){if(this.fm.selected.length){var d=this.fm.getSelected(),c=d.length;while(c--){if(d[c].read){return true}}}return false};this.cm=function(c){return c!="cwd"}},cut:function(b){this.name="Cut";this.fm=b;this.exec=function(){this.fm.setBuffer(this.fm.selected,1)};this.isAllowed=function(){if(this.fm.selected.length){var d=this.fm.getSelected(),c=d.length;while(c--){if(d[c].read&&d[c].rm){return true}}}return false};this.cm=function(c){return c!="cwd"}},paste:function(c){var b=this;this.name="Paste";this.fm=c;this.exec=function(){var e,l,h,g,k="";if(!this.fm.buffer.dst){this.fm.buffer.dst=this.fm.cwd.hash}l=this.fm.view.tree.find('[key="'+this.fm.buffer.dst+'"]');if(!l.length||l.hasClass("noaccess")||l.hasClass("readonly")){return this.fm.view.error("Access denied")}if(this.fm.buffer.src==this.fm.buffer.dst){return this.fm.view.error("Unable to copy into itself")}var j={cmd:"paste",current:this.fm.cwd.hash,src:this.fm.buffer.src,dst:this.fm.buffer.dst,cut:this.fm.buffer.cut};if(this.fm.jquery>132){j.targets=this.fm.buffer.files}else{j["targets[]"]=this.fm.buffer.files}this.fm.ajax(j,function(d){d.cdc&&b.fm.reload(d)},{force:true})};this.isAllowed=function(){return this.fm.buffer.files};this.cm=function(d){return d=="cwd"}},rm:function(c){var b=this;this.name="Remove";this.fm=c;this.exec=function(){var d,g=[],e=this.fm.getSelected();for(var d=0;d
                  '+this.fm.i18n("Are you sure you want to remove files?
                  This cannot be undone!")+"
                  ").dialog({title:this.fm.i18n("Confirmation required"),dialogClass:"el-finder-dialog",width:350,close:function(){b.fm.lockShortcuts()},buttons:{Cancel:function(){a(this).dialog("close")},Ok:function(){a(this).dialog("close");var h={cmd:"rm",current:b.fm.cwd.hash};if(b.fm.jquery>132){h.targets=g}else{h["targets[]"]=g}b.fm.ajax(h,function(i){i.tree&&b.fm.reload(i)},{force:true})}}})}};this.isAllowed=function(g){if(this.fm.selected.length){var e=this.fm.getSelected(),d=e.length;while(d--){if(e[d].rm){return true}}}return false};this.cm=function(d){return d!="cwd"}},mkdir:function(c){var b=this;this.name="New folder";this.fm=c;this.exec=function(){b.fm.unselectAll();var e=this.fm.uniqueName("untitled folder");input=a('').val(e);prev=this.fm.view.cwd.find(".directory:last");f={name:e,hash:"",mime:"directory",read:true,write:true,date:"",size:0},el=this.fm.options.view=="list"?a(this.fm.view.renderRow(f)).children("td").eq(1).empty().append(input).end().end():a(this.fm.view.renderIcon(f)).children("label").empty().append(input).end();el.addClass("directory ui-selected");if(prev.length){el.insertAfter(prev)}else{if(this.fm.options.view=="list"){el.insertAfter(this.fm.view.cwd.find("tr").eq(0))}else{el.prependTo(this.fm.view.cwd)}}b.fm.checkSelectedPos();input.select().focus().click(function(g){g.stopPropagation()}).bind("change blur",d).keydown(function(g){g.stopPropagation();if(g.keyCode==27){el.remove();b.fm.lockShortcuts()}else{if(g.keyCode==13){d()}}});b.fm.lockShortcuts(true);function d(){if(!b.fm.locked){var h,g=input.val();if(!b.fm.isValidName(g)){h="Invalid name"}else{if(b.fm.fileExists(g)){h="File or folder with the same name already exists"}}if(h){b.fm.view.error(h);b.fm.lockShortcuts(true);el.addClass("ui-selected");return input.select().focus()}b.fm.ajax({cmd:"mkdir",current:b.fm.cwd.hash,name:g},function(i){if(i.error){el.addClass("ui-selected");return input.select().focus()}b.fm.reload(i)},{force:true})}}};this.isAllowed=function(){return this.fm.cwd.write};this.cm=function(d){return d=="cwd"}},mkfile:function(c){var b=this;this.name="New text file";this.fm=c;this.exec=function(){b.fm.unselectAll();var i=this.fm.uniqueName("untitled file",".txt"),e=a('').val(i),h={name:i,hash:"",mime:"text/plain",read:true,write:true,date:"",size:0},g=this.fm.options.view=="list"?a(this.fm.view.renderRow(h)).children("td").eq(1).empty().append(e).end().end():a(this.fm.view.renderIcon(h)).children("label").empty().append(e).end();g.addClass("text ui-selected").appendTo(this.fm.options.view=="list"?b.fm.view.cwd.children("table"):b.fm.view.cwd);e.select().focus().bind("change blur",d).click(function(j){j.stopPropagation()}).keydown(function(j){j.stopPropagation();if(j.keyCode==27){g.remove();b.fm.lockShortcuts()}else{if(j.keyCode==13){d()}}});b.fm.lockShortcuts(true);function d(){if(!b.fm.locked){var k,j=e.val();if(!b.fm.isValidName(j)){k="Invalid name"}else{if(b.fm.fileExists(j)){k="File or folder with the same name already exists"}}if(k){b.fm.view.error(k);b.fm.lockShortcuts(true);g.addClass("ui-selected");return e.select().focus()}b.fm.ajax({cmd:"mkfile",current:b.fm.cwd.hash,name:j},function(l){if(l.error){g.addClass("ui-selected");return e.select().focus()}b.fm.reload(l)},{force:true})}}};this.isAllowed=function(d){return this.fm.cwd.write};this.cm=function(d){return d=="cwd"}},upload:function(c){var b=this;this.name="Upload files";this.fm=c;this.exec=function(){var g="el-finder-io-"+(new Date().getTime()),l=a('
                  '),h=this.fm.params.uplMaxSize?"

                  "+this.fm.i18n("Maximum allowed files size")+": "+this.fm.params.uplMaxSize+"

                  ":"",s=a('

                  '+this.fm.i18n("Add field")+"

                  ").click(function(){a(this).before('

                  ')}),k='
                  ',o=a("
                  "),j=3;while(j--){k+='

                  '}var r=a("meta[name=csrf-token]").attr("content");var q=a("meta[name=csrf-param]").attr("content");if(q!=null&&r!=null){k+=''}k=a(k+"");o.append(k.append(l.hide()).prepend(h).append(s)).dialog({dialogClass:"el-finder-dialog",title:b.fm.i18n("Upload files"),modal:true,resizable:false,close:function(){b.fm.lockShortcuts()},buttons:{Cancel:function(){a(this).dialog("close")},Ok:function(){if(!a(":file[value]",k).length){return p(b.fm.i18n("Select at least one file to upload"))}setTimeout(function(){b.fm.lock();if(a.browser.safari){a.ajax({url:b.fm.options.url,data:{cmd:"ping"},error:n,success:n})}else{n()}});a(this).dialog("close")}}});b.fm.lockShortcuts(true);function p(d){l.show().find("div").empty().text(d)}function n(){var v=a('': +"");a._keyEvent=false;return w},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
                  ',o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&&l)?" ":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var s=(new Date).getFullYear();i=function(q){q=q.match(/c[+-].*/)?c+parseInt(q.substring(1),10):q.match(/[+-].*/)?s+parseInt(q,10):parseInt(q,10);return isNaN(q)?s:q};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b, +e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
                  ";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+ +(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b)b.apply(a.input? +a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c, +e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a, +"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length)return this; +if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));return this.each(function(){typeof a== +"string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new M;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.16";window["DP_jQuery_"+B]=d})(jQuery); +;/* + * jQuery UI Progressbar 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
                  ").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); +this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* +this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.16"})})(jQuery); +;/* + * jQuery UI Effects 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/ + */ +jQuery.effects||function(f,j){function m(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], +16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return n.transparent;return n[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return m(b)}function o(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, +a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function p(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d= +a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function l(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor", +"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=m(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0, +0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211, +211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},q=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b, +d){if(f.isFunction(b)){d=b;b=null}return this.queue(function(){var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("class");f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});r=p(o.call(this));e.attr("class",v);e.animate(u(h,r),{queue:false,duration:a,easing:b,complete:function(){f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments);f.dequeue(this)}})})}; +f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this, +[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.16",save:function(c,a){for(var b=0;b
                  ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}), +d=document.activeElement;c.wrap(b);if(c[0]===d||f.contains(c[0],d))f(d).focus();b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(e,g){a[g]=c.css(g);if(isNaN(parseInt(a[g],10)))a[g]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){var a,b=document.activeElement; +if(c.parent().is(".ui-effects-wrapper")){a=c.parent().replaceWith(c);if(c[0]===b||f.contains(c[0],b))f(b).focus();return a}return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)}); +return d.call(this,b)},_show:f.fn.show,show:function(c){if(l(c))return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(l(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(l(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this, +arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/ +2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b, +d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c, +a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b, +d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h
                  ").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+ +e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); +;/* + * jQuery UI Effects Fade 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fade + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Fold 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fold + * + * Depends: + * jquery.effects.core.js + */ +(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1], +10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); +;/* + * jQuery UI Effects Highlight 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Highlight + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&& +this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Pulsate 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Pulsate + * + * Depends: + * jquery.effects.core.js + */ +(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c
                ').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments); +b.dequeue()})})}})(jQuery); +; \ No newline at end of file diff --git a/src/js/plugins/jquery.alerts.js b/src/js/plugins/jquery.alerts.js new file mode 100644 index 0000000..80b1c85 --- /dev/null +++ b/src/js/plugins/jquery.alerts.js @@ -0,0 +1,235 @@ +// jQuery Alert Dialogs Plugin +// +// Version 1.1 +// +// Cory S.N. LaViska +// A Beautiful Site (http://abeautifulsite.net/) +// 14 May 2009 +// +// Visit http://abeautifulsite.net/notebook/87 for more information +// +// Usage: +// jAlert( message, [title, callback] ) +// jConfirm( message, [title, callback] ) +// jPrompt( message, [value, title, callback] ) +// +// History: +// +// 1.00 - Released (29 December 2008) +// +// 1.01 - Fixed bug where unbinding would destroy all resize events +// +// License: +// +// This plugin is dual-licensed under the GNU General Public License and the MIT License and +// is copyright 2008 A Beautiful Site, LLC. +// +(function($) { + + $.alerts = { + + // These properties can be read/written by accessing $.alerts.propertyName from your scripts at any time + + verticalOffset: -75, // vertical offset of the dialog from center screen, in pixels + horizontalOffset: 0, // horizontal offset of the dialog from center screen, in pixels/ + repositionOnResize: true, // re-centers the dialog on window resize + overlayOpacity: .01, // transparency level of overlay + overlayColor: '#FFF', // base color of overlay + draggable: true, // make the dialogs draggable (requires UI Draggables plugin) + okButton: ' OK ', // text for the OK button + cancelButton: ' Cancel ', // text for the Cancel button + dialogClass: null, // if specified, this class will be applied to all dialogs + + // Public methods + + alert: function(message, title, callback) { + if( title == null ) title = 'Alert'; + $.alerts._show(title, message, null, 'alert', function(result) { + if( callback ) callback(result); + }); + }, + + confirm: function(message, title, callback) { + if( title == null ) title = 'Confirm'; + $.alerts._show(title, message, null, 'confirm', function(result) { + if( callback ) callback(result); + }); + }, + + prompt: function(message, value, title, callback) { + if( title == null ) title = 'Prompt'; + $.alerts._show(title, message, value, 'prompt', function(result) { + if( callback ) callback(result); + }); + }, + + // Private methods + + _show: function(title, msg, value, type, callback) { + + $.alerts._hide(); + $.alerts._overlay('show'); + + $("BODY").append( + ''); + + if( $.alerts.dialogClass ) $("#popup_container").addClass($.alerts.dialogClass); + + // IE6 Fix + var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ) ? 'absolute' : 'fixed'; + + $("#popup_container").css({ + position: pos, + zIndex: 99999, + padding: 0, + margin: 0 + }); + + $("#popup_title").text(title); + $("#popup_content").addClass(type); + $("#popup_message").text(msg); + $("#popup_message").html( $("#popup_message").text().replace(/\n/g, '
                ') ); + + $("#popup_container").css({ + minWidth: $("#popup_container").outerWidth(), + maxWidth: $("#popup_container").outerWidth() + }); + + $.alerts._reposition(); + $.alerts._maintainPosition(true); + + switch( type ) { + case 'alert': + $("#popup_message").after(''); + $("#popup_ok").click( function() { + $.alerts._hide(); + callback(true); + }); + $("#popup_ok").focus().keypress( function(e) { + if( e.keyCode == 13 || e.keyCode == 27 ) $("#popup_ok").trigger('click'); + }); + break; + case 'confirm': + $("#popup_message").after(''); + $("#popup_ok").click( function() { + $.alerts._hide(); + if( callback ) callback(true); + }); + $("#popup_cancel").click( function() { + $.alerts._hide(); + if( callback ) callback(false); + }); + $("#popup_ok").focus(); + $("#popup_ok, #popup_cancel").keypress( function(e) { + if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); + if( e.keyCode == 27 ) $("#popup_cancel").trigger('click'); + }); + break; + case 'prompt': + $("#popup_message").append('
                ').after(''); + $("#popup_prompt").width( $("#popup_message").width() ); + $("#popup_ok").click( function() { + var val = $("#popup_prompt").val(); + $.alerts._hide(); + if( callback ) callback( val ); + }); + $("#popup_cancel").click( function() { + $.alerts._hide(); + if( callback ) callback( null ); + }); + $("#popup_prompt, #popup_ok, #popup_cancel").keypress( function(e) { + if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); + if( e.keyCode == 27 ) $("#popup_cancel").trigger('click'); + }); + if( value ) $("#popup_prompt").val(value); + $("#popup_prompt").focus().select(); + break; + } + + // Make draggable + if( $.alerts.draggable ) { + try { + $("#popup_container").draggable({ handle: $("#popup_title") }); + $("#popup_title").css({ cursor: 'move' }); + } catch(e) { /* requires jQuery UI draggables */ } + } + }, + + _hide: function() { + $("#popup_container").remove(); + $.alerts._overlay('hide'); + $.alerts._maintainPosition(false); + }, + + _overlay: function(status) { + switch( status ) { + case 'show': + $.alerts._overlay('hide'); + $("BODY").append(''); + $("#popup_overlay").css({ + position: 'absolute', + zIndex: 99998, + top: '0px', + left: '0px', + width: '100%', + height: $(document).height(), + background: $.alerts.overlayColor, + opacity: $.alerts.overlayOpacity + }); + break; + case 'hide': + $("#popup_overlay").remove(); + break; + } + }, + + _reposition: function() { + var top = (($(window).height() / 2) - ($("#popup_container").outerHeight() / 2)) + $.alerts.verticalOffset; + var left = (($(window).width() / 2) - ($("#popup_container").outerWidth() / 2)) + $.alerts.horizontalOffset; + if( top < 0 ) top = 0; + if( left < 0 ) left = 0; + + // IE6 fix + if( $.browser.msie && parseInt($.browser.version) <= 6 ) top = top + $(window).scrollTop(); + + $("#popup_container").css({ + top: top + 'px', + left: left + 'px' + }); + $("#popup_overlay").height( $(document).height() ); + }, + + _maintainPosition: function(status) { + if( $.alerts.repositionOnResize ) { + switch(status) { + case true: + $(window).bind('resize', $.alerts._reposition); + break; + case false: + $(window).unbind('resize', $.alerts._reposition); + break; + } + } + } + + } + + // Shortuct functions + jAlert = function(message, title, callback) { + $.alerts.alert(message, title, callback); + } + + jConfirm = function(message, title, callback) { + $.alerts.confirm(message, title, callback); + }; + + jPrompt = function(message, value, title, callback) { + $.alerts.prompt(message, value, title, callback); + }; + +})(jQuery); \ No newline at end of file diff --git a/src/js/plugins/jquery.colorbox-min.js b/src/js/plugins/jquery.colorbox-min.js new file mode 100644 index 0000000..5449a51 --- /dev/null +++ b/src/js/plugins/jquery.colorbox-min.js @@ -0,0 +1,4 @@ +// ColorBox v1.3.18 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+ +// Copyright (c) 2011 Jack Moore - jack@colorpowered.com +// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php +(function(a,b,c){function Y(c,d,e){var g=b.createElement(c);return d&&(g.id=f+d),e&&(g.style.cssText=e),a(g)}function Z(a){var b=y.length,c=(Q+a)%b;return c<0?b+c:c}function $(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function _(a){return K.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(a)}function ba(){var b;K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.slice(0,2)!=="on"&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,typeof K.href=="string"&&(K.href=a.trim(K.href))}function bb(b,c){a.event.trigger(b),c&&c.call(P)}function bc(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;K.slideshow&&y[1]?(d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(Q"),b.open=!0}return c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b)),a(this).addClass(g)}),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&bd(f[0]),f},W.init=function(){if(!r){if(!a("body")[0]){a(W.init);return}z=a(c),r=Y(X).attr({id:e,"class":n?f+(o?"IE6":"IE"):""}),q=Y(X,"Overlay",o?"position:absolute":"").hide(),s=Y(X,"Wrapper"),t=Y(X,"Content").append(A=Y(X,"LoadedContent","width:0; height:0; overflow:hidden"),C=Y(X,"LoadingOverlay").add(Y(X,"LoadingGraphic")),D=Y(X,"Title"),E=Y(X,"Current"),G=Y(X,"Next"),H=Y(X,"Previous"),F=Y(X,"Slideshow").bind(h,bc),I=Y(X,"Close")),s.append(Y(X).append(Y(X,"TopLeft"),u=Y(X,"TopCenter"),Y(X,"TopRight")),Y(X,!1,"clear:left").append(v=Y(X,"MiddleLeft"),t,w=Y(X,"MiddleRight")),Y(X,!1,"clear:left").append(Y(X,"BottomLeft"),x=Y(X,"BottomCenter"),Y(X,"BottomRight"))).find("div div").css({"float":"left"}),B=Y(X,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),a("body").prepend(q,r.append(s,B)),L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}).hide(),G.click(function(){W.next()}),H.click(function(){W.prev()}),I.click(function(){W.close()}),J=G.add(H).add(E).add(F),q.click(function(){K.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),W.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))})}},W.remove=function(){r.add(q).remove(),r=null,a("."+g).removeData(e).removeClass(g)},W.position=function(a,b){function g(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,C[0].style.height=C[1].style.height=t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var c=0,d=0,e=r.offset();z.unbind("resize."+f),r.css({top:-99999,left:-99999}),K.fixed&&!o?r.css({position:"fixed"}):(c=z.scrollTop(),d=z.scrollLeft(),r.css({position:"absolute"})),K.right!==!1?d+=Math.max(z.width()-K.w-O-M-$(K.right,"x"),0):K.left!==!1?d+=$(K.left,"x"):d+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?c+=Math.max(z.height()-K.h-N-L-$(K.bottom,"y"),0):K.top!==!1?c+=$(K.top,"y"):c+=Math.round(Math.max(z.height()-K.h-N-L,0)/2),r.css({top:e.top,left:e.left}),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",r.dequeue().animate({width:K.w+O,height:K.h+N,top:c,left:d},{duration:a,complete:function(){g(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",b&&b(),setTimeout(function(){z.bind("resize."+f,W.position)},1)},step:function(){g(this)}})},W.resize=function(a){S&&(a=a||{},a.width&&(K.w=$(a.width,"x")-O-M),a.innerWidth&&(K.w=$(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=$(a.height,"y")-N-L),a.innerHeight&&(K.h=$(a.innerHeight,"y")),!a.innerHeight&&!a.height&&(A.css({height:"auto"}),K.h=A.height()),A.css({height:K.h}),W.position(K.transition==="none"?0:K.speed))},W.prep=function(b){function g(){return K.w=K.w||A.width(),K.w=K.mw&&K.mw1){typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",g)).show(),G[K.loop||QK.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(Q1||a.shiftKey||a.altKey||a.metaKey||(a.preventDefault(),bd(this))}),W.init()})(jQuery,document,this); \ No newline at end of file diff --git a/src/js/plugins/jquery.dataTables.columnFilter.js b/src/js/plugins/jquery.dataTables.columnFilter.js new file mode 100644 index 0000000..cc0cd69 --- /dev/null +++ b/src/js/plugins/jquery.dataTables.columnFilter.js @@ -0,0 +1,365 @@ +/* +* File: jquery.dataTables.columnFilter.js +* Version: 0.9.0 +* Author: Jovan Popovic +* +* Copyright 2011 Jovan Popovic, all rights reserved. +* +* This source file is free software, under either the GPL v2 license or a +* BSD style license, as supplied with this software. +* +* This source file is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +* or FITNESS FOR A PARTICULAR PURPOSE. +* +* Parameters: +* @sPlaceHolder String Place where inline filtering function should be place ("tfoot", "thead"). Default is "tfoot" +* @sRangeSeparator String Separatot that will be used when range values are sent to the server-side. Default value is "~". +* @iFilteringDelay int TODO: Delay that will be set between the filtering requests. Default is 250. +* @sRangeFormat string Default format of the From ... to ... range inputs. Default is From {from} to {to} +* @aoColumns Array Array of the filter settings that will be applied on the columns + +http://www.datatables.net/plug-ins/filtering + +*/ +(function ($) { + + + + + + + var asInitVals, i, label, th; + + var sTableId = "table"; + var sRangeFormat = "From {from} to {to}"; + //Array of the functions that will override sSearch_ parameters + var afnSearch_ = new Array(); + var aiCustomSearch_Indexes = new Array(); + + var oFunctionTimeout = null; + + + function fnCreateInput(regex, smart, bIsNumber) { + var sCSSClass = "text_filter"; + if (bIsNumber) + sCSSClass = "number_filter"; + var input = $(''); + th.html(input); + if (bIsNumber) + th.wrapInner(''); + else + th.wrapInner(''); + asInitVals[i] = label; + var index = i; + + if (bIsNumber && !oTable.fnSettings().oFeatures.bServerSide) { + input.keyup(function () { + /* Filter on the column all numbers that starts with the entered value */ + oTable.fnFilter('^' + this.value, index, true, false); + }); + } else { + input.keyup(function () { + /* Filter on the column (the index) of this element */ + oTable.fnFilter(this.value, index, regex, smart); + }); + } + + input.focus(function () { + if ($(this).hasClass("search_init")) { + $(this).removeClass("search_init"); + this.value = ""; + } + }); + input.blur(function () { + if (this.value == "") { + $(this).addClass("search_init"); + this.value = asInitVals[index]; + } + }); + } + + function fnCreateRangeInput() { + + th.html(_fnRangeLabelPart(0)); + var sFromId = sTableId + 'range_from_' + i; + var from = $(''); + th.append(from); + th.append(_fnRangeLabelPart(1)); + var sToId = sTableId + 'range_to_' + i; + var to = $(''); + th.append(to); + th.append(_fnRangeLabelPart(2)); + th.wrapInner(''); + var index = i; + aiCustomSearch_Indexes.push(i); + + + + //------------start range filtering function + + + /* Custom filtering function which will filter data in column four between two values + * Author: Allan Jardine, Modified by Jovan Popovic + */ + $.fn.dataTableExt.afnFiltering.push( + function (oSettings, aData, iDataIndex) { + var iMin = document.getElementById(sFromId).value * 1; + var iMax = document.getElementById(sToId).value * 1; + var iValue = aData[index] == "-" ? 0 : aData[index] * 1; + if (iMin == "" && iMax == "") { + return true; + } + else if (iMin == "" && iValue < iMax) { + return true; + } + else if (iMin < iValue && "" == iMax) { + return true; + } + else if (iMin < iValue && iValue < iMax) { + return true; + } + return false; + } + ); + //------------end range filtering function + + + + $('#' + sFromId + ',#' + sToId, th).keyup(function () { + + var iMin = document.getElementById(sFromId).value * 1; + var iMax = document.getElementById(sToId).value * 1; + if (iMin != 0 && iMax != 0 && iMin > iMax) + return; + + oTable.fnDraw(); + + }); + + + } + + + function fnCreateDateRangeInput() { + + th.html(_fnRangeLabelPart(0)); + var sFromId = sTableId + 'range_from_' + i; + var from = $(''); + from.datepicker(); + th.append(from); + th.append(_fnRangeLabelPart(1)); + var sToId = sTableId + 'range_to_' + i; + var to = $(''); + th.append(to); + th.append(_fnRangeLabelPart(2)); + th.wrapInner(''); + to.datepicker(); + var index = i; + aiCustomSearch_Indexes.push(i); + + + //------------start date range filtering function + + $.fn.dataTableExt.afnFiltering.push( + function (oSettings, aData, iDataIndex) { + var dStartDate = from.datepicker("getDate"); + + var dEndDate = to.datepicker("getDate"); + + var dCellDate = $.datepicker.parseDate($.datepicker.regional[""].dateFormat, aData[index]); + + if (dCellDate == null) + return false; + + if (dStartDate == null && dEndDate == null) { + return true; + } + else if (dStartDate == null && dCellDate < dEndDate) { + return true; + } + else if (dStartDate < dCellDate && dEndDate == null) { + return true; + } + else if (dStartDate < dCellDate && dCellDate < dEndDate) { + return true; + } + return false; + } + ); + //------------end date range filtering function + + $('#' + sFromId + ',#' + sToId, th).change(function () { + oTable.fnDraw(); + }); + + + } + + + function fnCreateSelect(aData) { + var index = i; + var r = ''); + th.html(select); + th.wrapInner(''); + select.change(function () { + //var val = $(this).val(); + if ($(this).val() != "") { + $(this).removeClass("search_init"); + } else { + $(this).addClass("search_init"); + } + oTable.fnFilter($(this).val(), index); + }); + } + + function _fnRangeLabelPart(iPlace){ + switch(iPlace){ + case 0: + return sRangeFormat.substring(0, sRangeFormat.indexOf("{from}")); + case 1: + return sRangeFormat.substring(sRangeFormat.indexOf("{from}") + 6, sRangeFormat.indexOf("{to}")); + default: + return sRangeFormat.substring(sRangeFormat.indexOf("{to}") + 4); + } + } + + + $.fn.columnFilter = function (options) { + + oTable = this; + + var defaults = { + sPlaceHolder: "foot", + sRangeSeparator: "~", + iFilteringDelay: 500, + aoColumns: null, + sRangeFormat: "From {from} to {to}" + + }; + + properties = $.extend(defaults, options); + + return this.each(function () { + + asInitVals = new Array(); + var sFilterRow = "tfoot tr"; + if (properties.sPlaceHolder == "head:after") { + sFilterRow = "thead tr:last"; + } else if (properties.sPlaceHolder == "head:before") { + var tr = $("thead tr:last").detach(); + tr.prependTo("thead"); + sFilterRow = "thead tr:first"; + } + + $(sFilterRow + " th", oTable).each(function (index) { + i = index; + var aoColumn = { type: "text", + bRegex: false, + bSmart: true + }; + if (properties.aoColumns != null) { + if (properties.aoColumns.length < i || properties.aoColumns[i] == null) + return; + aoColumn = properties.aoColumns[i]; + } + label = $(this).text(); //"Search by " + $(this).text(); + th = $($(this)[0]); + if (aoColumn != null) { + if (aoColumn.sRangeFormat != null) + sRangeFormat = aoColumn.sRangeFormat; + else + sRangeFormat = properties.sRangeFormat + switch (aoColumn.type) { + case "number": + fnCreateInput(true, false, true); + break; + case "text": + bRegex = (aoColumn.bRegex == null ? false : aoColumn.bRegex); + bSmart = (aoColumn.bSmart == null ? false : aoColumn.bSmart); + fnCreateInput(bRegex, bSmart, false); + break; + case "select": + fnCreateSelect(aoColumn.values); + break; + case "number-range": + fnCreateRangeInput(); + break; + case "date-range": + fnCreateDateRangeInput(); + + break; + default: + break; + + } + } + }); + + for (j = 0; j < aiCustomSearch_Indexes.length; j++) { + var index = aiCustomSearch_Indexes[j]; + var fnSearch_ = function () { + return $("#range_from_" + index).val() + properties.sRangeSeparator + $("#range_to_" + index).val() + } + afnSearch_.push(fnSearch_); + } + + if (oTable.fnSettings().oFeatures.bServerSide) { + + var fnServerDataOriginal = oTable.fnSettings().fnServerData; + + oTable.fnSettings().fnServerData = function (sSource, aoData, fnCallback) { + + for (j = 0; j < aiCustomSearch_Indexes.length; j++) { + var index = aiCustomSearch_Indexes[j]; + + for (k = 0; k < aoData.length; k++) { + if (aoData[k].name == "sSearch_" + index) + aoData[k].value = afnSearch_[j](); + } + } + aoData.push({ "name": "sRangeSeparator", "value": properties.sRangeSeparator }); + + if (fnServerDataOriginal != null) { + fnServerDataOriginal(sSource, aoData, fnCallback); + } + else { + $.getJSON(sSource, aoData, function (json) { + fnCallback(json) + }); + } + + /* + if (fnServerDataOriginal != null) { + if (properties.iDelay != 0) { + if (oFunctionTimeout != null) + window.clearTimeout(oFunctionTimeout); + oFunctionTimeout = window.setTimeout(function () { + fnServerDataOriginal(sSource, aoData, fnCallback); + }, properties.iDelay); + } else { + fnServerDataOriginal(sSource, aoData, fnCallback); + } + } + else + $.getJSON(sSource, aoData, function (json) { + fnCallback(json) + }); + */ + }; + + } + + }); + + }; + + + + +})(jQuery); \ No newline at end of file diff --git a/src/js/plugins/jquery.dataTables.js b/src/js/plugins/jquery.dataTables.js new file mode 100644 index 0000000..98c792d --- /dev/null +++ b/src/js/plugins/jquery.dataTables.js @@ -0,0 +1,7440 @@ +/* + * File: jquery.dataTables.js + * Version: 1.8.2 + * Description: Paginate, search and sort HTML tables + * Author: Allan Jardine (www.sprymedia.co.uk) + * Created: 28/3/2008 + * Language: Javascript + * License: GPL v2 or BSD 3 point style + * Project: Mtaala + * Contact: allan.jardine@sprymedia.co.uk + * + * Copyright 2008-2011 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD style license, as supplied with this software. + * + * This source file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + * + * For details please refer to: http://www.datatables.net + */ + +/* + * When considering jsLint, we need to allow eval() as it it is used for reading cookies + */ +/*jslint evil: true, undef: true, browser: true */ +/*globals $, jQuery,_fnExternApiFunc,_fnInitialise,_fnInitComplete,_fnLanguageProcess,_fnAddColumn,_fnColumnOptions,_fnAddData,_fnCreateTr,_fnGatherData,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnServerParams,_fnAddOptionsHtml,_fnFeatureHtmlTable,_fnScrollDraw,_fnAdjustColumnSizing,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnBuildSearchArray,_fnBuildSearchRow,_fnFilterCreateSearch,_fnDataToSearch,_fnSort,_fnSortAttachListener,_fnSortingClasses,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnFeatureHtmlLength,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnNodeToDataIndex,_fnVisbleColumns,_fnCalculateEnd,_fnConvertToWidth,_fnCalculateColumnWidths,_fnScrollingWidthAdjust,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnArrayCmp,_fnDetectType,_fnSettingsFromNode,_fnGetDataMaster,_fnGetTrNodes,_fnGetTdNodes,_fnEscapeRegex,_fnDeleteIndex,_fnReOrderIndex,_fnColumnOrdering,_fnLog,_fnClearTable,_fnSaveState,_fnLoadState,_fnCreateCookie,_fnReadCookie,_fnDetectHeader,_fnGetUniqueThs,_fnScrollBarWidth,_fnApplyToChildren,_fnMap,_fnGetRowData,_fnGetCellData,_fnSetCellData,_fnGetObjectDataFn,_fnSetObjectDataFn*/ + +(function($, window, document) { + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Section - DataTables variables + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /* + * Variable: dataTableSettings + * Purpose: Store the settings for each dataTables instance + * Scope: jQuery.fn + */ + $.fn.dataTableSettings = []; + var _aoSettings = $.fn.dataTableSettings; /* Short reference for fast internal lookup */ + + /* + * Variable: dataTableExt + * Purpose: Container for customisable parts of DataTables + * Scope: jQuery.fn + */ + $.fn.dataTableExt = {}; + var _oExt = $.fn.dataTableExt; + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Section - DataTables extensible objects + * + * The _oExt object is used to provide an area where user defined plugins can be + * added to DataTables. The following properties of the object are used: + * oApi - Plug-in API functions + * aTypes - Auto-detection of types + * oSort - Sorting functions used by DataTables (based on the type) + * oPagination - Pagination functions for different input styles + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /* + * Variable: sVersion + * Purpose: Version string for plug-ins to check compatibility + * Scope: jQuery.fn.dataTableExt + * Notes: Allowed format is a.b.c.d.e where: + * a:int, b:int, c:int, d:string(dev|beta), e:int. d and e are optional + */ + _oExt.sVersion = "1.8.2"; + + /* + * Variable: sErrMode + * Purpose: How should DataTables report an error. Can take the value 'alert' or 'throw' + * Scope: jQuery.fn.dataTableExt + */ + _oExt.sErrMode = "alert"; + + /* + * Variable: iApiIndex + * Purpose: Index for what 'this' index API functions should use + * Scope: jQuery.fn.dataTableExt + */ + _oExt.iApiIndex = 0; + + /* + * Variable: oApi + * Purpose: Container for plugin API functions + * Scope: jQuery.fn.dataTableExt + */ + _oExt.oApi = { }; + + /* + * Variable: aFiltering + * Purpose: Container for plugin filtering functions + * Scope: jQuery.fn.dataTableExt + */ + _oExt.afnFiltering = [ ]; + + /* + * Variable: aoFeatures + * Purpose: Container for plugin function functions + * Scope: jQuery.fn.dataTableExt + * Notes: Array of objects with the following parameters: + * fnInit: Function for initialisation of Feature. Takes oSettings and returns node + * cFeature: Character that will be matched in sDom - case sensitive + * sFeature: Feature name - just for completeness :-) + */ + _oExt.aoFeatures = [ ]; + + /* + * Variable: ofnSearch + * Purpose: Container for custom filtering functions + * Scope: jQuery.fn.dataTableExt + * Notes: This is an object (the name should match the type) for custom filtering function, + * which can be used for live DOM checking or formatted text filtering + */ + _oExt.ofnSearch = { }; + + /* + * Variable: afnSortData + * Purpose: Container for custom sorting data source functions + * Scope: jQuery.fn.dataTableExt + * Notes: Array (associative) of functions which is run prior to a column of this + * 'SortDataType' being sorted upon. + * Function input parameters: + * object:oSettings- DataTables settings object + * int:iColumn - Target column number + * Return value: Array of data which exactly matched the full data set size for the column to + * be sorted upon + */ + _oExt.afnSortData = [ ]; + + /* + * Variable: oStdClasses + * Purpose: Storage for the various classes that DataTables uses + * Scope: jQuery.fn.dataTableExt + */ + _oExt.oStdClasses = { + /* Two buttons buttons */ + "sPagePrevEnabled": "paginate_enabled_previous", + "sPagePrevDisabled": "paginate_disabled_previous", + "sPageNextEnabled": "paginate_enabled_next", + "sPageNextDisabled": "paginate_disabled_next", + "sPageJUINext": "", + "sPageJUIPrev": "", + + /* Full numbers paging buttons */ + "sPageButton": "paginate_button", + "sPageButtonActive": "paginate_active", + "sPageButtonStaticDisabled": "paginate_button paginate_button_disabled", + "sPageFirst": "first", + "sPagePrevious": "previous", + "sPageNext": "next", + "sPageLast": "last", + + /* Striping classes */ + "sStripeOdd": "odd", + "sStripeEven": "even", + + /* Empty row */ + "sRowEmpty": "dataTables_empty", + + /* Features */ + "sWrapper": "dataTables_wrapper", + "sFilter": "dataTables_filter", + "sInfo": "dataTables_info", + "sPaging": "dataTables_paginate paging_", /* Note that the type is postfixed */ + "sLength": "dataTables_length", + "sProcessing": "dataTables_processing", + + /* Sorting */ + "sSortAsc": "sorting_asc", + "sSortDesc": "sorting_desc", + "sSortable": "sorting", /* Sortable in both directions */ + "sSortableAsc": "sorting_asc_disabled", + "sSortableDesc": "sorting_desc_disabled", + "sSortableNone": "sorting_disabled", + "sSortColumn": "sorting_", /* Note that an int is postfixed for the sorting order */ + "sSortJUIAsc": "", + "sSortJUIDesc": "", + "sSortJUI": "", + "sSortJUIAscAllowed": "", + "sSortJUIDescAllowed": "", + "sSortJUIWrapper": "", + "sSortIcon": "", + + /* Scrolling */ + "sScrollWrapper": "dataTables_scroll", + "sScrollHead": "dataTables_scrollHead", + "sScrollHeadInner": "dataTables_scrollHeadInner", + "sScrollBody": "dataTables_scrollBody", + "sScrollFoot": "dataTables_scrollFoot", + "sScrollFootInner": "dataTables_scrollFootInner", + + /* Misc */ + "sFooterTH": "" + }; + + /* + * Variable: oJUIClasses + * Purpose: Storage for the various classes that DataTables uses - jQuery UI suitable + * Scope: jQuery.fn.dataTableExt + */ + _oExt.oJUIClasses = { + /* Two buttons buttons */ + "sPagePrevEnabled": "fg-button ui-button ui-state-default ui-corner-left", + "sPagePrevDisabled": "fg-button ui-button ui-state-default ui-corner-left ui-state-disabled", + "sPageNextEnabled": "fg-button ui-button ui-state-default ui-corner-right", + "sPageNextDisabled": "fg-button ui-button ui-state-default ui-corner-right ui-state-disabled", + "sPageJUINext": "ui-icon ui-icon-circle-arrow-e", + "sPageJUIPrev": "ui-icon ui-icon-circle-arrow-w", + + /* Full numbers paging buttons */ + "sPageButton": "fg-button ui-button ui-state-default", + "sPageButtonActive": "fg-button ui-button ui-state-default ui-state-disabled", + "sPageButtonStaticDisabled": "fg-button ui-button ui-state-default ui-state-disabled", + "sPageFirst": "first ui-corner-tl ui-corner-bl", + "sPagePrevious": "previous", + "sPageNext": "next", + "sPageLast": "last ui-corner-tr ui-corner-br", + + /* Striping classes */ + "sStripeOdd": "odd", + "sStripeEven": "even", + + /* Empty row */ + "sRowEmpty": "dataTables_empty", + + /* Features */ + "sWrapper": "dataTables_wrapper", + "sFilter": "dataTables_filter", + "sInfo": "dataTables_info", + "sPaging": "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi "+ + "ui-buttonset-multi paging_", /* Note that the type is postfixed */ + "sLength": "dataTables_length", + "sProcessing": "dataTables_processing", + + /* Sorting */ + "sSortAsc": "ui-state-default", + "sSortDesc": "ui-state-default", + "sSortable": "ui-state-default", + "sSortableAsc": "ui-state-default", + "sSortableDesc": "ui-state-default", + "sSortableNone": "ui-state-default", + "sSortColumn": "sorting_", /* Note that an int is postfixed for the sorting order */ + "sSortJUIAsc": "css_right ui-icon ui-icon-triangle-1-n", + "sSortJUIDesc": "css_right ui-icon ui-icon-triangle-1-s", + "sSortJUI": "css_right ui-icon ui-icon-carat-2-n-s", + "sSortJUIAscAllowed": "css_right ui-icon ui-icon-carat-1-n", + "sSortJUIDescAllowed": "css_right ui-icon ui-icon-carat-1-s", + "sSortJUIWrapper": "DataTables_sort_wrapper", + "sSortIcon": "DataTables_sort_icon", + + /* Scrolling */ + "sScrollWrapper": "dataTables_scroll", + "sScrollHead": "dataTables_scrollHead ui-state-default", + "sScrollHeadInner": "dataTables_scrollHeadInner", + "sScrollBody": "dataTables_scrollBody", + "sScrollFoot": "dataTables_scrollFoot ui-state-default", + "sScrollFootInner": "dataTables_scrollFootInner", + + /* Misc */ + "sFooterTH": "ui-state-default" + }; + + /* + * Variable: oPagination + * Purpose: Container for the various type of pagination that dataTables supports + * Scope: jQuery.fn.dataTableExt + */ + _oExt.oPagination = { + /* + * Variable: two_button + * Purpose: Standard two button (forward/back) pagination + * Scope: jQuery.fn.dataTableExt.oPagination + */ + "two_button": { + /* + * Function: oPagination.two_button.fnInit + * Purpose: Initialise dom elements required for pagination with forward/back buttons only + * Returns: - + * Inputs: object:oSettings - dataTables settings object + * node:nPaging - the DIV which contains this pagination control + * function:fnCallbackDraw - draw function which must be called on update + */ + "fnInit": function ( oSettings, nPaging, fnCallbackDraw ) + { + var nPrevious, nNext, nPreviousInner, nNextInner; + + /* Store the next and previous elements in the oSettings object as they can be very + * usful for automation - particularly testing + */ + if ( !oSettings.bJUI ) + { + nPrevious = document.createElement( 'div' ); + nNext = document.createElement( 'div' ); + } + else + { + nPrevious = document.createElement( 'a' ); + nNext = document.createElement( 'a' ); + + nNextInner = document.createElement('span'); + nNextInner.className = oSettings.oClasses.sPageJUINext; + nNext.appendChild( nNextInner ); + + nPreviousInner = document.createElement('span'); + nPreviousInner.className = oSettings.oClasses.sPageJUIPrev; + nPrevious.appendChild( nPreviousInner ); + } + + nPrevious.className = oSettings.oClasses.sPagePrevDisabled; + nNext.className = oSettings.oClasses.sPageNextDisabled; + + nPrevious.title = oSettings.oLanguage.oPaginate.sPrevious; + nNext.title = oSettings.oLanguage.oPaginate.sNext; + + nPaging.appendChild( nPrevious ); + nPaging.appendChild( nNext ); + + $(nPrevious).bind( 'click.DT', function() { + if ( oSettings.oApi._fnPageChange( oSettings, "previous" ) ) + { + /* Only draw when the page has actually changed */ + fnCallbackDraw( oSettings ); + } + } ); + + $(nNext).bind( 'click.DT', function() { + if ( oSettings.oApi._fnPageChange( oSettings, "next" ) ) + { + fnCallbackDraw( oSettings ); + } + } ); + + /* Take the brutal approach to cancelling text selection */ + $(nPrevious).bind( 'selectstart.DT', function () { return false; } ); + $(nNext).bind( 'selectstart.DT', function () { return false; } ); + + /* ID the first elements only */ + if ( oSettings.sTableId !== '' && typeof oSettings.aanFeatures.p == "undefined" ) + { + nPaging.setAttribute( 'id', oSettings.sTableId+'_paginate' ); + nPrevious.setAttribute( 'id', oSettings.sTableId+'_previous' ); + nNext.setAttribute( 'id', oSettings.sTableId+'_next' ); + } + }, + + /* + * Function: oPagination.two_button.fnUpdate + * Purpose: Update the two button pagination at the end of the draw + * Returns: - + * Inputs: object:oSettings - dataTables settings object + * function:fnCallbackDraw - draw function to call on page change + */ + "fnUpdate": function ( oSettings, fnCallbackDraw ) + { + if ( !oSettings.aanFeatures.p ) + { + return; + } + + /* Loop over each instance of the pager */ + var an = oSettings.aanFeatures.p; + for ( var i=0, iLen=an.length ; i= (iPages - iPageCountHalf)) + { + iStartButton = iPages - iPageCount + 1; + iEndButton = iPages; + } + else + { + iStartButton = iCurrentPage - Math.ceil(iPageCount / 2) + 1; + iEndButton = iStartButton + iPageCount - 1; + } + } + } + + /* Build the dynamic list */ + for ( i=iStartButton ; i<=iEndButton ; i++ ) + { + if ( iCurrentPage != i ) + { + sList += ''+i+''; + } + else + { + sList += ''+i+''; + } + } + + /* Loop over each instance of the pager */ + var an = oSettings.aanFeatures.p; + var anButtons, anStatic, nPaginateList; + var fnClick = function(e) { + /* Use the information in the element to jump to the required page */ + var iTarget = (this.innerHTML * 1) - 1; + oSettings._iDisplayStart = iTarget * oSettings._iDisplayLength; + fnCallbackDraw( oSettings ); + e.preventDefault(); + }; + var fnFalse = function () { return false; }; + + for ( i=0, iLen=an.length ; i y) ? 1 : 0)); + }, + + "string-desc": function ( a, b ) + { + if ( typeof a != 'string' ) { a = ''; } + if ( typeof b != 'string' ) { b = ''; } + var x = a.toLowerCase(); + var y = b.toLowerCase(); + return ((x < y) ? 1 : ((x > y) ? -1 : 0)); + }, + + + /* + * html sorting (ignore html tags) + */ + "html-asc": function ( a, b ) + { + var x = a.replace( /<.*?>/g, "" ).toLowerCase(); + var y = b.replace( /<.*?>/g, "" ).toLowerCase(); + return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + }, + + "html-desc": function ( a, b ) + { + var x = a.replace( /<.*?>/g, "" ).toLowerCase(); + var y = b.replace( /<.*?>/g, "" ).toLowerCase(); + return ((x < y) ? 1 : ((x > y) ? -1 : 0)); + }, + + + /* + * date sorting + */ + "date-asc": function ( a, b ) + { + var x = Date.parse( a ); + var y = Date.parse( b ); + + if ( isNaN(x) || x==="" ) + { + x = Date.parse( "01/01/1970 00:00:00" ); + } + if ( isNaN(y) || y==="" ) + { + y = Date.parse( "01/01/1970 00:00:00" ); + } + + return x - y; + }, + + "date-desc": function ( a, b ) + { + var x = Date.parse( a ); + var y = Date.parse( b ); + + if ( isNaN(x) || x==="" ) + { + x = Date.parse( "01/01/1970 00:00:00" ); + } + if ( isNaN(y) || y==="" ) + { + y = Date.parse( "01/01/1970 00:00:00" ); + } + + return y - x; + }, + + + /* + * numerical sorting + */ + "numeric-asc": function ( a, b ) + { + var x = (a=="-" || a==="") ? 0 : a*1; + var y = (b=="-" || b==="") ? 0 : b*1; + return x - y; + }, + + "numeric-desc": function ( a, b ) + { + var x = (a=="-" || a==="") ? 0 : a*1; + var y = (b=="-" || b==="") ? 0 : b*1; + return y - x; + } + }; + + + /* + * Variable: aTypes + * Purpose: Container for the various type of type detection that dataTables supports + * Scope: jQuery.fn.dataTableExt + * Notes: The functions in this array are expected to parse a string to see if it is a data + * type that it recognises. If so then the function should return the name of the type (a + * corresponding sort function should be defined!), if the type is not recognised then the + * function should return null such that the parser and move on to check the next type. + * Note that ordering is important in this array - the functions are processed linearly, + * starting at index 0. + * Note that the input for these functions is always a string! It cannot be any other data + * type + */ + _oExt.aTypes = [ + /* + * Function: - + * Purpose: Check to see if a string is numeric + * Returns: string:'numeric' or null + * Inputs: mixed:sText - string to check + */ + function ( sData ) + { + /* Allow zero length strings as a number */ + if ( typeof sData == 'number' ) + { + return 'numeric'; + } + else if ( typeof sData != 'string' ) + { + return null; + } + + var sValidFirstChars = "0123456789-"; + var sValidChars = "0123456789."; + var Char; + var bDecimal = false; + + /* Check for a valid first char (no period and allow negatives) */ + Char = sData.charAt(0); + if (sValidFirstChars.indexOf(Char) == -1) + { + return null; + } + + /* Check all the other characters are valid */ + for ( var i=1 ; i') != -1 ) + { + return 'html'; + } + return null; + } + ]; + + /* + * Function: fnVersionCheck + * Purpose: Check a version string against this version of DataTables. Useful for plug-ins + * Returns: bool:true -this version of DataTables is greater or equal to the required version + * false -this version of DataTales is not suitable + * Inputs: string:sVersion - the version to check against. May be in the following formats: + * "a", "a.b" or "a.b.c" + * Notes: This function will only check the first three parts of a version string. It is + * assumed that beta and dev versions will meet the requirements. This might change in future + */ + _oExt.fnVersionCheck = function( sVersion ) + { + /* This is cheap, but very effective */ + var fnZPad = function (Zpad, count) + { + while(Zpad.length < count) { + Zpad += '0'; + } + return Zpad; + }; + var aThis = _oExt.sVersion.split('.'); + var aThat = sVersion.split('.'); + var sThis = '', sThat = ''; + + for ( var i=0, iLen=aThat.length ; i= parseInt(sThat, 10); + }; + + /* + * Variable: _oExternConfig + * Purpose: Store information for DataTables to access globally about other instances + * Scope: jQuery.fn.dataTableExt + */ + _oExt._oExternConfig = { + /* int:iNextUnique - next unique number for an instance */ + "iNextUnique": 0 + }; + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Section - DataTables prototype + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /* + * Function: dataTable + * Purpose: DataTables information + * Returns: - + * Inputs: object:oInit - initialisation options for the table + */ + $.fn.dataTable = function( oInit ) + { + /* + * Function: classSettings + * Purpose: Settings container function for all 'class' properties which are required + * by dataTables + * Returns: - + * Inputs: - + */ + function classSettings () + { + this.fnRecordsTotal = function () + { + if ( this.oFeatures.bServerSide ) { + return parseInt(this._iRecordsTotal, 10); + } else { + return this.aiDisplayMaster.length; + } + }; + + this.fnRecordsDisplay = function () + { + if ( this.oFeatures.bServerSide ) { + return parseInt(this._iRecordsDisplay, 10); + } else { + return this.aiDisplay.length; + } + }; + + this.fnDisplayEnd = function () + { + if ( this.oFeatures.bServerSide ) { + if ( this.oFeatures.bPaginate === false || this._iDisplayLength == -1 ) { + return this._iDisplayStart+this.aiDisplay.length; + } else { + return Math.min( this._iDisplayStart+this._iDisplayLength, + this._iRecordsDisplay ); + } + } else { + return this._iDisplayEnd; + } + }; + + /* + * Variable: oInstance + * Purpose: The DataTables object for this table + * Scope: jQuery.dataTable.classSettings + */ + this.oInstance = null; + + /* + * Variable: sInstance + * Purpose: Unique idendifier for each instance of the DataTables object + * Scope: jQuery.dataTable.classSettings + */ + this.sInstance = null; + + /* + * Variable: oFeatures + * Purpose: Indicate the enablement of key dataTable features + * Scope: jQuery.dataTable.classSettings + */ + this.oFeatures = { + "bPaginate": true, + "bLengthChange": true, + "bFilter": true, + "bSort": true, + "bInfo": true, + "bAutoWidth": true, + "bProcessing": false, + "bSortClasses": true, + "bStateSave": false, + "bServerSide": false, + "bDeferRender": false + }; + + /* + * Variable: oScroll + * Purpose: Container for scrolling options + * Scope: jQuery.dataTable.classSettings + */ + this.oScroll = { + "sX": "", + "sXInner": "", + "sY": "", + "bCollapse": false, + "bInfinite": false, + "iLoadGap": 100, + "iBarWidth": 0, + "bAutoCss": true + }; + + /* + * Variable: aanFeatures + * Purpose: Array referencing the nodes which are used for the features + * Scope: jQuery.dataTable.classSettings + * Notes: The parameters of this object match what is allowed by sDom - i.e. + * 'l' - Length changing + * 'f' - Filtering input + * 't' - The table! + * 'i' - Information + * 'p' - Pagination + * 'r' - pRocessing + */ + this.aanFeatures = []; + + /* + * Variable: oLanguage + * Purpose: Store the language strings used by dataTables + * Scope: jQuery.dataTable.classSettings + * Notes: The words in the format _VAR_ are variables which are dynamically replaced + * by javascript + */ + this.oLanguage = { + "sProcessing": "Processing...", + "sLengthMenu": "Show _MENU_ entries", + "sZeroRecords": "No matching records found", + "sEmptyTable": "No data available in table", + "sLoadingRecords": "Loading...", + "sInfo": "Showing _START_ to _END_ of _TOTAL_ entries", + "sInfoEmpty": "Showing 0 to 0 of 0 entries", + "sInfoFiltered": "(filtered from _MAX_ total entries)", + "sInfoPostFix": "", + "sInfoThousands": ",", + "sSearch": "Search:", + "sUrl": "", + "oPaginate": { + "sFirst": "First", + "sPrevious": "Previous", + "sNext": "Next", + "sLast": "Last" + }, + "fnInfoCallback": null + }; + + /* + * Variable: aoData + * Purpose: Store data information + * Scope: jQuery.dataTable.classSettings + * Notes: This is an array of objects with the following parameters: + * int: _iId - internal id for tracking + * array: _aData - internal data - used for sorting / filtering etc + * node: nTr - display node + * array node: _anHidden - hidden TD nodes + * string: _sRowStripe + */ + this.aoData = []; + + /* + * Variable: aiDisplay + * Purpose: Array of indexes which are in the current display (after filtering etc) + * Scope: jQuery.dataTable.classSettings + */ + this.aiDisplay = []; + + /* + * Variable: aiDisplayMaster + * Purpose: Array of indexes for display - no filtering + * Scope: jQuery.dataTable.classSettings + */ + this.aiDisplayMaster = []; + + /* + * Variable: aoColumns + * Purpose: Store information about each column that is in use + * Scope: jQuery.dataTable.classSettings + */ + this.aoColumns = []; + + /* + * Variable: aoHeader + * Purpose: Store information about the table's header + * Scope: jQuery.dataTable.classSettings + */ + this.aoHeader = []; + + /* + * Variable: aoFooter + * Purpose: Store information about the table's footer + * Scope: jQuery.dataTable.classSettings + */ + this.aoFooter = []; + + /* + * Variable: iNextId + * Purpose: Store the next unique id to be used for a new row + * Scope: jQuery.dataTable.classSettings + */ + this.iNextId = 0; + + /* + * Variable: asDataSearch + * Purpose: Search data array for regular expression searching + * Scope: jQuery.dataTable.classSettings + */ + this.asDataSearch = []; + + /* + * Variable: oPreviousSearch + * Purpose: Store the previous search incase we want to force a re-search + * or compare the old search to a new one + * Scope: jQuery.dataTable.classSettings + */ + this.oPreviousSearch = { + "sSearch": "", + "bRegex": false, + "bSmart": true + }; + + /* + * Variable: aoPreSearchCols + * Purpose: Store the previous search for each column + * Scope: jQuery.dataTable.classSettings + */ + this.aoPreSearchCols = []; + + /* + * Variable: aaSorting + * Purpose: Sorting information + * Scope: jQuery.dataTable.classSettings + * Notes: Index 0 - column number + * Index 1 - current sorting direction + * Index 2 - index of asSorting for this column + */ + this.aaSorting = [ [0, 'asc', 0] ]; + + /* + * Variable: aaSortingFixed + * Purpose: Sorting information that is always applied + * Scope: jQuery.dataTable.classSettings + */ + this.aaSortingFixed = null; + + /* + * Variable: asStripeClasses + * Purpose: Classes to use for the striping of a table + * Scope: jQuery.dataTable.classSettings + */ + this.asStripeClasses = []; + + /* + * Variable: asDestroyStripes + * Purpose: If restoring a table - we should restore its striping classes as well + * Scope: jQuery.dataTable.classSettings + */ + this.asDestroyStripes = []; + + /* + * Variable: sDestroyWidth + * Purpose: If restoring a table - we should restore its width + * Scope: jQuery.dataTable.classSettings + */ + this.sDestroyWidth = 0; + + /* + * Variable: fnRowCallback + * Purpose: Call this function every time a row is inserted (draw) + * Scope: jQuery.dataTable.classSettings + */ + this.fnRowCallback = null; + + /* + * Variable: fnHeaderCallback + * Purpose: Callback function for the header on each draw + * Scope: jQuery.dataTable.classSettings + */ + this.fnHeaderCallback = null; + + /* + * Variable: fnFooterCallback + * Purpose: Callback function for the footer on each draw + * Scope: jQuery.dataTable.classSettings + */ + this.fnFooterCallback = null; + + /* + * Variable: aoDrawCallback + * Purpose: Array of callback functions for draw callback functions + * Scope: jQuery.dataTable.classSettings + * Notes: Each array element is an object with the following parameters: + * function:fn - function to call + * string:sName - name callback (feature). useful for arranging array + */ + this.aoDrawCallback = []; + + /* + * Variable: fnPreDrawCallback + * Purpose: Callback function for just before the table is redrawn. A return of false + * will be used to cancel the draw. + * Scope: jQuery.dataTable.classSettings + */ + this.fnPreDrawCallback = null; + + /* + * Variable: fnInitComplete + * Purpose: Callback function for when the table has been initialised + * Scope: jQuery.dataTable.classSettings + */ + this.fnInitComplete = null; + + /* + * Variable: sTableId + * Purpose: Cache the table ID for quick access + * Scope: jQuery.dataTable.classSettings + */ + this.sTableId = ""; + + /* + * Variable: nTable + * Purpose: Cache the table node for quick access + * Scope: jQuery.dataTable.classSettings + */ + this.nTable = null; + + /* + * Variable: nTHead + * Purpose: Permanent ref to the thead element + * Scope: jQuery.dataTable.classSettings + */ + this.nTHead = null; + + /* + * Variable: nTFoot + * Purpose: Permanent ref to the tfoot element - if it exists + * Scope: jQuery.dataTable.classSettings + */ + this.nTFoot = null; + + /* + * Variable: nTBody + * Purpose: Permanent ref to the tbody element + * Scope: jQuery.dataTable.classSettings + */ + this.nTBody = null; + + /* + * Variable: nTableWrapper + * Purpose: Cache the wrapper node (contains all DataTables controlled elements) + * Scope: jQuery.dataTable.classSettings + */ + this.nTableWrapper = null; + + /* + * Variable: bDeferLoading + * Purpose: Indicate if when using server-side processing the loading of data + * should be deferred until the second draw + * Scope: jQuery.dataTable.classSettings + */ + this.bDeferLoading = false; + + /* + * Variable: bInitialised + * Purpose: Indicate if all required information has been read in + * Scope: jQuery.dataTable.classSettings + */ + this.bInitialised = false; + + /* + * Variable: aoOpenRows + * Purpose: Information about open rows + * Scope: jQuery.dataTable.classSettings + * Notes: Has the parameters 'nTr' and 'nParent' + */ + this.aoOpenRows = []; + + /* + * Variable: sDom + * Purpose: Dictate the positioning that the created elements will take + * Scope: jQuery.dataTable.classSettings + * Notes: + * The following options are allowed: + * 'l' - Length changing + * 'f' - Filtering input + * 't' - The table! + * 'i' - Information + * 'p' - Pagination + * 'r' - pRocessing + * The following constants are allowed: + * 'H' - jQueryUI theme "header" classes + * 'F' - jQueryUI theme "footer" classes + * The following syntax is expected: + * '<' and '>' - div elements + * '<"class" and '>' - div with a class + * Examples: + * '<"wrapper"flipt>', 'ip>' + */ + this.sDom = 'lfrtip'; + + /* + * Variable: sPaginationType + * Purpose: Note which type of sorting should be used + * Scope: jQuery.dataTable.classSettings + */ + this.sPaginationType = "two_button"; + + /* + * Variable: iCookieDuration + * Purpose: The cookie duration (for bStateSave) in seconds - default 2 hours + * Scope: jQuery.dataTable.classSettings + */ + this.iCookieDuration = 60 * 60 * 2; + + /* + * Variable: sCookiePrefix + * Purpose: The cookie name prefix + * Scope: jQuery.dataTable.classSettings + */ + this.sCookiePrefix = "SpryMedia_DataTables_"; + + /* + * Variable: fnCookieCallback + * Purpose: Callback function for cookie creation + * Scope: jQuery.dataTable.classSettings + */ + this.fnCookieCallback = null; + + /* + * Variable: aoStateSave + * Purpose: Array of callback functions for state saving + * Scope: jQuery.dataTable.classSettings + * Notes: Each array element is an object with the following parameters: + * function:fn - function to call. Takes two parameters, oSettings and the JSON string to + * save that has been thus far created. Returns a JSON string to be inserted into a + * json object (i.e. '"param": [ 0, 1, 2]') + * string:sName - name of callback + */ + this.aoStateSave = []; + + /* + * Variable: aoStateLoad + * Purpose: Array of callback functions for state loading + * Scope: jQuery.dataTable.classSettings + * Notes: Each array element is an object with the following parameters: + * function:fn - function to call. Takes two parameters, oSettings and the object stored. + * May return false to cancel state loading. + * string:sName - name of callback + */ + this.aoStateLoad = []; + + /* + * Variable: oLoadedState + * Purpose: State that was loaded from the cookie. Useful for back reference + * Scope: jQuery.dataTable.classSettings + */ + this.oLoadedState = null; + + /* + * Variable: sAjaxSource + * Purpose: Source url for AJAX data for the table + * Scope: jQuery.dataTable.classSettings + */ + this.sAjaxSource = null; + + /* + * Variable: sAjaxDataProp + * Purpose: Property from a given object from which to read the table data from. This can + * be an empty string (when not server-side processing), in which case it is + * assumed an an array is given directly. + * Scope: jQuery.dataTable.classSettings + */ + this.sAjaxDataProp = 'aaData'; + + /* + * Variable: bAjaxDataGet + * Purpose: Note if draw should be blocked while getting data + * Scope: jQuery.dataTable.classSettings + */ + this.bAjaxDataGet = true; + + /* + * Variable: jqXHR + * Purpose: The last jQuery XHR object that was used for server-side data gathering. + * This can be used for working with the XHR information in one of the callbacks + * Scope: jQuery.dataTable.classSettings + */ + this.jqXHR = null; + + /* + * Variable: fnServerData + * Purpose: Function to get the server-side data - can be overruled by the developer + * Scope: jQuery.dataTable.classSettings + */ + this.fnServerData = function ( url, data, callback, settings ) { + settings.jqXHR = $.ajax( { + "url": url, + "data": data, + "success": function (json) { + $(settings.oInstance).trigger('xhr', settings); + callback( json ); + }, + "dataType": "json", + "cache": false, + "error": function (xhr, error, thrown) { + if ( error == "parsererror" ) { + alert( "DataTables warning: JSON data from server could not be parsed. "+ + "This is caused by a JSON formatting error." ); + } + } + } ); + }; + + /* + * Variable: aoServerParams + * Purpose: Functions which are called prior to sending an Ajax request so extra parameters + * can easily be sent to the server + * Scope: jQuery.dataTable.classSettings + * Notes: Each array element is an object with the following parameters: + * function:fn - function to call + * string:sName - name callback - useful for knowing where it came from (plugin etc) + */ + this.aoServerParams = []; + + /* + * Variable: fnFormatNumber + * Purpose: Format numbers for display + * Scope: jQuery.dataTable.classSettings + */ + this.fnFormatNumber = function ( iIn ) + { + if ( iIn < 1000 ) + { + /* A small optimisation for what is likely to be the vast majority of use cases */ + return iIn; + } + else + { + var s=(iIn+""), a=s.split(""), out="", iLen=s.length; + + for ( var i=0 ; i
                ")}}if(aI.length>0){aI.push('
                ');aC=aH(aI,"width:10000px;");aG=aC.height();aC.remove()}}}else{if(aK==null||aG==null){for(aF=0;aF'+aE+"
                ")}}if(aI.length>0){aC=aH(aI,"");if(aK==null){aK=aC.children().width()}if(aG==null){aG=aC.find("div.tickLabel").height()}aC.remove()}}}if(aK==null){aK=0}if(aG==null){aG=0}aD.labelWidth=aK;aD.labelHeight=aG}function au(aD){var aC=aD.labelWidth,aL=aD.labelHeight,aH=aD.options.position,aF=aD.options.tickLength,aG=O.grid.axisMargin,aJ=O.grid.labelMargin,aK=aD.direction=="x"?p:aw,aE;var aB=c.grep(aK,function(aN){return aN&&aN.options.position==aH&&aN.reserveSpace});if(c.inArray(aD,aB)==aB.length-1){aG=0}if(aF==null){aF="full"}var aI=c.grep(aK,function(aN){return aN&&aN.reserveSpace});var aM=c.inArray(aD,aI)==0;if(!aM&&aF=="full"){aF=5}if(!isNaN(+aF)){aJ+=+aF}if(aD.direction=="x"){aL+=aJ;if(aH=="bottom"){q.bottom+=aL+aG;aD.box={top:I-q.bottom,height:aL}}else{aD.box={top:q.top+aG,height:aL};q.top+=aL+aG}}else{aC+=aJ;if(aH=="left"){aD.box={left:q.left+aG,width:aC};q.left+=aC+aG}else{q.right+=aC+aG;aD.box={left:G-q.right,width:aC}}}aD.position=aH;aD.tickLength=aF;aD.box.padding=aJ;aD.innermost=aM}function U(aB){if(aB.direction=="x"){aB.box.left=q.left;aB.box.width=h}else{aB.box.top=q.top;aB.box.height=w}}function t(){var aC,aE=m();c.each(aE,function(aF,aG){aG.show=aG.options.show;if(aG.show==null){aG.show=aG.used}aG.reserveSpace=aG.show||aG.options.reserveSpace;n(aG)});allocatedAxes=c.grep(aE,function(aF){return aF.reserveSpace});q.left=q.right=q.top=q.bottom=0;if(O.grid.show){c.each(allocatedAxes,function(aF,aG){S(aG);P(aG);ap(aG,aG.ticks);L(aG)});for(aC=allocatedAxes.length-1;aC>=0;--aC){au(allocatedAxes[aC])}var aD=O.grid.minBorderMargin;if(aD==null){aD=0;for(aC=0;aC=0){aD=0}}if(aF.max==null){aB+=aH*aG;if(aB>0&&aE.datamax!=null&&aE.datamax<=0){aB=0}}}}aE.min=aD;aE.max=aB}function S(aG){var aM=aG.options;var aH;if(typeof aM.ticks=="number"&&aM.ticks>0){aH=aM.ticks}else{aH=0.3*Math.sqrt(aG.direction=="x"?G:I)}var aT=(aG.max-aG.min)/aH,aO,aB,aN,aR,aS,aQ,aI;if(aM.mode=="time"){var aJ={second:1000,minute:60*1000,hour:60*60*1000,day:24*60*60*1000,month:30*24*60*60*1000,year:365.2425*24*60*60*1000};var aK=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[0.25,"month"],[0.5,"month"],[1,"month"],[2,"month"],[3,"month"],[6,"month"],[1,"year"]];var aC=0;if(aM.minTickSize!=null){if(typeof aM.tickSize=="number"){aC=aM.tickSize}else{aC=aM.minTickSize[0]*aJ[aM.minTickSize[1]]}}for(var aS=0;aS=aC){break}}aO=aK[aS][0];aN=aK[aS][1];if(aN=="year"){aQ=Math.pow(10,Math.floor(Math.log(aT/aJ.year)/Math.LN10));aI=(aT/aJ.year)/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ}aG.tickSize=aM.tickSize||[aO,aN];aB=function(aX){var a2=[],a0=aX.tickSize[0],a3=aX.tickSize[1],a1=new Date(aX.min);var aW=a0*aJ[a3];if(a3=="second"){a1.setUTCSeconds(a(a1.getUTCSeconds(),a0))}if(a3=="minute"){a1.setUTCMinutes(a(a1.getUTCMinutes(),a0))}if(a3=="hour"){a1.setUTCHours(a(a1.getUTCHours(),a0))}if(a3=="month"){a1.setUTCMonth(a(a1.getUTCMonth(),a0))}if(a3=="year"){a1.setUTCFullYear(a(a1.getUTCFullYear(),a0))}a1.setUTCMilliseconds(0);if(aW>=aJ.minute){a1.setUTCSeconds(0)}if(aW>=aJ.hour){a1.setUTCMinutes(0)}if(aW>=aJ.day){a1.setUTCHours(0)}if(aW>=aJ.day*4){a1.setUTCDate(1)}if(aW>=aJ.year){a1.setUTCMonth(0)}var a5=0,a4=Number.NaN,aY;do{aY=a4;a4=a1.getTime();a2.push(a4);if(a3=="month"){if(a0<1){a1.setUTCDate(1);var aV=a1.getTime();a1.setUTCMonth(a1.getUTCMonth()+1);var aZ=a1.getTime();a1.setTime(a4+a5*aJ.hour+(aZ-aV)*a0);a5=a1.getUTCHours();a1.setUTCHours(0)}else{a1.setUTCMonth(a1.getUTCMonth()+a0)}}else{if(a3=="year"){a1.setUTCFullYear(a1.getUTCFullYear()+a0)}else{a1.setTime(a4+aW)}}}while(a4aU){aP=aU}aQ=Math.pow(10,-aP);aI=aT/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2;if(aI>2.25&&(aU==null||aP+1<=aU)){aO=2.5;++aP}}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ;if(aM.minTickSize!=null&&aO0){if(aM.min==null){aG.min=Math.min(aG.min,aL[0])}if(aM.max==null&&aL.length>1){aG.max=Math.max(aG.max,aL[aL.length-1])}}aB=function(aX){var aY=[],aV,aW;for(aW=0;aW1&&/\..*0$/.test((aD[1]-aD[0]).toFixed(aE)))){aG.tickDecimals=aE}}}}aG.tickGenerator=aB;if(c.isFunction(aM.tickFormatter)){aG.tickFormatter=function(aV,aW){return""+aM.tickFormatter(aV,aW)}}else{aG.tickFormatter=aR}}function P(aF){var aH=aF.options.ticks,aG=[];if(aH==null||(typeof aH=="number"&&aH>0)){aG=aF.tickGenerator(aF)}else{if(aH){if(c.isFunction(aH)){aG=aH({min:aF.min,max:aF.max})}else{aG=aH}}}var aE,aB;aF.ticks=[];for(aE=0;aE1){aC=aD[1]}}else{aB=+aD}if(aC==null){aC=aF.tickFormatter(aB,aF)}if(!isNaN(aB)){aF.ticks.push({v:aB,label:aC})}}}function ap(aB,aC){if(aB.options.autoscaleMargin&&aC.length>0){if(aB.options.min==null){aB.min=Math.min(aB.min,aC[0].v)}if(aB.options.max==null&&aC.length>1){aB.max=Math.max(aB.max,aC[aC.length-1].v)}}}function W(){H.clearRect(0,0,G,I);var aC=O.grid;if(aC.show&&aC.backgroundColor){N()}if(aC.show&&!aC.aboveData){ac()}for(var aB=0;aBaG){var aC=aH;aH=aG;aG=aC}return{from:aH,to:aG,axis:aE}}function N(){H.save();H.translate(q.left,q.top);H.fillStyle=am(O.grid.backgroundColor,w,0,"rgba(255, 255, 255, 0)");H.fillRect(0,0,h,w);H.restore()}function ac(){var aF;H.save();H.translate(q.left,q.top);var aH=O.grid.markings;if(aH){if(c.isFunction(aH)){var aK=aq.getAxes();aK.xmin=aK.xaxis.min;aK.xmax=aK.xaxis.max;aK.ymin=aK.yaxis.min;aK.ymax=aK.yaxis.max;aH=aH(aK)}for(aF=0;aFaC.axis.max||aI.toaI.axis.max){continue}aC.from=Math.max(aC.from,aC.axis.min);aC.to=Math.min(aC.to,aC.axis.max);aI.from=Math.max(aI.from,aI.axis.min);aI.to=Math.min(aI.to,aI.axis.max);if(aC.from==aC.to&&aI.from==aI.to){continue}aC.from=aC.axis.p2c(aC.from);aC.to=aC.axis.p2c(aC.to);aI.from=aI.axis.p2c(aI.from);aI.to=aI.axis.p2c(aI.to);if(aC.from==aC.to||aI.from==aI.to){H.beginPath();H.strokeStyle=aD.color||O.grid.markingsColor;H.lineWidth=aD.lineWidth||O.grid.markingsLineWidth;H.moveTo(aC.from,aI.from);H.lineTo(aC.to,aI.to);H.stroke()}else{H.fillStyle=aD.color||O.grid.markingsColor;H.fillRect(aC.from,aI.to,aC.to-aC.from,aI.from-aI.to)}}}var aK=m(),aM=O.grid.borderWidth;for(var aE=0;aEaB.max||(aQ=="full"&&aM>0&&(aO==aB.min||aO==aB.max))){continue}if(aB.direction=="x"){aN=aB.p2c(aO);aJ=aQ=="full"?-w:aQ;if(aB.position=="top"){aJ=-aJ}}else{aL=aB.p2c(aO);aP=aQ=="full"?-h:aQ;if(aB.position=="left"){aP=-aP}}if(H.lineWidth==1){if(aB.direction=="x"){aN=Math.floor(aN)+0.5}else{aL=Math.floor(aL)+0.5}}H.moveTo(aN,aL);H.lineTo(aN+aP,aL+aJ)}H.stroke()}if(aM){H.lineWidth=aM;H.strokeStyle=O.grid.borderColor;H.strokeRect(-aM/2,-aM/2,h+aM,w+aM)}H.restore()}function k(){av.find(".tickLabels").remove();var aG=['
                '];var aJ=m();for(var aD=0;aD');for(var aE=0;aEaC.max){continue}var aK={},aI;if(aC.direction=="x"){aI="center";aK.left=Math.round(q.left+aC.p2c(aH.v)-aC.labelWidth/2);if(aC.position=="bottom"){aK.top=aF.top+aF.padding}else{aK.bottom=I-(aF.top+aF.height-aF.padding)}}else{aK.top=Math.round(q.top+aC.p2c(aH.v)-aC.labelHeight/2);if(aC.position=="left"){aK.right=G-(aF.left+aF.width-aF.padding);aI="right"}else{aK.left=aF.left+aF.padding;aI="left"}}aK.width=aC.labelWidth;var aB=["position:absolute","text-align:"+aI];for(var aL in aK){aB.push(aL+":"+aK[aL]+"px")}aG.push('
                '+aH.label+"
                ")}aG.push("
                ")}aG.push("
                ");av.append(aG.join(""))}function d(aB){if(aB.lines.show){at(aB)}if(aB.bars.show){e(aB)}if(aB.points.show){ao(aB)}}function at(aE){function aD(aP,aQ,aI,aU,aT){var aV=aP.points,aJ=aP.pointsize,aN=null,aM=null;H.beginPath();for(var aO=aJ;aO=aR&&aS>aT.max){if(aR>aT.max){continue}aL=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aS=aT.max}else{if(aR>=aS&&aR>aT.max){if(aS>aT.max){continue}aK=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aR=aT.max}}if(aL<=aK&&aL=aK&&aL>aU.max){if(aK>aU.max){continue}aS=(aU.max-aL)/(aK-aL)*(aR-aS)+aS;aL=aU.max}else{if(aK>=aL&&aK>aU.max){if(aL>aU.max){continue}aR=(aU.max-aL)/(aK-aL)*(aR-aS)+aS;aK=aU.max}}if(aL!=aN||aS!=aM){H.moveTo(aU.p2c(aL)+aQ,aT.p2c(aS)+aI)}aN=aK;aM=aR;H.lineTo(aU.p2c(aK)+aQ,aT.p2c(aR)+aI)}H.stroke()}function aF(aI,aQ,aP){var aW=aI.points,aV=aI.pointsize,aN=Math.min(Math.max(0,aP.min),aP.max),aX=0,aU,aT=false,aM=1,aL=0,aR=0;while(true){if(aV>0&&aX>aW.length+aV){break}aX+=aV;var aZ=aW[aX-aV],aK=aW[aX-aV+aM],aY=aW[aX],aJ=aW[aX+aM];if(aT){if(aV>0&&aZ!=null&&aY==null){aR=aX;aV=-aV;aM=2;continue}if(aV<0&&aX==aL+aV){H.fill();aT=false;aV=-aV;aM=1;aX=aL=aR+aV;continue}}if(aZ==null||aY==null){continue}if(aZ<=aY&&aZ=aY&&aZ>aQ.max){if(aY>aQ.max){continue}aK=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)+aK;aZ=aQ.max}else{if(aY>=aZ&&aY>aQ.max){if(aZ>aQ.max){continue}aJ=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)+aK;aY=aQ.max}}if(!aT){H.beginPath();H.moveTo(aQ.p2c(aZ),aP.p2c(aN));aT=true}if(aK>=aP.max&&aJ>=aP.max){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.max));H.lineTo(aQ.p2c(aY),aP.p2c(aP.max));continue}else{if(aK<=aP.min&&aJ<=aP.min){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.min));H.lineTo(aQ.p2c(aY),aP.p2c(aP.min));continue}}var aO=aZ,aS=aY;if(aK<=aJ&&aK=aP.min){aZ=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.min}else{if(aJ<=aK&&aJ=aP.min){aY=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.min}}if(aK>=aJ&&aK>aP.max&&aJ<=aP.max){aZ=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.max}else{if(aJ>=aK&&aJ>aP.max&&aK<=aP.max){aY=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.max}}if(aZ!=aO){H.lineTo(aQ.p2c(aO),aP.p2c(aK))}H.lineTo(aQ.p2c(aZ),aP.p2c(aK));H.lineTo(aQ.p2c(aY),aP.p2c(aJ));if(aY!=aS){H.lineTo(aQ.p2c(aY),aP.p2c(aJ));H.lineTo(aQ.p2c(aS),aP.p2c(aJ))}}}H.save();H.translate(q.left,q.top);H.lineJoin="round";var aG=aE.lines.lineWidth,aB=aE.shadowSize;if(aG>0&&aB>0){H.lineWidth=aB;H.strokeStyle="rgba(0,0,0,0.1)";var aH=Math.PI/18;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/2),Math.cos(aH)*(aG/2+aB/2),aE.xaxis,aE.yaxis);H.lineWidth=aB/2;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/4),Math.cos(aH)*(aG/2+aB/4),aE.xaxis,aE.yaxis)}H.lineWidth=aG;H.strokeStyle=aE.color;var aC=ae(aE.lines,aE.color,0,w);if(aC){H.fillStyle=aC;aF(aE.datapoints,aE.xaxis,aE.yaxis)}if(aG>0){aD(aE.datapoints,0,0,aE.xaxis,aE.yaxis)}H.restore()}function ao(aE){function aH(aN,aM,aU,aK,aS,aT,aQ,aJ){var aR=aN.points,aI=aN.pointsize;for(var aL=0;aLaT.max||aOaQ.max){continue}H.beginPath();aP=aT.p2c(aP);aO=aQ.p2c(aO)+aK;if(aJ=="circle"){H.arc(aP,aO,aM,0,aS?Math.PI:Math.PI*2,false)}else{aJ(H,aP,aO,aM,aS)}H.closePath();if(aU){H.fillStyle=aU;H.fill()}H.stroke()}}H.save();H.translate(q.left,q.top);var aG=aE.points.lineWidth,aC=aE.shadowSize,aB=aE.points.radius,aF=aE.points.symbol;if(aG>0&&aC>0){var aD=aC/2;H.lineWidth=aD;H.strokeStyle="rgba(0,0,0,0.1)";aH(aE.datapoints,aB,null,aD+aD/2,true,aE.xaxis,aE.yaxis,aF);H.strokeStyle="rgba(0,0,0,0.2)";aH(aE.datapoints,aB,null,aD/2,true,aE.xaxis,aE.yaxis,aF)}H.lineWidth=aG;H.strokeStyle=aE.color;aH(aE.datapoints,aB,ae(aE.points,aE.color),0,false,aE.xaxis,aE.yaxis,aF);H.restore()}function E(aN,aM,aV,aI,aQ,aF,aD,aL,aK,aU,aR,aC){var aE,aT,aJ,aP,aG,aB,aO,aH,aS;if(aR){aH=aB=aO=true;aG=false;aE=aV;aT=aN;aP=aM+aI;aJ=aM+aQ;if(aTaL.max||aPaK.max){return}if(aEaL.max){aT=aL.max;aB=false}if(aJaK.max){aP=aK.max;aO=false}aE=aL.p2c(aE);aJ=aK.p2c(aJ);aT=aL.p2c(aT);aP=aK.p2c(aP);if(aD){aU.beginPath();aU.moveTo(aE,aJ);aU.lineTo(aE,aP);aU.lineTo(aT,aP);aU.lineTo(aT,aJ);aU.fillStyle=aD(aJ,aP);aU.fill()}if(aC>0&&(aG||aB||aO||aH)){aU.beginPath();aU.moveTo(aE,aJ+aF);if(aG){aU.lineTo(aE,aP+aF)}else{aU.moveTo(aE,aP+aF)}if(aO){aU.lineTo(aT,aP+aF)}else{aU.moveTo(aT,aP+aF)}if(aB){aU.lineTo(aT,aJ+aF)}else{aU.moveTo(aT,aJ+aF)}if(aH){aU.lineTo(aE,aJ+aF)}else{aU.moveTo(aE,aJ+aF)}aU.stroke()}}function e(aD){function aC(aJ,aI,aL,aG,aK,aN,aM){var aO=aJ.points,aF=aJ.pointsize;for(var aH=0;aH")}aH.push("");aF=true}if(aN){aJ=aN(aJ,aM)}aH.push('
                '+aJ+"")}if(aF){aH.push("")}if(aH.length==0){return}var aL=''+aH.join("")+"
                ";if(O.legend.container!=null){c(O.legend.container).html(aL)}else{var aI="",aC=O.legend.position,aD=O.legend.margin;if(aD[0]==null){aD=[aD,aD]}if(aC.charAt(0)=="n"){aI+="top:"+(aD[1]+q.top)+"px;"}else{if(aC.charAt(0)=="s"){aI+="bottom:"+(aD[1]+q.bottom)+"px;"}}if(aC.charAt(1)=="e"){aI+="right:"+(aD[0]+q.right)+"px;"}else{if(aC.charAt(1)=="w"){aI+="left:"+(aD[0]+q.left)+"px;"}}var aK=c('
                '+aL.replace('style="','style="position:absolute;'+aI+";")+"
                ").appendTo(av);if(O.legend.backgroundOpacity!=0){var aG=O.legend.backgroundColor;if(aG==null){aG=O.grid.backgroundColor;if(aG&&typeof aG=="string"){aG=c.color.parse(aG)}else{aG=c.color.extract(aK,"background-color")}aG.a=1;aG=aG.toString()}var aB=aK.children();c('
                ').prependTo(aK).css("opacity",O.legend.backgroundOpacity)}}}var ab=[],M=null;function K(aI,aG,aD){var aO=O.grid.mouseActiveRadius,a0=aO*aO+1,aY=null,aR=false,aW,aU;for(aW=Q.length-1;aW>=0;--aW){if(!aD(Q[aW])){continue}var aP=Q[aW],aH=aP.xaxis,aF=aP.yaxis,aV=aP.datapoints.points,aT=aP.datapoints.pointsize,aQ=aH.c2p(aI),aN=aF.c2p(aG),aC=aO/aH.scale,aB=aO/aF.scale;if(aH.options.inverseTransform){aC=Number.MAX_VALUE}if(aF.options.inverseTransform){aB=Number.MAX_VALUE}if(aP.lines.show||aP.points.show){for(aU=0;aUaC||aK-aQ<-aC||aJ-aN>aB||aJ-aN<-aB){continue}var aM=Math.abs(aH.p2c(aK)-aI),aL=Math.abs(aF.p2c(aJ)-aG),aS=aM*aM+aL*aL;if(aS=Math.min(aZ,aK)&&aN>=aJ+aE&&aN<=aJ+aX):(aQ>=aK+aE&&aQ<=aK+aX&&aN>=Math.min(aZ,aJ)&&aN<=Math.max(aZ,aJ))){aY=[aW,aU/aT]}}}}if(aY){aW=aY[0];aU=aY[1];aT=Q[aW].datapoints.pointsize;return{datapoint:Q[aW].datapoints.points.slice(aU*aT,(aU+1)*aT),dataIndex:aU,series:Q[aW],seriesIndex:aW}}return null}function aa(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return aC.hoverable!=false})}}function l(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return false})}}function R(aB){u("plotclick",aB,function(aC){return aC.clickable!=false})}function u(aC,aB,aD){var aE=y.offset(),aH=aB.pageX-aE.left-q.left,aF=aB.pageY-aE.top-q.top,aJ=C({left:aH,top:aF});aJ.pageX=aB.pageX;aJ.pageY=aB.pageY;var aK=K(aH,aF,aD);if(aK){aK.pageX=parseInt(aK.series.xaxis.p2c(aK.datapoint[0])+aE.left+q.left);aK.pageY=parseInt(aK.series.yaxis.p2c(aK.datapoint[1])+aE.top+q.top)}if(O.grid.autoHighlight){for(var aG=0;aGaH.max||aIaG.max){return}var aF=aE.points.radius+aE.points.lineWidth/2;A.lineWidth=aF;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aB=1.5*aF,aC=aH.p2c(aC),aI=aG.p2c(aI);A.beginPath();if(aE.points.symbol=="circle"){A.arc(aC,aI,aB,0,2*Math.PI,false)}else{aE.points.symbol(A,aC,aI,aB,false)}A.closePath();A.stroke()}function v(aE,aB){A.lineWidth=aE.bars.lineWidth;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aD=c.color.parse(aE.color).scale("a",0.5).toString();var aC=aE.bars.align=="left"?0:-aE.bars.barWidth/2;E(aB[0],aB[1],aB[2]||0,aC,aC+aE.bars.barWidth,0,function(){return aD},aE.xaxis,aE.yaxis,A,aE.bars.horizontal,aE.bars.lineWidth)}function am(aJ,aB,aH,aC){if(typeof aJ=="string"){return aJ}else{var aI=H.createLinearGradient(0,aH,0,aB);for(var aE=0,aD=aJ.colors.length;aE12){n=n-12}else{if(n==0){n=12}}}for(var g=0;g1){N.series.pie.tilt=1}if(N.series.pie.tilt<0){N.series.pie.tilt=0}O.hooks.processDatapoints.push(E);O.hooks.drawOverlay.push(H);O.hooks.draw.push(r)}}function e(P,N){var O=P.getOptions();if(O.series.pie.show&&O.grid.hoverable){N.unbind("mousemove").mousemove(t)}if(O.series.pie.show&&O.grid.clickable){N.unbind("click").click(l)}}function G(O){var P="";function N(S,T){if(!T){T=0}for(var R=0;Rh.width-n){B=h.width-n}}}function v(O){for(var N=0;N0){R.push({data:[[1,P]],color:N,label:a.series.pie.combine.label,angle:(P*(Math.PI*2))/M,percent:(P/M*100)})}return R}function r(S,Q){if(!L){return}ctx=Q;I();var T=S.getData();var P=0;while(F&&P0){n*=w}P+=1;N();if(a.series.pie.tilt<=0.8){O()}R()}if(P>=o){N();L.prepend('
                Could not draw pie with labels contained inside canvas
                ')}if(S.setSeries&&S.insertLegend){S.setSeries(T);S.insertLegend()}function N(){ctx.clearRect(0,0,h.width,h.height);L.children().filter(".pieLabel, .pieLabelBackground").remove()}function O(){var Z=5;var Y=15;var W=10;var X=0.02;if(a.series.pie.radius>1){var U=a.series.pie.radius}else{var U=n*a.series.pie.radius}if(U>=(h.width/2)-Z||U*a.series.pie.tilt>=(h.height/2)-Y||U<=W){return}ctx.save();ctx.translate(Z,Y);ctx.globalAlpha=X;ctx.fillStyle="#000";ctx.translate(B,p);ctx.scale(1,a.series.pie.tilt);for(var V=1;V<=W;V++){ctx.beginPath();ctx.arc(0,0,U,0,Math.PI*2,false);ctx.fill();U-=V}ctx.restore()}function R(){startAngle=Math.PI*a.series.pie.startAngle;if(a.series.pie.radius>1){var U=a.series.pie.radius}else{var U=n*a.series.pie.radius}ctx.save();ctx.translate(B,p);ctx.scale(1,a.series.pie.tilt);ctx.save();var Y=startAngle;for(var W=0;W1e-9){ctx.moveTo(0,0)}else{if(b.browser.msie){ab-=0.0001}}ctx.arc(0,0,U,Y,Y+ab,false);ctx.closePath();Y+=ab;if(aa){ctx.fill()}else{ctx.stroke()}}function V(){var ac=startAngle;if(a.series.pie.label.radius>1){var Z=a.series.pie.label.radius}else{var Z=n*a.series.pie.label.radius}for(var ab=0;ab=a.series.pie.label.threshold*100){aa(T[ab],ac,ab)}ac+=T[ab].angle}function aa(ap,ai,ag){if(ap.data[0][1]==0){return}var ar=a.legend.labelFormatter,aq,ae=a.series.pie.label.formatter;if(ar){aq=ar(ap.label,ap)}else{aq=ap.label}if(ae){aq=ae(aq,ap)}var aj=((ai+ap.angle)+ai)/2;var ao=B+Math.round(Math.cos(aj)*Z);var am=p+Math.round(Math.sin(aj)*Z)*a.series.pie.tilt;var af=''+aq+"";L.append(af);var an=L.children("#pieLabel"+ag);var ad=(am-an.height()/2);var ah=(ao-an.width()/2);an.css("top",ad);an.css("left",ah);if(0-ad>0||0-ah>0||h.height-(ad+an.height())<0||h.width-(ah+an.width())<0){F=true}if(a.series.pie.label.background.opacity!=0){var ak=a.series.pie.label.background.color;if(ak==null){ak=ap.color}var al="top:"+ad+"px;left:"+ah+"px;";b('
                ').insertBefore(an).css("opacity",a.series.pie.label.background.opacity)}}}}}function J(N){if(a.series.pie.innerRadius>0){N.save();innerRadius=a.series.pie.innerRadius>1?a.series.pie.innerRadius:n*a.series.pie.innerRadius;N.globalCompositeOperation="destination-out";N.beginPath();N.fillStyle=a.series.pie.stroke.color;N.arc(0,0,innerRadius,0,Math.PI*2,false);N.fill();N.closePath();N.restore();N.save();N.beginPath();N.strokeStyle=a.series.pie.stroke.color;N.arc(0,0,innerRadius,0,Math.PI*2,false);N.stroke();N.closePath();N.restore()}}function s(Q,R){for(var S=false,P=-1,N=Q.length,O=N-1;++P1?O.series.pie.radius:n*O.series.pie.radius;for(var Q=0;Q1?P.series.pie.radius:n*P.series.pie.radius;R.save();R.translate(B,p);R.scale(1,P.series.pie.tilt);for(i=0;i1e-9){R.moveTo(0,0)}R.arc(0,0,N,S.startAngle,S.startAngle+S.angle,false);R.closePath();R.fill()}}}var a={series:{pie:{show:false,radius:"auto",innerRadius:0,startAngle:3/2,tilt:1,offset:{top:0,left:"auto"},stroke:{color:"#FFF",width:1},label:{show:"auto",formatter:function(d,e){return'
                '+d+"
                "+Math.round(e.percent)+"%
                "},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:0.5}}}};b.plot.plugins.push({init:c,options:a,name:"pie",version:"1.0"})})(jQuery); \ No newline at end of file diff --git a/src/js/plugins/jquery.jgrowl.js b/src/js/plugins/jquery.jgrowl.js new file mode 100644 index 0000000..3c3b789 --- /dev/null +++ b/src/js/plugins/jquery.jgrowl.js @@ -0,0 +1,338 @@ +/** + * jGrowl 1.2.6 + * + * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) + * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. + * + * Written by Stan Lemon + * Last updated: 2011.03.27 + * + * jGrowl is a jQuery plugin implementing unobtrusive userland notifications. These + * notifications function similarly to the Growl Framework available for + * Mac OS X (http://growl.info). + * + * To Do: + * - Move library settings to containers and allow them to be changed per container + * + * Changes in 1.2.6 + * - Fixed js error when a notification is opening and closing at the same time + * + * Changes in 1.2.5 + * - Changed wrapper jGrowl's options usage to "o" instead of $.jGrowl.defaults + * - Added themeState option to control 'highlight' or 'error' for jQuery UI + * - Ammended some CSS to provide default positioning for nested usage. + * - Changed some CSS to be prefixed with jGrowl- to prevent namespacing issues + * - Added two new options - openDuration and closeDuration to allow + * better control of notification open and close speeds, respectively + * Patch contributed by Jesse Vincet. + * - Added afterOpen callback. Patch contributed by Russel Branca. + * + * Changes in 1.2.4 + * - Fixed IE bug with the close-all button + * - Fixed IE bug with the filter CSS attribute (special thanks to gotwic) + * - Update IE opacity CSS + * - Changed font sizes to use "em", and only set the base style + * + * Changes in 1.2.3 + * - The callbacks no longer use the container as context, instead they use the actual notification + * - The callbacks now receive the container as a parameter after the options parameter + * - beforeOpen and beforeClose now check the return value, if it's false - the notification does + * not continue. The open callback will also halt execution if it returns false. + * - Fixed bug where containers would get confused + * - Expanded the pause functionality to pause an entire container. + * + * Changes in 1.2.2 + * - Notification can now be theme rolled for jQuery UI, special thanks to Jeff Chan! + * + * Changes in 1.2.1 + * - Fixed instance where the interval would fire the close method multiple times. + * - Added CSS to hide from print media + * - Fixed issue with closer button when div { position: relative } is set + * - Fixed leaking issue with multiple containers. Special thanks to Matthew Hanlon! + * + * Changes in 1.2.0 + * - Added message pooling to limit the number of messages appearing at a given time. + * - Closing a notification is now bound to the notification object and triggered by the close button. + * + * Changes in 1.1.2 + * - Added iPhone styled example + * - Fixed possible IE7 bug when determining if the ie6 class shoudl be applied. + * - Added template for the close button, so that it's content could be customized. + * + * Changes in 1.1.1 + * - Fixed CSS styling bug for ie6 caused by a mispelling + * - Changes height restriction on default notifications to min-height + * - Added skinned examples using a variety of images + * - Added the ability to customize the content of the [close all] box + * - Added jTweet, an example of using jGrowl + Twitter + * + * Changes in 1.1.0 + * - Multiple container and instances. + * - Standard $.jGrowl() now wraps $.fn.jGrowl() by first establishing a generic jGrowl container. + * - Instance methods of a jGrowl container can be called by $.fn.jGrowl(methodName) + * - Added glue preferenced, which allows notifications to be inserted before or after nodes in the container + * - Added new log callback which is called before anything is done for the notification + * - Corner's attribute are now applied on an individual notification basis. + * + * Changes in 1.0.4 + * - Various CSS fixes so that jGrowl renders correctly in IE6. + * + * Changes in 1.0.3 + * - Fixed bug with options persisting across notifications + * - Fixed theme application bug + * - Simplified some selectors and manipulations. + * - Added beforeOpen and beforeClose callbacks + * - Reorganized some lines of code to be more readable + * - Removed unnecessary this.defaults context + * - If corners plugin is present, it's now customizable. + * - Customizable open animation. + * - Customizable close animation. + * - Customizable animation easing. + * - Added customizable positioning (top-left, top-right, bottom-left, bottom-right, center) + * + * Changes in 1.0.2 + * - All CSS styling is now external. + * - Added a theme parameter which specifies a secondary class for styling, such + * that notifications can be customized in appearance on a per message basis. + * - Notification life span is now customizable on a per message basis. + * - Added the ability to disable the global closer, enabled by default. + * - Added callbacks for when a notification is opened or closed. + * - Added callback for the global closer. + * - Customizable animation speed. + * - jGrowl now set itself up and tears itself down. + * + * Changes in 1.0.1: + * - Removed dependency on metadata plugin in favor of .data() + * - Namespaced all events + */ +(function($) { + + /** jGrowl Wrapper - Establish a base jGrowl Container for compatibility with older releases. **/ + $.jGrowl = function( m , o ) { + // To maintain compatibility with older version that only supported one instance we'll create the base container. + if ( $('#jGrowl').size() == 0 ) + $('
                ').addClass( (o && o.position) ? o.position : $.jGrowl.defaults.position ).appendTo('body'); + + // Create a notification on the container. + $('#jGrowl').jGrowl(m,o); + }; + + + /** Raise jGrowl Notification on a jGrowl Container **/ + $.fn.jGrowl = function( m , o ) { + if ( $.isFunction(this.each) ) { + var args = arguments; + + return this.each(function() { + var self = this; + + /** Create a jGrowl Instance on the Container if it does not exist **/ + if ( $(this).data('jGrowl.instance') == undefined ) { + $(this).data('jGrowl.instance', $.extend( new $.fn.jGrowl(), { notifications: [], element: null, interval: null } )); + $(this).data('jGrowl.instance').startup( this ); + } + + /** Optionally call jGrowl instance methods, or just raise a normal notification **/ + if ( $.isFunction($(this).data('jGrowl.instance')[m]) ) { + $(this).data('jGrowl.instance')[m].apply( $(this).data('jGrowl.instance') , $.makeArray(args).slice(1) ); + } else { + $(this).data('jGrowl.instance').create( m , o ); + } + }); + }; + }; + + $.extend( $.fn.jGrowl.prototype , { + + /** Default JGrowl Settings **/ + defaults: { + pool: 0, + header: '', + group: '', + sticky: false, + position: 'top-right', + glue: 'after', + theme: 'default', + themeState: 'highlight', + corners: '10px', + check: 250, + life: 3000, + closeDuration: 'normal', + openDuration: 'normal', + easing: 'swing', + closer: true, + closeTemplate: '×', + closerTemplate: '
                [ close all ]
                ', + log: function(e,m,o) {}, + beforeOpen: function(e,m,o) {}, + afterOpen: function(e,m,o) {}, + open: function(e,m,o) {}, + beforeClose: function(e,m,o) {}, + close: function(e,m,o) {}, + animateOpen: { + opacity: 'show' + }, + animateClose: { + opacity: 'hide' + } + }, + + notifications: [], + + /** jGrowl Container Node **/ + element: null, + + /** Interval Function **/ + interval: null, + + /** Create a Notification **/ + create: function( message , o ) { + var o = $.extend({}, this.defaults, o); + + /* To keep backward compatibility with 1.24 and earlier, honor 'speed' if the user has set it */ + if (typeof o.speed !== 'undefined') { + o.openDuration = o.speed; + o.closeDuration = o.speed; + } + + this.notifications.push({ message: message , options: o }); + + o.log.apply( this.element , [this.element,message,o] ); + }, + + render: function( notification ) { + var self = this; + var message = notification.message; + var o = notification.options; + + // Support for jQuery theme-states, if this is not used it displays a widget header + o.themeState = (o.themeState == '') ? '' : 'ui-state-' + o.themeState; + + var notification = $( + '
                ' + + '
                ' + o.closeTemplate + '
                ' + + '
                ' + o.header + '
                ' + + '
                ' + message + '
                ' + ).data("jGrowl", o).addClass(o.theme).children('div.jGrowl-close').bind("click.jGrowl", function() { + $(this).parent().trigger('jGrowl.close'); + }).parent(); + + + /** Notification Actions **/ + $(notification).bind("mouseover.jGrowl", function() { + $('div.jGrowl-notification', self.element).data("jGrowl.pause", true); + }).bind("mouseout.jGrowl", function() { + $('div.jGrowl-notification', self.element).data("jGrowl.pause", false); + }).bind('jGrowl.beforeOpen', function() { + if ( o.beforeOpen.apply( notification , [notification,message,o,self.element] ) != false ) { + $(this).trigger('jGrowl.open'); + } + }).bind('jGrowl.open', function() { + if ( o.open.apply( notification , [notification,message,o,self.element] ) != false ) { + if ( o.glue == 'after' ) { + $('div.jGrowl-notification:last', self.element).after(notification); + } else { + $('div.jGrowl-notification:first', self.element).before(notification); + } + + $(this).animate(o.animateOpen, o.openDuration, o.easing, function() { + // Fixes some anti-aliasing issues with IE filters. + if ($.browser.msie && (parseInt($(this).css('opacity'), 10) === 1 || parseInt($(this).css('opacity'), 10) === 0)) + this.style.removeAttribute('filter'); + + if ( $(this).data("jGrowl") != null ) // Happens when a notification is closing before it's open. + $(this).data("jGrowl").created = new Date(); + + $(this).trigger('jGrowl.afterOpen'); + }); + } + }).bind('jGrowl.afterOpen', function() { + o.afterOpen.apply( notification , [notification,message,o,self.element] ); + }).bind('jGrowl.beforeClose', function() { + if ( o.beforeClose.apply( notification , [notification,message,o,self.element] ) != false ) + $(this).trigger('jGrowl.close'); + }).bind('jGrowl.close', function() { + // Pause the notification, lest during the course of animation another close event gets called. + $(this).data('jGrowl.pause', true); + $(this).animate(o.animateClose, o.closeDuration, o.easing, function() { + if ( $.isFunction(o.close) ) { + if ( o.close.apply( notification , [notification,message,o,self.element] ) !== false ) + $(this).remove(); + } else { + $(this).remove(); + } + }); + }).trigger('jGrowl.beforeOpen'); + + /** Optional Corners Plugin **/ + if ( o.corners != '' && $.fn.corner != undefined ) $(notification).corner( o.corners ); + + /** Add a Global Closer if more than one notification exists **/ + if ( $('div.jGrowl-notification:parent', self.element).size() > 1 && + $('div.jGrowl-closer', self.element).size() == 0 && this.defaults.closer != false ) { + $(this.defaults.closerTemplate).addClass('jGrowl-closer ' + this.defaults.themeState + ' ui-corner-all').addClass(this.defaults.theme) + .appendTo(self.element).animate(this.defaults.animateOpen, this.defaults.speed, this.defaults.easing) + .bind("click.jGrowl", function() { + $(this).siblings().trigger("jGrowl.beforeClose"); + + if ( $.isFunction( self.defaults.closer ) ) { + self.defaults.closer.apply( $(this).parent()[0] , [$(this).parent()[0]] ); + } + }); + }; + }, + + /** Update the jGrowl Container, removing old jGrowl notifications **/ + update: function() { + $(this.element).find('div.jGrowl-notification:parent').each( function() { + if ( $(this).data("jGrowl") != undefined && $(this).data("jGrowl").created != undefined && + ($(this).data("jGrowl").created.getTime() + parseInt($(this).data("jGrowl").life)) < (new Date()).getTime() && + $(this).data("jGrowl").sticky != true && + ($(this).data("jGrowl.pause") == undefined || $(this).data("jGrowl.pause") != true) ) { + + // Pause the notification, lest during the course of animation another close event gets called. + $(this).trigger('jGrowl.beforeClose'); + } + }); + + if ( this.notifications.length > 0 && + (this.defaults.pool == 0 || $(this.element).find('div.jGrowl-notification:parent').size() < this.defaults.pool) ) + this.render( this.notifications.shift() ); + + if ( $(this.element).find('div.jGrowl-notification:parent').size() < 2 ) { + $(this.element).find('div.jGrowl-closer').animate(this.defaults.animateClose, this.defaults.speed, this.defaults.easing, function() { + $(this).remove(); + }); + } + }, + + /** Setup the jGrowl Notification Container **/ + startup: function(e) { + this.element = $(e).addClass('jGrowl').append('
                '); + this.interval = setInterval( function() { + $(e).data('jGrowl.instance').update(); + }, parseInt(this.defaults.check)); + + if ($.browser.msie && parseInt($.browser.version) < 7 && !window["XMLHttpRequest"]) { + $(this.element).addClass('ie6'); + } + }, + + /** Shutdown jGrowl, removing it and clearing the interval **/ + shutdown: function() { + $(this.element).removeClass('jGrowl').find('div.jGrowl-notification').remove(); + clearInterval( this.interval ); + }, + + close: function() { + $(this.element).find('div.jGrowl-notification').each(function(){ + $(this).trigger('jGrowl.beforeClose'); + }); + } + }); + + /** Reference the Defaults Object for compatibility with older versions of jGrowl **/ + $.jGrowl.defaults = $.fn.jGrowl.prototype.defaults; + +})(jQuery); \ No newline at end of file diff --git a/src/js/plugins/jquery.validate.min.js b/src/js/plugins/jquery.validate.min.js new file mode 100644 index 0000000..edd6452 --- /dev/null +++ b/src/js/plugins/jquery.validate.min.js @@ -0,0 +1,51 @@ +/** + * jQuery Validation Plugin 1.9.0 + * + * http://bassistance.de/jquery-plugins/jquery-plugin-validation/ + * http://docs.jquery.com/Plugins/Validation + * + * Copyright (c) 2006 - 2011 Jörn Zaefferer + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ +(function(c){c.extend(c.fn,{validate:function(a){if(this.length){var b=c.data(this[0],"validator");if(b)return b;this.attr("novalidate","novalidate");b=new c.validator(a,this[0]);c.data(this[0],"validator",b);if(b.settings.onsubmit){a=this.find("input, button");a.filter(".cancel").click(function(){b.cancelSubmit=true});b.settings.submitHandler&&a.filter(":submit").click(function(){b.submitButton=this});this.submit(function(d){function e(){if(b.settings.submitHandler){if(b.submitButton)var f=c("").attr("name", +b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm);b.settings.submitHandler.call(b,b.currentForm);b.submitButton&&f.remove();return false}return true}b.settings.debug&&d.preventDefault();if(b.cancelSubmit){b.cancelSubmit=false;return e()}if(b.form()){if(b.pendingRequest){b.formSubmitted=true;return false}return e()}else{b.focusInvalid();return false}})}return b}else a&&a.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(c(this[0]).is("form"))return this.validate().form(); +else{var a=true,b=c(this[0].form).validate();this.each(function(){a&=b.element(this)});return a}},removeAttrs:function(a){var b={},d=this;c.each(a.split(/\s/),function(e,f){b[f]=d.attr(f);d.removeAttr(f)});return b},rules:function(a,b){var d=this[0];if(a){var e=c.data(d.form,"validator").settings,f=e.rules,g=c.validator.staticRules(d);switch(a){case "add":c.extend(g,c.validator.normalizeRule(b));f[d.name]=g;if(b.messages)e.messages[d.name]=c.extend(e.messages[d.name],b.messages);break;case "remove":if(!b){delete f[d.name]; +return g}var h={};c.each(b.split(/\s/),function(j,i){h[i]=g[i];delete g[i]});return h}}d=c.validator.normalizeRules(c.extend({},c.validator.metadataRules(d),c.validator.classRules(d),c.validator.attributeRules(d),c.validator.staticRules(d)),d);if(d.required){e=d.required;delete d.required;d=c.extend({required:e},d)}return d}});c.extend(c.expr[":"],{blank:function(a){return!c.trim(""+a.value)},filled:function(a){return!!c.trim(""+a.value)},unchecked:function(a){return!a.checked}});c.validator=function(a, +b){this.settings=c.extend(true,{},c.validator.defaults,a);this.currentForm=b;this.init()};c.validator.format=function(a,b){if(arguments.length==1)return function(){var d=c.makeArray(arguments);d.unshift(a);return c.validator.format.apply(this,d)};if(arguments.length>2&&b.constructor!=Array)b=c.makeArray(arguments).slice(1);if(b.constructor!=Array)b=[b];c.each(b,function(d,e){a=a.replace(RegExp("\\{"+d+"\\}","g"),e)});return a};c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error", +validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(a){this.lastActive=a;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(a)).hide()}},onfocusout:function(a){if(!this.checkable(a)&&(a.name in this.submitted||!this.optional(a)))this.element(a)}, +onkeyup:function(a){if(a.name in this.submitted||a==this.lastElement)this.element(a)},onclick:function(a){if(a.name in this.submitted)this.element(a);else a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).addClass(b).removeClass(d):c(a).addClass(b).removeClass(d)},unhighlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).removeClass(b).addClass(d):c(a).removeClass(b).addClass(d)}},setDefaults:function(a){c.extend(c.validator.defaults, +a)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:c.validator.format("Please enter no more than {0} characters."), +minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(e){var f=c.data(this[0].form,"validator"),g="on"+e.type.replace(/^validate/, +"");f.settings[g]&&f.settings[g].call(f,this[0],e)}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=this.groups={};c.each(this.settings.groups,function(e,f){c.each(f.split(/\s/),function(g,h){b[h]=e})});var d= +this.settings.rules;c.each(d,function(e,f){d[e]=c.validator.normalizeRule(f)});c(this.currentForm).validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",a).validateDelegate("[type='radio'], [type='checkbox'], select, option","click", +a);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(a){this.lastElement= +a=this.validationTargetFor(this.clean(a));this.prepareElement(a);this.currentElements=c(a);var b=this.check(a);if(b)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return b},showErrors:function(a){if(a){c.extend(this.errorMap,a);this.errorList=[];for(var b in a)this.errorList.push({message:a[b],element:this.findByName(b)[0]});this.successList=c.grep(this.successList,function(d){return!(d.name in a)})}this.settings.showErrors? +this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b=0,d;for(d in a)b++;return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()== +0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&c.grep(this.errorList,function(b){return b.element.name==a.name}).length==1&&a},elements:function(){var a=this,b={};return c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&& +a.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!a.objectLength(c(this).rules()))return false;return b[this.name]=true})},clean:function(a){return c(a)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)}, +prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(a){a=this.validationTargetFor(this.clean(a));var b=c(a).rules(),d=false,e;for(e in b){var f={method:e,parameters:b[e]};try{var g=c.validator.methods[e].call(this,a.value.replace(/\r/g,""),a,f.parameters);if(g=="dependency-mismatch")d=true;else{d=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!g){this.formatAndAdd(a,f);return false}}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+ +a.id+", check the '"+f.method+"' method",h);throw h;}}if(!d){this.objectLength(b)&&this.successList.push(a);return true}},customMetaMessage:function(a,b){if(c.metadata){var d=this.settings.meta?c(a).metadata()[this.settings.meta]:c(a).metadata();return d&&d.messages&&d.messages[b]}},customMessage:function(a,b){var d=this.settings.messages[a];return d&&(d.constructor==String?d:d[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+a.name+"
                ")},formatAndAdd:function(a,b){var d=this.defaultMessage(a,b.method),e=/\$?\{(\d+)\}/g;if(typeof d=="function")d=d.call(this,b.parameters,a);else if(e.test(d))d=jQuery.format(d.replace(e,"{$1}"),b.parameters);this.errorList.push({message:d,element:a});this.errorMap[a.name]=d;this.submitted[a.name]= +d},addWrapper:function(a){if(this.settings.wrapper)a=a.add(a.parent(this.settings.wrapper));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var b=this.errorList[a];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]); +if(this.settings.unhighlight){a=0;for(b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return c(this.errorList).map(function(){return this.element})},showLabel:function(a,b){var d=this.errorsFor(a);if(d.length){d.removeClass(this.settings.validClass).addClass(this.settings.errorClass); +d.attr("generated")&&d.html(b)}else{d=c("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(b||"");if(this.settings.wrapper)d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,c(a)):d.insertAfter(a))}if(!b&&this.settings.success){d.text("");typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow= +this.toShow.add(d)},errorsFor:function(a){var b=this.idOrName(a);return this.errors().filter(function(){return c(this).attr("for")==b})},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(a){if(this.checkable(a))a=this.findByName(a.name).not(this.settings.ignore)[0];return a},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(a){var b=this.currentForm;return c(document.getElementsByName(a)).map(function(d, +e){return e.form==b&&e.name==a&&e||null})},getLength:function(a,b){switch(b.nodeName.toLowerCase()){case "select":return c("option:selected",b).length;case "input":if(this.checkable(b))return this.findByName(b.name).filter(":checked").length}return a.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):true},dependTypes:{"boolean":function(a){return a},string:function(a,b){return!!c(a,b.form).length},"function":function(a,b){return a(b)}},optional:function(a){return!c.validator.methods.required.call(this, +c.trim(a.value),a)&&"dependency-mismatch"},startRequest:function(a){if(!this.pending[a.name]){this.pendingRequest++;this.pending[a.name]=true}},stopRequest:function(a,b){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[a.name];if(b&&this.pendingRequest==0&&this.formSubmitted&&this.form()){c(this.currentForm).submit();this.formSubmitted=false}else if(!b&&this.pendingRequest==0&&this.formSubmitted){c(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted= +false}},previousValue:function(a){return c.data(a,"previousValue")||c.data(a,"previousValue",{old:null,valid:true,message:this.defaultMessage(a,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(a,b){a.constructor==String?this.classRuleSettings[a]=b:c.extend(this.classRuleSettings, +a)},classRules:function(a){var b={};(a=c(a).attr("class"))&&c.each(a.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(b,c.validator.classRuleSettings[this])});return b},attributeRules:function(a){var b={};a=c(a);for(var d in c.validator.methods){var e;if(e=d==="required"&&typeof c.fn.prop==="function"?a.prop(d):a.attr(d))b[d]=e;else if(a[0].getAttribute("type")===d)b[d]=true}b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)&&delete b.maxlength;return b},metadataRules:function(a){if(!c.metadata)return{}; +var b=c.data(a.form,"validator").settings.meta;return b?c(a).metadata()[b]:c(a).metadata()},staticRules:function(a){var b={},d=c.data(a.form,"validator");if(d.settings.rules)b=c.validator.normalizeRule(d.settings.rules[a.name])||{};return b},normalizeRules:function(a,b){c.each(a,function(d,e){if(e===false)delete a[d];else if(e.param||e.depends){var f=true;switch(typeof e.depends){case "string":f=!!c(e.depends,b.form).length;break;case "function":f=e.depends.call(b,b)}if(f)a[d]=e.param!==undefined? +e.param:true;else delete a[d]}});c.each(a,function(d,e){a[d]=c.isFunction(e)?e(b):e});c.each(["minlength","maxlength","min","max"],function(){if(a[this])a[this]=Number(a[this])});c.each(["rangelength","range"],function(){if(a[this])a[this]=[Number(a[this][0]),Number(a[this][1])]});if(c.validator.autoCreateRanges){if(a.min&&a.max){a.range=[a.min,a.max];delete a.min;delete a.max}if(a.minlength&&a.maxlength){a.rangelength=[a.minlength,a.maxlength];delete a.minlength;delete a.maxlength}}a.messages&&delete a.messages; +return a},normalizeRule:function(a){if(typeof a=="string"){var b={};c.each(a.split(/\s/),function(){b[this]=true});a=b}return a},addMethod:function(a,b,d){c.validator.methods[a]=b;c.validator.messages[a]=d!=undefined?d:c.validator.messages[a];b.length<3&&c.validator.addClassRules(a,c.validator.normalizeRule(a))},methods:{required:function(a,b,d){if(!this.depend(d,b))return"dependency-mismatch";switch(b.nodeName.toLowerCase()){case "select":return(a=c(b).val())&&a.length>0;case "input":if(this.checkable(b))return this.getLength(a, +b)>0;default:return c.trim(a).length>0}},remote:function(a,b,d){if(this.optional(b))return"dependency-mismatch";var e=this.previousValue(b);this.settings.messages[b.name]||(this.settings.messages[b.name]={});e.originalMessage=this.settings.messages[b.name].remote;this.settings.messages[b.name].remote=e.message;d=typeof d=="string"&&{url:d}||d;if(this.pending[b.name])return"pending";if(e.old===a)return e.valid;e.old=a;var f=this;this.startRequest(b);var g={};g[b.name]=a;c.ajax(c.extend(true,{url:d, +mode:"abort",port:"validate"+b.name,dataType:"json",data:g,success:function(h){f.settings.messages[b.name].remote=e.originalMessage;var j=h===true;if(j){var i=f.formSubmitted;f.prepareElement(b);f.formSubmitted=i;f.successList.push(b);f.showErrors()}else{i={};h=h||f.defaultMessage(b,"remote");i[b.name]=e.message=c.isFunction(h)?h(a):h;f.showErrors(i)}e.valid=j;f.stopRequest(b,j)}},d));return"pending"},minlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)>=d},maxlength:function(a, +b,d){return this.optional(b)||this.getLength(c.trim(a),b)<=d},rangelength:function(a,b,d){a=this.getLength(c.trim(a),b);return this.optional(b)||a>=d[0]&&a<=d[1]},min:function(a,b,d){return this.optional(b)||a>=d},max:function(a,b,d){return this.optional(b)||a<=d},range:function(a,b,d){return this.optional(b)||a>=d[0]&&a<=d[1]},email:function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(a)}, +url:function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)}, +date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 -]+/.test(a))return false;var d=0,e=0,f=false;a=a.replace(/\D/g,"");for(var g=a.length-1;g>= +0;g--){e=a.charAt(g);e=parseInt(e,10);if(f)if((e*=2)>9)e-=9;d+=e;f=!f}return d%10==0},accept:function(a,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||a.match(RegExp(".("+d+")$","i"))},equalTo:function(a,b,d){d=c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){c(b).valid()});return a==d.val()}}});c.format=c.validator.format})(jQuery); +(function(c){var a={};if(c.ajaxPrefilter)c.ajaxPrefilter(function(d,e,f){e=d.port;if(d.mode=="abort"){a[e]&&a[e].abort();a[e]=f}});else{var b=c.ajax;c.ajax=function(d){var e=("port"in d?d:c.ajaxSettings).port;if(("mode"in d?d:c.ajaxSettings).mode=="abort"){a[e]&&a[e].abort();return a[e]=b.apply(this,arguments)}return b.apply(this,arguments)}}})(jQuery); +(function(c){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.handle.call(this,e)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)},handler:function(e){arguments[0]=c.event.fix(e);arguments[0].type=b;return c.event.handle.apply(this,arguments)}}});c.extend(c.fn,{validateDelegate:function(a, +b,d){return this.bind(b,function(e){var f=c(e.target);if(f.is(a))return d.apply(f,arguments)})}})})(jQuery); diff --git a/src/js/plugins/wysiwyg/jquery.wysiwyg.js b/src/js/plugins/wysiwyg/jquery.wysiwyg.js new file mode 100644 index 0000000..9dd82fd --- /dev/null +++ b/src/js/plugins/wysiwyg/jquery.wysiwyg.js @@ -0,0 +1,2454 @@ +/** + * WYSIWYG - jQuery plugin 0.97 + * (0.97.2 - From infinity) + * + * Copyright (c) 2008-2009 Juan M Martinez, 2010-2011 Akzhan Abdulin and all contributors + * https://github.com/akzhan/jwysiwyg + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ + +/*jslint browser: true, forin: true */ + +(function ($) { + "use strict"; + /* Wysiwyg namespace: private properties and methods */ + + var console = window.console ? window.console : { + log: $.noop, + error: function (msg) { + $.error(msg); + } + }; + var supportsProp = (('prop' in $.fn) && ('removeProp' in $.fn)); + + function Wysiwyg() { + // - the item is added by this.ui.appendControls and then appendItem + // - click triggers this.triggerControl + // cmd or[key] - designMode exec function name + // tags - activates control for these tags (@see checkTargets) + // css - activates control if one of css is applied + this.controls = { + bold: { + groupIndex: 0, + visible: true, + tags: ["b", "strong"], + css: { + fontWeight: "bold" + }, + tooltip: "Bold", + hotkey: {"ctrl": 1, "key": 66} + }, + + copy: { + groupIndex: 8, + visible: false, + tooltip: "Copy" + }, + + createLink: { + groupIndex: 6, + visible: true, + exec: function () { + var self = this; + if ($.wysiwyg.controls && $.wysiwyg.controls.link) { + $.wysiwyg.controls.link.init(this); + } else if ($.wysiwyg.autoload) { + $.wysiwyg.autoload.control("wysiwyg.link.js", function () { + self.controls.createLink.exec.apply(self); + }); + } else { + console.error("$.wysiwyg.controls.link not defined. You need to include wysiwyg.link.js file"); + } + }, + tags: ["a"], + tooltip: "Create link" + }, + + cut: { + groupIndex: 8, + visible: false, + tooltip: "Cut" + }, + + decreaseFontSize: { + groupIndex: 9, + visible: false, + tags: ["small"], + tooltip: "Decrease font size", + exec: function () { + this.decreaseFontSize(); + } + }, + + h1: { + groupIndex: 7, + visible: true, + className: "h1", + command: ($.browser.msie || $.browser.safari) ? "FormatBlock" : "heading", + "arguments": ($.browser.msie || $.browser.safari) ? "

                " : "h1", + tags: ["h1"], + tooltip: "Header 1" + }, + + h2: { + groupIndex: 7, + visible: true, + className: "h2", + command: ($.browser.msie || $.browser.safari) ? "FormatBlock" : "heading", + "arguments": ($.browser.msie || $.browser.safari) ? "

                " : "h2", + tags: ["h2"], + tooltip: "Header 2" + }, + + h3: { + groupIndex: 7, + visible: true, + className: "h3", + command: ($.browser.msie || $.browser.safari) ? "FormatBlock" : "heading", + "arguments": ($.browser.msie || $.browser.safari) ? "

                " : "h3", + tags: ["h3"], + tooltip: "Header 3" + }, + + highlight: { + tooltip: "Highlight", + className: "highlight", + groupIndex: 1, + visible: false, + css: { + backgroundColor: "rgb(255, 255, 102)" + }, + exec: function () { + var command, node, selection, args; + + if ($.browser.msie || $.browser.safari) { + command = "backcolor"; + } else { + command = "hilitecolor"; + } + + if ($.browser.msie) { + node = this.getInternalRange().parentElement(); + } else { + selection = this.getInternalSelection(); + node = selection.extentNode || selection.focusNode; + + while (node.style === undefined) { + node = node.parentNode; + if (node.tagName && node.tagName.toLowerCase() === "body") { + return; + } + } + } + + if (node.style.backgroundColor === "rgb(255, 255, 102)" || + node.style.backgroundColor === "#ffff66") { + args = "#ffffff"; + } else { + args = "#ffff66"; + } + + this.editorDoc.execCommand(command, false, args); + } + }, + + html: { + groupIndex: 10, + visible: false, + exec: function () { + var elementHeight; + + if (this.options.resizeOptions && $.fn.resizable) { + elementHeight = this.element.height(); + } + + if (this.viewHTML) { //textarea is shown + this.setContent(this.original.value); + + $(this.original).hide(); + this.editor.show(); + + if (this.options.resizeOptions && $.fn.resizable) { + // if element.height still the same after frame was shown + if (elementHeight === this.element.height()) { + this.element.height(elementHeight + this.editor.height()); + } + + this.element.resizable($.extend(true, { + alsoResize: this.editor + }, this.options.resizeOptions)); + } + + this.ui.toolbar.find("li").each(function () { + var li = $(this); + + if (li.hasClass("html")) { + li.removeClass("active"); + } else { + li.removeClass('disabled'); + } + }); + } else { //wysiwyg is shown + this.saveContent(); + + $(this.original).css({ + width: this.element.outerWidth() - 6, + height: this.element.height() - this.ui.toolbar.height() - 6, + resize: "none" + }).show(); + this.editor.hide(); + + if (this.options.resizeOptions && $.fn.resizable) { + // if element.height still the same after frame was hidden + if (elementHeight === this.element.height()) { + this.element.height(this.ui.toolbar.height()); + } + + this.element.resizable("destroy"); + } + + this.ui.toolbar.find("li").each(function () { + var li = $(this); + + if (li.hasClass("html")) { + li.addClass("active"); + } else { + if (false === li.hasClass("fullscreen")) { + li.removeClass("active").addClass('disabled'); + } + } + }); + } + + this.viewHTML = !(this.viewHTML); + }, + tooltip: "View source code" + }, + + increaseFontSize: { + groupIndex: 9, + visible: false, + tags: ["big"], + tooltip: "Increase font size", + exec: function () { + this.increaseFontSize(); + } + }, + + indent: { + groupIndex: 2, + visible: true, + tooltip: "Indent" + }, + + insertHorizontalRule: { + groupIndex: 6, + visible: true, + tags: ["hr"], + tooltip: "Insert Horizontal Rule" + }, + + insertImage: { + groupIndex: 6, + visible: true, + exec: function () { + var self = this; + + if ($.wysiwyg.controls && $.wysiwyg.controls.image) { + $.wysiwyg.controls.image.init(this); + } else if ($.wysiwyg.autoload) { + $.wysiwyg.autoload.control("wysiwyg.image.js", function () { + self.controls.insertImage.exec.apply(self); + }); + } else { + console.error("$.wysiwyg.controls.image not defined. You need to include wysiwyg.image.js file"); + } + }, + tags: ["img"], + tooltip: "Insert image" + }, + + insertOrderedList: { + groupIndex: 5, + visible: true, + tags: ["ol"], + tooltip: "Insert Ordered List" + }, + + insertTable: { + groupIndex: 6, + visible: true, + exec: function () { + var self = this; + + if ($.wysiwyg.controls && $.wysiwyg.controls.table) { + $.wysiwyg.controls.table(this); + } else if ($.wysiwyg.autoload) { + $.wysiwyg.autoload.control("wysiwyg.table.js", function () { + self.controls.insertTable.exec.apply(self); + }); + } else { + console.error("$.wysiwyg.controls.table not defined. You need to include wysiwyg.table.js file"); + } + }, + tags: ["table"], + tooltip: "Insert table" + }, + + insertUnorderedList: { + groupIndex: 5, + visible: true, + tags: ["ul"], + tooltip: "Insert Unordered List" + }, + + italic: { + groupIndex: 0, + visible: true, + tags: ["i", "em"], + css: { + fontStyle: "italic" + }, + tooltip: "Italic", + hotkey: {"ctrl": 1, "key": 73} + }, + + justifyCenter: { + groupIndex: 1, + visible: true, + tags: ["center"], + css: { + textAlign: "center" + }, + tooltip: "Justify Center" + }, + + justifyFull: { + groupIndex: 1, + visible: true, + css: { + textAlign: "justify" + }, + tooltip: "Justify Full" + }, + + justifyLeft: { + visible: true, + groupIndex: 1, + css: { + textAlign: "left" + }, + tooltip: "Justify Left" + }, + + justifyRight: { + groupIndex: 1, + visible: true, + css: { + textAlign: "right" + }, + tooltip: "Justify Right" + }, + + ltr: { + groupIndex: 10, + visible: false, + exec: function () { + var p = this.dom.getElement("p"); + + if (!p) { + return false; + } + + $(p).attr("dir", "ltr"); + return true; + }, + tooltip : "Left to Right" + }, + + outdent: { + groupIndex: 2, + visible: true, + tooltip: "Outdent" + }, + + paragraph: { + groupIndex: 7, + visible: false, + className: "paragraph", + command: "FormatBlock", + "arguments": ($.browser.msie || $.browser.safari) ? "

                " : "p", + tags: ["p"], + tooltip: "Paragraph" + }, + + paste: { + groupIndex: 8, + visible: false, + tooltip: "Paste" + }, + + redo: { + groupIndex: 4, + visible: true, + tooltip: "Redo" + }, + + removeFormat: { + groupIndex: 10, + visible: true, + exec: function () { + this.removeFormat(); + }, + tooltip: "Remove formatting" + }, + + rtl: { + groupIndex: 10, + visible: false, + exec: function () { + var p = this.dom.getElement("p"); + + if (!p) { + return false; + } + + $(p).attr("dir", "rtl"); + return true; + }, + tooltip : "Right to Left" + }, + + strikeThrough: { + groupIndex: 0, + visible: true, + tags: ["s", "strike"], + css: { + textDecoration: "line-through" + }, + tooltip: "Strike-through" + }, + + subscript: { + groupIndex: 3, + visible: true, + tags: ["sub"], + tooltip: "Subscript" + }, + + superscript: { + groupIndex: 3, + visible: true, + tags: ["sup"], + tooltip: "Superscript" + }, + + underline: { + groupIndex: 0, + visible: true, + tags: ["u"], + css: { + textDecoration: "underline" + }, + tooltip: "Underline", + hotkey: {"ctrl": 1, "key": 85} + }, + + undo: { + groupIndex: 4, + visible: true, + tooltip: "Undo" + }, + + code: { + visible : true, + groupIndex: 6, + tooltip: "Code snippet", + exec: function () { + var range = this.getInternalRange(), + common = $(range.commonAncestorContainer), + $nodeName = range.commonAncestorContainer.nodeName.toLowerCase(); + if (common.parent("code").length) { + common.unwrap(); + } else { + if ($nodeName !== "body") { + common.wrap(""); + } + } + } + }, + + cssWrap: { + visible : false, + groupIndex: 6, + tooltip: "CSS Wrapper", + exec: function () { + $.wysiwyg.controls.cssWrap.init(this); + } + } + + }; + + this.defaults = { +html: '', + debug: false, + controls: {}, + css: {}, + events: {}, + autoGrow: false, + autoSave: true, + brIE: true, // http://code.google.com/p/jwysiwyg/issues/detail?id=15 + formHeight: 270, + formWidth: 440, + iFrameClass: null, + initialContent: "

                Initial content

                ", + maxHeight: 10000, // see autoGrow + maxLength: 0, + messages: { + nonSelection: "Select the text you wish to link" + }, + toolbarHtml: '', + removeHeadings: false, + replaceDivWithP: false, + resizeOptions: false, + rmUnusedControls: false, // https://github.com/akzhan/jwysiwyg/issues/52 + rmUnwantedBr: true, // http://code.google.com/p/jwysiwyg/issues/detail?id=11 + tableFiller: "Lorem ipsum", + initialMinHeight: null, + + controlImage: { + forceRelativeUrls: false + }, + + controlLink: { + forceRelativeUrls: false + }, + + plugins: { // placeholder for plugins settings + autoload: false, + i18n: false, + rmFormat: { + rmMsWordMarkup: false + } + }, + + dialog : "default" + }; + + //these properties are set from control hashes + this.availableControlProperties = [ + "arguments", + "callback", + "className", + "command", + "css", + "custom", + "exec", + "groupIndex", + "hotkey", + "icon", + "tags", + "tooltip", + "visible" + ]; + + this.editor = null; //jquery iframe holder + this.editorDoc = null; + this.element = null; + this.options = {}; + this.original = null; + this.savedRange = null; + this.timers = []; + this.validKeyCodes = [8, 9, 13, 16, 17, 18, 19, 20, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46]; + + this.isDestroyed = false; + + this.dom = { // DOM related properties and methods + ie: { + parent: null // link to dom + }, + w3c: { + parent: null // link to dom + } + }; + this.dom.parent = this; + this.dom.ie.parent = this.dom; + this.dom.w3c.parent = this.dom; + + this.ui = {}; // UI related properties and methods + this.ui.self = this; + this.ui.toolbar = null; + this.ui.initialHeight = null; // ui.grow + + this.dom.getAncestor = function (element, filterTagName) { + filterTagName = filterTagName.toLowerCase(); + + while (element && typeof element.tagName != "undefined" && "body" !== element.tagName.toLowerCase()) { + if (filterTagName === element.tagName.toLowerCase()) { + return element; + } + + element = element.parentNode; + } + if(!element.tagName && (element.previousSibling || element.nextSibling)) { + if(element.previousSibling) { + if(element.previousSibling.tagName.toLowerCase() == filterTagName) { + return element.previousSibling; + } + } + if(element.nextSibling) { + if(element.nextSibling.tagName.toLowerCase() == filterTagName) { + return element.nextSibling; + } + } + } + + return null; + }; + + this.dom.getElement = function (filterTagName) { + var dom = this; + + filterTagName = filterTagName.toLowerCase(); + + if (window.getSelection) { + return dom.w3c.getElement(filterTagName); + } else { + return dom.ie.getElement(filterTagName); + } + }; + + this.dom.ie.getElement = function (filterTagName) { + var dom = this.parent, + selection = dom.parent.getInternalSelection(), + range = selection.createRange(), + element; + + if ("Control" === selection.type) { + // control selection + if (1 === range.length) { + element = range.item(0); + } else { + // multiple control selection + return null; + } + } else { + element = range.parentElement(); + } + + return dom.getAncestor(element, filterTagName); + }; + + this.dom.w3c.getElement = function (filterTagName) { + var dom = this.parent, + range = dom.parent.getInternalRange(), + element; + + if (!range) { + return null; + } + + element = range.commonAncestorContainer; + + if (3 === element.nodeType) { + element = element.parentNode; + } + + // if startContainer not Text, Comment, or CDATASection element then + // startOffset is the number of child nodes between the start of the + // startContainer and the boundary point of the Range + if (element === range.startContainer) { + element = element.childNodes[range.startOffset]; + } + + if(!element.tagName && (element.previousSibiling || element.nextSibling)) { + if(element.previousSibiling) { + if(element.previousSibiling.tagName.toLowerCase() == filterTagName) { + return element.previousSibiling; + } + } + if(element.nextSibling) { + if(element.nextSibling.tagName.toLowerCase() == filterTagName) { + return element.nextSibling; + } + } + } + + return dom.getAncestor(element, filterTagName); + }; + + this.ui.addHoverClass = function () { + $(this).addClass("wysiwyg-button-hover"); + }; + + this.ui.appendControls = function () { + var ui = this, + self = this.self, + controls = self.parseControls(), + hasVisibleControls = true, // to prevent separator before first item + groups = [], + controlsByGroup = {}, + i, + currentGroupIndex, // jslint wants all vars at top of function + iterateGroup = function (controlName, control) { //called for every group when adding + if (control.groupIndex && currentGroupIndex !== control.groupIndex) { + currentGroupIndex = control.groupIndex; + hasVisibleControls = false; + } + + if (!control.visible) { + return; + } + + if (!hasVisibleControls) { + ui.appendItemSeparator(); + hasVisibleControls = true; + } + + if (control.custom) { + ui.appendItemCustom(controlName, control); + } else { + ui.appendItem(controlName, control); + } + }; + + $.each(controls, function (name, c) { //sort by groupIndex + var index = "empty"; + + if (undefined !== c.groupIndex) { + if ("" === c.groupIndex) { + index = "empty"; + } else { + index = c.groupIndex; + } + } + + if (undefined === controlsByGroup[index]) { + groups.push(index); + controlsByGroup[index] = {}; + } + controlsByGroup[index][name] = c; + }); + + groups.sort(function (a, b) { //just sort group indexes by + if ("number" === typeof (a) && typeof (a) === typeof (b)) { + return (a - b); + } else { + a = a.toString(); + b = b.toString(); + + if (a > b) { + return 1; + } + + if (a === b) { + return 0; + } + + return -1; + } + }); + + if (0 < groups.length) { + // set to first index in groups to proper placement of separator + currentGroupIndex = groups[0]; + } + + for (i = 0; i < groups.length; i += 1) { + $.each(controlsByGroup[groups[i]], iterateGroup); + } + }; + + this.ui.appendItem = function (name, control) { + var self = this.self, + className = control.className || control.command || name || "empty", + tooltip = control.tooltip || control.command || name || ""; + + return $('
              • ' + (className) + "
              • ") + .addClass(className) + .attr("title", tooltip) + .hover(this.addHoverClass, this.removeHoverClass) + .click(function (event) { + if ($(this).hasClass("disabled")) { + return false; + } + + self.triggerControl.apply(self, [name, control]); + + /** + * @link https://github.com/akzhan/jwysiwyg/issues/219 + */ + var $target = $(event.target); + for (var controlName in self.controls) { + if ($target.hasClass(controlName)) { + self.ui.toolbar.find("." + controlName).toggleClass("active"); + self.editorDoc.rememberCommand = true; + break; + } + } + + this.blur(); + self.ui.returnRange(); + self.ui.focus(); + return true; + }) + .appendTo(self.ui.toolbar); + }; + + this.ui.appendItemCustom = function (name, control) { + var self = this.self, + tooltip = control.tooltip || control.command || name || ""; + + if (control.callback) { + $(window).bind("trigger-" + name + ".wysiwyg", control.callback); + } + + return $('
              • ') + .addClass("custom-command-" + name) + .addClass("wysiwyg-custom-command") + .addClass(name) + .attr("title", tooltip) + .hover(this.addHoverClass, this.removeHoverClass) + .click(function () { + if ($(this).hasClass("disabled")) { + return false; + } + + self.triggerControl.apply(self, [name, control]); + + this.blur(); + self.ui.returnRange(); + self.ui.focus(); + + self.triggerControlCallback(name); + return true; + }) + .appendTo(self.ui.toolbar); + }; + + this.ui.appendItemSeparator = function () { + var self = this.self; + return $('').appendTo(self.ui.toolbar); + }; + + this.autoSaveFunction = function () { + this.saveContent(); + }; + + //called after click in wysiwyg "textarea" + this.ui.checkTargets = function (element) { + var self = this.self; + + //activate controls + $.each(self.options.controls, function (name, control) { + var className = control.className || control.command || name || "empty", + tags, + elm, + css, + el, + checkActiveStatus = function (cssProperty, cssValue) { + var handler; + + if ("function" === typeof (cssValue)) { + handler = cssValue; + if (handler(el.css(cssProperty).toString().toLowerCase(), self)) { + self.ui.toolbar.find("." + className).addClass("active"); + } + } else { + if (el.css(cssProperty).toString().toLowerCase() === cssValue) { + self.ui.toolbar.find("." + className).addClass("active"); + } + } + }; + + if ("fullscreen" !== className) { + self.ui.toolbar.find("." + className).removeClass("active"); + } + + //activate by allowed tags + if (control.tags || (control.options && control.options.tags)) { + tags = control.tags || (control.options && control.options.tags); + + elm = element; + while (elm) { + if (elm.nodeType !== 1) { + break; + } + + if ($.inArray(elm.tagName.toLowerCase(), tags) !== -1) { + self.ui.toolbar.find("." + className).addClass("active"); + } + + elm = elm.parentNode; + } + } + + //activate by supposed css + if (control.css || (control.options && control.options.css)) { + css = control.css || (control.options && control.options.css); + el = $(element); + + while (el) { + if (el[0].nodeType !== 1) { + break; + } + $.each(css, checkActiveStatus); + + el = el.parent(); + } + } + }); + }; + + this.ui.designMode = function () { + var attempts = 3, + self = this.self, + runner; + runner = function (attempts) { + if ("on" === self.editorDoc.designMode) { + if (self.timers.designMode) { + window.clearTimeout(self.timers.designMode); + } + + // IE needs to reget the document element (this.editorDoc) after designMode was set + if (self.innerDocument() !== self.editorDoc) { + self.ui.initFrame(); + } + + return; + } + + try { + self.editorDoc.designMode = "on"; + } catch (e) { + } + + attempts -= 1; + if (attempts > 0) { + self.timers.designMode = window.setTimeout(function () { runner(attempts); }, 100); + } + }; + + runner(attempts); + }; + + this.destroy = function () { + this.isDestroyed = true; + + var i, $form = this.element.closest("form"); + + for (i = 0; i < this.timers.length; i += 1) { + window.clearTimeout(this.timers[i]); + } + + // Remove bindings + $form.unbind(".wysiwyg"); + this.element.remove(); + $.removeData(this.original, "wysiwyg"); + $(this.original).show(); + return this; + }; + + this.getRangeText = function () { + var r = this.getInternalRange(); + + if (r.toString) { + r = r.toString(); + } else if (r.text) { // IE + r = r.text; + } + + return r; + }; + //not used? + this.execute = function (command, arg) { + if (typeof (arg) === "undefined") { + arg = null; + } + this.editorDoc.execCommand(command, false, arg); + }; + + this.extendOptions = function (options) { + var controls = {}; + + /** + * If the user set custom controls, we catch it, and merge with the + * defaults controls later. + */ + if ("object" === typeof options.controls) { + controls = options.controls; + delete options.controls; + } + + options = $.extend(true, {}, this.defaults, options); + options.controls = $.extend(true, {}, controls, this.controls, controls); + + if (options.rmUnusedControls) { + $.each(options.controls, function (controlName) { + if (!controls[controlName]) { + delete options.controls[controlName]; + } + }); + } + + return options; + }; + + this.ui.focus = function () { + var self = this.self; + + self.editor.get(0).contentWindow.focus(); + return self; + }; + + this.ui.returnRange = function () { + var self = this.self, sel; + + if (self.savedRange !== null) { + if (window.getSelection) { //non IE and there is already a selection + sel = window.getSelection(); + if (sel.rangeCount > 0) { + sel.removeAllRanges(); + } + try { + sel.addRange(self.savedRange); + } catch (e) { + console.error(e); + } + } else if (window.document.createRange) { // non IE and no selection + window.getSelection().addRange(self.savedRange); + } else if (window.document.selection) { //IE + self.savedRange.select(); + } + + self.savedRange = null; + } + }; + + this.increaseFontSize = function () { + if ($.browser.mozilla || $.browser.opera) { + this.editorDoc.execCommand("increaseFontSize", false, null); + } else if ($.browser.safari) { + var Range = this.getInternalRange(), + Selection = this.getInternalSelection(), + newNode = this.editorDoc.createElement("big"); + + // If cursor placed on text node + if (true === Range.collapsed && 3 === Range.commonAncestorContainer.nodeType) { + var text = Range.commonAncestorContainer.nodeValue.toString(), + start = text.lastIndexOf(" ", Range.startOffset) + 1, + end = (-1 === text.indexOf(" ", Range.startOffset)) ? text : text.indexOf(" ", Range.startOffset); + + Range.setStart(Range.commonAncestorContainer, start); + Range.setEnd(Range.commonAncestorContainer, end); + + Range.surroundContents(newNode); + Selection.addRange(Range); + } else { + Range.surroundContents(newNode); + Selection.removeAllRanges(); + Selection.addRange(Range); + } + } else { + console.error("Internet Explorer?"); + } + }; + + this.decreaseFontSize = function () { + if ($.browser.mozilla || $.browser.opera) { + this.editorDoc.execCommand("decreaseFontSize", false, null); + } else if ($.browser.safari) { + var Range = this.getInternalRange(), + Selection = this.getInternalSelection(), + newNode = this.editorDoc.createElement("small"); + + // If cursor placed on text node + if (true === Range.collapsed && 3 === Range.commonAncestorContainer.nodeType) { + var text = Range.commonAncestorContainer.nodeValue.toString(), + start = text.lastIndexOf(" ", Range.startOffset) + 1, + end = (-1 === text.indexOf(" ", Range.startOffset)) ? text : text.indexOf(" ", Range.startOffset); + + Range.setStart(Range.commonAncestorContainer, start); + Range.setEnd(Range.commonAncestorContainer, end); + + Range.surroundContents(newNode); + Selection.addRange(Range); + } else { + Range.surroundContents(newNode); + Selection.removeAllRanges(); + Selection.addRange(Range); + } + } else { + console.error("Internet Explorer?"); + } + }; + + this.getContent = function () { + if (this.viewHTML) { + this.setContent(this.original.value); + } + return this.events.filter('getContent', this.editorDoc.body.innerHTML); + }; + + /** + * A jWysiwyg specific event system. + * + * Example: + * + * $("#editor").getWysiwyg().events.bind("getContent", function (orig) { + * return "
                "+orgi+"
                "; + * }); + * + * This makes it so that when ever getContent is called, it is wrapped in a div#content. + */ + this.events = { + _events : {}, + + /** + * Similar to jQuery's bind, but for jWysiwyg only. + */ + bind : function (eventName, callback) { + if (typeof (this._events.eventName) !== "object") { + this._events[eventName] = []; + } + this._events[eventName].push(callback); + }, + + /** + * Similar to jQuery's trigger, but for jWysiwyg only. + */ + trigger : function (eventName, args) { + if (typeof (this._events.eventName) === "object") { + var editor = this.editor; + $.each(this._events[eventName], function (k, v) { + if (typeof (v) === "function") { + v.apply(editor, args); + } + }); + } + }, + + /** + * This "filters" `originalText` by passing it as the first argument to every callback + * with the name `eventName` and taking the return value and passing it to the next function. + * + * This function returns the result after all the callbacks have been applied to `originalText`. + */ + filter : function (eventName, originalText) { + if (typeof (this._events[eventName]) === "object") { + var editor = this.editor, + args = Array.prototype.slice.call(arguments, 1); + + $.each(this._events[eventName], function (k, v) { + if (typeof (v) === "function") { + originalText = v.apply(editor, args); + } + }); + } + return originalText; + } + }; + + this.getElementByAttributeValue = function (tagName, attributeName, attributeValue) { + var i, value, elements = this.editorDoc.getElementsByTagName(tagName); + + for (i = 0; i < elements.length; i += 1) { + value = elements[i].getAttribute(attributeName); + + if ($.browser.msie) { + /** IE add full path, so I check by the last chars. */ + value = value.substr(value.length - attributeValue.length); + } + + if (value === attributeValue) { + return elements[i]; + } + } + + return false; + }; + + this.getInternalRange = function () { + var selection = this.getInternalSelection(); + + if (!selection) { + return null; + } + + if (selection.rangeCount && selection.rangeCount > 0) { // w3c + return selection.getRangeAt(0); + } else if (selection.createRange) { // ie + return selection.createRange(); + } + + return null; + }; + + this.getInternalSelection = function () { + // firefox: document.getSelection is deprecated + if (this.editor.get(0).contentWindow) { + if (this.editor.get(0).contentWindow.getSelection) { + return this.editor.get(0).contentWindow.getSelection(); + } + if (this.editor.get(0).contentWindow.selection) { + return this.editor.get(0).contentWindow.selection; + } + } + if (this.editorDoc.getSelection) { + return this.editorDoc.getSelection(); + } + if (this.editorDoc.selection) { + return this.editorDoc.selection; + } + + return null; + }; + + this.getRange = function () { + var selection = this.getSelection(); + + if (!selection) { + return null; + } + + if (selection.rangeCount && selection.rangeCount > 0) { // w3c + selection.getRangeAt(0); + } else if (selection.createRange) { // ie + return selection.createRange(); + } + + return null; + }; + + this.getSelection = function () { + return (window.getSelection) ? window.getSelection() : window.document.selection; + }; + + // :TODO: you can type long string and letters will be hidden because of overflow + this.ui.grow = function () { + var self = this.self, + innerBody = $(self.editorDoc.body), + innerHeight = $.browser.msie ? innerBody[0].scrollHeight : innerBody.height() + 2 + 20, // 2 - borders, 20 - to prevent content jumping on grow + minHeight = self.ui.initialHeight, + height = Math.max(innerHeight, minHeight); + + height = Math.min(height, self.options.maxHeight); + + self.editor.attr("scrolling", height < self.options.maxHeight ? "no" : "auto"); // hide scrollbar firefox + innerBody.css("overflow", height < self.options.maxHeight ? "hidden" : ""); // hide scrollbar chrome + + self.editor.get(0).height = height; + + return self; + }; + + this.init = function (element, options) { + var self = this, + $form = $(element).closest("form"), + newX = (element.width || element.clientWidth || 0), + newY = (element.height || element.clientHeight || 0) + ; + + this.options = this.extendOptions(options); + this.original = element; + this.ui.toolbar = $(this.options.toolbarHtml); + + if ($.browser.msie && parseInt($.browser.version, 10) < 8) { + this.options.autoGrow = false; + } + + if (newX === 0 && element.cols) { + newX = (element.cols * 8) + 21; + } + if (newY === 0 && element.rows) { + newY = (element.rows * 16) + 16; + } + + this.editor = $(window.location.protocol === "https:" ? '' : "").attr("frameborder", "0"); + + if (this.options.iFrameClass) { + this.editor.addClass(this.options.iFrameClass); + } else { + this.editor.css({ + minHeight: (newY - 6).toString() + "px", + // fix for issue 12 ( http://github.com/akzhan/jwysiwyg/issues/issue/12 ) + width: (newX > 50) ? (newX - 8).toString() + "px" : "" + }); + if ($.browser.msie && parseInt($.browser.version, 10) < 7) { + this.editor.css("height", newY.toString() + "px"); + } + } + /** + * Automagically add id to iframe if textarea has its own when possible + * ( http://github.com/akzhan/jwysiwyg/issues/245 ) + */ + if (element.id) { + var proposedId = element.id + '-wysiwyg-iframe'; + if (! document.getElementById(proposedId)) { + this.editor.attr('id', proposedId); + } + } + + /** + * http://code.google.com/p/jwysiwyg/issues/detail?id=96 + */ + this.editor.attr("tabindex", $(element).attr("tabindex")); + + this.element = $("
                ").addClass("wysiwyg"); + + if (!this.options.iFrameClass) { + this.element.css({ + width: (newX > 0) ? newX.toString() + "px" : "100%" + }); + } + + $(element).hide().before(this.element); + + this.viewHTML = false; + + /** + * @link http://code.google.com/p/jwysiwyg/issues/detail?id=52 + */ + this.initialContent = $(element).val(); + this.ui.initFrame(); + + if (this.options.resizeOptions && $.fn.resizable) { + this.element.resizable($.extend(true, { + alsoResize: this.editor + }, this.options.resizeOptions)); + } + + if (this.options.autoSave) { + $form.bind("submit.wysiwyg", function () { self.autoSaveFunction(); }); + } + + $form.bind("reset.wysiwyg", function () { self.resetFunction(); }); + }; + + this.ui.initFrame = function () { + var self = this.self, + stylesheet, + growHandler, + saveHandler; + + self.ui.appendControls(); + self.element.append(self.ui.toolbar) + .append($("
                ") + .css({ + clear: "both" + })) + .append(self.editor); + + self.editorDoc = self.innerDocument(); + + if (self.isDestroyed) { + return null; + } + + self.ui.designMode(); + self.editorDoc.open(); + self.editorDoc.write( + self.options.html + /** + * @link http://code.google.com/p/jwysiwyg/issues/detail?id=144 + */ + .replace(/INITIAL_CONTENT/, function () { return self.wrapInitialContent(); }) + ); + self.editorDoc.close(); + + $.wysiwyg.plugin.bind(self); + + $(self.editorDoc).trigger("initFrame.wysiwyg"); + + $(self.editorDoc).bind("click.wysiwyg", function (event) { + self.ui.checkTargets(event.target ? event.target : event.srcElement); + }); + + /** + * @link https://github.com/akzhan/jwysiwyg/issues/251 + */ + setInterval(function () { + var offset = null; + + try { + var range = self.getInternalRange(); + if (range) { + offset = { + range: range, + parent: $.browser.msie ? range.parentElement() : range.endContainer.parentNode, + width: ($.browser.msie ? range.boundingWidth : range.startOffset - range.endOffset) || 0 + }; + } + } + catch (e) { console.error(e); } + + if (offset && offset.width == 0 && !self.editorDoc.rememberCommand) { + self.ui.checkTargets(offset.parent); + } + }, 400); + + /** + * @link http://code.google.com/p/jwysiwyg/issues/detail?id=20 + */ + $(self.original).focus(function () { + if ($(this).filter(":visible").length === 0) { + return; + } + self.ui.focus(); + }); + + $(self.editorDoc).keydown(function (event) { + var emptyContentRegex; + if (event.keyCode === 8) { // backspace + emptyContentRegex = /^<([\w]+)[^>]*>()?<\/\1>$/; + if (emptyContentRegex.test(self.getContent())) { // if content is empty + event.stopPropagation(); // prevent remove single empty tag + return false; + } + } + + self.editorDoc.rememberCommand = false; + return true; + }); + + if (!$.browser.msie) { + $(self.editorDoc).keydown(function (event) { + var controlName; + + /* Meta for Macs. tom@punkave.com */ + if (event.ctrlKey || event.metaKey) { + for (controlName in self.controls) { + if (self.controls[controlName].hotkey && self.controls[controlName].hotkey.ctrl) { + if (event.keyCode === self.controls[controlName].hotkey.key) { + self.triggerControl.apply(self, [controlName, self.controls[controlName]]); + + return false; + } + } + } + } + + return true; + }); + } else if (self.options.brIE) { + $(self.editorDoc).keydown(function (event) { + if (event.keyCode === 13) { + var rng = self.getRange(); + rng.pasteHTML("
                "); + rng.collapse(false); + rng.select(); + + return false; + } + + return true; + }); + } + + if (self.options.plugins.rmFormat.rmMsWordMarkup) { + $(self.editorDoc).bind("keyup.wysiwyg", function (event) { + if (event.ctrlKey || event.metaKey) { + // CTRL + V (paste) + if (86 === event.keyCode) { + if ($.wysiwyg.rmFormat) { + if ("object" === typeof (self.options.plugins.rmFormat.rmMsWordMarkup)) { + $.wysiwyg.rmFormat.run(self, {rules: { msWordMarkup: self.options.plugins.rmFormat.rmMsWordMarkup }}); + } else { + $.wysiwyg.rmFormat.run(self, {rules: { msWordMarkup: { enabled: true }}}); + } + } + } + } + }); + } + + if (self.options.autoSave) { + $(self.editorDoc).keydown(function () { self.autoSaveFunction(); }) + .keyup(function () { self.autoSaveFunction(); }) + .mousedown(function () { self.autoSaveFunction(); }) + .bind($.support.noCloneEvent ? "input.wysiwyg" : "paste.wysiwyg", function () { self.autoSaveFunction(); }); + } + + if (self.options.autoGrow) { + if (self.options.initialMinHeight !== null) { + self.ui.initialHeight = self.options.initialMinHeight; + } else { + self.ui.initialHeight = $(self.editorDoc).height(); + } + $(self.editorDoc.body).css("border", "1px solid white"); // cancel margin collapsing + + growHandler = function () { + self.ui.grow(); + }; + + $(self.editorDoc).keyup(growHandler); + $(self.editorDoc).bind("editorRefresh.wysiwyg", growHandler); + + // fix when content height > textarea height + self.ui.grow(); + } + + if (self.options.css) { + if (String === self.options.css.constructor) { + if ($.browser.msie) { + stylesheet = self.editorDoc.createStyleSheet(self.options.css); + $(stylesheet).attr({ + "media": "all" + }); + } else { + stylesheet = $("").attr({ + "href": self.options.css, + "media": "all", + "rel": "stylesheet", + "type": "text/css" + }); + + $(self.editorDoc).find("head").append(stylesheet); + } + } else { + self.timers.initFrame_Css = window.setTimeout(function () { + $(self.editorDoc.body).css(self.options.css); + }, 0); + } + } + + if (self.initialContent.length === 0) { + if ("function" === typeof (self.options.initialContent)) { + self.setContent(self.options.initialContent()); + } else { + self.setContent(self.options.initialContent); + } + } + + if (self.options.maxLength > 0) { + $(self.editorDoc).keydown(function (event) { + if ($(self.editorDoc).text().length >= self.options.maxLength && $.inArray(event.which, self.validKeyCodes) === -1) { + event.preventDefault(); + } + }); + } + + // Support event callbacks + $.each(self.options.events, function (key, handler) { + $(self.editorDoc).bind(key + ".wysiwyg", function (event) { + // Trigger event handler, providing the event and api to + // support additional functionality. + handler.apply(self.editorDoc, [event, self]); + }); + }); + + // restores selection properly on focus + if ($.browser.msie) { + // Event chain: beforedeactivate => focusout => blur. + // Focusout & blur fired too late to handle internalRange() in dialogs. + // When clicked on input boxes both got range = null + $(self.editorDoc).bind("beforedeactivate.wysiwyg", function () { + self.savedRange = self.getInternalRange(); + }); + } else { + $(self.editorDoc).bind("blur.wysiwyg", function () { + self.savedRange = self.getInternalRange(); + }); + } + + $(self.editorDoc.body).addClass("wysiwyg"); + if (self.options.events && self.options.events.save) { + saveHandler = self.options.events.save; + + $(self.editorDoc).bind("keyup.wysiwyg", saveHandler); + $(self.editorDoc).bind("change.wysiwyg", saveHandler); + + if ($.support.noCloneEvent) { + $(self.editorDoc).bind("input.wysiwyg", saveHandler); + } else { + $(self.editorDoc).bind("paste.wysiwyg", saveHandler); + $(self.editorDoc).bind("cut.wysiwyg", saveHandler); + } + } + + /** + * XHTML5 {@link https://github.com/akzhan/jwysiwyg/issues/152} + */ + if (self.options.xhtml5 && self.options.unicode) { + var replacements = {ne:8800,le:8804,para:182,xi:958,darr:8595,nu:957,oacute:243,Uacute:218,omega:969,prime:8242,pound:163,igrave:236,thorn:254,forall:8704,emsp:8195,lowast:8727,brvbar:166,alefsym:8501,nbsp:160,delta:948,clubs:9827,lArr:8656,Omega:937,Auml:196,cedil:184,and:8743,plusmn:177,ge:8805,raquo:187,uml:168,equiv:8801,laquo:171,rdquo:8221,Epsilon:917,divide:247,fnof:402,chi:967,Dagger:8225,iacute:237,rceil:8969,sigma:963,Oslash:216,acute:180,frac34:190,lrm:8206,upsih:978,Scaron:352,part:8706,exist:8707,nabla:8711,image:8465,prop:8733,zwj:8205,omicron:959,aacute:225,Yuml:376,Yacute:221,weierp:8472,rsquo:8217,otimes:8855,kappa:954,thetasym:977,harr:8596,Ouml:214,Iota:921,ograve:242,sdot:8901,copy:169,oplus:8853,acirc:226,sup:8835,zeta:950,Iacute:205,Oacute:211,crarr:8629,Nu:925,bdquo:8222,lsquo:8216,apos:39,Beta:914,eacute:233,egrave:232,lceil:8968,Kappa:922,piv:982,Ccedil:199,ldquo:8220,Xi:926,cent:162,uarr:8593,hellip:8230,Aacute:193,ensp:8194,sect:167,Ugrave:217,aelig:230,ordf:170,curren:164,sbquo:8218,macr:175,Phi:934,Eta:919,rho:961,Omicron:927,sup2:178,euro:8364,aring:229,Theta:920,mdash:8212,uuml:252,otilde:245,eta:951,uacute:250,rArr:8658,nsub:8836,agrave:224,notin:8713,ndash:8211,Psi:936,Ocirc:212,sube:8838,szlig:223,micro:181,not:172,sup1:185,middot:183,iota:953,ecirc:234,lsaquo:8249,thinsp:8201,sum:8721,ntilde:241,scaron:353,cap:8745,atilde:227,lang:10216,__replacement:65533,isin:8712,gamma:947,Euml:203,ang:8736,upsilon:965,Ntilde:209,hearts:9829,Alpha:913,Tau:932,spades:9824,dagger:8224,THORN:222,"int":8747,lambda:955,Eacute:201,Uuml:220,infin:8734,rlm:8207,Aring:197,ugrave:249,Egrave:200,Acirc:194,rsaquo:8250,ETH:208,oslash:248,alpha:945,Ograve:210,Prime:8243,mu:956,ni:8715,real:8476,bull:8226,beta:946,icirc:238,eth:240,prod:8719,larr:8592,ordm:186,perp:8869,Gamma:915,reg:174,ucirc:251,Pi:928,psi:968,tilde:732,asymp:8776,zwnj:8204,Agrave:192,deg:176,AElig:198,times:215,Delta:916,sim:8764,Otilde:213,Mu:924,uArr:8657,circ:710,theta:952,Rho:929,sup3:179,diams:9830,tau:964,Chi:935,frac14:188,oelig:339,shy:173,or:8744,dArr:8659,phi:966,iuml:239,Lambda:923,rfloor:8971,iexcl:161,cong:8773,ccedil:231,Icirc:206,frac12:189,loz:9674,rarr:8594,cup:8746,radic:8730,frasl:8260,euml:235,OElig:338,hArr:8660,Atilde:195,Upsilon:933,there4:8756,ouml:246,oline:8254,Ecirc:202,yacute:253,auml:228,permil:8240,sigmaf:962,iquest:191,empty:8709,pi:960,Ucirc:219,supe:8839,Igrave:204,yen:165,rang:10217,trade:8482,lfloor:8970,minus:8722,Zeta:918,sub:8834,epsilon:949,yuml:255,Sigma:931,Iuml:207,ocirc:244}; + self.events.bind("getContent", function (text) { + return text.replace(/&(?:amp;)?(?!amp|lt|gt|quot)([a-z][a-z0-9]*);/gi, function (str, p1) { + if (!replacements[p1]) { + p1 = p1.toLowerCase(); + if (!replacements[p1]) { + p1 = "__replacement"; + } + } + + var num = replacements[p1]; + /* Numeric return if ever wanted: return replacements[p1] ? "&#"+num+";" : ""; */ + return String.fromCharCode(num); + }); + }); + } + $(self.original).trigger('ready.jwysiwyg', [self.editorDoc, self]); + }; + + this.innerDocument = function () { + var element = this.editor.get(0); + + if (element.nodeName.toLowerCase() === "iframe") { + if (element.contentDocument) { // Gecko + return element.contentDocument; + } else if (element.contentWindow) { // IE + return element.contentWindow.document; + } + + if (this.isDestroyed) { + return null; + } + + console.error("Unexpected error in innerDocument"); + + /* + return ( $.browser.msie ) + ? document.frames[element.id].document + : element.contentWindow.document // contentDocument; + */ + } + + return element; + }; + + this.insertHtml = function (szHTML) { + var img, range; + + if (!szHTML || szHTML.length === 0) { + return this; + } + + if ($.browser.msie) { + this.ui.focus(); + this.editorDoc.execCommand("insertImage", false, "#jwysiwyg#"); + img = this.getElementByAttributeValue("img", "src", "#jwysiwyg#"); + if (img) { + $(img).replaceWith(szHTML); + } + } else { + if ($.browser.mozilla) { // @link https://github.com/akzhan/jwysiwyg/issues/50 + if (1 === $(szHTML).length) { + range = this.getInternalRange(); + range.deleteContents(); + range.insertNode($(szHTML).get(0)); + } else { + this.editorDoc.execCommand("insertHTML", false, szHTML); + } + } else { + if (!this.editorDoc.execCommand("insertHTML", false, szHTML)) { + this.editor.focus(); + /* :TODO: place caret at the end + if (window.getSelection) { + } else { + } + this.editor.focus(); + */ + this.editorDoc.execCommand("insertHTML", false, szHTML); + } + } + } + + this.saveContent(); + + return this; + }; + + //check allowed properties + this.parseControls = function () { + var self = this; + + $.each(this.options.controls, function (controlName, control) { + $.each(control, function (propertyName) { + if (-1 === $.inArray(propertyName, self.availableControlProperties)) { + throw controlName + '["' + propertyName + '"]: property "' + propertyName + '" not exists in Wysiwyg.availableControlProperties'; + } + }); + }); + + if (this.options.parseControls) { //user callback + return this.options.parseControls.call(this); + } + + return this.options.controls; + }; + + this.removeFormat = function () { + if ($.browser.msie) { + this.ui.focus(); + } + + if (this.options.removeHeadings) { + this.editorDoc.execCommand("formatBlock", false, "

                "); // remove headings + } + + this.editorDoc.execCommand("removeFormat", false, null); + this.editorDoc.execCommand("unlink", false, null); + + if ($.wysiwyg.rmFormat && $.wysiwyg.rmFormat.enabled) { + if ("object" === typeof (this.options.plugins.rmFormat.rmMsWordMarkup)) { + $.wysiwyg.rmFormat.run(this, {rules: { msWordMarkup: this.options.plugins.rmFormat.rmMsWordMarkup }}); + } else { + $.wysiwyg.rmFormat.run(this, {rules: { msWordMarkup: { enabled: true }}}); + } + } + + return this; + }; + + this.ui.removeHoverClass = function () { + $(this).removeClass("wysiwyg-button-hover"); + }; + + this.resetFunction = function () { + this.setContent(this.initialContent); + }; + + this.saveContent = function () { + if (this.viewHTML) + { + return; // no need + } + if (this.original) { + var content, newContent; + + content = this.getContent(); + + if (this.options.rmUnwantedBr) { + content = content.replace(/$/, ""); + } + + if (this.options.replaceDivWithP) { + newContent = $("

                ").addClass("temp").append(content); + + newContent.children("div").each(function () { + var element = $(this), p = element.find("p"), i; + + if (0 === p.length) { + p = $("

                "); + + if (this.attributes.length > 0) { + for (i = 0; i < this.attributes.length; i += 1) { + p.attr(this.attributes[i].name, element.attr(this.attributes[i].name)); + } + } + + p.append(element.html()); + + element.replaceWith(p); + } + }); + + content = newContent.html(); + } + + $(this.original).val(content); + + if (this.options.events && this.options.events.save) { + this.options.events.save.call(this); + } + } + + return this; + }; + + this.setContent = function (newContent) { + this.editorDoc.body.innerHTML = newContent; + this.saveContent(); + + return this; + }; + + this.triggerControl = function (name, control) { + var cmd = control.command || name, //command directly for designMode=on iframe (this.editorDoc) + args = control["arguments"] || []; + + if (control.exec) { + control.exec.apply(this); //custom exec function in control, allows DOM changing + } else { + this.ui.focus(); + this.ui.withoutCss(); //disable style="" attr inserting in mozzila's designMode + // when click , or got "Access to XPConnect service denied" code: "1011" + // in Firefox untrusted JavaScript is not allowed to access the clipboard + try { + this.editorDoc.execCommand(cmd, false, args); + } catch (e) { + console.error(e); + } + } + + if (this.options.autoSave) { + this.autoSaveFunction(); + } + }; + + this.triggerControlCallback = function (name) { + $(window).trigger("trigger-" + name + ".wysiwyg", [this]); + }; + + this.ui.withoutCss = function () { + var self = this.self; + + if ($.browser.mozilla) { + try { + self.editorDoc.execCommand("styleWithCSS", false, false); + } catch (e) { + try { + self.editorDoc.execCommand("useCSS", false, true); + } catch (e2) { + } + } + } + + return self; + }; + + this.wrapInitialContent = function () { + var content = this.initialContent, + found = content.match(/<\/?p>/gi); + + if (!found) { + return "

                " + content + "

                "; + } else { + // :TODO: checking/replacing + } + + return content; + }; + } + + /* + * Wysiwyg namespace: public properties and methods + */ + $.wysiwyg = { + messages: { + noObject: "Something goes wrong, check object" + }, + + /** + * Custom control support by Alec Gorge ( http://github.com/alecgorge ) + */ + addControl: function (object, name, settings) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"), + customControl = {}, + toolbar; + + if (!oWysiwyg) { + return this; + } + + customControl[name] = $.extend(true, {visible: true, custom: true}, settings); + $.extend(true, oWysiwyg.options.controls, customControl); + + // render new toolbar + toolbar = $(oWysiwyg.options.toolbarHtml); + oWysiwyg.ui.toolbar.replaceWith(toolbar); + oWysiwyg.ui.toolbar = toolbar; + oWysiwyg.ui.appendControls(); + }); + }, + + clear: function (object) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"); + + if (!oWysiwyg) { + return this; + } + + oWysiwyg.setContent(""); + }); + }, + + console: console, // let our console be available for extensions + + destroy: function (object) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"); + + if (!oWysiwyg) { + return this; + } + + oWysiwyg.destroy(); + }); + }, + + "document": function (object) { + // no chains because of return + var oWysiwyg = object.data("wysiwyg"); + + if (!oWysiwyg) { + return undefined; + } + + return $(oWysiwyg.editorDoc); + }, + + getContent: function (object) { + // no chains because of return + var oWysiwyg = object.data("wysiwyg"); + + if (!oWysiwyg) { + return undefined; + } + + return oWysiwyg.getContent(); + }, + + init: function (object, options) { + return object.each(function () { + var opts = $.extend(true, {}, options), + obj; + + // :4fun: + // remove this textarea validation and change line in this.saveContent function + // $(this.original).val(content); to $(this.original).html(content); + // now you can make WYSIWYG editor on h1, p, and many more tags + if (("textarea" !== this.nodeName.toLowerCase()) || $(this).data("wysiwyg")) { + return; + } + + obj = new Wysiwyg(); + obj.init(this, opts); + $.data(this, "wysiwyg", obj); + + $(obj.editorDoc).trigger("afterInit.wysiwyg"); + }); + }, + + insertHtml: function (object, szHTML) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"); + + if (!oWysiwyg) { + return this; + } + + oWysiwyg.insertHtml(szHTML); + }); + }, + + plugin: { + listeners: {}, + + bind: function (Wysiwyg) { + var self = this; + + $.each(this.listeners, function (action, handlers) { + var i, plugin; + + for (i = 0; i < handlers.length; i += 1) { + plugin = self.parseName(handlers[i]); + + $(Wysiwyg.editorDoc).bind(action + ".wysiwyg", {plugin: plugin}, function (event) { + $.wysiwyg[event.data.plugin.name][event.data.plugin.method].apply($.wysiwyg[event.data.plugin.name], [Wysiwyg]); + }); + } + }); + }, + + exists: function (name) { + var plugin; + + if ("string" !== typeof (name)) { + return false; + } + + plugin = this.parseName(name); + + if (!$.wysiwyg[plugin.name] || !$.wysiwyg[plugin.name][plugin.method]) { + return false; + } + + return true; + }, + + listen: function (action, handler) { + var plugin; + + plugin = this.parseName(handler); + + if (!$.wysiwyg[plugin.name] || !$.wysiwyg[plugin.name][plugin.method]) { + return false; + } + + if (!this.listeners[action]) { + this.listeners[action] = []; + } + + this.listeners[action].push(handler); + + return true; + }, + + parseName: function (name) { + var elements; + + if ("string" !== typeof (name)) { + return false; + } + + elements = name.split("."); + + if (2 > elements.length) { + return false; + } + + return {name: elements[0], method: elements[1]}; + }, + + register: function (data) { + if (!data.name) { + console.error("Plugin name missing"); + } + + $.each($.wysiwyg, function (pluginName) { + if (pluginName === data.name) { + console.error("Plugin with name '" + data.name + "' was already registered"); + } + }); + + $.wysiwyg[data.name] = data; + + return true; + } + }, + + removeFormat: function (object) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"); + + if (!oWysiwyg) { + return this; + } + + oWysiwyg.removeFormat(); + }); + }, + + save: function (object) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"); + + if (!oWysiwyg) { + return this; + } + + oWysiwyg.saveContent(); + }); + }, + + selectAll: function (object) { + var oWysiwyg = object.data("wysiwyg"), oBody, oRange, selection; + + if (!oWysiwyg) { + return this; + } + + oBody = oWysiwyg.editorDoc.body; + if (window.getSelection) { + selection = oWysiwyg.getInternalSelection(); + selection.selectAllChildren(oBody); + } else { + oRange = oBody.createTextRange(); + oRange.moveToElementText(oBody); + oRange.select(); + } + }, + + setContent: function (object, newContent) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"); + + if (!oWysiwyg) { + return this; + } + + oWysiwyg.setContent(newContent); + }); + }, + + triggerControl: function (object, controlName) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"); + + if (!oWysiwyg) { + return this; + } + + if (!oWysiwyg.controls[controlName]) { + console.error("Control '" + controlName + "' not exists"); + } + + oWysiwyg.triggerControl.apply(oWysiwyg, [controlName, oWysiwyg.controls[controlName]]); + }); + }, + + support: { + prop: supportsProp + }, + + utils: { + extraSafeEntities: [["<", ">", "'", '"', " "], [32]], + + encodeEntities: function (str) { + var self = this, aStr, aRet = []; + + if (this.extraSafeEntities[1].length === 0) { + $.each(this.extraSafeEntities[0], function (i, ch) { + self.extraSafeEntities[1].push(ch.charCodeAt(0)); + }); + } + aStr = str.split(""); + $.each(aStr, function (i) { + var iC = aStr[i].charCodeAt(0); + if ($.inArray(iC, self.extraSafeEntities[1]) && (iC < 65 || iC > 127 || (iC > 90 && iC < 97))) { + aRet.push('&#' + iC + ';'); + } else { + aRet.push(aStr[i]); + } + }); + + return aRet.join(''); + } + } + }; + + /** + * Unifies dialog methods to allow custom implementations + * + * Events: + * * afterOpen + * * beforeShow + * * afterShow + * * beforeHide + * * afterHide + * * beforeClose + * * afterClose + * + * Example: + * var dialog = new ($.wysiwyg.dialog)($('#idToTextArea').data('wysiwyg'), {"title": "Test", "content": "form data, etc."}); + * + * dialog.bind("afterOpen", function () { alert('you should see a dialog behind this one!'); }); + * + * dialog.open(); + * + * + */ + $.wysiwyg.dialog = function (jWysiwyg, opts) { + + var theme = (jWysiwyg && jWysiwyg.options && jWysiwyg.options.dialog) ? jWysiwyg.options.dialog : (opts.theme ? opts.theme : "default"), + obj = new $.wysiwyg.dialog.createDialog(theme), + that = this, + $that = $(that); + + this.options = { + "modal": true, + "draggable": true, + "title": "Title", + "content": "Content", + "width": "auto", + "height": "auto", + "zIndex": 2000, + "open": false, + "close": false + }; + + this.isOpen = false; + + $.extend(this.options, opts); + + this.object = obj; + + // Opens a dialog with the specified content + this.open = function () { + this.isOpen = true; + + obj.init.apply(that, []); + var $dialog = obj.show.apply(that, []); + + $that.trigger("afterOpen", [$dialog]); + + }; + + this.show = function () { + this.isOpen = true; + + $that.trigger("beforeShow"); + + var $dialog = obj.show.apply(that, []); + + $that.trigger("afterShow"); + }; + + this.hide = function () { + this.isOpen = false; + + $that.trigger("beforeHide"); + + var $dialog = obj.hide.apply(that, []); + + $that.trigger("afterHide", [$dialog]); + }; + + // Closes the dialog window. + this.close = function () { + this.isOpen = false; + + var $dialog = obj.hide.apply(that, []); + + $that.trigger("beforeClose", [$dialog]); + + obj.destroy.apply(that, []); + + $that.trigger("afterClose", [$dialog]); + + }; + + if (this.options.open) { + $that.bind("afterOpen", this.options.open); + } + if (this.options.close) { + $that.bind("afterClose", this.options.close); + } + + return this; + }; + + // "Static" Dialog methods. + $.extend(true, $.wysiwyg.dialog, { + _themes : {}, // sample {"Theme Name": object} + _theme : "", // the current theme + + register : function(name, obj) { + $.wysiwyg.dialog._themes[name] = obj; + }, + + deregister : function (name) { + delete $.wysiwyg.dialog._themes[name]; + }, + + createDialog : function (name) { + return new ($.wysiwyg.dialog._themes[name]); + }, + + getDimensions : function () { + var width = document.body.scrollWidth, + height = document.body.scrollHeight; + + if ($.browser.opera) { + height = Math.max( + $(document).height(), + $(window).height(), + document.documentElement.clientHeight); + } + + return [width, height]; + } + }); + + $(function () { // need access to jQuery UI stuff. + if (jQuery.ui) { + $.wysiwyg.dialog.register("jqueryui", function () { + var that = this; + + this._$dialog = null; + + this.init = function() { + var abstractDialog = this, + content = this.options.content; + + if (typeof content === 'object') { + if (typeof content.html === 'function') { + content = content.html(); + } else if(typeof content.toString === 'function') { + content = content.toString(); + } + } + + that._$dialog = $('
                ').attr('title', this.options.title).html(content); + + var dialogHeight = this.options.height == 'auto' ? 300 : this.options.height, + dialogWidth = this.options.width == 'auto' ? 450 : this.options.width; + + // console.log(that._$dialog); + + that._$dialog.dialog({ + modal: this.options.modal, + draggable: this.options.draggable, + height: dialogHeight, + width: dialogWidth + }); + + return that._$dialog; + }; + + this.show = function () { + that._$dialog.dialog("open"); + return that._$dialog; + }; + + this.hide = function () { + that._$dialog.dialog("close"); + return that._$dialog; + }; + + this.destroy = function() { + that._$dialog.dialog("destroy"); + return that._$dialog; + }; + }); + } + + $.wysiwyg.dialog.register("default", function () { + var that = this; + + this._$dialog = null; + + this.init = function() { + var abstractDialog = this, + content = this.options.content; + + if (typeof content === 'object') { + if(typeof content.html === 'function') { + content = content.html(); + } + else if(typeof content.toString === 'function') { + content = content.toString(); + } + } + + that._$dialog = $('
                ').css({"z-index": this.options.zIndex}); + + var $topbar = $('
                '+this.options.title+'
                '); + var $link = $('X'); + + $link.click(function () { + abstractDialog.close(); // this is important it makes sure that is close from the abstract $.wysiwyg.dialog instace, not just locally + }); + + $topbar.find('.wysiwyg-dialog-close-wrapper').prepend($link); + + var $dcontent = $('
                '+content+'
                '); + + that._$dialog.append($topbar).append($dcontent); + + // Set dialog's height & width, and position it correctly: + var dialogHeight = this.options.height == 'auto' ? 300 : this.options.height, + dialogWidth = this.options.width == 'auto' ? 450 : this.options.width; + that._$dialog.hide().css({ + "width": dialogWidth, + "height": dialogHeight, + "left": (($(window).width() - dialogWidth) / 2), + "top": (($(window).height() - dialogHeight) / 3) + }); + + $("body").append(that._$dialog); + + return that._$dialog; + }; + + this.show = function () { + + // Modal feature: + if (this.options.modal) { + var dimensions = $.wysiwyg.dialog.getDimensions(), + wrapper = $('
                ') + .css({"width": dimensions[0], "height": dimensions[1]}); + that._$dialog.wrap(wrapper); + } + + // Draggable feature: + if (this.options.draggable) { + + var mouseDown = false; + + that._$dialog.find("div.wysiwyg-dialog-topbar").bind("mousedown", function (e) { + e.preventDefault(); + $(this).css({ "cursor": "move" }); + var $topbar = $(this), + _dialog = $(this).parents(".wysiwyg-dialog"), + offsetX = (e.pageX - parseInt(_dialog.css("left"), 10)), + offsetY = (e.pageY - parseInt(_dialog.css("top"), 10)); + mouseDown = true; + $(this).css({ "cursor": "move" }); + + $(document).bind("mousemove", function (e) { + e.preventDefault(); + if (mouseDown) { + _dialog.css({ + "top": (e.pageY - offsetY), + "left": (e.pageX - offsetX) + }); + } + }).bind("mouseup", function (e) { + e.preventDefault(); + mouseDown = false; + $topbar.css({ "cursor": "auto" }); + $(document).unbind("mousemove").unbind("mouseup"); + }); + + }); + } + + that._$dialog.show(); + return that._$dialog; + + }; + + this.hide = function () { + that._$dialog.hide(); + return that._$dialog; + }; + + this.destroy = function() { + + // Modal feature: + if (this.options.modal) { + that._$dialog.unwrap(); + } + + // Draggable feature: + if (this.options.draggable) { + that._$dialog.find("div.wysiwyg-dialog-topbar").unbind("mousedown"); + } + + that._$dialog.remove(); + return that._$dialog; + }; + }); + }); + // end Dialog + + $.fn.wysiwyg = function (method) { + var args = arguments, plugin; + + if ("undefined" !== typeof $.wysiwyg[method]) { + // set argument object to undefined + args = Array.prototype.concat.call([args[0]], [this], Array.prototype.slice.call(args, 1)); + return $.wysiwyg[method].apply($.wysiwyg, Array.prototype.slice.call(args, 1)); + } else if ("object" === typeof method || !method) { + Array.prototype.unshift.call(args, this); + return $.wysiwyg.init.apply($.wysiwyg, args); + } else if ($.wysiwyg.plugin.exists(method)) { + plugin = $.wysiwyg.plugin.parseName(method); + args = Array.prototype.concat.call([args[0]], [this], Array.prototype.slice.call(args, 1)); + return $.wysiwyg[plugin.name][plugin.method].apply($.wysiwyg[plugin.name], Array.prototype.slice.call(args, 1)); + } else { + console.error("Method '" + method + "' does not exist on jQuery.wysiwyg.\nTry to include some extra controls or plugins"); + } + }; + + $.fn.getWysiwyg = function () { + return this.data("wysiwyg"); + }; +})(jQuery); diff --git a/src/js/plugins/wysiwyg/wysiwyg.colorpicker.js b/src/js/plugins/wysiwyg/wysiwyg.colorpicker.js new file mode 100644 index 0000000..c2dd7e9 --- /dev/null +++ b/src/js/plugins/wysiwyg/wysiwyg.colorpicker.js @@ -0,0 +1,250 @@ +/** + * Controls: Colorpicker plugin + * + * Depends on jWYSIWYG, (farbtastic || other colorpicker plugins) + */ +(function ($) { + "use strict"; + + if (undefined === $.wysiwyg) { + throw "wysiwyg.colorpicker.js depends on $.wysiwyg"; + } + + if (!$.wysiwyg.controls) { + $.wysiwyg.controls = {}; + } + + /* + * Wysiwyg namespace: public properties and methods + */ + $.wysiwyg.controls.colorpicker = { + modalOpen: false, + color: { + back: { + prev: "#ffffff", + palette: [] + }, + fore: { + prev: "#123456", + palette: [] + } + }, + + addColorToPalette: function (type, color) { + if (-1 === $.inArray(color, this.color[type].palette)) { + this.color[type].palette.push(color); + } else { + this.color[type].palette.sort(function (a, b) { + if (a === color) { + return 1; + } + + return 0; + }); + } + }, + + init: function (Wysiwyg) { + if ($.wysiwyg.controls.colorpicker.modalOpen === true) { + return false; + } else { + $.wysiwyg.controls.colorpicker.modalOpen = true; + } + var self = this, elements, dialog, colorpickerHtml, dialogReplacements, key, translation; + + dialogReplacements = { + legend: "Colorpicker", + color: "Color", + submit: "Apply", + reset: "Cancel" + }; + + colorpickerHtml = '
                {legend}' + + '
                  ' + + '' + + '
                  ' + + ' ' + + '
                  '; + + for (key in dialogReplacements) { + if ($.wysiwyg.i18n) { + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs.colorpicker"); + + if (translation === dialogReplacements[key]) { // if not translated search in dialogs + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs"); + } + + dialogReplacements[key] = translation; + } + + colorpickerHtml = colorpickerHtml.replace("{" + key + "}", dialogReplacements[key]); + } + + if ($.modal) { + elements = $(colorpickerHtml); + + if ($.farbtastic) { + this.renderPalette(elements, "fore"); + elements.find(".wheel").farbtastic(elements.find("input:text")); + } + + $.modal(elements.html(), { + maxWidth: Wysiwyg.defaults.formWidth, + maxHeight: Wysiwyg.defaults.formHeight, + overlayClose: true, + + onShow: function (dialog) { + $("input:submit", dialog.data).click(function (e) { + var color = $('input[name="color"]', dialog.data).val(); + self.color.fore.prev = color; + self.addColorToPalette("fore", color); + + if ($.browser.msie) { + Wysiwyg.ui.returnRange(); + } + + Wysiwyg.editorDoc.execCommand('ForeColor', false, color); + $.modal.close(); + return false; + }); + $("input:reset", dialog.data).click(function (e) { + if ($.browser.msie) { + Wysiwyg.ui.returnRange(); + } + + $.modal.close(); + return false; + }); + $("fieldset", dialog.data).click(function (e) { + e.stopPropagation(); + }); + }, + + onClose: function (dialog) { + $.wysiwyg.controls.colorpicker.modalOpen = false; + $.modal.close(); + } + }); + } else if ($.fn.dialog) { + elements = $(colorpickerHtml); + + if ($.farbtastic) { + this.renderPalette(elements, "fore"); + elements.find(".wheel").farbtastic(elements.find("input:text")); + } + + dialog = elements.appendTo("body"); + dialog.dialog({ + modal: true, + + open: function (event, ui) { + $("input:submit", elements).click(function (e) { + var color = $('input[name="color"]', dialog).val(); + self.color.fore.prev = color; + self.addColorToPalette("fore", color); + + if ($.browser.msie) { + Wysiwyg.ui.returnRange(); + } + + Wysiwyg.editorDoc.execCommand('ForeColor', false, color); + $(dialog).dialog("close"); + return false; + }); + $("input:reset", elements).click(function (e) { + if ($.browser.msie) { + Wysiwyg.ui.returnRange(); + } + + $(dialog).dialog("close"); + return false; + }); + $('fieldset', elements).click(function (e) { + e.stopPropagation(); + }); + }, + + close: function (event, ui) { + $.wysiwyg.controls.colorpicker.modalOpen = false; + dialog.dialog("destroy"); + dialog.remove(); + } + }); + } else { + if ($.farbtastic) { + elements = $("
                  ") + .css({"position": "fixed", + "z-index": 2000, + "left": "50%", "top": "50%", "background": "rgb(0, 0, 0)", + "margin-top": -1 * Math.round(Wysiwyg.defaults.formHeight / 2), + "margin-left": -1 * Math.round(Wysiwyg.defaults.formWidth / 2)}) + .html(colorpickerHtml); + this.renderPalette(elements, "fore"); + elements.find("input[name=color]").val(self.color.fore.prev); + elements.find(".wheel").farbtastic(elements.find("input:text")); + $("input:submit", elements).click(function (event) { + var color = $('input[name="color"]', elements).val(); + self.color.fore.prev = color; + self.addColorToPalette("fore", color); + + if ($.browser.msie) { + Wysiwyg.ui.returnRange(); + } + + Wysiwyg.editorDoc.execCommand('ForeColor', false, color); + + $(elements).remove(); + $.wysiwyg.controls.colorpicker.modalOpen = false; + return false; + }); + $("input:reset", elements).click(function (event) { + + if ($.browser.msie) { + Wysiwyg.ui.returnRange(); + } + + $(elements).remove(); + $.wysiwyg.controls.colorpicker.modalOpen = false; + return false; + }); + $("body").append(elements); + elements.click(function (e) { + e.stopPropagation(); + }); + } + } + }, + + renderPalette: function (jqObj, type) { + var palette = jqObj.find(".palette"), + bind = function () { + var color = $(this).text(); + jqObj.find("input[name=color]").val(color); + // farbtastic binds on keyup + if ($.farbtastic) { + jqObj.find("input[name=color]").trigger("keyup"); + } + }, + colorExample, + colorSelect, + i; + + for (i = this.color[type].palette.length - 1; i > -1; i -= 1) { + colorExample = $("
                  ").css({ + "float": "left", + "width": "16px", + "height": "16px", + "margin": "0px 5px 0px 0px", + "background-color": this.color[type].palette[i] + }); + + colorSelect = $("
                • " + this.color[type].palette[i] + "
                • ") + .css({"float": "left", "list-style": "none"}) + .append(colorExample) + .bind("click.wysiwyg", bind); + + palette.append(colorSelect).css({"margin": "0px", "padding": "0px"}); + } + } + }; +})(jQuery); \ No newline at end of file diff --git a/src/js/plugins/wysiwyg/wysiwyg.cssWrap.js b/src/js/plugins/wysiwyg/wysiwyg.cssWrap.js new file mode 100644 index 0000000..0215f02 --- /dev/null +++ b/src/js/plugins/wysiwyg/wysiwyg.cssWrap.js @@ -0,0 +1,134 @@ +/** + * Controls: Element CSS Wrapper plugin + * + * Depends on jWYSIWYG + * + * By Yotam Bar-On (https://github.com/tudmotu) + */ +(function ($) { + if (undefined === $.wysiwyg) { + throw "wysiwyg.cssWrap.js depends on $.wysiwyg"; + } + /* For core enhancements #143 + $.wysiwyg.ui.addControl("cssWrap", { + visible : false, + groupIndex: 6, + tooltip: "CSS Wrapper", + exec: function () { + $.wysiwyg.controls.cssWrap.init(this); + } + } + */ + if (!$.wysiwyg.controls) { + $.wysiwyg.controls = {}; + } + + /* + * Wysiwyg namespace: public properties and methods + */ + $.wysiwyg.controls.cssWrap = { + init: function (Wysiwyg) { + var self = this, formWrapHtml, key, translation, + dialogReplacements = { + legend : "Wrap Element", + wrapperType : "Wrapper Type", + ID : "ID", + "class" : "Class", + wrap : "Wrap", + unwrap: "Unwrap", + cancel : "Cancel" + }; + + formWrapHtml = '
                  {legend}' + + '
                  ' + + '
                  ' + + '
                  ' + + '
                  ' + + '' + + '
                  '; + + for (key in dialogReplacements) { + if ($.wysiwyg.i18n) { + translation = $.wysiwyg.i18n.t(dialogReplacements[key]); + if (translation === dialogReplacements[key]) { // if not translated search in dialogs + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs"); + } + dialogReplacements[key] = translation; + } + formWrapHtml = formWrapHtml.replace("{" + key + "}", dialogReplacements[key]); + } + if (!$(".wysiwyg-dialog-wrapper").length) { + $(formWrapHtml).appendTo("body"); + $("form.wysiwyg").dialog({ + modal: true, + open: function (ev, ui) { + var $this = $(this), range = Wysiwyg.getInternalRange(), common, $nodeName; + // We make sure that there is some selection: + if (range) { + if ($.browser.msie) { + Wysiwyg.ui.focus(); + } + common = $(range.commonAncestorContainer); + } else { + alert("You must select some elements before you can wrap them."); + $this.dialog("close"); + return 0; + } + $nodeName = range.commonAncestorContainer.nodeName.toLowerCase(); + // If the selection is already a .wysiwygCssWrapper, then we want to change it and not double-wrap it. + if (common.parent(".wysiwygCssWrapper").length) { + alert(common.parent(".wysiwygCssWrapper").get(0).nodeName.toLowerCase()); + $this.find("select[name=type]").val(common.parent(".wysiwygCssWrapper").get(0).nodeName.toLowerCase()); + $this.find("select[name=type]").attr("disabled", "disabled"); + $this.find("input[name=id]").val(common.parent(".wysiwygCssWrapper").attr("id")); + $this.find("input[name=class]").val(common.parent(".wysiwygCssWrapper").attr("class").replace('wysiwygCssWrapper ', '')); + // Add the "unwrap" button: + $("form.wysiwyg").find(".cssWrap-unwrap").show(); + $("form.wysiwyg").find(".cssWrap-unwrap").click(function (e) { + e.preventDefault(); + if ($nodeName !== "body") { + common.unwrap(); + } + $this.dialog("close"); + return 1; + }); + } + // Submit button. + $("form.wysiwyg").find(".cssWrap-submit").click(function (e) { + e.preventDefault(); + var $wrapper = $("form.wysiwyg").find("select[name=type]").val(), + $id = $("form.wysiwyg").find("input[name=id]").val(), + $class = $("form.wysiwyg").find("input[name=class]").val(); + + if ($nodeName !== "body") { + // If the selection is already a .wysiwygCssWrapper, then we want to change it and not double-wrap it. + if (common.parent(".wysiwygCssWrapper").length) { + common.parent(".wysiwygCssWrapper").attr("id", $class); + common.parent(".wysiwygCssWrapper").attr("class", $class); + } else { + common.wrap("<" + $wrapper + " id=\"" + $id + "\" class=\"" + "wysiwygCssWrapper " + $class + "\"/>"); + } + } else { + // Currently no implemntation for if $nodeName == 'body'. + } + $this.dialog("close"); + }); + // Cancel button. + $("form.wysiwyg").find(".cssWrap-cancel").click(function (e) { + e.preventDefault(); + $this.dialog("close"); + return 1; + }); + }, + close: function () { + $(this).dialog("destroy"); + $(this).remove(); + } + }); + Wysiwyg.saveContent(); + } + $(Wysiwyg.editorDoc).trigger("editorRefresh.wysiwyg"); + return 1; + } + }; +})(jQuery); diff --git a/src/js/plugins/wysiwyg/wysiwyg.image.js b/src/js/plugins/wysiwyg/wysiwyg.image.js new file mode 100644 index 0000000..d940f93 --- /dev/null +++ b/src/js/plugins/wysiwyg/wysiwyg.image.js @@ -0,0 +1,285 @@ +/** + * Controls: Image plugin + * + * Depends on jWYSIWYG + */ +(function ($) { + "use strict"; + + if (undefined === $.wysiwyg) { + throw "wysiwyg.image.js depends on $.wysiwyg"; + } + + if (!$.wysiwyg.controls) { + $.wysiwyg.controls = {}; + } + + /* + * Wysiwyg namespace: public properties and methods + */ + $.wysiwyg.controls.image = { + groupIndex: 6, + visible: true, + exec: function () { + $.wysiwyg.controls.image.init(this); + }, + tags: ["img"], + tooltip: "Insert image", + init: function (Wysiwyg) { + var self = this, elements, adialog, dialog, formImageHtml, regexp, dialogReplacements, key, translation, + img = { + alt: "", + self: Wysiwyg.dom ? Wysiwyg.dom.getElement("img") : null, // link to element node + src: "http://", + title: "" + }; + + dialogReplacements = { + legend : "Insert Image", + preview : "Preview", + url : "URL", + title : "Title", + description : "Description", + width : "Width", + height : "Height", + original : "Original W x H", + "float" : "Float", + floatNone : "None", + floatLeft : "Left", + floatRight : "Right", + submit : "Insert Image", + reset : "Cancel", + fileManagerIcon : "Select file from server" + }; + + formImageHtml = '
                  ' + + '
                  {preview}:
                  {preview}
                  ' + + '
                  '; + + if ($.wysiwyg.fileManager && $.wysiwyg.fileManager.ready) { + // Add the File Manager icon: + formImageHtml += '
                  '; + } + + formImageHtml += '
                  ' + + '
                  ' + + '
                  ' + + '
                  x
                  ' + + '
                  x ' + + '
                  ' + + '
                  ' + + '
                  ' + + '
                  '; + + for (key in dialogReplacements) { + if ($.wysiwyg.i18n) { + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs.image"); + + if (translation === dialogReplacements[key]) { // if not translated search in dialogs + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs"); + } + + dialogReplacements[key] = translation; + } + + regexp = new RegExp("{" + key + "}", "g"); + formImageHtml = formImageHtml.replace(regexp, dialogReplacements[key]); + } + + if (img.self) { + img.src = img.self.src ? img.self.src : ""; + img.alt = img.self.alt ? img.self.alt : ""; + img.title = img.self.title ? img.self.title : ""; + img.width = img.self.width ? img.self.width : ""; + img.height = img.self.height ? img.self.height : ""; + img.styleFloat = $(img.self).css("float"); + } + + adialog = new $.wysiwyg.dialog(Wysiwyg, { + "title" : dialogReplacements.legend, + "content" : formImageHtml + }); + + $(adialog).bind("afterOpen", function (e, dialog) { + dialog.find("form#wysiwyg-addImage").submit(function (e) { + e.preventDefault(); + self.processInsert(dialog.container, Wysiwyg, img); + + adialog.close(); + return false; + }); + + // File Manager (select file): + if ($.wysiwyg.fileManager) { + $("div.wysiwyg-fileManager").bind("click", function () { + $.wysiwyg.fileManager.init(function (selected) { + dialog.find("input[name=src]").val(selected); + dialog.find("input[name=src]").trigger("change"); + }); + }); + } + + $("input:reset", dialog).click(function (e) { + adialog.close(); + + return false; + }); + + $("fieldset", dialog).click(function (e) { + e.stopPropagation(); + }); + + self.makeForm(dialog, img); + }); + + adialog.open(); + + $(Wysiwyg.editorDoc).trigger("editorRefresh.wysiwyg"); + }, + + processInsert: function (context, Wysiwyg, img) { + var image, + url = $('input[name="src"]', context).val(), + title = $('input[name="imgtitle"]', context).val(), + description = $('input[name="description"]', context).val(), + width = $('input[name="width"]', context).val(), + height = $('input[name="height"]', context).val(), + styleFloat = $('select[name="float"]', context).val(), + styles = [], + style = "", + found, + baseUrl; + + if (Wysiwyg.options.controlImage && Wysiwyg.options.controlImage.forceRelativeUrls) { + baseUrl = window.location.protocol + "//" + window.location.hostname + + (window.location.port ? ":" + window.location.port : ""); + if (0 === url.indexOf(baseUrl)) { + url = url.substr(baseUrl.length); + } + } + + if (img.self) { + // to preserve all img attributes + $(img.self).attr("src", url) + .attr("title", title) + .attr("alt", description) + .css("float", styleFloat); + + if (width.toString().match(/^[0-9]+(px|%)?$/)) { + $(img.self).css("width", width); + } else { + $(img.self).css("width", ""); + } + + if (height.toString().match(/^[0-9]+(px|%)?$/)) { + $(img.self).css("height", height); + } else { + $(img.self).css("height", ""); + } + + Wysiwyg.saveContent(); + } else { + found = width.toString().match(/^[0-9]+(px|%)?$/); + if (found) { + if (found[1]) { + styles.push("width: " + width + ";"); + } else { + styles.push("width: " + width + "px;"); + } + } + + found = height.toString().match(/^[0-9]+(px|%)?$/); + if (found) { + if (found[1]) { + styles.push("height: " + height + ";"); + } else { + styles.push("height: " + height + "px;"); + } + } + + if (styleFloat.length > 0) { + styles.push("float: " + styleFloat + ";"); + } + + if (styles.length > 0) { + style = ' style="' + styles.join(" ") + '"'; + } + + image = "" + description + ""; + Wysiwyg.insertHtml(image); + } + }, + + makeForm: function (form, img) { + form.find("input[name=src]").val(img.src); + form.find("input[name=imgtitle]").val(img.title); + form.find("input[name=description]").val(img.alt); + form.find('input[name="width"]').val(img.width); + form.find('input[name="height"]').val(img.height); + form.find('select[name="float"]').val(img.styleFloat); + form.find('img').attr("src", img.src); + + form.find('img').bind("load", function () { + if (form.find('img').get(0).naturalWidth) { + form.find('input[name="naturalWidth"]').val(form.find('img').get(0).naturalWidth); + form.find('input[name="naturalHeight"]').val(form.find('img').get(0).naturalHeight); + } else if (form.find('img').attr("naturalWidth")) { + form.find('input[name="naturalWidth"]').val(form.find('img').attr("naturalWidth")); + form.find('input[name="naturalHeight"]').val(form.find('img').attr("naturalHeight")); + } + }); + + form.find("input[name=src]").bind("change", function () { + form.find('img').attr("src", this.value); + }); + + return form; + } + }; + + $.wysiwyg.insertImage = function (object, url, attributes) { + return object.each(function () { + var Wysiwyg = $(this).data("wysiwyg"), + image, + attribute; + + if (!Wysiwyg) { + return this; + } + + if (!url || url.length === 0) { + return this; + } + + if ($.browser.msie) { + Wysiwyg.ui.focus(); + } + + if (attributes) { + Wysiwyg.editorDoc.execCommand("insertImage", false, "#jwysiwyg#"); + image = Wysiwyg.getElementByAttributeValue("img", "src", "#jwysiwyg#"); + + if (image) { + image.src = url; + + for (attribute in attributes) { + if (attributes.hasOwnProperty(attribute)) { + image.setAttribute(attribute, attributes[attribute]); + } + } + } + } else { + Wysiwyg.editorDoc.execCommand("insertImage", false, url); + } + + Wysiwyg.saveContent(); + + $(Wysiwyg.editorDoc).trigger("editorRefresh.wysiwyg"); + + return this; + }); + }; +})(jQuery); diff --git a/src/js/plugins/wysiwyg/wysiwyg.link.js b/src/js/plugins/wysiwyg/wysiwyg.link.js new file mode 100644 index 0000000..be8a885 --- /dev/null +++ b/src/js/plugins/wysiwyg/wysiwyg.link.js @@ -0,0 +1,251 @@ +/** + * Controls: Link plugin + * + * Depends on jWYSIWYG + * + * By: Esteban Beltran (academo) + */ +(function ($) { + "use strict"; + + if (undefined === $.wysiwyg) { + throw "wysiwyg.link.js depends on $.wysiwyg"; + } + + if (!$.wysiwyg.controls) { + $.wysiwyg.controls = {}; + } + + /* + * Wysiwyg namespace: public properties and methods + */ + $.wysiwyg.controls.link = { + init: function (Wysiwyg) { + var self = this, elements, dialog, url, a, selection, + formLinkHtml, dialogReplacements, key, translation, regexp, + baseUrl, img; + + dialogReplacements = { + legend: "Insert Link", + url : "Link URL", + title : "Link Title", + target: "Link Target", + submit: "Insert Link", + reset: "Cancel" + }; + + formLinkHtml = '
                  ' + + '

                  ' + + '

                  ' + + '

                  ' + + '

                  ' + + '

                  '; + + for (key in dialogReplacements) { + if ($.wysiwyg.i18n) { + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs.link"); + + if (translation === dialogReplacements[key]) { // if not translated search in dialogs + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs"); + } + + dialogReplacements[key] = translation; + } + + regexp = new RegExp("{" + key + "}", "g"); + formLinkHtml = formLinkHtml.replace(regexp, dialogReplacements[key]); + } + + a = { + self: Wysiwyg.dom.getElement("a"), // link to element node + href: "http://", + title: "", + target: "" + }; + + if (a.self) { + a.href = a.self.href ? a.self.href : a.href; + a.title = a.self.title ? a.self.title : ""; + a.target = a.self.target ? a.self.target : ""; + } + + if ($.fn.dialog) { + elements = $(formLinkHtml); + elements.find("input[name=linkhref]").val(a.href); + elements.find("input[name=linktitle]").val(a.title); + elements.find("input[name=linktarget]").val(a.target); + + if ($.browser.msie) { + try { + dialog = elements.appendTo(Wysiwyg.editorDoc.body); + } catch (err) { + dialog = elements.appendTo("body"); + } + } else { + dialog = elements.appendTo("body"); + } + + dialog.dialog({ + modal: true, + title: 'Insert Link', + closeText: 'x', + open: function (ev, ui) { + $("input:submit", dialog).click(function (e) { + e.preventDefault(); + + var url = $('input[name="linkhref"]', dialog).val(), + title = $('input[name="linktitle"]', dialog).val(), + target = $('input[name="linktarget"]', dialog).val(), + baseUrl, + img; + + if (Wysiwyg.options.controlLink.forceRelativeUrls) { + baseUrl = window.location.protocol + "//" + window.location.hostname; + if (0 === url.indexOf(baseUrl)) { + url = url.substr(baseUrl.length); + } + } + + if (a.self) { + if ("string" === typeof (url)) { + if (url.length > 0) { + // to preserve all link attributes + $(a.self).attr("href", url).attr("title", title).attr("target", target); + } else { + $(a.self).replaceWith(a.self.innerHTML); + } + } + } else { + if ($.browser.msie) { + Wysiwyg.ui.returnRange(); + } + + //Do new link element + selection = Wysiwyg.getRangeText(); + img = Wysiwyg.dom.getElement("img"); + + if ((selection && selection.length > 0) || img) { + if ($.browser.msie) { + Wysiwyg.ui.focus(); + } + + if ("string" === typeof (url)) { + if (url.length > 0) { + Wysiwyg.editorDoc.execCommand("createLink", false, url); + } else { + Wysiwyg.editorDoc.execCommand("unlink", false, null); + } + } + + a.self = Wysiwyg.dom.getElement("a"); + + $(a.self).attr("href", url).attr("title", title); + + /** + * @url https://github.com/akzhan/jwysiwyg/issues/16 + */ + $(a.self).attr("target", target); + } else if (Wysiwyg.options.messages.nonSelection) { + window.alert(Wysiwyg.options.messages.nonSelection); + } + } + + Wysiwyg.saveContent(); + + $(dialog).dialog("close"); + }); + $("input:reset", dialog).click(function (e) { + e.preventDefault(); + $(dialog).dialog("close"); + }); + }, + close: function (ev, ui) { + dialog.dialog("destroy"); + dialog.remove(); + } + }); + } else { + if (a.self) { + url = window.prompt("URL", a.href); + + if (Wysiwyg.options.controlLink.forceRelativeUrls) { + baseUrl = window.location.protocol + "//" + window.location.hostname; + if (0 === url.indexOf(baseUrl)) { + url = url.substr(baseUrl.length); + } + } + + if ("string" === typeof (url)) { + if (url.length > 0) { + $(a.self).attr("href", url); + } else { + $(a.self).replaceWith(a.self.innerHTML); + } + } + } else { + //Do new link element + selection = Wysiwyg.getRangeText(); + img = Wysiwyg.dom.getElement("img"); + + if ((selection && selection.length > 0) || img) { + if ($.browser.msie) { + Wysiwyg.ui.focus(); + Wysiwyg.editorDoc.execCommand("createLink", true, null); + } else { + url = window.prompt(dialogReplacements.url, a.href); + + if (Wysiwyg.options.controlLink.forceRelativeUrls) { + baseUrl = window.location.protocol + "//" + window.location.hostname; + if (0 === url.indexOf(baseUrl)) { + url = url.substr(baseUrl.length); + } + } + + if ("string" === typeof (url)) { + if (url.length > 0) { + Wysiwyg.editorDoc.execCommand("createLink", false, url); + } else { + Wysiwyg.editorDoc.execCommand("unlink", false, null); + } + } + } + } else if (Wysiwyg.options.messages.nonSelection) { + window.alert(Wysiwyg.options.messages.nonSelection); + } + } + + Wysiwyg.saveContent(); + } + + $(Wysiwyg.editorDoc).trigger("editorRefresh.wysiwyg"); + } + }; + + $.wysiwyg.createLink = function (object, url) { + return object.each(function () { + var oWysiwyg = $(this).data("wysiwyg"), + selection; + + if (!oWysiwyg) { + return this; + } + + if (!url || url.length === 0) { + return this; + } + + selection = oWysiwyg.getRangeText(); + + if (selection && selection.length > 0) { + if ($.browser.msie) { + oWysiwyg.ui.focus(); + } + oWysiwyg.editorDoc.execCommand("unlink", false, null); + oWysiwyg.editorDoc.execCommand("createLink", false, url); + } else if (oWysiwyg.options.messages.nonSelection) { + window.alert(oWysiwyg.options.messages.nonSelection); + } + return this; + }); + }; +})(jQuery); diff --git a/src/js/plugins/wysiwyg/wysiwyg.table.js b/src/js/plugins/wysiwyg/wysiwyg.table.js new file mode 100644 index 0000000..d8372de --- /dev/null +++ b/src/js/plugins/wysiwyg/wysiwyg.table.js @@ -0,0 +1,129 @@ +/** + * Controls: Table plugin + * + * Depends on jWYSIWYG + */ +(function ($) { + "use strict"; + + if (undefined === $.wysiwyg) { + throw "wysiwyg.table.js depends on $.wysiwyg"; + } + + if (!$.wysiwyg.controls) { + $.wysiwyg.controls = {}; + } + + var insertTable = function (colCount, rowCount, filler) { + if (isNaN(rowCount) || isNaN(colCount) || rowCount === null || colCount === null) { + return; + } + + var i, j, html = ['']; + + colCount = parseInt(colCount, 10); + rowCount = parseInt(rowCount, 10); + + if (filler === null) { + filler = " "; + } + filler = ""; + + for (i = rowCount; i > 0; i -= 1) { + html.push(""); + for (j = colCount; j > 0; j -= 1) { + html.push(filler); + } + html.push(""); + } + html.push("
                  " + filler + "
                  "); + + return this.insertHtml(html.join("")); + }; + + /* + * Wysiwyg namespace: public properties and methods + */ + $.wysiwyg.controls.table = function (Wysiwyg) { + var adialog, dialog, colCount, rowCount, formTableHtml, dialogReplacements, key, translation, regexp; + + dialogReplacements = { + legend: "Insert table", + cols : "Count of columns", + rows : "Count of rows", + submit: "Insert table", + reset: "Cancel" + }; + + formTableHtml = '
                  ' + + '

                  ' + + '

                  ' + + '

                  ' + + '

                  '; + + for (key in dialogReplacements) { + if ($.wysiwyg.i18n) { + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs.table"); + + if (translation === dialogReplacements[key]) { // if not translated search in dialogs + translation = $.wysiwyg.i18n.t(dialogReplacements[key], "dialogs"); + } + + dialogReplacements[key] = translation; + } + + regexp = new RegExp("{" + key + "}", "g"); + formTableHtml = formTableHtml.replace(regexp, dialogReplacements[key]); + } + + if (!Wysiwyg.insertTable) { + Wysiwyg.insertTable = insertTable; + } + + adialog = new $.wysiwyg.dialog(Wysiwyg, { + "title" : dialogReplacements.legend, + "content" : formTableHtml, + "open" : function (e, dialog) { + dialog.find("form#wysiwyg-tableInsert").submit(function (e) { + e.preventDefault(); + rowCount = dialog.find("input[name=rowCount]").val(); + colCount = dialog.find("input[name=colCount]").val(); + + Wysiwyg.insertTable(colCount, rowCount, Wysiwyg.defaults.tableFiller); + + adialog.close(); + return false; + }); + + dialog.find("input:reset").click(function (e) { + e.preventDefault(); + adialog.close(); + return false; + }); + } + }); + + adialog.open(); + + $(Wysiwyg.editorDoc).trigger("editorRefresh.wysiwyg"); + }; + + $.wysiwyg.insertTable = function (object, colCount, rowCount, filler) { + return object.each(function () { + var Wysiwyg = $(this).data("wysiwyg"); + + if (!Wysiwyg.insertTable) { + Wysiwyg.insertTable = insertTable; + } + + if (!Wysiwyg) { + return this; + } + + Wysiwyg.insertTable(colCount, rowCount, filler); + $(Wysiwyg.editorDoc).trigger("editorRefresh.wysiwyg"); + + return this; + }); + }; +})(jQuery); diff --git a/src/pages/info.html b/src/pages/info.html new file mode 100644 index 0000000..54216b7 --- /dev/null +++ b/src/pages/info.html @@ -0,0 +1,41 @@ +
                  +

                  Notifications

                  + + +
                  \ No newline at end of file diff --git a/src/pages/message.html b/src/pages/message.html new file mode 100644 index 0000000..5602c49 --- /dev/null +++ b/src/pages/message.html @@ -0,0 +1,21 @@ +
                  +

                  Messages

                  + + +
                  \ No newline at end of file diff --git a/src/php/connector.php b/src/php/connector.php new file mode 100644 index 0000000..b95dc4f --- /dev/null +++ b/src/php/connector.php @@ -0,0 +1,89 @@ + '../files', // path to root directory + 'URL' => 'http://localhost/files/', // root directory URL + 'rootAlias' => 'Home', // display this instead of root directory name + //'uploadAllow' => array('images/*'), + //'uploadDeny' => array('all'), + //'uploadOrder' => 'deny,allow' + // 'disabled' => array(), // list of not allowed commands + // 'dotFiles' => false, // display dot files + // 'dirSize' => true, // count total directories sizes + // 'fileMode' => 0666, // new files mode + // 'dirMode' => 0777, // new folders mode + // 'mimeDetect' => 'internal', // files mimetypes detection method (finfo, mime_content_type, linux (file -ib), bsd (file -Ib), internal (by extensions)) + // 'uploadAllow' => array(), // mimetypes which allowed to upload + // 'uploadDeny' => array(), // mimetypes which not allowed to upload + // 'uploadOrder' => 'deny,allow', // order to proccess uploadAllow and uploadAllow options + // 'imgLib' => 'mogrify', // image manipulation library (imagick, mogrify, gd) + // 'tmbDir' => '.tmb', // directory name for image thumbnails. Set to "" to avoid thumbnails generation + // 'tmbCleanProb' => 1, // how frequiently clean thumbnails dir (0 - never, 100 - every init request) + // 'tmbAtOnce' => 5, // number of thumbnails to generate per request + // 'tmbSize' => 48, // images thumbnails size (px) + // 'fileURL' => true, // display file URL in "get info" + // 'dateFormat' => 'j M Y H:i', // file modification date format + // 'logger' => null, // object logger + // 'defaults' => array( // default permisions + // 'read' => true, + // 'write' => true, + // 'rm' => true + // ), + // 'perms' => array(), // individual folders/files permisions + // 'debug' => true, // send debug to client + // 'archiveMimes' => array(), // allowed archive's mimetypes to create. Leave empty for all available types. + // 'archivers' => array() // info about archivers to use. See example below. Leave empty for auto detect + // 'archivers' => array( + // 'create' => array( + // 'application/x-gzip' => array( + // 'cmd' => 'tar', + // 'argc' => '-czf', + // 'ext' => 'tar.gz' + // ) + // ), + // 'extract' => array( + // 'application/x-gzip' => array( + // 'cmd' => 'tar', + // 'argc' => '-xzf', + // 'ext' => 'tar.gz' + // ), + // 'application/x-bzip2' => array( + // 'cmd' => 'tar', + // 'argc' => '-xjf', + // 'ext' => 'tar.bz' + // ) + // ) + // ) +); + +$fm = new elFinder($opts); +$fm->run(); + +?> diff --git a/src/php/elFinder.class.php b/src/php/elFinder.class.php new file mode 100644 index 0000000..badba75 --- /dev/null +++ b/src/php/elFinder.class.php @@ -0,0 +1,1995 @@ + '', // path to root directory + 'URL' => '', // root directory URL + 'rootAlias' => 'Home', // display this instead of root directory name + 'disabled' => array(), // list of not allowed commands + 'dotFiles' => false, // display dot files + 'dirSize' => true, // count total directories sizes + 'fileMode' => 0666, // new files mode + 'dirMode' => 0777, // new folders mode + 'mimeDetect' => 'auto', // files mimetypes detection method (finfo, mime_content_type, linux (file -ib), bsd (file -Ib), internal (by extensions)) + 'uploadAllow' => array(), // mimetypes which allowed to upload + 'uploadDeny' => array(), // mimetypes which not allowed to upload + 'uploadOrder' => 'deny,allow', // order to proccess uploadAllow and uploadAllow options + 'imgLib' => 'auto', // image manipulation library (imagick, mogrify, gd) + 'tmbDir' => '.tmb', // directory name for image thumbnails. Set to "" to avoid thumbnails generation + 'tmbCleanProb' => 1, // how frequiently clean thumbnails dir (0 - never, 200 - every init request) + 'tmbAtOnce' => 5, // number of thumbnails to generate per request + 'tmbSize' => 48, // images thumbnails size (px) + 'tmbCrop' => true, // crop thumbnails (true - crop, false - scale image to fit thumbnail size) + 'tmbBgColor' => '#ffffff', // thumbnail background color + 'fileURL' => true, // display file URL in "get info" + 'dateFormat' => 'j M Y H:i', // file modification date format + 'logger' => null, // object logger + 'aclObj' => null, // acl object (not implemented yet) + 'aclRole' => 'user', // role for acl + 'defaults' => array( // default permisions + 'read' => true, + 'write' => true, + 'rm' => true + ), + 'perms' => array(), // individual folders/files permisions + 'debug' => false, // send debug to client + 'archiveMimes' => array(), // allowed archive's mimetypes to create. Leave empty for all available types. + 'archivers' => array() // info about archivers to use. See example below. Leave empty for auto detect + // 'archivers' => array( + // 'create' => array( + // 'application/x-gzip' => array( + // 'cmd' => 'tar', + // 'argc' => '-czf', + // 'ext' => 'tar.gz' + // ) + // ), + // 'extract' => array( + // 'application/x-gzip' => array( + // 'cmd' => 'tar', + // 'argc' => '-xzf', + // 'ext' => 'tar.gz' + // ), + // 'application/x-bzip2' => array( + // 'cmd' => 'tar', + // 'argc' => '-xjf', + // 'ext' => 'tar.bz' + // ) + // ) + // ) + ); + + /** + * mapping $_GET['cmd]/$_POST['cmd] to class methods + * + * @var array + **/ + protected $_commands = array( + 'open' => '_open', + 'reload' => '_reload', + 'mkdir' => '_mkdir', + 'mkfile' => '_mkfile', + 'rename' => '_rename', + 'upload' => '_upload', + 'paste' => '_paste', + 'rm' => '_rm', + 'duplicate' => '_duplicate', + 'read' => '_fread', + 'edit' => '_edit', + 'archive' => '_archive', + 'extract' => '_extract', + 'resize' => '_resize', + 'tmb' => '_thumbnails', + 'ping' => '_ping' + ); + + /** + * List of commands to log + * + * @var string + **/ + public $_loggedCommands = array('mkdir', 'mkfile', 'rename', 'upload', 'paste', 'rm', 'duplicate', 'edit', 'resize'); + + /** + * Context to log command + * + * @var string + **/ + protected $_logContext = array(); + + /** + * extensions/mimetypes for _mimetypeDetect = 'internal' + * + * @var array + **/ + protected $_mimeTypes = array( + //applications + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'exe' => 'application/octet-stream', + 'doc' => 'application/vnd.ms-word', + 'xls' => 'application/vnd.ms-excel', + 'ppt' => 'application/vnd.ms-powerpoint', + 'pps' => 'application/vnd.ms-powerpoint', + 'pdf' => 'application/pdf', + 'xml' => 'application/xml', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'swf' => 'application/x-shockwave-flash', + // archives + 'gz' => 'application/x-gzip', + 'tgz' => 'application/x-gzip', + 'bz' => 'application/x-bzip2', + 'bz2' => 'application/x-bzip2', + 'tbz' => 'application/x-bzip2', + 'zip' => 'application/zip', + 'rar' => 'application/x-rar', + 'tar' => 'application/x-tar', + '7z' => 'application/x-7z-compressed', + // texts + 'txt' => 'text/plain', + 'php' => 'text/x-php', + 'html' => 'text/html', + 'htm' => 'text/html', + 'js' => 'text/javascript', + 'css' => 'text/css', + 'rtf' => 'text/rtf', + 'rtfd' => 'text/rtfd', + 'py' => 'text/x-python', + 'java' => 'text/x-java-source', + 'rb' => 'text/x-ruby', + 'sh' => 'text/x-shellscript', + 'pl' => 'text/x-perl', + 'sql' => 'text/x-sql', + // images + 'bmp' => 'image/x-ms-bmp', + 'jpg' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'gif' => 'image/gif', + 'png' => 'image/png', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'tga' => 'image/x-targa', + 'psd' => 'image/vnd.adobe.photoshop', + //audio + 'mp3' => 'audio/mpeg', + 'mid' => 'audio/midi', + 'ogg' => 'audio/ogg', + 'mp4a' => 'audio/mp4', + 'wav' => 'audio/wav', + 'wma' => 'audio/x-ms-wma', + // video + 'avi' => 'video/x-msvideo', + 'dv' => 'video/x-dv', + 'mp4' => 'video/mp4', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mov' => 'video/quicktime', + 'wm' => 'video/x-ms-wmv', + 'flv' => 'video/x-flv', + 'mkv' => 'video/x-matroska' + ); + + /** + * undocumented class variable + * + * @var string + **/ + protected $_time = 0; + + /** + * Additional data about error + * + * @var array + **/ + protected $_errorData = array(); + + /** + * undocumented class variable + * + * @var string + **/ + protected $_fakeRoot = ''; + + /** + * Command result to send to client + * + * @var array + **/ + protected $_result = array(); + + /** + * undocumented class variable + * + * @var string + **/ + protected $_today = 0; + + /** + * undocumented class variable + * + * @var string + **/ + protected $_yesterday = 0; + + /** + * constructor + * + * @param array object options + * @return void + **/ + public function __construct($options=array()) { + foreach ($this->_options as $k=>$v) { + if (isset($options[$k])) { + $this->_options[$k] = is_array($this->_options[$k]) + ? array_merge($this->_options[$k], $options[$k]) + : $options[$k]; + } + } + + if (substr($this->_options['root'], -1) == DIRECTORY_SEPARATOR) { + $this->_options['root'] = substr($this->_options['root'], 0, -1); + } + + $this->_time = $this->_options['debug'] ? $this->_utime() : 0; + + $this->_fakeRoot = !$this->_options['rootAlias'] + ? $this->_options['root'] + : dirname($this->_options['root']).DIRECTORY_SEPARATOR.$this->_options['rootAlias']; + + if (!empty($this->_options['disabled'])) { + $no = array('open', 'reload', 'tmb', 'ping'); + foreach ($this->_options['disabled'] as $k => $c) { + if (!isset($this->_commands[$c]) || in_array($c, $no)) { + unset($this->_options['disabled'][$k]); + } else { + unset($this->_commands[$c]); + } + } + } + + if ($this->_options['tmbDir']) { + $tmbDir = $this->_options['root'].DIRECTORY_SEPARATOR.$this->_options['tmbDir']; + $this->_options['tmbDir'] = is_dir($tmbDir) || @mkdir($tmbDir, $this->_options['dirMode']) ? $tmbDir : ''; + } + if ($this->_options['tmbDir']) { + if (!in_array($this->_options['imgLib'], array('imagick', 'mogrify', 'gd'))) { + $this->_options['imgLib'] = $this->_getImgLib(); + } + } + $this->_today = mktime(0,0,0, date('m'), date('d'), date('Y')); + $this->_yesterday = $this->_today-86400; + } + + /** + * Proccess client request and output json + * + * @return void + **/ + public function run() { + if (!function_exists('json_encode')) { + exit('{"error":"PHP JSON module not installed"}'); + } + if (empty($this->_options['root']) || !is_dir($this->_options['root'])) { + exit(json_encode(array('error' => 'Invalid backend configuration'))); + } + if (!$this->_isAllowed($this->_options['root'], 'read')) { + exit(json_encode(array('error' => 'Access denied'))); + } + + $cmd = ''; + if (!empty($_POST['cmd'])) { + $cmd = trim($_POST['cmd']); + } elseif (!empty($_GET['cmd'])) { + $cmd = trim($_GET['cmd']); + } + if (!$cmd && $_SERVER["REQUEST_METHOD"] == 'POST') { + header("Content-Type: text/html"); + $this->_result['error'] = 'Data exceeds the maximum allowed size'; + exit(json_encode($this->_result)); + } + + if ($cmd && (empty($this->_commands[$cmd]) || !method_exists($this, $this->_commands[$cmd]))) { + exit(json_encode(array('error' => 'Unknown command'))); + } + + if (isset($_GET['init'])) { + + $ts = $this->_utime(); + $this->_result['disabled'] = array_values($this->_options['disabled']); + + $this->_result['params'] = array( + 'dotFiles' => $this->_options['dotFiles'], + 'uplMaxSize' => ini_get('upload_max_filesize'), + 'archives' => array(), + 'extract' => array(), + 'url' => $this->_options['fileURL'] ? $this->_options['URL'] : '' + ); + if (isset($this->_commands['archive']) || isset($this->_commands['extract'])) { + $this->_checkArchivers(); + if (isset($this->_commands['archive'])) { + $this->_result['params']['archives'] = $this->_options['archiveMimes']; + } + if (isset($this->_commands['extract'])) { + $this->_result['params']['extract'] = array_keys($this->_options['archivers']['extract']); + } + } + // clean thumbnails dir + if ($this->_options['tmbDir']) { + srand((double) microtime() * 1000000); + if (rand(1, 200) <= $this->_options['tmbCleanProb']) { + $ts2 = $this->_utime(); + $ls = scandir($this->_options['tmbDir']); + for ($i=0, $s = count($ls); $i < $s; $i++) { + if ('.' != $ls[$i] && '..' != $ls[$i]) { + @unlink($this->_options['tmbDir'].DIRECTORY_SEPARATOR.$ls[$i]); + } + } + } + } + + } + + if ($this->_options['debug']) { + $this->_result['debug'] = array( + 'time' => $this->_utime() - $this->_time, + 'mimeDetect' => $this->_options['mimeDetect'], + 'imgLib' => $this->_options['imgLib'] + ); + if ($this->_options['dirSize']) { + $this->_result['debug']['dirSize'] = true; + $this->_result['debug']['du'] = @$this->_options['du']; + } + } + + if ($cmd) { + $this->{$this->_commands[$cmd]}(); + } else { + $this->_open(); + } + + header("Content-Type: ".($cmd == 'upload' ? 'text/html' : 'application/json')); + header("Connection: close"); + echo json_encode($this->_result); + + if (!empty($this->_options['logger']) && in_array($cmd, $this->_loggedCommands)) { + $this->_options['logger']->log($cmd, empty($this->_result['error']), $this->_logContext, !empty($this->_result['error']) ? $this->_result['error'] : '', !empty($this->_result['errorData']) ? $this->_result['errorData'] : array()); + } + exit(); + } + + + /************************************************************/ + /** elFinder commands **/ + /************************************************************/ + + /** + * Return current dir content to client or output file content to browser + * + * @return void + **/ + protected function _open() + { + if (isset($_GET['current'])) { // read file + if (empty($_GET['current']) + || empty($_GET['target']) + || false == ($dir = $this->_findDir(trim($_GET['current']))) + || false == ($file = $this->_find(trim($_GET['target']), $dir)) + || is_dir($file) + ) { + header('HTTP/1.x 404 Not Found'); + exit('File not found'); + } + if (!$this->_isAllowed($dir, 'read') || !$this->_isAllowed($file, 'read')) { + header('HTTP/1.x 403 Access Denied'); + exit('Access denied'); + } + + if (filetype($file) == 'link') { + $file = $this->_readlink($file); + if (!$file || is_dir($file)) { + header('HTTP/1.x 404 Not Found'); + exit('File not found'); + } + if (!$this->_isAllowed(dirname($file), 'read') || !$this->_isAllowed($file, 'read')) { + header('HTTP/1.x 403 Access Denied'); + exit('Access denied'); + } + } + + $mime = $this->_mimetype($file); + $parts = explode('/', $mime); + $disp = $parts[0] == 'image' || $parts[0] == 'text' ? 'inline' : 'attachments'; + + header("Content-Type: ".$mime); + header("Content-Disposition: ".$disp."; filename=".basename($file)); + header("Content-Location: ".str_replace($this->_options['root'], '', $file)); + header('Content-Transfer-Encoding: binary'); + header("Content-Length: ".filesize($file)); + header("Connection: close"); + readfile($file); + exit(); + + } else { // enter directory + $path = $this->_options['root']; + if (!empty($_GET['target'])) { + if (false == ($p = $this->_findDir(trim($_GET['target'])))) { + if (!isset($_GET['init'])) { + $this->_result['error'] = 'Invalid parameters'; + } + } elseif (!$this->_isAllowed($p, 'read')) { + if (!isset($_GET['init'])) { + $this->_result['error'] = 'Access denied'; + } + } else { + $path = $p; + } + } + $this->_content($path, isset($_GET['tree'])); + } + } + + + /** + * Rename file/folder + * + * @return void + **/ + protected function _rename() + { + if (empty($_GET['current']) + || empty($_GET['target']) + || false == ($dir = $this->_findDir(trim($_GET['current']))) + || false == ($target = $this->_find(trim($_GET['target']), $dir)) + ) { + $this->_result['error'] = 'File not found'; + } elseif (false == ($name = $this->_checkName($_GET['name'])) ) { + $this->_result['error'] = 'Invalid name'; + } elseif (!$this->_isAllowed($dir, 'write')) { + $this->_result['error'] = 'Access denied'; + } elseif (file_exists($dir.DIRECTORY_SEPARATOR.$name)) { + $this->_result['error'] = 'File or folder with the same name already exists'; + } elseif (!rename($target, $dir.DIRECTORY_SEPARATOR.$name)) { + $this->_result['error'] = 'Unable to rename file'; + } else { + $this->_rmTmb($target); + $this->_logContext['from'] = $target; + $this->_logContext['to'] = $dir.DIRECTORY_SEPARATOR.$name; + $this->_result['select'] = array($this->_hash($dir.DIRECTORY_SEPARATOR.$name)); + $this->_content($dir, is_dir($dir.DIRECTORY_SEPARATOR.$name)); + } + } + + + /** + * Create new folder + * + * @return void + **/ + protected function _mkdir() + { + if (empty($_GET['current']) || false == ($dir = $this->_findDir(trim($_GET['current'])))) { + return $this->_result['error'] = 'Invalid parameters'; + } + $this->_logContext['dir'] = $dir.DIRECTORY_SEPARATOR.$_GET['name']; + if (!$this->_isAllowed($dir, 'write')) { + $this->_result['error'] = 'Access denied'; + } elseif (false == ($name = $this->_checkName($_GET['name'])) ) { + $this->_result['error'] = 'Invalid name'; + } elseif (file_exists($dir.DIRECTORY_SEPARATOR.$name)) { + $this->_result['error'] = 'File or folder with the same name already exists'; + } elseif (!@mkdir($dir.DIRECTORY_SEPARATOR.$name, $this->_options['dirMode'])) { + $this->_result['error'] = 'Unable to create folder'; + } else { + $this->_logContext['dir'] = $dir.DIRECTORY_SEPARATOR.$name; + $this->_result['select'] = array($this->_hash($dir.DIRECTORY_SEPARATOR.$name)); + $this->_content($dir, true); + } + } + + /** + * Create new empty file + * + * @return void + **/ + protected function _mkfile() + { + if (empty($_GET['current']) + || false == ($dir = $this->_findDir(trim($_GET['current'])))) { + return $this->_result['error'] = 'Invalid parameters'; + } + $this->_logContext['file'] = $dir.DIRECTORY_SEPARATOR.$_GET['name']; + if (!$this->_isAllowed($dir, 'write')) { + $this->_result['error'] = 'Access denied'; + } elseif (false == ($name = $this->_checkName($_GET['name'])) ) { + $this->_result['error'] = 'Invalid name'; + } elseif (file_exists($dir.DIRECTORY_SEPARATOR.$name)) { + $this->_result['error'] = 'File or folder with the same name already exists'; + } else { + $f = $dir.DIRECTORY_SEPARATOR.$name; + $this->_logContext['file'] = $f; + if (false != ($fp = @fopen($f, 'wb'))) { + fwrite($fp, ""); + fclose($fp); + $this->_result['select'] = array($this->_hash($dir.DIRECTORY_SEPARATOR.$name)); + $this->_content($dir); + } else { + $this->_result['error'] = 'Unable to create file'; + } + } + } + + /** + * Remove files/folders + * + * @return void + **/ + protected function _rm() + { + if (empty($_GET['current']) + || false == ($dir = $this->_findDir(trim($_GET['current']))) + || (empty($_GET['targets']) || !is_array($_GET['targets']))) { + return $this->_result['error'] = 'Invalid parameters'; + } + + $this->_logContext['targets'] = array(); + foreach ($_GET['targets'] as $hash) { + if (false != ($f = $this->_find($hash, $dir))) { + $this->_remove($f); + $this->_logContext['targets'][] = $f; + } + } + if (!empty($this->_result['errorData'])) { + $this->_result['error'] = 'Unable to remove file'; + } + $this->_content($dir, true); + } + + /** + * Upload files + * + * @return void + **/ + protected function _upload() + { + + if (empty($_POST['current']) + || false == ($dir = $this->_findDir(trim($_POST['current'])))) { + return $this->_result['error'] = 'Invalid parameters'; + } + if (!$this->_isAllowed($dir, 'write')) { + return $this->_result['error'] = 'Access denied'; + } + if (empty($_FILES['upload'])) + { + return $this->_result['error'] = 'No file to upload'; + } + + $this->_logContext['upload'] = array(); + $this->_result['select'] = array(); + $total = 0; + for ($i=0, $s = count($_FILES['upload']['name']); $i < $s; $i++) { + if (!empty($_FILES['upload']['name'][$i])) { + $total++; + $this->_logContext['upload'][] = $_FILES['upload']['name'][$i]; + if ($_FILES['upload']['error'][$i] > 0) { + $error = 'Unable to upload file'; + switch ($_FILES['upload']['error'][$i]) { + case UPLOAD_ERR_INI_SIZE: + case UPLOAD_ERR_FORM_SIZE: + $error = 'File exceeds the maximum allowed filesize'; + break; + case UPLOAD_ERR_EXTENSION: + $error = 'Not allowed file type'; + break; + } + $this->_errorData($_FILES['upload']['name'][$i], $error); + } elseif (false == ($name = $this->_checkName($_FILES['upload']['name'][$i]))) { + $this->_errorData($_FILES['upload']['name'][$i], 'Invalid name'); + } elseif (!$this->_isUploadAllow($_FILES['upload']['name'][$i], $_FILES['upload']['tmp_name'][$i])) { + $this->_errorData($_FILES['upload']['name'][$i], 'Not allowed file type'); + } else { + $name = $this->_checkName($_FILES['upload']['name'][$i]); + $file = $dir.DIRECTORY_SEPARATOR.$name; + if (!@move_uploaded_file($_FILES['upload']['tmp_name'][$i], $file)) { + $this->_errorData($_FILES['upload']['name'][$i], 'Unable to save uploaded file'); + } else { + @chmod($file, $this->_options['fileMode']); + $this->_result['select'][] = $this->_hash($file); + } + } + } + } + + $errCnt = !empty($this->_result['errorData']) ? count($this->_result['errorData']) : 0; + + if ($errCnt == $total) { + $this->_result['error'] = 'Unable to upload files'; + } else { + if ($errCnt>0) { + $this->_result['error'] = 'Some files was not uploaded'; + } + $this->_content($dir); + } + + } + + /** + * Copy/move files/folders + * + * @return void + **/ + protected function _paste() + { + if (empty($_GET['current']) + || false == ($current = $this->_findDir(trim($_GET['current']))) + || empty($_GET['src']) + || false == ($src = $this->_findDir(trim($_GET['src']))) + || empty($_GET['dst']) + || false == ($dst = $this->_findDir(trim($_GET['dst']))) + || empty($_GET['targets']) || !is_array($_GET['targets']) + ) { + return $this->_result['error'] = 'Invalid parameters'; + } + $cut = !empty($_GET['cut']); + $this->_logContext['src'] = array(); + $this->_logContext['dest'] = $dst; + $this->_logContext['cut'] = $cut; + + + if (!$this->_isAllowed($dst, 'write') || !$this->_isAllowed($src, 'read')) { + return $this->_result['error'] = 'Access denied'; + } + + foreach ($_GET['targets'] as $hash) { + if (false == ($f = $this->_find($hash, $src))) { + return $this->_result['error'] = 'File not found' && $this->_content($current, true); + } + $this->_logContext['src'][] = $f; + $_dst = $dst.DIRECTORY_SEPARATOR.basename($f); + + if (0 === strpos($dst, $f)) { + return $this->_result['error'] = 'Unable to copy into itself' && $this->_content($current, true); + } elseif (file_exists($_dst)) { + return $this->_result['error'] = 'File or folder with the same name already exists' && $this->_content($current, true); + } elseif ($cut && !$this->_isAllowed($f, 'rm')) { + return $this->_result['error'] = 'Access denied' && $this->_content($current, true); + } + + if ($cut) { + if (!@rename($f, $_dst)) { + return $this->_result['error'] = 'Unable to move files' && $this->_content($current, true); + } elseif (!is_dir($f)) { + $this->_rmTmb($f); + } + } elseif (!$this->_copy($f, $_dst)) { + return $this->_result['error'] = 'Unable to copy files' && $this->_content($current, true); + } + } + $this->_content($current, true); + } + + /** + * Create file/folder copy with suffix - "copy" + * + * @return void + **/ + protected function _duplicate() + { + if (empty($_GET['current']) + || false == ($current = $this->_findDir(trim($_GET['current']))) + || empty($_GET['target']) + || false == ($target = $this->_find(trim($_GET['target']), $current)) + ) { + return $this->_result['error'] = 'Invalid parameters'; + } + $this->_logContext['target'] = $target; + if (!$this->_isAllowed($current, 'write') || !$this->_isAllowed($target, 'read')) { + return $this->_result['error'] = 'Access denied'; + } + $dup = $this->_uniqueName($target); + if (!$this->_copy($target, $dup)) { + return $this->_result['error'] = 'Unable to create file copy'; + } + $this->_result['select'] = array($this->_hash($dup)); + $this->_content($current, is_dir($target)); + } + + /** + * Resize image + * + * @return void + **/ + protected function _resize() + { + if (empty($_GET['current']) + || false == ($current = $this->_findDir(trim($_GET['current']))) + || empty($_GET['target']) + || false == ($target = $this->_find(trim($_GET['target']), $current)) + || empty($_GET['width']) || 0 >= ($width = intval($_GET['width'])) + || empty($_GET['height']) || 0 >= ($height = intval($_GET['height'])) + ) { + return $this->_result['error'] = 'Invalid parameters'; + } + $this->_logContext = array( + 'target' => $target, + 'width' => $width, + 'height' => $height + ); + if (!$this->_isAllowed($target, 'write')) { + return $this->_result['error'] = 'Access denied'; + } + if (0 !== strpos($this->_mimetype($target), 'image')) { + return $this->_result['error'] = 'File is not an image'; + } + if (!$this->_resizeImg($target, $width, $height)) { + return $this->_result['error'] = 'Unable to resize image'; + } + $this->_result['select'] = array($this->_hash($target)); + $this->_content($current); + } + + /** + * Create images thumbnails + * + * @return void + **/ + protected function _thumbnails() + { + if (!empty($this->_options['tmbDir']) && !empty($_GET['current']) && false != ($current = $this->_findDir(trim($_GET['current'])))) { + $this->_result['current'] = $this->_hash($current); + $this->_result['images'] = array(); + $ls = scandir($current); + $cnt = 0; + $max = $this->_options['tmbAtOnce'] > 0 ? intval($this->_options['tmbAtOnce']) : 5; + for ($i=0; $i < count($ls); $i++) { + if ($this->_isAccepted($ls[$i])) { + $path = $current.DIRECTORY_SEPARATOR.$ls[$i]; + if (is_readable($path) && $this->_canCreateTmb($this->_mimetype($path))) { + $tmb = $this->_tmbPath($path); + if (!file_exists($tmb)) { + if ($cnt>=$max) { + return $this->_result['tmb'] = true; + } elseif ($this->_tmb($path, $tmb)) { + $this->_result['images'][$this->_hash($path)] = $this->_path2url($tmb); + $cnt++; + } + } + } + } + } + } + } + + /** + * Return file content to client + * + * @return void + **/ + protected function _fread() + { + if (empty($_GET['current']) + || false == ($current = $this->_findDir(trim($_GET['current']))) + || empty($_GET['target']) + || false == ($target = $this->_find(trim($_GET['target']), $current)) + ) { + return $this->_result['error'] = 'Invalid parameters'; + } + if (!$this->_isAllowed($target, 'read')) { + return $this->_result['error'] = 'Access denied'; + } + $this->_result['content'] = @file_get_contents($target); + } + + /** + * Save data into text file. + * + * @return void + **/ + protected function _edit() + { + if (empty($_POST['current']) + || false == ($current = $this->_findDir(trim($_POST['current']))) + || empty($_POST['target']) + || false == ($target = $this->_find(trim($_POST['target']), $current)) + || !isset($_POST['content']) + ) { + return $this->_result['error'] = 'Invalid parameters'; + } + $this->_logContext['target'] = $target; + if (!$this->_isAllowed($target, 'write')) { + return $this->_result['error'] = 'Access denied'; + } + if (false === file_put_contents($target, trim($_POST['content']))) { + return $this->_result['error'] = 'Unable to write to file'; + } + $this->_result['target'] = $this->_info($target); + // $this->_result['select'] = array($this->_hash($target)); + } + + /** + * Create archive of selected type + * + * @return void + **/ + protected function _archive() + { + $this->_checkArchivers(); + if (empty($this->_options['archivers']['create']) + || empty($_GET['type']) + || empty($this->_options['archivers']['create'][$_GET['type']]) + || !in_array($_GET['type'], $this->_options['archiveMimes'])) { + return $this->_result['error'] = 'Invalid parameters'; + } + + if (empty($_GET['current']) + || empty($_GET['targets']) + || !is_array($_GET['targets']) + || false == ($dir = $this->_findDir(trim($_GET['current']))) + || !$this->_isAllowed($dir, 'write') + ) { + return $this->_result['error'] = 'Invalid parameters'; + } + + $files = array(); + $argc = ''; + foreach ($_GET['targets'] as $hash) { + if (false == ($f = $this->_find($hash, $dir))) { + return $this->_result['error'] = 'File not found'; + } + $files[] = $f; + $argc .= escapeshellarg(basename($f)).' '; + } + $arc = $this->_options['archivers']['create'][$_GET['type']]; + $name = count($files) == 1 ? basename($files[0]) : $_GET['name']; + $name = basename($this->_uniqueName($name.'.'.$arc['ext'], '')); + + $cwd = getcwd(); + chdir($dir); + $cmd = $arc['cmd'].' '.$arc['argc'].' '.escapeshellarg($name).' '.$argc; + exec($cmd, $o, $c); + chdir($cwd); + if (file_exists($dir.DIRECTORY_SEPARATOR.$name)) { + $this->_content($dir); + $this->_result['select'] = array($this->_hash($dir.DIRECTORY_SEPARATOR.$name)); + } else { + $this->_result['error'] = 'Unable to create archive'; + } + } + + /** + * Extract files from archive + * + * @return void + **/ + protected function _extract() + { + if (empty($_GET['current']) + || false == ($current = $this->_findDir(trim($_GET['current']))) + || empty($_GET['target']) + || false == ($file = $this->_find(trim($_GET['target']), $current)) + || !$this->_isAllowed($current, 'write') + ) { + return $this->_result['error'] = 'Invalid parameters'; + } + $this->_checkArchivers(); + $mime = $this->_mimetype($file); + if (empty($this->_options['archivers']['extract'][$mime])) { + return $this->_result['error'] = 'Invalid parameters'; + } + $cwd = getcwd(); + $arc = $this->_options['archivers']['extract'][$mime]; + $cmd = $arc['cmd'].' '.$arc['argc'].' '.escapeshellarg(basename($file)); + chdir(dirname($file)); + exec($cmd, $o, $c); + chdir($cwd); + if ($c == 0) { + $this->_content($current, true); + } else { + $this->_result['error'] = 'Unable to extract files from archive'; + } + } + + + /** + * Send header Connection: close. Required by safari to fix bug http://www.webmasterworld.com/macintosh_webmaster/3300569.htm + * + * @return void + **/ + protected function _ping() + { + exit(header("Connection: close")); + } + /************************************************************/ + /** "content" methods **/ + /************************************************************/ + /** + * Set current dir info, content and [dirs tree] + * + * @param string $path current dir path + * @param bool $tree set dirs tree? + * @return void + **/ + protected function _content($path, $tree=false) + { + $this->_cwd($path); + $this->_cdc($path); + if ($tree) { + $this->_result['tree'] = $this->_tree($this->_options['root']); + } + } + + /** + * Set current dir info + * + * @param string $path current dir path + * @return void + **/ + protected function _cwd($path) + { + $rel = $this->_options['rootAlias'] ? $this->_options['rootAlias'] : basename($this->_options['root']); + if ($path == $this->_options['root']) { + $name = $rel; + } else { + $name = basename($path); + $rel .= DIRECTORY_SEPARATOR.substr($path, strlen($this->_options['root'])+1); + } + $this->_result['cwd'] = array( + 'hash' => $this->_hash($path), + 'name' => $name, + 'mime' => 'directory', + 'rel' => $rel, + 'size' => 0, + 'date' => date($this->_options['dateFormat'], filemtime($path)), + 'read' => true, + 'write' => $this->_isAllowed($path, 'write'), + 'rm' => $path == $this->_options['root'] ? false : $this->_isAllowed($path, 'rm') + ); + } + + + /** + * Set current dir content + * + * @param string $path current dir path + * @return void + **/ + protected function _cdc($path) + { + $dirs = $files = array(); + $ls = scandir($path); + for ($i=0; $i < count($ls); $i++) { + if ($this->_isAccepted($ls[$i])) { + $info = $this->_info($path.DIRECTORY_SEPARATOR.$ls[$i]); + if ($info['mime'] == 'directory') { + $dirs[] = $info; + } else { + $files[] = $info; + } + } + } + $this->_result['cdc'] = array_merge($dirs, $files); + } + + /** + * Return file/folder info + * + * @param string $path file path + * @return array + **/ + protected function _info($path) + { + $type = filetype($path); + $stat = $type == 'link' ? lstat($path) : stat($path); + + if ($stat['mtime'] > $this->_today) { + $d = 'Today '.date('H:i', $stat['mtime']); + } elseif ($stat['mtime'] > $this->_yesterday) { + $d = 'Yesterday '.date('H:i', $stat['mtime']); + } else { + $d = date($this->_options['dateFormat'], $stat['mtime']); + } + + $info = array( + 'name' => htmlspecialchars(basename($path)), + 'hash' => $this->_hash($path), + 'mime' => $type == 'dir' ? 'directory' : $this->_mimetype($path), + 'date' => $d, + 'size' => $type == 'dir' ? $this->_dirSize($path) : $stat['size'], + 'read' => $this->_isAllowed($path, 'read'), + 'write' => $this->_isAllowed($path, 'write'), + 'rm' => $this->_isAllowed($path, 'rm'), + ); + + if ($type == 'link') { + if (false == ($lpath = $this->_readlink($path))) { + $info['mime'] = 'symlink-broken'; + return $info; + } + if (is_dir($lpath)) { + $info['mime'] = 'directory'; + } else { + $info['parent'] = $this->_hash(dirname($lpath)); + $info['mime'] = $this->_mimetype($lpath); + } + $info['link'] = $this->_hash($lpath); + $info['linkTo'] = ($this->_options['rootAlias'] ? $this->_options['rootAlias'] : basename($this->_options['root'])).substr($lpath, strlen($this->_options['root'])); + $info['read'] = $this->_isAllowed($lpath, 'read'); + $info['write'] = $this->_isAllowed($lpath, 'write'); + $info['rm'] = $this->_isAllowed($lpath, 'rm'); + } else { + $lpath = ''; + } + + if ($info['mime'] != 'directory') { + if ($this->_options['fileURL'] && $info['read']) { + $info['url'] = $this->_path2url($lpath ? $lpath : $path); + } + + if (0 === ($p = strpos($info['mime'], 'image'))) { + if (false != ($s = getimagesize($path))) { + $info['dim'] = $s[0].'x'.$s[1]; + } + if ($info['read']) { + $info['resize'] = isset($info['dim']) && $this->_canCreateTmb($info['mime']); + $tmb = $this->_tmbPath($path); + + if (file_exists($tmb)) { + $info['tmb'] = $this->_path2url($tmb); + } elseif ($info['resize']) { + $this->_result['tmb'] = true; + } + + } + } + } + return $info; + } + + /** + * Return directory tree (multidimensional array) + * + * @param string $path directory path + * @return array + **/ + protected function _tree($path) + { + $dir = array( + 'hash' => $this->_hash($path), + 'name' => $path == $this->_options['root'] && $this->_options['rootAlias'] ? $this->_options['rootAlias'] : basename($path), + 'read' => $this->_isAllowed($path, 'read'), + 'write' => $this->_isAllowed($path, 'write'), + 'dirs' => array() + ); + + if ($dir['read'] && (false != ($ls = scandir($path)))) { + for ($i=0; $i < count($ls); $i++) { + $p = $path.DIRECTORY_SEPARATOR.$ls[$i]; + if ($this->_isAccepted($ls[$i]) && is_dir($p) && !is_link($p)) { + $dir['dirs'][] = $this->_tree($p); + } + } + } + return $dir; + } + + /************************************************************/ + /** fs methods **/ + /************************************************************/ + + /** + * Return name for duplicated file/folder or new archive + * + * @param string $f file/folder name + * @param string $suffix file name suffix + * @return string + **/ + protected function _uniqueName($f, $suffix=' copy') + { + $dir = dirname($f); + $name = basename($f); + $ext = ''; + + if (!is_dir($f)) { + if (preg_match('/\.(tar\.gz|tar\.bz|tar\.bz2|[a-z0-9]{1,4})$/i', $name, $m)) { + $ext = '.'.$m[1]; + $name = substr($name, 0, strlen($name)-strlen($m[0])); + } + } + + if (preg_match('/('.$suffix.')(\d*)$/i', $name, $m)) { + $i = (int)$m[2]; + $name = substr($name, 0, strlen($name)-strlen($m[2])); + } else { + $name .= $suffix; + $i = 0; + $n = $dir.DIRECTORY_SEPARATOR.$name.$ext; + if (!file_exists($n)) { + return $n; + } + } + + while ($i++ <= 10000) { + $n = $dir.DIRECTORY_SEPARATOR.$name.$i.$ext; + if (!file_exists($n)) { + return $n; + } + } + return $dir.DIRECTORY_SEPARATOR.$name.md5($f).$ext; + } + + /** + * Remove file or folder (recursively) + * + * @param string $path fole/folder path + * @return void + **/ + protected function _remove($path) + { + if (!$this->_isAllowed($path, 'rm')) { + return $this->_errorData($path, 'Access denied'); + } + if (!is_dir($path)) { + if (!@unlink($path)) { + $this->_errorData($path, 'Unable to remove file'); + } else { + $this->_rmTmb($path); + } + } else { + $ls = scandir($path); + for ($i=0; $i < count($ls); $i++) { + if ('.' != $ls[$i] && '..' != $ls[$i]) { + $this->_remove($path.DIRECTORY_SEPARATOR.$ls[$i]); + } + } + if (!@rmdir($path)) { + return $this->_errorData($path, 'Unable to remove file'); + } + } + return true; + } + + /** + * Copy file/folder (recursively) + * + * @param string $src file/folder to copy + * @param string $trg destination name + * @return bool + **/ + protected function _copy($src, $trg) + { + if (!$this->_isAllowed($src, 'read')) { + return $this->_errorData($src, 'Access denied'); + } + + $dir = dirname($trg); + + if (!$this->_isAllowed($dir, 'write')) { + return $this->_errorData($dir, 'Access denied'); + } + if (file_exists($trg)) { + return $this->_errorData($src, 'File or folder with the same name already exists'); + } + + if (!is_dir($src)) { + if (!@copy($src, $trg)) { + return $this->_errorData($src, 'Unable to copy files'); + } + @chmod($trg, $this->_options['fileMode']); + } else { + + if (!@mkdir($trg, $this->_options['dirMode'])) { + return $this->_errorData($src, 'Unable to copy files'); + } + + $ls = scandir($src); + for ($i=0; $i < count($ls); $i++) { + if ('.' != $ls[$i] && '..' != $ls[$i]) { + $_src = $src.DIRECTORY_SEPARATOR.$ls[$i]; + $_trg = $trg.DIRECTORY_SEPARATOR.$ls[$i]; + if (is_dir($_src)) { + if (!$this->_copy($_src, $_trg)) { + return $this->_errorData($_src, 'Unable to copy files'); + } + } else { + if (!@copy($_src, $_trg)) { + return $this->_errorData($_src, 'Unable to copy files'); + } + @chmod($_trg, $this->_options['fileMode']); + } + } + } + } + return true; + } + + /** + * Check new file name for invalid simbols. Return name if valid + * + * @return string $n file name + * @return string + **/ + protected function _checkName($n) + { + $n = strip_tags(trim($n)); + if (!$this->_options['dotFiles'] && '.' == substr($n, 0, 1)) { + return false; + } + return preg_match('|^[^\\/\<\>:]+$|', $n) ? $n : false; + } + + /** + * Find folder by hash in required folder and subfolders + * + * @param string $hash folder hash + * @param string $path folder path to search in + * @return string + **/ + protected function _findDir($hash, $path='') + { + if (!$path) { + $path = $this->_options['root']; + if ($this->_hash($path) == $hash) { + return $path; + } + } + + if (false != ($ls = scandir($path))) { + for ($i=0; $i < count($ls); $i++) { + $p = $path.DIRECTORY_SEPARATOR.$ls[$i]; + if (is_link($p)) + { + $link = $this->_readlink($p); + //$this->_result['debug']['findDir_'.$p] = 'link to '.$link; + } + if ($this->_isAccepted($ls[$i]) && is_dir($p) && (!is_link($p))) { + if ($this->_hash($p) == $hash || false != ($p = $this->_findDir($hash, $p))) { + return $p; + } + } + } + } + } + + /** + * Find file/folder by hash in required folder + * + * @param string $hash file/folder hash + * @param string $path folder path to search in + **/ + protected function _find($hash, $path) + { + if (false != ($ls = scandir($path))) { + for ($i=0; $i < count($ls); $i++) { + if ($this->_isAccepted($ls[$i])) { + $p = $path.DIRECTORY_SEPARATOR.$ls[$i]; + if ($this->_hash($p) == $hash) { + return $p; + } + } + } + } + } + + + /** + * Return path of file on which link point to, if exists in root directory + * + * @param string $path symlink path + * @return string + **/ + protected function _readlink($path) + { + $target = readlink($path); + if ('/' != substr($target, 0, 1)) { + $target = dirname($path).DIRECTORY_SEPARATOR.$target; + } + $target = $this->_normpath($target); + $root = $this->_normpath($this->_options['root']); + return $target && file_exists($target) && 0 === strpos($target, $root) ? $target : false; + } + + /** + * Count total directory size if this allowed in options + * + * @param string $path directory path + * @return int + **/ + protected function _dirSize($path) + { + $size = 0; + if (!$this->_options['dirSize'] || !$this->_isAllowed($path, 'read')) { + return filesize($path); + } + if (!isset($this->_options['du'])) { + $this->_options['du'] = function_exists('exec') + ? exec('du -h '.escapeshellarg(__FILE__), $o, $s) > 0 && $s == 0 + : false; + } + if ($this->_options['du']) { + $size = intval(exec('du -k '.escapeshellarg($path)))*1024; + } else { + $ls = scandir($path); + for ($i=0; $i < count($ls); $i++) { + if ($this->_isAccepted($ls[$i])) { + $p = $path.DIRECTORY_SEPARATOR.$ls[$i]; + $size += filetype($p) == 'dir' && $this->_isAllowed($p, 'read') ? $this->_dirSize($p) : filesize($p); + } + } + } + return $size; + } + + /** + * Return file mimetype + * + * @param string $path file path + * @return string + **/ + protected function _mimetype($path) + { + if (empty($this->_options['mimeDetect']) || $this->_options['mimeDetect'] == 'auto') { + $this->_options['mimeDetect'] = $this->_getMimeDetect(); + } + + switch ($this->_options['mimeDetect']) { + case 'finfo': + if (empty($this->_finfo)) { + $this->_finfo = finfo_open(FILEINFO_MIME); + } + $type = @finfo_file($this->_finfo, $path); + break; + case 'php': + $type = mime_content_type($path); + break; + case 'linux': + $type = exec('file -ib '.escapeshellarg($path)); + break; + case 'bsd': + $type = exec('file -Ib '.escapeshellarg($path)); + break; + default: + $pinfo = pathinfo($path); + $ext = isset($pinfo['extension']) ? strtolower($pinfo['extension']) : ''; + $type = isset($this->_mimeTypes[$ext]) ? $this->_mimeTypes[$ext] : 'unknown;'; + } + $type = explode(';', $type); + + if ($this->_options['mimeDetect'] != 'internal' && $type[0] == 'application/octet-stream') { + $pinfo = pathinfo($path); + $ext = isset($pinfo['extension']) ? strtolower($pinfo['extension']) : ''; + if (!empty($ext) && !empty($this->_mimeTypes[$ext])) { + $type[0] = $this->_mimeTypes[$ext]; + } + } + + return $type[0]; + } + + /************************************************************/ + /** image manipulation **/ + /************************************************************/ + + /** + * Create image thumbnail + * + * @param string $img image file + * @param string $tmb thumbnail name + * @return bool + **/ + protected function _tmb($img, $tmb) + { + if (false == ($s = getimagesize($img))) { + return false; + } + $tmbSize = $this->_options['tmbSize']; + + if ($this->_options['tmbCrop'] == false) { + + /* Calculating image scale width and height */ + $xscale = $s[0] / $tmbSize; + $yscale = $s[1] / $tmbSize; + + if ($yscale > $xscale) { + $newwidth = round($s[0] * (1 / $yscale)); + $newheight = round($s[1] * (1 / $yscale)); + } else { + $newwidth = round($s[0] * (1 / $xscale)); + $newheight = round($s[1] * (1 / $xscale)); + } + + /* Keeping original dimensions if image fitting into thumbnail without scale */ + if ($s[0] <= $tmbSize && $s[1] <= $tmbSize) { + $newwidth = $s[0]; + $newheight = $s[1]; + } + + /* Calculating coordinates for aligning thumbnail */ + $align_y = ceil(($tmbSize - $newheight) / 2); + $align_x = ceil(($tmbSize - $newwidth) / 2); + } + + + + switch ($this->_options['imgLib']) { + case 'imagick': + try { + $_img = new imagick($img); + } catch (Exception $e) { + return false; + } + + $_img->contrastImage(1); + + if ($this->_options['tmbCrop'] == false) { + $img1 = new Imagick(); + $img1->newImage($tmbSize, $tmbSize, new ImagickPixel($this->_options['tmbBgColor'])); + $img1->setImageFormat('png'); + $_img->resizeImage($newwidth, $newheight, NULL, true); + $img1->compositeImage( $_img, imagick::COMPOSITE_OVER, $align_x, $align_y ); + return $img1->writeImage($tmb); + } else { + return $_img->cropThumbnailImage($tmbSize, $tmbSize) && $_img->writeImage($tmb); + } + break; + + case 'mogrify': + if (@copy($img, $tmb)) { + list($x, $y, $size) = $this->_cropPos($s[0], $s[1]); + // exec('mogrify -crop '.$size.'x'.$size.'+'.$x.'+'.$y.' -scale '.$tmbSize.'x'.$tmbSize.'! '.escapeshellarg($tmb), $o, $c); + + $mogrifyArgs = 'mogrify -resize ' . $tmbSize . 'x' . $tmbSize; + + if ($this->_options['tmbCrop'] == false) { + $mogrifyArgs .= ' -gravity center -background "' . $this->_options['tmbBgColor'] . '" -extent ' . $tmbSize . 'x' . $tmbSize; + } + + if ($this->_options['tmbCrop'] == false) { + $mogrifyArgs .= ' ' . escapeshellarg($tmb); + } + + exec($mogrifyArgs, $o, $c); + + if (file_exists($tmb)) { + return true; + } elseif ($c == 0) { + // find tmb for psd and animated gif + $mime = $this->_mimetype($img); + if ($mime == 'image/vnd.adobe.photoshop' || $mime = 'image/gif') { + $pinfo = pathinfo($tmb); + $test = $pinfo['dirname'].DIRECTORY_SEPARATOR.$pinfo['filename'].'-0.'.$pinfo['extension']; + if (file_exists($test)) { + return rename($test, $tmb); + } + } + } + } + break; + + case 'gd': + if ($s['mime'] == 'image/jpeg') { + $_img = imagecreatefromjpeg($img); + } elseif ($s['mime'] == 'image/png') { + $_img = imagecreatefrompng($img); + } elseif ($s['mime'] == 'image/gif') { + $_img = imagecreatefromgif($img); + } + if (!$_img || false == ($_tmb = imagecreatetruecolor($tmbSize, $tmbSize))) { + return false; + } + + if ($this->_options['tmbCrop'] == false) { + + list($r,$g,$b) = sscanf($this->_options['tmbBgColor'], "#%02x%02x%02x"); + + imagefill($_tmb, 0, 0, imagecolorallocate($_tmb, $r, $g, $b)); + + if (!imagecopyresampled($_tmb, $_img, $align_x, $align_y, 0, 0, $newwidth, $newheight, $s[0], $s[1])) { + return false; + } + + } else { + list($x, $y, $size) = $this->_cropPos($s[0], $s[1]); + if (!imagecopyresampled($_tmb, $_img, 0, 0, $x, $y, $tmbSize, $tmbSize, $size, $size)) { + return false; + } + } + + $r = imagepng($_tmb, $tmb, 7); + imagedestroy($_img); + imagedestroy($_tmb); + return $r; + break; + } + } + + /** + * Remove image thumbnail + * + * @param string $img image file + * @return void + **/ + protected function _rmTmb($img) + { + if ($this->_options['tmbDir'] && false != ($tmb = $this->_tmbPath($img)) && file_exists($tmb)) { + @unlink($tmb); + } + } + + /** + * Return x/y coord for crop image thumbnail + * + * @param int $w image width + * @param int $h image height + * @return array + **/ + protected function _cropPos($w, $h) + { + $x = $y = 0; + $size = min($w, $h); + if ($w > $h) { + $x = ceil(($w - $h)/2); + } else { + $y = ceil(($h - $w)/2); + } + return array($x, $y, $size); + } + + /** + * Resize image + * + * @param string $img image path + * @param int $w image width + * @param int $h image height + * @return bool + **/ + protected function _resizeImg($img, $w, $h) + { + if (false == ($s = getimagesize($img))) { + return false; + } + + switch ($this->_options['imgLib']) { + case 'imagick': + if (false != ($_img = new imagick($img))) { + return $_img->cropThumbnailImage($w, $h) && $_img->writeImage($img); + } + break; + case 'mogrify': + exec('mogrify -scale '.$w.'x'.$h.'! '.escapeshellarg($img), $o, $c); + return 0 == $c; + break; + case 'gd': + if ($s['mime'] == 'image/jpeg') { + $_img = imagecreatefromjpeg($img); + } elseif ($s['mime'] = 'image/png') { + $_img = imagecreatefrompng($img); + } elseif ($s['mime'] = 'image/gif') { + $_img = imagecreatefromgif($img); + } + if (!$_img || false == ($_out = imagecreatetruecolor($w, $h))) { + return false; + } + if (!imagecopyresampled($_out, $_img, 0, 0, 0, 0, $w, $h, $s[0], $s[1])) { + return false; + } + if ($s['mime'] == 'image/jpeg') { + $r = imagejpeg($_out, $img, 100); + } else if ($s['mime'] = 'image/png') { + $r = imagepng($_out, $img, 7); + } else { + $r = imagegif($_out, $img, 7); + } + imagedestroy($_img); + imagedestroy($_out); + return $r; + break; + } + + + } + + /** + * Return true if we can create thumbnail for file with this mimetype + * + * @param string $mime file mimetype + * @return bool + **/ + protected function _canCreateTmb($mime) + { + if ($this->_options['tmbDir'] && $this->_options['imgLib'] && 0 === strpos($mime, 'image')) { + if ('gd' == $this->_options['imgLib']) { + return $mime == 'image/jpeg' || $mime == 'image/png' || $mime == 'image/gif'; + } + return true; + } + } + + /** + * Return image thumbnail path. For thumbnail return itself + * + * @param string $path image path + * @return string + **/ + protected function _tmbPath($path) + { + $tmb = ''; + if ($this->_options['tmbDir']) { + $tmb = dirname($path) != $this->_options['tmbDir'] + ? $this->_options['tmbDir'].DIRECTORY_SEPARATOR.$this->_hash($path).'.png' + : $path; + } + return $tmb; + } + + /************************************************************/ + /** access control **/ + /************************************************************/ + + /** + * Return true if file's mimetype is allowed for upload + * + * @param string $name file name + * @param string $tmpName uploaded file tmp name + * @return bool + **/ + protected function _isUploadAllow($name, $tmpName) + { + $allow = false; + $deny = false; + $mime = $this->_mimetype($this->_options['mimeDetect'] != 'internal' ? $tmpName : $name); + + if (in_array('all', $this->_options['uploadAllow'])) { + $allow = true; + } else { + foreach ($this->_options['uploadAllow'] as $type) { + if (0 === strpos($mime, $type)) { + $allow = true; + } + } + } + + if (in_array('all', $this->_options['uploadDeny'])) { + $deny = true; + } else { + foreach ($this->_options['uploadDeny'] as $type) { + if (0 === strpos($mime, $type)) { + $deny = true; + } + } + } + + $this->_result['debug']['_isUploadAllow'][$name] = $mime; + + if (0 === strpos($this->_options['uploadOrder'], 'allow')) { // ,deny + if ($deny == true) { + return false; + } elseif ($allow == true) { + return true; + } else { + return false; + } + } else { // deny,allow + if ($allow == true) { + return true; + } elseif ($deny == true) { + return false; + } else { + return true; + } + } + } + + /** + * Return true if file name is not . or .. + * If file name begins with . return value according to $this->_options['dotFiles'] + * + * @param string $file file name + * @return bool + **/ + protected function _isAccepted($file) + { + if ('.' == $file || '..' == $file) { + return false; + } + if (!$this->_options['dotFiles'] && '.' == substr($file, 0, 1)) { + return false; + } + return true; + } + + /** + * Return true if requeired action allowed to file/folder + * + * @param string $path file/folder path + * @param string $action action name (read/write/rm) + * @return void + **/ + protected function _isAllowed($path, $action) { + + switch ($action) { + case 'read': + if (!is_readable($path)) { + return false; + } + break; + case 'write': + if (!is_writable($path)) { + return false; + } + break; + case 'rm': + if (!is_writable(dirname($path))) { + return false; + } + break; + } + + // if ($this->_options['aclObj']) { + // + // } + $path = substr($path, strlen($this->_options['root'])+1); + // echo "$path\n"; + foreach ($this->_options['perms'] as $regex => $rules) { + + if (preg_match($regex, $path)) { + if (isset($rules[$action])) { + return $rules[$action]; + } + } + } + return isset($this->_options['defaults'][$action]) ? $this->_options['defaults'][$action] : false; + } + + /************************************************************/ + /** utilites **/ + /************************************************************/ + + /** + * Return image manipalation library name + * + * @return string + **/ + protected function _getImgLib() + { + if (extension_loaded('imagick')) { + return 'imagick'; + } elseif (function_exists('exec')) { + exec('mogrify --version', $o, $c); + if ($c == 0) { + return 'mogrify'; + } + } + return function_exists('gd_info') ? 'gd' : ''; + } + + /** + * Return list of available archivers + * + * @return array + **/ + protected function _checkArchivers() + { + if (!function_exists('exec')) { + $this->_options['archivers'] = $this->_options['archive'] = array(); + return; + } + $arcs = array( + 'create' => array(), + 'extract' => array() + ); + + exec('tar --version', $o, $ctar); + if ($ctar == 0) { + $arcs['create']['application/x-tar'] = array('cmd' => 'tar', 'argc' => '-cf', 'ext' => 'tar'); + $arcs['extract']['application/x-tar'] = array('cmd' => 'tar', 'argc' => '-xf', 'ext' => 'tar'); + $test = exec('gzip --version', $o, $c); + if ($c == 0) { + $arcs['create']['application/x-gzip'] = array('cmd' => 'tar', 'argc' => '-czf', 'ext' => 'tgz'); + $arcs['extract']['application/x-gzip'] = array('cmd' => 'tar', 'argc' => '-xzf', 'ext' => 'tgz'); + } + $test = exec('bzip2 --version', $o, $c); + if ($c == 0) { + $arcs['create']['application/x-bzip2'] = array('cmd' => 'tar', 'argc' => '-cjf', 'ext' => 'tbz'); + $arcs['extract']['application/x-bzip2'] = array('cmd' => 'tar', 'argc' => '-xjf', 'ext' => 'tbz'); + } + } + + exec('zip --version', $o, $c); + if ($c == 0) { + $arcs['create']['application/zip'] = array('cmd' => 'zip', 'argc' => '-r9', 'ext' => 'zip'); + } + + exec('unzip --help', $o, $c); + if ($c == 0) { + $arcs['extract']['application/zip'] = array('cmd' => 'unzip', 'argc' => '', 'ext' => 'zip'); + } + + exec('rar --version', $o, $c); + if ($c == 0 || $c == 7) { + $arcs['create']['application/x-rar'] = array('cmd' => 'rar', 'argc' => 'a -inul', 'ext' => 'rar'); + $arcs['extract']['application/x-rar'] = array('cmd' => 'rar', 'argc' => 'x -y', 'ext' => 'rar'); + } else { + $test = exec('unrar', $o, $c); + if ($c==0 || $c == 7) { + $arcs['extract']['application/x-rar'] = array('cmd' => 'unrar', 'argc' => 'x -y', 'ext' => 'rar'); + } + } + + exec('7za --help', $o, $c); + if ($c == 0) { + $arcs['create']['application/x-7z-compressed'] = array('cmd' => '7za', 'argc' => 'a', 'ext' => '7z'); + $arcs['extract']['application/x-7z-compressed'] = array('cmd' => '7za', 'argc' => 'e -y', 'ext' => '7z'); + + if (empty($arcs['create']['application/x-gzip'])) { + $arcs['create']['application/x-gzip'] = array('cmd' => '7za', 'argc' => 'a -tgzip', 'ext' => 'tar.gz'); + } + if (empty($arcs['extract']['application/x-gzip'])) { + $arcs['extract']['application/x-gzip'] = array('cmd' => '7za', 'argc' => 'e -tgzip -y', 'ext' => 'tar.gz'); + } + if (empty($arcs['create']['application/x-bzip2'])) { + $arcs['create']['application/x-bzip2'] = array('cmd' => '7za', 'argc' => 'a -tbzip2', 'ext' => 'tar.bz'); + } + if (empty($arcs['extract']['application/x-bzip2'])) { + $arcs['extract']['application/x-bzip2'] = array('cmd' => '7za', 'argc' => 'a -tbzip2 -y', 'ext' => 'tar.bz'); + } + if (empty($arcs['create']['application/zip'])) { + $arcs['create']['application/zip'] = array('cmd' => '7za', 'argc' => 'a -tzip -l', 'ext' => 'zip'); + } + if (empty($arcs['extract']['application/zip'])) { + $arcs['extract']['application/zip'] = array('cmd' => '7za', 'argc' => 'e -tzip -y', 'ext' => 'zip'); + } + if (empty($arcs['create']['application/x-tar'])) { + $arcs['create']['application/x-tar'] = array('cmd' => '7za', 'argc' => 'a -ttar -l', 'ext' => 'tar'); + } + if (empty($arcs['extract']['application/x-tar'])) { + $arcs['extract']['application/x-tar'] = array('cmd' => '7za', 'argc' => 'e -ttar -y', 'ext' => 'tar'); + } + } + + $this->_options['archivers'] = $arcs; + foreach ($this->_options['archiveMimes'] as $k=>$mime) { + if (!isset($this->_options['archivers']['create'][$mime])) { + unset($this->_options['archiveMimes'][$k]); + } + } + if (empty($this->_options['archiveMimes'])) { + $this->_options['archiveMimes'] = array_keys($this->_options['archivers']['create']); + } + } + + + /** + * Return mimetype detect method name + * + * @return string + **/ + protected function _getMimeDetect() + { + if (class_exists('finfo')) { + return 'finfo'; + } elseif (function_exists('mime_content_type') && (mime_content_type(__FILE__) == 'text/x-php' || mime_content_type(__FILE__) == 'text/x-c++')) { + return 'mime_content_type'; + } elseif (function_exists('exec')) { + $type = exec('file -ib '.escapeshellarg(__FILE__)); + if (0 === strpos($type, 'text/x-php') || 0 === strpos($type, 'text/x-c++')) + { + return 'linux'; + } + $type = exec('file -Ib '.escapeshellarg(__FILE__)); + if (0 === strpos($type, 'text/x-php') || 0 === strpos($type, 'text/x-c++')) + { + return 'bsd'; + } + } + return 'internal'; + } + + + /** + * Return file path hash + * + * @param string $path + * @return string + **/ + protected function _hash($path) + { + return md5($path); + } + + /** + * Return file URL + * + * @param string $path + * @return string + **/ + protected function _path2url($path) + { + $dir = substr(dirname($path), strlen($this->_options['root'])+1); + $file = rawurlencode(basename($path)); + return $this->_options['URL'].($dir ? str_replace(DIRECTORY_SEPARATOR, '/', $dir).'/' : '').$file; + } + + /** + * Return normalized path, this works the same as os.path.normpath() in Python + * + * @param string $path path + * @return string + **/ + protected function _normpath($path) + { + if (empty($path)) + return '.'; + + if (strpos($path, '/') === 0) + $initial_slashes = true; + else + $initial_slashes = false; + if ( + ($initial_slashes) && + (strpos($path, '//') === 0) && + (strpos($path, '///') === false) + ) + $initial_slashes = 2; + $initial_slashes = (int) $initial_slashes; + + $comps = explode('/', $path); + $new_comps = array(); + foreach ($comps as $comp) + { + if (in_array($comp, array('', '.'))) + continue; + if ( + ($comp != '..') || + (!$initial_slashes && !$new_comps) || + ($new_comps && (end($new_comps) == '..')) + ) + array_push($new_comps, $comp); + elseif ($new_comps) + array_pop($new_comps); + } + $comps = $new_comps; + $path = implode('/', $comps); + if ($initial_slashes) + $path = str_repeat('/', $initial_slashes) . $path; + if ($path) + return $path; + else + return '.'; + } + + /** + * Pack error message in $this->_result['errorData'] + * + * @param string $path path to file + * @param string $msg error message + * @return bool always false + **/ + protected function _errorData($path, $msg) + { + $path = preg_replace('|^'.preg_quote($this->_options['root']).'|', $this->_fakeRoot, $path); + if (!isset($this->_result['errorData'])) { + $this->_result['errorData'] = array(); + } + $this->_result['errorData'][$path] = $msg; + return false; + } + + protected function _utime() + { + $time = explode(" ", microtime()); + return (double)$time[1] + (double)$time[0]; + } + +} diff --git a/src/reports.html b/src/reports.html new file mode 100644 index 0000000..98a6124 --- /dev/null +++ b/src/reports.html @@ -0,0 +1,253 @@ + + + + +Reports | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + + + + + +
                  + +
                  + + + + + + + + Logo + + + +
                  + Avatar +
                  +

                  John Doe

                  + youremail@domain.com +

                  + Account Settings Logout +

                  +
                  +
                  +
                  + + + + + +
                  + + + +
                  +
                  + +
                  +

                  Sample Chart

                  +
                  +
                  +
                  +
                  + +
                  +

                  Annotation

                  +
                  +
                  +
                  +
                  + +
                  +

                  Real Time Chart

                  +
                  +
                  +

                  You can update a chart periodically to get a real-time effect + by using a timer to insert the new data in the plot and redraw it.

                  +
                  +
                  + + +
                  + +
                  +
                  + +
                  +
                  + +
                  +

                  EARNINGS

                  +
                  + +

                  $232.45

                  +

                  Estimate earnings by the end of the day: $300.00

                  + +
                  + +
                  +

                  $412.30

                  + Yesterday's earnings +
                  + +
                  +

                  $2,796.98

                  + This month's earnings +
                  + + +
                  +
                  + +
                  +

                  Pie Chart

                  +
                  +
                  +
                  +
                  + +
                  +

                  PROGRESS BAR

                  +
                  + +
                  + Storage (60%) +
                  +
                  + +
                  + Bandwidth (86%) +
                  +
                  + +
                  + Impression (34%) +
                  +
                  + +
                  +
                  + + +
                  +

                  Another Progress Bar

                  +
                  + +
                  + Storage +
                  60%
                  +
                  + +
                  + Bandwidth +
                  86%
                  +
                  + +
                  + Impressions +
                  34%
                  +
                  + +
                  +
                  + +
                  +
                  + +
                  + +
                  + +
                  + + + + diff --git a/src/tables.html b/src/tables.html new file mode 100644 index 0000000..edac372 --- /dev/null +++ b/src/tables.html @@ -0,0 +1,683 @@ + + + + +Table Styling | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + +
                  + +
                  + + + + + + + + Logo + + + +
                  + Avatar +
                  +

                  John Doe

                  + youremail@domain.com +

                  + Account Settings Logout +

                  +
                  +
                  +
                  + + + + + +
                  + + + +
                  + +

                  Table Styling

                  + +
                  +

                  Default table using colgroup

                  +
                  + + + + + + + + + + + + + + + + + +
                  Column 1Column 2Column 3ImpressionsPercentageColumn 6
                  + +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
                  Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
                  Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
                  Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
                  Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
                  +
                  + +
                  + +
                  +

                  Static Table

                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  Column 1Column 2Column 3ImpressionsPercentageColumn 6
                  Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
                  Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
                  Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
                  Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
                  Row Text 1Row Text 2Row Text 32 100.0020%Row Text 6
                  + +

                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  Rendering engineBrowserPlatform(s)Engine versionCSS grade
                  Trident + Internet + Explorer + 4.0 + Win 95+4X
                  TridentInternet + Explorer 5.0Win 95+5C
                  TridentInternet + Explorer 5.5Win 95+5.5A
                  TridentInternet + Explorer 6Win 98+6A
                  TridentInternet Explorer 7Win XP SP2+7A
                  TridentAOL browser (AOL desktop)Win XP6A
                  GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
                  GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
                  GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
                  GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
                  GeckoCamino 1.0OSX.2+1.8A
                  GeckoCamino 1.5OSX.3+1.8A
                  GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
                  GeckoNetscape Browser 8Win 98SE+1.7A
                  GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
                  GeckoMozilla 1.0Win 95+ / OSX.1+1A
                  GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
                  GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
                  GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
                  GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
                  GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
                  GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
                  GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
                  GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
                  GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
                  GeckoEpiphany 2.20Gnome1.8A
                  WebkitSafari 1.2OSX.3125.5A
                  WebkitSafari 1.3OSX.3312.8A
                  WebkitSafari 2.0OSX.4+419.3A
                  WebkitSafari 3.0OSX.4+522.1A
                  WebkitOmniWeb 5.5OSX.4+420A
                  WebkitiPod Touch / iPhoneiPod420.1A
                  WebkitS60S60413A
                  PrestoOpera 7.0Win 95+ / OSX.1+-A
                  PrestoOpera 7.5Win 95+ / OSX.2+-A
                  PrestoOpera 8.0Win 95+ / OSX.2+-A
                  PrestoOpera 8.5Win 95+ / OSX.2+-A
                  PrestoOpera 9.0Win 95+ / OSX.3+-A
                  PrestoOpera 9.2Win 88+ / OSX.3+-A
                  PrestoOpera 9.5Win 88+ / OSX.3+-A
                  PrestoOpera for WiiWii-A
                  PrestoNokia N800N800-A
                  PrestoNintendo DS browserNintendo DS8.5C/A1
                  KHTMLKonqureror 3.1KDE 3.13.1C
                  KHTMLKonqureror 3.3KDE 3.33.3A
                  KHTMLKonqureror 3.5KDE 3.53.5A
                  TasmanInternet Explorer 4.5Mac OS 8-9-X
                  TasmanInternet Explorer 5.1Mac OS 7.6-91C
                  TasmanInternet Explorer 5.2Mac OS 8-X1C
                  MiscNetFront 3.1Embedded devices-C
                  MiscNetFront 3.4Embedded devices-A
                  Rendering engineBrowserPlatform(s)Engine versionCSS grade
                  + + +
                  + +
                  + +
                  + +
                  + + + + diff --git a/src/users.html b/src/users.html new file mode 100644 index 0000000..1ca7376 --- /dev/null +++ b/src/users.html @@ -0,0 +1,493 @@ + + + + +Users | Mandy Lane - Premium Admin Template + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  + +
                  + + + + + + + + Logo + + + +
                  + Avatar +
                  +

                  Rafael Salazar

                  + correo@dominio.com +

                  + Preferencias Salir +

                  +
                  +
                  +
                  + + + + + +
                  + + + +
                  + +

                  Gestión de candidatos

                  + + + + Nuevo candidato + + + + Importar candidatos + + + + +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  Candidato
                  Capacidad profesional
                  EstadoÚltimo cambio
                  Capacidad técnicaCapacidad funcional
                  Arthur M. MooneyP.-Ejecución de Pruebas (3 meses) ARQ.-WEBSPHERE, BD.-Oracle, ED.-ECLIPSE, LE.-J2EE, LE.-JAVA
                  + D.-AP Plat Host (0 meses) LE.-Cobol CICS DB2 + +
                  Sin especialidad funcionalBorrador06/08/2010
                  Lana U. ReidP.-Ejecución de Pruebas (3 meses) +
                  ARQ.-WEBSPHERE, BD.-Oracle, ED.-ECLIPSE, LE.-J2EE, LE.-JAVA
                  Sin especialidad funcionalDisponible16/08/2010
                  Iola G. YatesSin capacidadesSin capacidadesBorrador27/11/2010
                  Meredith Q. LawrenceSin capacidadesSin capacidadesBorrador18/09/2010
                  Aaron K. HolderSin capacidadesSin capacidadesRechazado27/11/2010
                  Scarlet D. ForbesP.-Ejecución de Pruebas (3 meses) +
                  BD.-Oracle
                  Sin especialidad funcionalRechazado31/05/2010
                  Carter G. MartinP.-Ejecución de Pruebas (3 meses) +
                  BD.-Oracle
                  Sin especialidad funcionalDisponible09/06/2010
                  Chaney Z. FryeP.-Ejecución de Pruebas (3 meses) +
                  BD.-Oracle
                  Sin especialidad funcionalDisponible12/09/2010
                  Kaden D. McbrideP.-Ejecución de Pruebas (3 meses) +
                  ARQ.-WEBSPHERE, BD.-Oracle, ED.-ECLIPSE, LE.-J2EE, LE.-JAVA
                  Sin especialidad funcionalDisponible07/09/2010
                  Geraldine F. RatliffD.-JP Plat Host Unix (3 meses) +
                  BI.-PowerCenter, C.-Metodología y Cal, HD.-POWER DESIGNER, MET.-CMMI, MET.-ITIL
                  Sin especialidad funcionalDisponible asignado10/11/2010
                  Porter X. KeithP.-Ejecución de Pruebas (3 meses) +
                  BD.-Oracle
                  Sin especialidad funcionalDisponible30/11/2010
                  Emi U. BlackP.-Ejecución de Pruebas (3 meses) +
                  BD.-Oracle
                  Sin especialidad funcionalDisponible asignado16/11/2010
                  Lisandra F. LambP.-Ejecución de Pruebas (3 meses) +
                  BD.-Oracle
                  Sin especialidad funcionalDisponible asignado02/09/2010
                  Vincent J. JenningsP.-Ejecución de Pruebas (3 meses) +
                  BD.-Oracle
                  Sin especialidad funcionalRechazado24/11/2010
                  Selma A. BrowningP.-Ejecución de Pruebas (3 meses) +
                  BD.-Oracle
                  Sin especialidad funcionalDisponible asignado09/05/2010
                  Regina T. TalleyP.-Ejecución de Pruebas (3 meses) +
                  BD.-Oracle
                  Sin especialidad funcionalDisponible asignado25/05/2010
                  Quin E. GrimesP.-Ejecución de Pruebas (3 meses) +
                  BD.-Oracle
                  Sin especialidad funcionalDisponible asignado27/09/2010
                  Owen A. WareSin capacidadesSin capacidadesDisponible asignado12/06/2010
                  Dorothy I. GillespieSin capacidadesSin capacidadesDisponible asignado31/07/2010
                  Ashely E. CardenasSin capacidadesSin capacidadesRechazado04/09/2010
                  CandidatoCapacidades profesionalesProvincia deseadaEstadoÚltimo cambio
                  + + + + +
                  + +
                  + +
                  + +
                  + + + +