Created
August 5, 2014 20:20
-
-
Save pegli/08bc415e64ca3c08b93d to your computer and use it in GitHub Desktop.
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
$.index.open(); |
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
var records = Alloy.Collections.records; | |
records.fetch(); |
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
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; | |
} | |
}; |
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
<Alloy> | |
<TabGroup> | |
<Require src="records"/> | |
</TabGroup> | |
</Alloy> |
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
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment