-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reverting, changes were meant for branch, not trunk
git-svn-id: file:///root/var/svn/trunk/uploadr@592 2ccee060-bf41-0410-b5a3-d28fdbd3ea41
- Loading branch information
Showing
111 changed files
with
4,317 additions
and
22,764 deletions.
There are no files selected for viewing
993 changes: 495 additions & 498 deletions
993
MacUploadr.app/Contents/Resources/chrome/content/uploadr/api.js
Large diffs are not rendered by default.
Oops, something went wrong.
172 changes: 86 additions & 86 deletions
172
MacUploadr.app/Contents/Resources/chrome/content/uploadr/buttons.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
48
MacUploadr.app/Contents/Resources/chrome/content/uploadr/clh.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}; |
Oops, something went wrong.