author | Clipperz <info@clipperz.com> | 2013-01-09 11:45:31 (UTC) |
---|---|---|
committer | Clipperz <info@clipperz.com> | 2013-01-09 11:45:31 (UTC) |
commit | 9741a93a9f5c76827135b43c03b20c0a48f12604 (patch) (side-by-side diff) | |
tree | 1a8fff379a033d873c9e1c7faff755fb6bb7b118 | |
parent | 8ef30d00eb96004c39540019336c0ec99dae01cb (diff) | |
download | clipperz-9741a93a9f5c76827135b43c03b20c0a48f12604.zip clipperz-9741a93a9f5c76827135b43c03b20c0a48f12604.tar.gz clipperz-9741a93a9f5c76827135b43c03b20c0a48f12604.tar.bz2 |
Merge latest changes with public repository
-rw-r--r-- | frontend/beta/js/Clipperz/PM/DataModel/Record.js | 9 | ||||
-rw-r--r-- | frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js | 2 | ||||
-rw-r--r-- | scripts/builder/repository.py | 4 |
3 files changed, 8 insertions, 7 deletions
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/Record.js b/frontend/beta/js/Clipperz/PM/DataModel/Record.js index d6ebb39..f89f79c 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/Record.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/Record.js @@ -234,119 +234,118 @@ Clipperz.PM.DataModel.Record.prototype = MochiKit.Base.update(null, { } else { result = MochiKit.Async.succeed(this.serverData()); } //MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.loadData"); return result; }, //------------------------------------------------------------------------- 'decryptData': function(anEncryptedData) { var result; //MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.decryptData - this: " + this + " (" + anEncryptedData + ")"); if (this.shouldDecryptData()) { var deferredResult; deferredResult = new MochiKit.Async.Deferred(); deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'decryptingRecordData'); deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, this.key(), anEncryptedData['data'], anEncryptedData['version']); deferredResult.addCallback(function(anEncryptedData, someDecryptedValues) { var result; result = anEncryptedData; result['data'] = someDecryptedValues; return result; }, anEncryptedData); deferredResult.addCallback(MochiKit.Base.method(this, 'setDecryptedData')); deferredResult.callback(); result = deferredResult; } else { result = MochiKit.Async.succeed(this.decryptedData()); } //MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.decryptData"); return result; }, //------------------------------------------------------------------------- 'processData': function(someValues) { //MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.processData"); //MochiKit.Logging.logDebug("--- Record.processData: " + Clipperz.Base.serializeJSON(someValues)); if (this.shouldProcessData()) { var currentVersionParameters; -console.log("Record.processData", someValues); this.processDataToExtractLegacyValues(someValues['data']); if (typeof(someValues['data']['notes']) != 'undefined') { this.setNotes(someValues['data']['notes']); } if (someValues['data']['currentVersionKey'] != null) { this.setCurrentVersionKey(someValues['data']['currentVersionKey']); } else { this.setCurrentVersionKey(this.key()); } -// community edition doesn't currently pass version -// information +// community edition doesn't currently pass version information if (someValues['versions'] == null) { currentVersionParameters = someValues['currentVersion']; } else { currentVersionParameters = someValues['versions'][someValues['currentVersion']]; } -console.log("Record.processData - this.currentVersionKey()", this.currentVersionKey()); -console.log("Record.processData - currentVersionParameters", currentVersionParameters); +//- currentVersionParameters = someValues['currentVersion']; +// currentVersionParameters = someValues['versions'][someValues['currentVersion']]; + currentVersionParameters['key'] = this.currentVersionKey(); this.setCurrentVersion(new Clipperz.PM.DataModel.RecordVersion(this, currentVersionParameters)); if (someValues['data']['directLogins'] != null) { var directLoginReference; for (directLoginReference in someValues['data']['directLogins']) { var directLogin; var directLoginParameters; directLoginParameters = someValues['data']['directLogins'][directLoginReference]; directLoginParameters.record = this; directLoginParameters.reference = directLoginReference; directLogin = new Clipperz.PM.DataModel.DirectLogin(directLoginParameters); this.addDirectLogin(directLogin, true); } } this.setShouldProcessData(false); } Clipperz.NotificationCenter.notify(this, 'recordDataReady'); //MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.processData"); //MochiKit.Logging.logDebug("<<< Record.processData"); return this; }, //------------------------------------------------------------------------- 'processDataToExtractLegacyValues': function(someValues) { //MochiKit.Logging.logDebug(">>> Record.processDataToExtractLegacyValues"); if (someValues['data'] != null) { this.setNotes(someValues['data']); } if ( (typeof(someValues['loginFormData']) != "undefined") && (typeof(someValues['loginBindings'] != "undefined")) && (someValues['loginFormData'] != "") && (someValues['loginBindings'] != "") ) { var directLogin; directLogin = new Clipperz.PM.DataModel.DirectLogin({ record:this, label:this.label() + Clipperz.PM.Strings['newDirectLoginLabelSuffix'], reference:Clipperz.Crypto.SHA.sha256(new Clipperz.ByteArray(this.label() + diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js index 299ebc7..ab1bb0f 100644 --- a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js +++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js @@ -463,97 +463,97 @@ Clipperz.PM.Strings.Languages['en-us'] = { <h5>Internet Explorer</h5>\ <ol>\ <li><p>Make sure that the “Links” toolbar is displayed by selecting “View > Toolbars > Links” from the browser menu.</p></li>\ <li><p>Right-click on the “Add to Clipperz” link below.</p></li>\ <li><p>Select “Add to favorites” from the contextual menu.</p></li>\ <li><p>Click “Yes” for any security message that pops up.</p></li>\ <li><p>Open the “Links” folder and click “OK”</p></li>\ </ol>", 'bookmarkletTabBookmarkletTitle': "Add to Clipperz", // Tools panel - bookmarklet - instructions 'bookmarkletTabInstructions': "\ <!-- FIX CSS DONE! --> \ <h3>How to create a new card inclusive of a “direct login” link to an online service</h3>\ <ol>\ <li><p>Open the web page where the login form is hosted. (this is the page where you usually enter your sign-in credentials)</p></li>\ <li><p>Launch the bookmarklet by clicking on it: a pop-up window will appear over the web page.</p></li>\ <li><p>Copy to the clipboard the content of the large text area within the pop-up. (ctrl-C)</p></li>\ <li><p>Enter your Clipperz account and click on the <b>Add new card</b> button.</p></li>\ <li><p>Select the “Direct login” template and paste the content of the clipboard to the large text area in the form. (ctrl-V)</p></li>\ <li><p>Press the <b>Create</b> button, complete and review the details, then click <b>Save</b>.</p></li>\ </ol>\ \ <h3>How to add a “direct login” link to an existing card</h3>\ <ol>\ <li><p>Same as above.</p></li>\ <li><p>Same as above.</p></li>\ <li><p>Same as above.</p></li>\ <li><p>Enter your Clipperz account and select the card containing the credentials for the web service you just visited and click the <b>Edit</b> button.</p></li>\ <li><p>Paste the content of the clipboard to the large text area in the “Direct logins” section. (ctrl-V)</p></li>\ <li><p>Press the <b>Add direct login</b> button, review the details and then click <b>Save</b>.</p></li>\ </ol>\ \ <p></p>\ <p>Further information about the bookmarklet are <a href=\"http://www.clipperz.com/support/user_guide/bookmarklet\" target=\"_blank\">available here</a>.</p>", // Tools panel - Compact - instructions 'compactTabDescription': "\ <!-- FIX CSS DONE! --> \ <p>Clipperz Compact is a special version of Clipperz designed to be opened in the Firefox sidebar.</p>\ <p>Its purpose is to keep your collection of “direct logins” always at hand. Read more <a href=\"http://www.clipperz.com/support/user_guide/clipperz_compact\", target=\"blank\">here</a></p>\ \ <h3>How to launch Clipperz Compact in the sidebar</h3>\ <ol>\ <li><p>Get Firefox! Sidebars are only available in Firefox and you need to switch to Firefox in order to enjoy the convenience of Clipperz Compact.</p></li>\ <li>\ <p>Add the following URL to Firefox bookmarks, or even better, drag it to the bookmark bar.</p>\ - <div id=\"compactLinkBox\"><a href=\"index.html?compact\" target=\"_search\">Clipperz Compact</a></div>\ + <div id=\"compactLinkBox\"><a href=\"./index.html?compact\" target=\"_search\">Clipperz Compact</a></div>\ </li>\ <li><p>Change the properties of the bookmark so that “load this bookmark in the sidebar” is checked.</p></li>\ </ol>\ \ <h5>Added bonus: Clipperz Compact works also in Opera’s panel.</h5>", // Tools panel - HTTP authentication - instructions 'httpAuthTabDescription': "\ <!-- FIX CSS DONE! --> \ <p>HTTP authentication is a method designed to allow a web browser to provide credentials – in the form of a username and password – including them in a website address (HTTP or HTTPS URL).</p>\ <p>Nowadays it is rarely used, but it can still be found on small, private websites. You can tell that a website is protected by HTTP authentication when the browser displays a pop-up window to enter username and password.</p>\ <p>Unfortunately the Clipperz bookmarklet does not work on websites that use HTTP authentication. However you can still create a “direct login”.</p>\ \ <h3>How to create a “direct login” for a website that uses HTTP authentication</h3>\ <ol>\ <li><p>Store website URL, username and password in a new card.</p></li>\ <li><p>Copy the configuration below and paste it to the large text area in the “Direct logins” section of the new card.</p></li>\ <li><p>Press the <b>Add direct login</b> button, bind URL, username and password fields and then click <b>Save</b>.</p></li>\ </ol>\ \ <h5><a href=\"http://support.microsoft.com/kb/834489\" target=\"_blank\">Warning: Internet Explorer does not support HTTP authentication.</a></h5>", // Direct logins block 'mainPanelDirectLoginBlockLabel': "Direct logins", 'directLinkReferenceShowButtonLabel': "show", // Direct logins - blank slate 'mainPanelDirectLoginBlockDescription': "\ <!-- FIX CSS DONE! --> \ <p>Add “direct logins” to sign in to your web accounts without typing usernames and passwords!</p>\ <p>“Direct logins” greatly enhance your password security since you can:</p>\ <ul>\ <li><p>conveniently adopt and enter complex passwords;</p></li>\ <li><p>never re-use the same and easy-to-guess password.</p></li>\ </ul>\ <p>Simple and quick configuration with the <b>Clipperz bookmarklet</b>.</p>\ <a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">Learn more about “direct logins”</a>", // Cards block 'mainPanelRecordsBlockLabel': "Cards", 'mainPanelAddRecordButtonLabel': "Add new card", 'mainPanelRemoveRecordButtonLabel': "Delete card", // Cards block - filter tabs 'mainPanelRecordFilterBlockAllLabel': "all", 'mainPanelRecordFilterBlockTagsLabel': "tags", 'mainPanelRecordFilterBlockSearchLabel': "search", diff --git a/scripts/builder/repository.py b/scripts/builder/repository.py index 7ac2324..7a44e47 100644 --- a/scripts/builder/repository.py +++ b/scripts/builder/repository.py @@ -1,97 +1,99 @@ #!/usr/bin/env python # -*- coding: UTF-8 -*- def repositoryWithPath (path): try: from mercurial import ui, hg repo = hg.repository(ui.ui(), path) result = HgRepository(repo, path) except: try: from git import Repo repo = Repo(path) result = GitRepository(repo, path) - except ImportError, exception: print "Failed to import git, please install http://gitorious.org/git-python" raise exception except: result = SnapshotRepository('', path) return result #=================================================================== class Repository(object): def __init__ (self, repository, path): self.repository = repository self.path = path def revision (self): raise NotImplementedError() def areTherePendingChanges (self): raise NotImplementedError() def version (self): result = self.revision() if self.areTherePendingChanges(): result = '>>> ' + result + ' <<<' # print "VERSION: " + result return result #=================================================================== class GitRepository(Repository): # http://gitorious.org/git-python def revision (self): try: return self.repository.head.commit.hexsha except: return self.repository.commits()[0].id def areTherePendingChanges (self): try: return self.repository.is_dirty() except TypeError, te: return self.repository.is_dirty #=================================================================== class HgRepository(Repository): # http://mercurial.selenic.com/wiki/MercurialApi def revision (self): return 'hg:' + str(self.repository['tip']) def areTherePendingChanges (self): # TODO: FIXME: repository.status() does not report 'unknown(?)' files. :( return not all(map(lambda fileList: len(fileList) == 0, self.repository.status())) #=================================================================== + class SnapshotRepository(Repository): + def revision (self): return 'SNAPSHOT' + def areTherePendingChanges (self): return False |