Skip to content

Commit

Permalink
reverting, changes were meant for branch, not trunk
Browse files Browse the repository at this point in the history
git-svn-id: file:///root/var/svn/trunk/uploadr@592 2ccee060-bf41-0410-b5a3-d28fdbd3ea41
  • Loading branch information
ashot committed Apr 7, 2009
1 parent 24928be commit e9108e8
Show file tree
Hide file tree
Showing 111 changed files with 4,317 additions and 22,764 deletions.
993 changes: 495 additions & 498 deletions MacUploadr.app/Contents/Resources/chrome/content/uploadr/api.js

Large diffs are not rendered by default.

172 changes: 86 additions & 86 deletions MacUploadr.app/Contents/Resources/chrome/content/uploadr/buttons.js
Original file line number Diff line number Diff line change
@@ -1,86 +1,86 @@
/*
* Flickr Uploadr
*
* Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is
* free software; you can redistribute it and/or modify it under the terms of
* the GNU General Public License (GPL), version 2 only. This library is
* distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU
* GPL for more details (http://www.gnu.org/licenses/gpl.html)
*/

var buttons = {

login: {
click: function() {
//if ('small button' != document.getElementById('login').className) {
//return;
//}
if (users.nsid) {
settings.show();
} else {
users.login();
}
},
enable: function() {
//document.getElementById('login').className = 'small button';
//document.getElementById('big_login').className = 'button';
},
disable: function() {
//document.getElementById('login').className = 'small disabled_button';
//document.getElementById('big_login').className = 'disabled_button';
}
},

auth: {
click: function() {
wrap.auth.getToken(users.frob);
pages.go('photos');
}
},

remove: {
enable: function() {
//document.getElementById('t_remove').className = 'button';
},
disable: function() {
//document.getElementById('t_remove').className = 'disabled_button';
}
},

upload: {
enable: function() {
if (users.nsid && 'boolean' == typeof users.is_pro &&
0 < photos.count) {
//document.getElementById('button_upload').className = 'button';
//document.getElementById('menu_upload').disabled = false;
//document.getElementById('menu_upload').disabled = false;
}
},
disable: function() {
//document.getElementById('button_upload').className = 'disabled_button';
//document.getElementById('menu_upload').disabled = true;
//document.getElementById('menu_upload').disabled = true;
},
click: function() {

// Save the selected photo before uploading
mouse.click({target: {}});
ui.cancel = false;
photos.upload();
}
},

cancel: {
click: function() {
if (confirm(locale.getString('upload.cancel.text'),
locale.getString('upload.cancel.title'),
locale.getString('upload.cancel.ok'),
locale.getString('upload.cancel.cancel'))) {
ui.cancel = true;
upload.cancel = true;
upload._start(upload.genErr(), upload.progress_id);
}
}
}

};
/*
* Flickr Uploadr
*
* Copyright (c) 2007-2009 Yahoo! Inc. All rights reserved. This library is
* free software; you can redistribute it and/or modify it under the terms of
* the GNU General Public License (GPL), version 2 only. This library is
* distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU
* GPL for more details (http://www.gnu.org/licenses/gpl.html)
*/

var buttons = {

login: {
click: function() {
if ('small button' != document.getElementById('login').className) {
return;
}
if (users.nsid) {
settings.show();
} else {
users.login();
}
},
enable: function() {
document.getElementById('login').className = 'small button';
document.getElementById('big_login').className = 'button';
},
disable: function() {
document.getElementById('login').className = 'small disabled_button';
document.getElementById('big_login').className = 'disabled_button';
}
},

auth: {
click: function() {
wrap.auth.getToken(users.frob);
pages.go('photos');
}
},

remove: {
enable: function() {
document.getElementById('t_remove').className = 'button';
},
disable: function() {
document.getElementById('t_remove').className = 'disabled_button';
}
},

upload: {
enable: function() {
if (users.nsid && 'boolean' == typeof users.is_pro &&
0 < photos.count) {
document.getElementById('button_upload').className = 'button';
document.getElementById('button_upload').style.display = 'block';
document.getElementById('menu_upload').disabled = false;
}
},
disable: function() {
document.getElementById('button_upload').className = 'disabled_button';
document.getElementById('button_upload').style.display = 'none';
document.getElementById('menu_upload').disabled = true;
},
click: function() {

// Save the selected photo before uploading
mouse.click({target: {}});
ui.cancel = false;
photos.upload();
}
},

cancel: {
click: function() {
if (confirm(locale.getString('upload.cancel.text'),
locale.getString('upload.cancel.title'),
locale.getString('upload.cancel.ok'),
locale.getString('upload.cancel.cancel'))) {
ui.cancel = true;
upload.cancel = true;
upload._start(upload.genErr(), upload.progress_id);
}
}
}

};
48 changes: 23 additions & 25 deletions MacUploadr.app/Contents/Resources/chrome/content/uploadr/clh.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
/*
* Flickr Uploadr
*
* Copyright (c) 2007-2009 Yahoo! Inc. All rights reserved. This library is
* free software; you can redistribute it and/or modify it under the terms of
* the GNU General Public License (GPL), version 2 only. This library is
* distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU
* GPL for more details (http://www.gnu.org/licenses/gpl.html)
*/

// Check the command line queue for arguments
var clh = function(silent, queue) {
if(!threads.initialized) {
window.setTimeout(clh, 100, silent, queue);
return;
}
if (null == queue) {
var comp = Cc["@mozilla.org/commandlinehandler/general-startup;1?type=flcmdline"]
.getService(Ci.flICLH);
queue = comp.getQueue();
}
var Q = queue.split('|||||');
if(Q.length > 0)
photos.add(Q, silent);
};
/*
* Flickr Uploadr
*
* Copyright (c) 2007-2009 Yahoo! Inc. All rights reserved. This library is
* free software; you can redistribute it and/or modify it under the terms of
* the GNU General Public License (GPL), version 2 only. This library is
* distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU
* GPL for more details (http://www.gnu.org/licenses/gpl.html)
*/

// Check the command line queue for arguments
var clh = function(silent, queue) {
if(!threads.initialized) {
window.setTimeout(clh, 100, silent, queue);
return;
}
if (null == queue) {
var comp = Cc["@mozilla.org/commandlinehandler/general-startup;1?type=flcmdline"]
.getService(Ci.flICLH);
queue = comp.getQueue();
}
photos.add(queue.split('|||||'), silent);
};
Loading

0 comments on commit e9108e8

Please sign in to comment.