muck-engine 0.2.15 → 0.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Metadata - jQuery plugin for parsing metadata from elements
3
+ *
4
+ * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan
5
+ *
6
+ * Dual licensed under the MIT and GPL licenses:
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ * http://www.gnu.org/licenses/gpl.html
9
+ *
10
+ * Revision: $Id: jquery.metadata.js 3620 2007-10-10 20:55:38Z pmclanahan $
11
+ *
12
+ */
13
+ (function($){$.extend({metadata:{defaults:{type:'class',name:'metadata',cre:/({.*})/,single:'metadata'},setType:function(type,name){this.defaults.type=type;this.defaults.name=name;},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length)settings.single='metadata';var data=$.data(elem,settings.single);if(data)return data;data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m)data=m[1];}else if(settings.type=="elem"){if(!elem.getElementsByTagName)return;var e=elem.getElementsByTagName(settings.name);if(e.length)data=$.trim(e[0].innerHTML);}else if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr)data=attr;}if(data.indexOf('{')<0)data="{"+data+"}";data=eval("("+data+")");$.data(elem,settings.single,data);return data;}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts);};})(jQuery);
@@ -0,0 +1,33 @@
1
+ // QueryString Engine v1.0.1
2
+ //By James Campbell
3
+ (function($) {
4
+ $.querystringvalues = $.queryStringValues = $.QueryStringValues = $.QueryStringvalues = $.queryStringValues = $.queryStringvalues = $.querystringValues = $.getqueryString = $.queryString = $.querystring = $.QueryString = $.Querystring = $.getQueryString = $.getquerystring = $.getQuerystring = function(options)
5
+ {
6
+ defaults = {defaultvalue:"null"} ;
7
+ options = $.extend(defaults , options);
8
+ qs = location.search.substring(1, location.search.length);
9
+ if (qs.length == 0) return options.defaultvalue;
10
+ qs = qs.replace(/\+/g, ' ');
11
+ var args = qs.split('&');
12
+ for (var i = 0; i < args.length; i ++ )
13
+ {
14
+ var value;
15
+ var pair = args[i].split('=');
16
+ var name = unescape(pair[0]);
17
+
18
+ if (pair.length == 2)
19
+ {
20
+ value = unescape(pair[1]);
21
+ }
22
+ else
23
+ {
24
+ value = name;
25
+ }
26
+ if (name == options.id || i == options.id-1)
27
+ {
28
+ return value;
29
+ }
30
+ }
31
+ return options.defaultvalue
32
+ };
33
+ })(jQuery);
@@ -0,0 +1,66 @@
1
+ /**
2
+ * swapImage - jQuery plugin for swapping image
3
+ *
4
+ * Copyright (c) 2008 tszming (tszming@gmail.com)
5
+ *
6
+ * Dual licensed under the MIT and GPL licenses:
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ * http://www.gnu.org/licenses/gpl.html
9
+ *
10
+ */
11
+
12
+ /**
13
+ * Enable image swapping, requires metadata plugin.
14
+ *
15
+ * @example $.swapImage(".swapImage");
16
+ * @desc Enable image swapping for all images with CSS class name equal to "swapImage", e.g.
17
+ * <img class="swapImage {src: 'images/new.gif'}" src="images/old.gif" />
18
+ *
19
+ * @param i Images to be selected.
20
+ * @param preload Preload the image, default = true.
21
+ * @param repeat Repeat the effect, default = true.
22
+ * @param swapInEvent Event for swap In.
23
+ * @param swapOutEvent Event for swap Out.
24
+ *
25
+ * @name $.swapImage
26
+ * @cat Plugins/SwapImage
27
+ * @author tszming (tszming@gmail.com)
28
+ * @version 1.0.1
29
+ */
30
+ jQuery.swapImage = function(i, preload, repeat, swapInEvent, swapOutEvent) {
31
+
32
+ jQuery.swapImage.preload = function() {
33
+ var img = new Image();
34
+ img.src = jQuery(this).metadata().src;
35
+ };
36
+
37
+ jQuery.swapImage.swap = function() {
38
+ var data = jQuery(this).metadata();
39
+ var tmp = data.src;
40
+ data.src = this.src;
41
+ this.src = tmp;
42
+ };
43
+
44
+ jQuery(document).ready(function() {
45
+
46
+ if (typeof preload == "undefined") preload = true;
47
+ if (typeof repeat == "undefined") repeat = true;
48
+ if (typeof swapInEvent == "undefined" && typeof swapInEvent == "undefined") {
49
+ swapInEvent = "mouseenter"; swapOutEvent = "mouseleave";
50
+ }
51
+
52
+ if (repeat) {
53
+ if (typeof swapOutEvent != "undefined") {
54
+ jQuery(i).bind(swapInEvent, jQuery.swapImage.swap).bind(swapOutEvent, jQuery.swapImage.swap);
55
+ } else {
56
+ jQuery(i).bind(swapInEvent, jQuery.swapImage.swap);
57
+ }
58
+ } else {
59
+ jQuery(i).one(swapInEvent, jQuery.swapImage.swap);
60
+ }
61
+
62
+ if (preload) {
63
+ jQuery(i).each(jQuery.swapImage.preload)
64
+ };
65
+ });
66
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * swapImage - jQuery plugin for swapping image
3
+ *
4
+ * Copyright (c) 2008 tszming (tszming@gmail.com)
5
+ *
6
+ * Dual licensed under the MIT and GPL licenses:
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ * http://www.gnu.org/licenses/gpl.html
9
+ *
10
+ */
11
+ jQuery.swapImage=function(i,preload,repeat,swapInEvent,swapOutEvent){jQuery.swapImage.preload=function(){var img=new Image();img.src=jQuery(this).metadata().src};jQuery.swapImage.swap=function(){var data=jQuery(this).metadata();var tmp=data.src;data.src=this.src;this.src=tmp};jQuery(document).ready(function(){if(typeof preload=="undefined")preload=true;if(typeof repeat=="undefined")repeat=true;if(typeof swapInEvent=="undefined"&&typeof swapInEvent=="undefined"){swapInEvent="mouseenter";swapOutEvent="mouseleave"}if(repeat){if(typeof swapOutEvent!="undefined"){jQuery(i).bind(swapInEvent,jQuery.swapImage.swap).bind(swapOutEvent,jQuery.swapImage.swap)}else{jQuery(i).bind(swapInEvent,jQuery.swapImage.swap)}}else{jQuery(i).one(swapInEvent,jQuery.swapImage.swap)}if(preload){jQuery(i).each(jQuery.swapImage.preload)}})};
@@ -0,0 +1,107 @@
1
+ jQuery(document).ready(function() {
2
+
3
+ jQuery(".pageContainer").draggable({
4
+ zIndex : 1000000,
5
+ revert : 'invalid',
6
+ opacity : 0.5,
7
+ scroll : true,
8
+ helper : 'clone'
9
+ });
10
+
11
+ jQuery("#pageList").droppable({
12
+ accept: ".pageContainer",
13
+ drop: function(ev, ui) {
14
+ var source_li = jQuery(ui.draggable);
15
+ var child_ul = jQuery(this).children('ul');
16
+ var page_id = source_li.children('input').val();
17
+ var parent_id = 0;
18
+ if(same_parent(source_li, child_ul)){
19
+ return;
20
+ }
21
+ insert_alphabetic(child_ul, source_li);
22
+ update_parent(page_id, parent_id);
23
+ }
24
+ });
25
+
26
+ jQuery(".pageContainer").droppable({
27
+ accept: ".pageContainer",
28
+ hoverClass: 'pageContainer-hover',
29
+ tolerance : 'pointer',
30
+ greedy : true,
31
+ drop: function(ev, ui) {
32
+ var source_li = jQuery(ui.draggable);
33
+ var target_li = jQuery(this);
34
+ var page_id = source_li.children('input').val();
35
+ var parent_id = target_li.children('input').val();
36
+ if(target_li.children('ul').length <= 0){
37
+ target_li.append('<ul></ul>');
38
+ }
39
+ var child_ul = target_li.children('ul');
40
+ if(same_parent(source_li, child_ul)){
41
+ return;
42
+ }
43
+ jQuery(this).children('ul:hidden').slideDown();
44
+ insert_alphabetic(child_ul, source_li);
45
+ update_parent(page_id, parent_id);
46
+ }
47
+ });
48
+
49
+ jQuery(".submit-delete").click(function() {
50
+ if(jQuery(this).parents('li:first').siblings('li').length <= 0){
51
+ jQuery(this).parents('li:first').parents('li:first').children('.expander').remove();
52
+ }
53
+ return false;
54
+ });
55
+
56
+ function insert_alphabetic(child_ul, source_li){
57
+ var kids = child_ul.children('li');
58
+ var source_text = source_li.children('span.link').children('a').html().toLowerCase();
59
+ for(i=0; i<kids.length; i++){
60
+ var current_text = jQuery(kids[i]).children('span.link').children('a').html().toLowerCase();
61
+ if(source_text < current_text){
62
+ source_li.insertBefore(kids[i]);
63
+ return;
64
+ }
65
+ }
66
+ source_li.appendTo(child_ul);
67
+ }
68
+
69
+ function same_parent(source_li, child_ul){
70
+ return source_li.parent() == child_ul;
71
+ }
72
+
73
+ function update_parent(page_id, parent_id){
74
+ var path = jQuery('#updatePath').val();
75
+ jQuery.post(path + '/' + page_id + '.js', {parent_id: parent_id, action: 'update', _method: 'put', only_parent: 'true' },
76
+ function(data){
77
+ apply_expander();
78
+ if(data.length > 0){
79
+ var result = eval('(' + data + ')');
80
+ if(!result.success){
81
+ jQuery.jGrowl.error(result.message);
82
+ }
83
+ }
84
+ });
85
+ return false;
86
+ }
87
+
88
+ apply_expander();
89
+ function apply_expander(){
90
+ jQuery(".expander").remove();
91
+ jQuery(".pageContainer ul:hidden li:first-child").parent().parent().prepend('<a class="expander" href="#"><img src="/images/expand.png" /></a>');
92
+ jQuery(".pageContainer ul:visible li:first-child").parent().parent().prepend('<a class="expander" href="#"><img src="/images/collapse.png" /></a>');
93
+ jQuery(".expander").click(function(){
94
+ var img = jQuery(this).children('img');
95
+ var target_ul = jQuery(this).siblings('ul');
96
+ if(img.attr('src') == '/images/expand.png'){
97
+ img.attr('src', '/images/collapse.png');
98
+ target_ul.slideDown();
99
+ } else {
100
+ img.attr('src', '/images/expand.png');
101
+ target_ul.slideUp();
102
+ }
103
+ return false;
104
+ });
105
+ }
106
+
107
+ });
@@ -0,0 +1,15 @@
1
+ .ac_results{padding:0px;border:1px solid black;background-color:white;overflow:hidden;z-index:99999;color:#555;}
2
+ .ac_results ul{width:100%;list-style-position:outside;list-style:none;padding:0;margin:0;}
3
+ .ac_results li{margin:0px;padding:2px 5px;cursor:default;display:block;/*
4
+ if width will be 100% horizontal scrollbar will apear
5
+ when scroll mode will be used
6
+ */
7
+ /*width:100%;*/
8
+ font:menu;font-size:12px;/*
9
+ it is very important,if line-height not setted or setted
10
+ in relative units scroll will be broken in firefox
11
+ */
12
+ line-height:16px;overflow:hidden;}
13
+ .ac_loading{background:white url('/images/spinner.gif') right center no-repeat;}
14
+ .ac_odd{background-color:#eee;}
15
+ .ac_over{background-color:#0A246A;color:white;}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.15
4
+ version: 0.2.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Ball
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-11-13 00:00:00 -07:00
13
+ date: 2009-11-17 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -199,16 +199,25 @@ files:
199
199
  - public/images/spinner.gif
200
200
  - public/images/sprites.png
201
201
  - public/javascripts/fancyzoom.min.js
202
+ - public/javascripts/jquery/colorpicker.js
202
203
  - public/javascripts/jquery/jquery-ui.js
204
+ - public/javascripts/jquery/jquery.autocomplete.js.readme
205
+ - public/javascripts/jquery/jquery.autocomplete.min.js
206
+ - public/javascripts/jquery/jquery.autocomplete.pack.js
203
207
  - public/javascripts/jquery/jquery.easing.js
204
208
  - public/javascripts/jquery/jquery.fancybox.js
205
209
  - public/javascripts/jquery/jquery.form.js
206
210
  - public/javascripts/jquery/jquery.jgrowl.js
207
211
  - public/javascripts/jquery/jquery.js
212
+ - public/javascripts/jquery/jquery.metadata.min.js
213
+ - public/javascripts/jquery/jquery.queryString.js
214
+ - public/javascripts/jquery/jquery.swapimage.js
215
+ - public/javascripts/jquery/jquery.swapimage.min.js
208
216
  - public/javascripts/jquery/jquery.tips.js
209
217
  - public/javascripts/jquery/jrails.js
210
218
  - public/javascripts/muck.js
211
219
  - public/javascripts/muck_time/en.js
220
+ - public/javascripts/tree.js
212
221
  - public/stylesheets/admin.css
213
222
  - public/stylesheets/blueprint/ie.css
214
223
  - public/stylesheets/blueprint/liquid_screen.css
@@ -260,6 +269,7 @@ files:
260
269
  - public/stylesheets/jquery/cupertino/images/ui-icons_cd0a0a_256x240.png
261
270
  - public/stylesheets/jquery/cupertino/images/ui-icons_ffffff_256x240.png
262
271
  - public/stylesheets/jquery/cupertino/jquery-ui-1.7.1.custom.css
272
+ - public/stylesheets/jquery/jquery.autocomplete.css
263
273
  - public/stylesheets/jquery/jquery.fancybox.css
264
274
  - public/stylesheets/jquery/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png
265
275
  - public/stylesheets/jquery/redmond/images/ui-bg_flat_55_fbec88_40x100.png