redde 0.0.8 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/.travis.yml +10 -0
- data/Gemfile +3 -3
- data/LICIENSE.md +21 -0
- data/README.md +53 -14
- data/lib/generators/redde/layout/layout_generator.rb +7 -4
- data/lib/generators/redde/layout/templates/assets/images/admin/error-label-triangle.png +0 -0
- data/lib/generators/redde/layout/templates/assets/images/admin/favicon.png +0 -0
- data/lib/generators/redde/layout/templates/assets/javascripts/admin.js +9 -76
- data/lib/generators/redde/layout/templates/assets/redactor/images/.keep +0 -0
- data/lib/generators/redde/layout/templates/assets/redactor/images/redactor/icons.png +0 -0
- data/lib/generators/redde/layout/templates/assets/redactor/javascripts/jquery-migrate-1.2.1.js +521 -0
- data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/javascripts}/redactor/redactor.js.erb +9 -21
- data/lib/generators/redde/layout/templates/assets/{images/admin/redactor/css/redactor.css → redactor/stylesheets/redactor/redactor.css.scss} +1 -1
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/error-msg.sass +47 -0
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/paginate.sass +28 -0
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/pagination.scss +28 -0
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/phead-tabs.sass +27 -0
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/default.scss +0 -0
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/input.sass +35 -0
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/header.sass +50 -0
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/launchbar.sass +23 -0
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/main.sass +39 -0
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/page-header.sass +19 -0
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/page-sidebar.sass +22 -0
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/sidebar.sass +30 -0
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/reset.sass +33 -0
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin.scss +9 -9
- data/lib/generators/redde/layout/templates/base/_header.html.haml +12 -0
- data/lib/generators/redde/layout/templates/base/_launchbar.html.haml +11 -0
- data/lib/generators/redde/layout/templates/base/_sidebar.html.haml +15 -0
- data/lib/generators/redde/layout/templates/base/_validate.haml +8 -0
- data/lib/generators/redde/layout/templates/base/welcome.haml +2 -0
- data/lib/generators/redde/layout/templates/controllers/base_controller.rb +5 -0
- data/lib/generators/redde/layout/templates/layouts/admin.html.haml +14 -15
- data/lib/generators/redde/scaffold/scaffold_generator.rb +8 -0
- data/lib/generators/redde/scaffold/templates/edit.html.haml +2 -6
- data/lib/generators/redde/scaffold/templates/index.html.haml +1 -1
- data/lib/redde/version.rb +1 -1
- data/lib/redde.rb +3 -0
- data/redde.gemspec +11 -10
- data/spec/dummy/.rspec +1 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +14 -0
- data/spec/dummy/app/assets/stylesheets/application.css.scss +0 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/controllers/articles_controller.rb +12 -0
- data/spec/dummy/app/models/.keep +0 -0
- data/spec/dummy/app/models/article.rb +3 -0
- data/spec/dummy/app/models/article_category.rb +2 -0
- data/spec/dummy/app/views/articles/show.html.haml +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +15 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config/application.rb +33 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +29 -0
- data/spec/dummy/config/environments/production.rb +80 -0
- data/spec/dummy/config/environments/test.rb +36 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +12 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +36 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20130908123351_create_articles.rb +9 -0
- data/spec/dummy/db/migrate/20140128152208_create_article_categories.rb +11 -0
- data/spec/dummy/db/schema.rb +29 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/log/development.log +26606 -0
- data/spec/dummy/log/test.log +53411 -0
- data/spec/dummy/public/404.html +58 -0
- data/spec/dummy/public/422.html +58 -0
- data/spec/dummy/public/500.html +57 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/{deploy_generator_spec.rb → generators/deploy_generator_spec.rb} +1 -1
- data/spec/{layout_generator_spec.rb → generators/layout_generator_spec.rb} +5 -5
- data/spec/generators/scaffold_generator_spec.rb +59 -0
- data/spec/spec_helper.rb +53 -4
- metadata +187 -155
- data/LICENSE +0 -22
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/docstyle.css +0 -123
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/style.css +0 -119
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/img/icons.png +0 -0
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/by.js +0 -72
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/de.js +0 -75
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/es.js +0 -76
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/fr.js +0 -74
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/hu.js +0 -76
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/it.js +0 -76
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/ja.js +0 -76
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/lv.js +0 -74
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/nl.js +0 -76
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/pl.js +0 -75
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/pt_br.js +0 -81
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/sq.js +0 -76
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/tr.js +0 -76
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/ua.js +0 -75
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/zh_cn.js +0 -77
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/redactor.min.js +0 -1
- data/lib/generators/redde/layout/templates/assets/images/admin/redactor/toolbars/mini.js +0 -103
- data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/_jquery.reddebox.js.erb +0 -214
- data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/close.png +0 -0
- data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/jquery.reddebox.js.erb +0 -246
- data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/jquery.reddebox.scss +0 -31
- data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/next.png +0 -0
- data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/prev.png +0 -0
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/change-log.txt +0 -19
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/check-exists.php +0 -15
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/index.php +0 -50
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/jquery.uploadifive.js +0 -888
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/jquery.uploadifive.min.js +0 -6
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/license-standard.txt +0 -71
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive-cancel.png +0 -0
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive-image-only.php +0 -66
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive.css +0 -100
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive.php +0 -33
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/#swfobject.js +0 -4
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/cancel.png +0 -0
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/jquery.uploadify.min.js +0 -315
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/uploadify-cancel.png +0 -0
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/uploadify.css +0 -66
- data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/uploadify.swf +0 -0
- data/lib/generators/redde/layout/templates/assets/javascripts/admin/swfobject.js +0 -4
- data/lib/generators/redde/layout/templates/assets/javascripts/admin/zen_textarea.min.js +0 -17
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/_reset.scss +0 -32
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/_input.scss +0 -43
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_header.scss +0 -57
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_launchbar.scss +0 -35
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_main.scss +0 -59
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_sidebar.scss +0 -35
- data/lib/generators/redde/layout/templates/shared/_header.html.haml +0 -13
- data/lib/generators/redde/layout/templates/shared/_launchbar.html.haml +0 -9
- data/lib/generators/redde/layout/templates/shared/_sidebar.html.haml +0 -9
- data/spec/scaffold_generator_spec.rb +0 -25
- /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/images}/redactor/plugins/file.html +0 -0
- /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/images}/redactor/plugins/image.html +0 -0
- /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/images}/redactor/plugins/image_edit.html +0 -0
- /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/images}/redactor/plugins/link.html +0 -0
- /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/images}/redactor/plugins/table.html +0 -0
- /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/images}/redactor/plugins/video.html +0 -0
- /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/javascripts}/redactor/langs/en.js +0 -0
- /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/javascripts}/redactor/langs/ru.js +0 -0
- /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/javascripts}/redactor/toolbars/default.js +0 -0
- /data/lib/generators/redde/layout/templates/assets/{images/admin/redactor/css → redactor/stylesheets/redactor}/wym.css +0 -0
- /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/{_list.scss → list.scss} +0 -0
- /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/{_notice.scss → notice.scss} +0 -0
- /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/{_orders.scss → orders.scss} +0 -0
- /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/{_partners.scss → partners.scss} +0 -0
- /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/{_photos.scss → photos.scss} +0 -0
- /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/{_sortable.scss → sortable.scss} +0 -0
- /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/{_table.scss → table.scss} +0 -0
- /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/{_login.scss → login.scss} +0 -0
data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/jquery.reddebox.js.erb
DELETED
@@ -1,246 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* jQuery lightBox plugin
|
3
|
-
* This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
|
4
|
-
* and adapted to me for use like a plugin from jQuery.
|
5
|
-
* @name jquery-lightbox-0.5.js
|
6
|
-
* @author Leandro Vieira Pinho - http://leandrovieira.com
|
7
|
-
* @version 0.5
|
8
|
-
* @date April 11, 2008
|
9
|
-
* @category jQuery plugin
|
10
|
-
* @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
|
11
|
-
* @license CC Attribution-No Derivative Works 2.5 Brazil - http://creativecommons.org/licenses/by-nd/2.5/br/deed.en_US
|
12
|
-
* @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
|
13
|
-
*/
|
14
|
-
|
15
|
-
// Offering a Custom Alias suport - More info: http://docs.jquery.com/Plugins/Authoring#Custom_Alias
|
16
|
-
(function($) {
|
17
|
-
/**
|
18
|
-
* $ is an alias to jQuery object
|
19
|
-
*
|
20
|
-
*/
|
21
|
-
$.fn.reddeBox = function(settings) {
|
22
|
-
// Settings to configure the jQuery lightBox plugin how you like
|
23
|
-
var settings = jQuery.extend({
|
24
|
-
// Configuration related to overlay
|
25
|
-
overlayOpacity: 0.8, // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9
|
26
|
-
// Configuration related to navigation
|
27
|
-
//fixedNavigation: true, // (boolean) Boolean that informs if the navigation (next and prev button) will be fixed or not in the interface.
|
28
|
-
// Configuration related to images
|
29
|
-
classWrapper: "",
|
30
|
-
//imageLoading: '<%= asset_path("reddebox/103.gif") %>', // (string) Path and the name of the loading icon
|
31
|
-
//imageBtnPrev: '<%= asset_path("reddebox/previous.png") %>', // (string) Path and the name of the prev button image
|
32
|
-
//imageBtnNext: '<%= asset_path("reddebox/next.png") %>', // (string) Path and the name of the next button image
|
33
|
-
//imageBtnClose: '<%= asset_path("reddebox/close.png") %>', // (string) Path and the name of the close btn
|
34
|
-
// Configuration related to container image box
|
35
|
-
//containerBorderSize: 0, // (integer) If you adjust the padding in the CSS for the container, #lightbox-container-image-box, you will need to update this value
|
36
|
-
//containerResizeSpeed: 0, // (integer) Specify the resize duration of container image. These number are miliseconds. 400 is default.
|
37
|
-
// Configuration related to texts in caption. For example: Image 2 of 8. You can alter either "Image" and "of" texts.
|
38
|
-
//txtImage: 'Изображение', // (string) Specify text "Image"
|
39
|
-
//txtOf: 'из', // (string) Specify text "of"
|
40
|
-
// Configuration related to keyboard navigation
|
41
|
-
//keyToClose: 'c', // (string) (c = close) Letter to close the jQuery lightBox interface. Beyond this letter, the letter X and the SCAPE key is used to.
|
42
|
-
//keyToPrev: 'p', // (string) (p = previous) Letter to show the previous image
|
43
|
-
//keyToNext: 'n', // (string) (n = next) Letter to show the next image.
|
44
|
-
// Don�t alter these variables in any way
|
45
|
-
usedThisLink: true, // включить в набор текущий линк или линки
|
46
|
-
imageArray: [],
|
47
|
-
activeImage: 0
|
48
|
-
},settings);
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
var elems = this;
|
57
|
-
|
58
|
-
return this.unbind('click.reddebox').bind("click.reddebox",function(e){
|
59
|
-
new Bilder(this,elems,settings);
|
60
|
-
e.preventDefault();
|
61
|
-
});
|
62
|
-
};
|
63
|
-
|
64
|
-
function Bilder(el,elems,settings) {
|
65
|
-
var arr = $.map(settings.imageArray,function(n){
|
66
|
-
return $("<a />").attr("href",n)[0];
|
67
|
-
});
|
68
|
-
if (settings.usedThisLink) {
|
69
|
-
this.jQueryMatchedObj = $.merge($.merge([],elems), arr);
|
70
|
-
} else {
|
71
|
-
this.jQueryMatchedObj = arr;
|
72
|
-
};
|
73
|
-
|
74
|
-
this.activeIndex = $.map(elems,function(n,i){
|
75
|
-
if (n == el) {
|
76
|
-
return i;
|
77
|
-
};
|
78
|
-
})[0] || 0;
|
79
|
-
this.setInterface(el,settings);
|
80
|
-
};
|
81
|
-
|
82
|
-
Bilder.prototype = {
|
83
|
-
removeReddeBox: function() {
|
84
|
-
$("#redde-overlay, #redde-box").remove();
|
85
|
-
},
|
86
|
-
|
87
|
-
setActiveIndex: function(linkActiveHref) {
|
88
|
-
for(var i = this.jQueryMatchedObj.length; i--;) {
|
89
|
-
if (this.jQueryMatchedObj[i].href == linkActiveHref) {
|
90
|
-
activeIndex = i;
|
91
|
-
break;
|
92
|
-
}
|
93
|
-
};
|
94
|
-
},
|
95
|
-
|
96
|
-
updateNavi: function(linkActive) {
|
97
|
-
var maxLength = this.jQueryMatchedObj.length;
|
98
|
-
this.setActiveIndex(linkActive.attr("href"));
|
99
|
-
this.container.find("a.redde-next, a.redde-prev").css("visibility","visible");
|
100
|
-
if (this.activeIndex == 0) {
|
101
|
-
$("a.redde-prev").css("visibility","hidden");
|
102
|
-
};
|
103
|
-
if (this.activeIndex == maxLength-1) {
|
104
|
-
$("a.redde-next").css("visibility","hidden");
|
105
|
-
};
|
106
|
-
if (linkActive.attr("title")) {
|
107
|
-
this.container.find("div.redde-desc").html(linkActive.attr("title")).css("visibility","visible");
|
108
|
-
} else {
|
109
|
-
this.container.find("div.redde-desc").empty().css("visibility","hidden");
|
110
|
-
};
|
111
|
-
},
|
112
|
-
|
113
|
-
showImage: function(me) {
|
114
|
-
var self = this;
|
115
|
-
this.updateNavi(me);
|
116
|
-
if (/\.(jpg|jpeg|gif|png)$/i.test($(me).attr("href"))) {
|
117
|
-
$("<img />").attr("src",me.attr("href")).fadeTo(0,0).load(function(){
|
118
|
-
//alert("test")
|
119
|
-
$("#redde-container #wrap-redde-container").html(this);
|
120
|
-
self.setCenter.call(self,$(this));
|
121
|
-
});
|
122
|
-
} else {
|
123
|
-
this.container.find("#wrap-redde-container").html('<iframe src="'+ me.attr("href") +'" frameborder="0" width="600" height="600" />');
|
124
|
-
self.setCenter.call(self,this.container.find("iframe"));
|
125
|
-
}
|
126
|
-
|
127
|
-
},
|
128
|
-
|
129
|
-
setCenter: function(el) {
|
130
|
-
var w = el.width(),
|
131
|
-
h = el.height();
|
132
|
-
this.container.addClass("resize-show-photo").stop(false,false).animate({
|
133
|
-
width: w,
|
134
|
-
height: h,
|
135
|
-
"margin-left": -w/2-1, // -1 - поправка на border
|
136
|
-
"margin-top": -h/2-1,
|
137
|
-
top: "50%",
|
138
|
-
left: "50%"
|
139
|
-
},400,function(){
|
140
|
-
$(this).removeClass("resize-show-photo");
|
141
|
-
if ($.isFunction($.fn.draggable)) {
|
142
|
-
$(this).draggable({
|
143
|
-
stop: function(){
|
144
|
-
var obj = {},
|
145
|
-
x1 = parseInt($(this).css("left")),
|
146
|
-
y1 = parseInt($(this).css("top")),
|
147
|
-
xy2 = $(this).offsetParent(),
|
148
|
-
x2 = parseInt(xy2.width()),
|
149
|
-
y2 = parseInt(xy2.height());
|
150
|
-
|
151
|
-
if (x2 > w) {
|
152
|
-
if (x1 < 0) {
|
153
|
-
obj.left = 0;
|
154
|
-
} else if (x1 > x2) {
|
155
|
-
obj.left = x2;
|
156
|
-
};
|
157
|
-
} else {
|
158
|
-
if (x2/2-x1 > w/2) {
|
159
|
-
obj.left = (x2-w)/2;
|
160
|
-
} else if (x1-x2/2 > w/2) {
|
161
|
-
obj.left = (x2+w)/2;
|
162
|
-
};
|
163
|
-
};
|
164
|
-
|
165
|
-
if (y2 > h) {
|
166
|
-
if (y1 < 0) {
|
167
|
-
obj.top = 0
|
168
|
-
} else if (y1 > y2) {
|
169
|
-
obj.top = y2
|
170
|
-
};
|
171
|
-
} else {
|
172
|
-
if (y2/2-y1 > h/2) {
|
173
|
-
obj.top = (y2-h)/2;
|
174
|
-
} else if (y1-y2/2 > h/2) {
|
175
|
-
obj.top = (y2+h)/2;
|
176
|
-
};
|
177
|
-
}
|
178
|
-
|
179
|
-
$(this).animate(obj);
|
180
|
-
}
|
181
|
-
});
|
182
|
-
};
|
183
|
-
}).find("img").fadeTo(0,1.0);
|
184
|
-
},
|
185
|
-
|
186
|
-
setInterface: function(linkActive,settings) {
|
187
|
-
if (settings.classWrapper) {
|
188
|
-
settings.classWrapper = ' class="' + settings.classWrapper + '"';
|
189
|
-
};
|
190
|
-
var navigation =
|
191
|
-
'<a href="#" class="redde-prev"></a>' +
|
192
|
-
'<a href="#" class="redde-close"></a>' +
|
193
|
-
'<a href="#" class="redde-next"></a>' +
|
194
|
-
'<div class="redde-desc"></div>';
|
195
|
-
var cont =
|
196
|
-
'<div id="redde-overlay"></div>' +
|
197
|
-
'<div id="redde-box"' + settings.classWrapper + '>' +
|
198
|
-
'<div id="redde-container"><div id="wrap-redde-container"></div>' + navigation + '</div>' +
|
199
|
-
'</div>';
|
200
|
-
$("body").append(cont);
|
201
|
-
this.container = $("#redde-container"); // обертка
|
202
|
-
$("#redde-overlay").fadeTo(400,settings.overlayOpacity);
|
203
|
-
var self = this;
|
204
|
-
|
205
|
-
$("#redde-box").fadeTo(400,1.0/*,
|
206
|
-
//закрываем лайтбокс при клике на подложку
|
207
|
-
function(){
|
208
|
-
$(this).bind("click",function(e){
|
209
|
-
if (e.target == this) {
|
210
|
-
self.removeReddeBox();
|
211
|
-
};
|
212
|
-
});
|
213
|
-
}*/);
|
214
|
-
|
215
|
-
if (!settings.imageArray.length) {
|
216
|
-
this.showImage($(linkActive));
|
217
|
-
} else {
|
218
|
-
if (settings.activeImage) {
|
219
|
-
this.activeIndex = settings.activeImage;
|
220
|
-
};
|
221
|
-
this.showImage($(this.jQueryMatchedObj[this.activeIndex]));
|
222
|
-
}
|
223
|
-
|
224
|
-
this.container.find("a").click(function(e){
|
225
|
-
switch (this.className) {
|
226
|
-
case "redde-next":
|
227
|
-
case "redde-prev":
|
228
|
-
{
|
229
|
-
self.container.stop(true,true);
|
230
|
-
var delta = this.className == "redde-prev" ? -1 : 1;
|
231
|
-
if (self.jQueryMatchedObj[self.activeIndex+delta] != undefined) {
|
232
|
-
self.activeIndex = self.activeIndex+delta;
|
233
|
-
self.showImage($(self.jQueryMatchedObj[self.activeIndex]));
|
234
|
-
};
|
235
|
-
break;
|
236
|
-
};
|
237
|
-
case "redde-close": {
|
238
|
-
self.removeReddeBox();
|
239
|
-
break;
|
240
|
-
};
|
241
|
-
}
|
242
|
-
e.preventDefault();
|
243
|
-
});
|
244
|
-
}
|
245
|
-
};
|
246
|
-
})(jQuery); // Call and execute the function immediately passing the jQuery object
|
data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/jquery.reddebox.scss
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
#redde-overlay {
|
2
|
-
position:fixed; top:0; left:0; width:100%; height:100%; z-index:9000; background:#42332b;
|
3
|
-
opacity:0; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);
|
4
|
-
}
|
5
|
-
|
6
|
-
#redde-box {
|
7
|
-
position:fixed; top:0; left:0; width:100%; height:100%; z-index:9000;
|
8
|
-
opacity:0; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);
|
9
|
-
#redde-container {
|
10
|
-
position:absolute; top:50%; left:50%; width:200px; height:200px; margin:-101px 0 0 -101px; border:1px solid #edbb69; background-color:#42332b;
|
11
|
-
background-repeat:no-repeat; background-position:center; box-shadow:0 0 10px rgba(#fff,0.26);
|
12
|
-
#wrap-redde-container {width:100%; height:100%;}
|
13
|
-
&.resize-show-photo {
|
14
|
-
img {width:100%; height:100%;}
|
15
|
-
.redde-close,
|
16
|
-
.redde-prev,
|
17
|
-
.redde-next {display:none;}
|
18
|
-
}
|
19
|
-
&.ui-draggable img {cursor:move;}
|
20
|
-
}
|
21
|
-
.redde-close,
|
22
|
-
.redde-prev,
|
23
|
-
.redde-next,
|
24
|
-
.redde-desc {display:block; position:absolute;}
|
25
|
-
.redde-close {top:-11px; right:-11px; width:22px; height:22px; background:image-url("reddebox/close.png") no-repeat 0 0;}
|
26
|
-
.redde-prev,
|
27
|
-
.redde-next {width:19px; height:47px; top:50%; margin-top:-24px; }
|
28
|
-
.redde-prev {background:image-url("reddebox/prev.png") no-repeat 0 0; left:0; margin-left:-34px;}
|
29
|
-
.redde-next {background:image-url("reddebox/next.png") no-repeat 0 0; right:0; margin-right:-34px;}
|
30
|
-
.redde-desc {left:0; top:100%; margin-top:5px; width:100%; text-align:center; font-style:italic;}
|
31
|
-
}
|
Binary file
|
Binary file
|
@@ -1,19 +0,0 @@
|
|
1
|
-
UploadiFive Change Log
|
2
|
-
|
3
|
-
v1.0.4
|
4
|
-
* Added compatibility with Safari
|
5
|
-
|
6
|
-
v1.0.3
|
7
|
-
* Using new and faster FormData object if available
|
8
|
-
* Added extra security and image only uploadifive.php file
|
9
|
-
* formData is sent to the check script along with the filename
|
10
|
-
* Removed index from Filedata object
|
11
|
-
|
12
|
-
v1.0.2
|
13
|
-
* Changed $data.uploadFile method to use boundary for uploads
|
14
|
-
|
15
|
-
v1.0.1
|
16
|
-
* Fixed bug with onQueueComplete event
|
17
|
-
|
18
|
-
v1.0
|
19
|
-
* Initial creation of UploadiFive plugin
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<?php
|
2
|
-
/*
|
3
|
-
UploadiFive
|
4
|
-
Copyright (c) 2012 Reactive Apps, Ronnie Garcia
|
5
|
-
*/
|
6
|
-
|
7
|
-
// Define a destination
|
8
|
-
$targetFolder = '/uploads'; // Relative to the root and should match the upload folder in the uploader script
|
9
|
-
|
10
|
-
if (file_exists($_SERVER['DOCUMENT_ROOT'] . $targetFolder . '/' . $_POST['filename'])) {
|
11
|
-
echo 1;
|
12
|
-
} else {
|
13
|
-
echo 0;
|
14
|
-
}
|
15
|
-
?>
|
@@ -1,50 +0,0 @@
|
|
1
|
-
<!DOCTYPE HTML>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
5
|
-
<title>UploadiFive Test</title>
|
6
|
-
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
|
7
|
-
<script src="jquery.uploadifive-v1.0.js" type="text/javascript"></script>
|
8
|
-
<link rel="stylesheet" type="text/css" href="uploadifive.css">
|
9
|
-
<style type="text/css">
|
10
|
-
body {
|
11
|
-
font: 13px Arial, Helvetica, Sans-serif;
|
12
|
-
}
|
13
|
-
.uploadifive-button {
|
14
|
-
float: left;
|
15
|
-
margin-right: 10px;
|
16
|
-
}
|
17
|
-
#queue {
|
18
|
-
border: 1px solid #E5E5E5;
|
19
|
-
height: 177px;
|
20
|
-
overflow: auto;
|
21
|
-
margin-bottom: 10px;
|
22
|
-
padding: 0 3px 3px;
|
23
|
-
width: 300px;
|
24
|
-
}
|
25
|
-
</style>
|
26
|
-
</head>
|
27
|
-
|
28
|
-
<body>
|
29
|
-
<h1>UploadiFive Demo</h1>
|
30
|
-
<form>
|
31
|
-
<div id="queue"></div>
|
32
|
-
<input id="file_upload" name="file_upload" type="file" multiple="true">
|
33
|
-
<a style="position: relative; top: 8px;" href="javascript:$('#file_upload').uploadifive('upload')">Upload Files</a>
|
34
|
-
</form>
|
35
|
-
|
36
|
-
<script type="text/javascript">
|
37
|
-
$(function() {
|
38
|
-
$('#file_upload').uploadifive({
|
39
|
-
'auto' : false,
|
40
|
-
'formData' : {'test' : 'something'},
|
41
|
-
'queueID' : 'queue',
|
42
|
-
'uploadScript' : 'uploadifive.php',
|
43
|
-
'onUploadComplete' : function(file, data) {
|
44
|
-
console.log(data);
|
45
|
-
}
|
46
|
-
});
|
47
|
-
});
|
48
|
-
</script>
|
49
|
-
</body>
|
50
|
-
</html>
|