Diffstat (limited to 'frontend/delta/js/Clipperz/PM/DataModel/User.Subscription.js') (more/less context) (show whitespace changes)
-rw-r--r-- | frontend/delta/js/Clipperz/PM/DataModel/User.Subscription.js | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/frontend/delta/js/Clipperz/PM/DataModel/User.Subscription.js b/frontend/delta/js/Clipperz/PM/DataModel/User.Subscription.js new file mode 100644 index 0000000..341e9f3 --- a/dev/null +++ b/frontend/delta/js/Clipperz/PM/DataModel/User.Subscription.js | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2013 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz, the online password manager. | ||
6 | For further information about its features and functionalities please | ||
7 | refer to http://www.clipperz.com. | ||
8 | |||
9 | * Clipperz is free software: you can redistribute it and/or modify it | ||
10 | under the terms of the GNU Affero General Public License as published | ||
11 | by the Free Software Foundation, either version 3 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | * Clipperz is distributed in the hope that it will be useful, but | ||
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | See the GNU Affero General Public License for more details. | ||
18 | |||
19 | * You should have received a copy of the GNU Affero General Public | ||
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | ||
21 | |||
22 | */ | ||
23 | |||
24 | try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) { | ||
25 | throw "Clipperz.PM.DataModel.User.Subscription depends on Clipperz.PM.DataModel.User!"; | ||
26 | } | ||
27 | |||
28 | Clipperz.PM.DataModel.User.Subscription = function(args) { | ||
29 | this._attributes = args; | ||
30 | return this; | ||
31 | } | ||
32 | |||
33 | |||
34 | Clipperz.Base.extend(Clipperz.PM.DataModel.User.Subscription, Object, { | ||
35 | |||
36 | 'features': function () { | ||
37 | return this._attributes['features']; | ||
38 | }, | ||
39 | |||
40 | 'type': function () { | ||
41 | return this._attributes['type']; | ||
42 | }, | ||
43 | |||
44 | 'validity': function () { | ||
45 | return { | ||
46 | 'from':this._attributes['fromDate'], | ||
47 | 'to':this._attributes['toDate'] | ||
48 | }; | ||
49 | }, | ||
50 | |||
51 | //========================================================================= | ||
52 | __syntaxFix__: "syntax fix" | ||
53 | }); | ||