* Fix various areaID and area name refs for new system

This commit is contained in:
Bryan Ashby 2015-08-20 17:05:02 -06:00
parent d69d00a14b
commit 6f3137d522
3 changed files with 6 additions and 24 deletions

View File

@ -80,24 +80,6 @@ function createUserTables() {
} }
function createMessageBaseTables() { function createMessageBaseTables() {
/*
dbs.message.run(
'CREATE TABLE IF NOT EXISTS message_area (' +
' area_id INTEGER PRIMARY KEY,' +
' area_name VARCHAR NOT NULL,' +
' UNIQUE(area_name)' +
');'
);
dbs.message.run(
'CREATE TABLE IF NOT EXISTS message_area_group (' +
' area_id INTEGER NOT NULL,' +
' group_id INTEGER NOT NULL' + // FK @ user.sqlite::user_group::group_id
');'
);
*/
dbs.message.run( dbs.message.run(
'CREATE TABLE IF NOT EXISTS message (' + 'CREATE TABLE IF NOT EXISTS message (' +
' message_id INTEGER PRIMARY KEY,' + ' message_id INTEGER PRIMARY KEY,' +
@ -110,7 +92,7 @@ function createMessageBaseTables() {
' message,' + // FTS @ message_fts ' message,' + // FTS @ message_fts
' modified_timestamp DATETIME NOT NULL,' + ' modified_timestamp DATETIME NOT NULL,' +
' view_count INTEGER NOT NULL DEFAULT 0,' + ' view_count INTEGER NOT NULL DEFAULT 0,' +
' UNIQUE(message_uuid),' + ' UNIQUE(message_uuid)' +
');' ');'
); );

View File

@ -36,7 +36,7 @@ function FullScreenEditorModule(options) {
// editorMode : view | edit | quote (private: editMenu | ... ) // editorMode : view | edit | quote (private: editMenu | ... )
// //
// extraArgs: // extraArgs:
// messageAreaId // messageAreaName
// messageNumber / messageTotal // messageNumber / messageTotal
// //
// //
@ -44,11 +44,11 @@ function FullScreenEditorModule(options) {
this.editorMode = config.editorMode; this.editorMode = config.editorMode;
if(_.isObject(options.extraArgs)) { if(_.isObject(options.extraArgs)) {
this.messageAreaId = options.extraArgs.messageAreaId || Message.WellKnownAreaIds.Private; this.messageAreaName = options.extraArgs.messageAreaName || Message.WellKnownAreaIds.Private;
} }
this.isLocalEmail = function() { this.isLocalEmail = function() {
return 'email' === this.editorType && Message.WellKnownAreaIds.Private === this.messageAreaId; return 'email' === this.editorType && Message.WellKnownAreaIds.Private === this.messageAreaName;
}; };
this.getFooterName = function(editorMode) { this.getFooterName = function(editorMode) {
@ -72,7 +72,7 @@ function FullScreenEditorModule(options) {
var headerValues = self.viewControllers.header.getFormData().value; var headerValues = self.viewControllers.header.getFormData().value;
var messageOpts = { var messageOpts = {
areaId : self.messageAreaId, areaName : self.messageAreaName,
toUserName : headerValues.to, toUserName : headerValues.to,
fromUserName : headerValues.from, fromUserName : headerValues.from,
subject : headerValues.subject, subject : headerValues.subject,

View File

@ -49,7 +49,7 @@ MCIViewFactory.prototype.getPredefinedViewLabel = function(code) {
UT : this.client.user.properties.theme_id, UT : this.client.user.properties.theme_id,
MS : moment(this.client.user.properties.account_created).format(this.client.currentTheme.helpers.getDateFormat()), MS : moment(this.client.user.properties.account_created).format(this.client.currentTheme.helpers.getDateFormat()),
MA : this.client.user.properties.message_area_name, MA : this.client.user.properties.message_area_desc,
SH : this.client.term.termHeight.toString(), SH : this.client.term.termHeight.toString(),