new feature in desktop for uploading wallpapers or putting url link

This commit is contained in:
harrybomrah authored and saurabhbhatia committed 2013-08-02 19:32:41 +08:00
1 parent 0f3a8414be
commit 42615f02ea
35 files changed
+97 -34

No files matched your search

+15 -6
View File
@@ -1,5 +1,5 @@
// JavaScript Document
//harry
//harry bomrah
//Inititialize function will initialize desktop
//callback-method will be called after desktop controlled ajax call
@@ -16,6 +16,11 @@
//"pagination-link" = "url" this url will be used for pagination.. this will override last link url.
//"pagination-var" = "variable to send paramater with url for pagination" this will enable pagination with this attribute for that view.
//for forms
//form-type = "ajax_form" will turn form to ajax submit
//notification = string will display after the form is succesfully submitted
//for layout tinyscrollbar
//content-layout="datalist|column|simple" datalist is for data list from database.. column is usually for forms and some other pages.. simple is without any columns, the page will be displayed as it is.. base width will be considered the default width for tinyscrollbar
//base-width="300" this is the basic width of each column and in case of simple layout it ll be the final width
@@ -241,20 +246,24 @@ var orbitDesktop = function(dom){
},'*[content-type=menu] a');
$("body").on("submit","form[form-type=ajax_form]",function(){
var callback_method = $(this).attr("callback-method");
var dt = null;
var callback_method = $(this).attr("callback-method"),
dt = null,
notification = $(this).attr("notification");
dt = $(this).attr("response-type");
if(dt == null){
dt = "json";
}
var options = {
dataType : dt,
resetForm : true,
success:function(responseText, statusText, xhr, $form){
if(typeof callback_method != "undefined"){
if(callback_method != ""){
window.o[o.data_method][callback_method](responseText,statusText,xhr,$form);
}
}
if(notification != "")
o.notify(notification,"success");
},
error:function(){
o.notify("Please try again later!","imp");
@@ -1242,8 +1251,8 @@ var orbitDesktop = function(dom){
});
$(".stock_wallpaper .ssl_item").click(function(){
var wallpapername = $(this).find("img").attr("alt");
o.changeWallpaper(wallpapername);
var wallpaper = $(this).find("img").data("link");
o.changeWallpaper(wallpaper);
})
}
var loadthmc = function(){ // a general function to load the themecolor in color selector
@@ -1516,7 +1525,7 @@ var orbitDesktop = function(dom){
if(!wallpaper){
$("#thmbackground").attr("src",o.themesettings.background);
} else {
$("#thmbackground").attr("src",o.wallpaperPath+wallpaper);
$("#thmbackground").attr("src",wallpaper);
}
};
@@ -72,7 +72,7 @@ var orbitDesktopAPI = function(){
this.changeWallpaper = function(wallpaper){
//takes 1 parameter
//wallpaper (string): takes wallpaper and sets the wallpaper
$("#thmbackground").attr("src",o.wallpaperPath+wallpaper);
$("#thmbackground").attr("src",wallpaper);
o.saveWallpaper(wallpaper);
};
this.confirm = function(settings,callbackfn){
+1 -1
View File
@@ -1,5 +1,5 @@
// JavaScript Document
//harry
//harry bomrah
//Inititialize function will initialize desktop
//callback-method will be called after desktop controlled ajax call