Last active
August 29, 2015 14:04
-
-
Save mytrile/357dc71c218338bf56a5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// controller | |
var args = arguments[0] || {}; |
This file contains hidden or 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
<Alloy> | |
<Collection src="records"/> | |
<Tab id="records" title="Records" icon="records.png"> | |
<Window title="Records" class="container"> | |
<TitleControl> | |
<Label id="window_title">Records</Label> | |
</TitleControl> | |
<TableView dataCollection="records"> | |
<TableViewRow title="{title}" class="tableRow"></TableViewRow> | |
</TableView> | |
<Toolbar bottom="0"> | |
<Items> | |
<Button id="showArchive" title="Archive"></Button> | |
<FlexSpace/> | |
<Button id="newRecord" title="New Record"></Button> | |
</Items> | |
</Toolbar> | |
</Window> | |
</Tab> | |
</Alloy> |
This file contains hidden or 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
// model | |
exports.definition = { | |
config: { | |
columns: { | |
title: "TEXT", | |
notes: "TEXT", | |
dateTime: "TEXT", | |
type: "TEXT", | |
reminder: "INTEGER", | |
record_id: "INTEGER PRIMARY KEY AUTOINCREMENT" | |
}, | |
adapter: { | |
type: "sql", | |
collection_name: "records", | |
idAttribute: "record_id" | |
} | |
}, | |
extendModel: function(Model) { | |
_.extend(Model.prototype, {}); | |
return Model; | |
}, | |
extendCollection: function(Collection) { | |
_.extend(Collection.prototype, {}); | |
return Collection; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment