mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-26 03:02:25 -05:00
Update to use human-model and human-view
This commit is contained in:
parent
5c6655e7be
commit
f1bad70a14
@ -2,14 +2,14 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var async = require('async');
|
var async = require('async');
|
||||||
var StrictModel = require('strictmodel').Model;
|
var HumanModel = require('human-model');
|
||||||
var Resources = require('./resources');
|
var Resources = require('./resources');
|
||||||
var Messages = require('./messages');
|
var Messages = require('./messages');
|
||||||
var Message = require('./message');
|
var Message = require('./message');
|
||||||
var crypto = XMPP.crypto;
|
var crypto = XMPP.crypto;
|
||||||
|
|
||||||
|
|
||||||
module.exports = StrictModel.extend({
|
module.exports = HumanModel.extend({
|
||||||
initialize: function (attrs) {
|
initialize: function (attrs) {
|
||||||
if (attrs.jid) {
|
if (attrs.jid) {
|
||||||
this.cid = attrs.jid;
|
this.cid = attrs.jid;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/*global app*/
|
/*global app*/
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var StrictModel = require('strictmodel');
|
var HumanModel = require('human-model');
|
||||||
var Contacts = require('./contacts');
|
var Contacts = require('./contacts');
|
||||||
var Contact = require('./contact');
|
var Contact = require('./contact');
|
||||||
|
|
||||||
|
|
||||||
module.exports = StrictModel.Model.extend({
|
module.exports = HumanModel.extend({
|
||||||
session: {
|
session: {
|
||||||
jid: ['string', true, ''],
|
jid: ['string', true, ''],
|
||||||
status: ['string', true, ''],
|
status: ['string', true, ''],
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
/*global me*/
|
/*global me*/
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var StrictModel = require('strictmodel').Model;
|
var HumanModel = require('human-model');
|
||||||
|
|
||||||
|
|
||||||
module.exports = StrictModel.extend({
|
module.exports = HumanModel.extend({
|
||||||
initialize: function (attrs) {
|
initialize: function (attrs) {
|
||||||
this._created = Date.now();
|
this._created = Date.now();
|
||||||
},
|
},
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var StrictModel = require('strictmodel').Model;
|
var HumanModel = require('human-model');
|
||||||
|
|
||||||
|
|
||||||
module.exports = StrictModel.extend({
|
module.exports = HumanModel.extend({
|
||||||
initialize: function () {},
|
initialize: function () {},
|
||||||
type: 'resource',
|
type: 'resource',
|
||||||
session: {
|
session: {
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var _ = require('underscore');
|
var _ = require('underscore');
|
||||||
var StrictView = require('strictview');
|
var HumanView = require('human-view');
|
||||||
|
|
||||||
|
|
||||||
module.exports = StrictView.extend({
|
module.exports = HumanView.extend({
|
||||||
show: function (animation) {
|
show: function (animation) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ var ChatPage = require('./pages/chat');
|
|||||||
|
|
||||||
module.exports = Backbone.Router.extend({
|
module.exports = Backbone.Router.extend({
|
||||||
routes: {
|
routes: {
|
||||||
'': 'signin',
|
'': 'main',
|
||||||
'signin': 'signin',
|
'signin': 'signin',
|
||||||
'chat/:jid': 'chat'
|
'chat/:jid': 'chat'
|
||||||
},
|
},
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var _ = require('underscore');
|
var _ = require('underscore');
|
||||||
var StrictView = require('strictview');
|
var HumanView = require('human-view');
|
||||||
var templates = require('../templates');
|
var templates = require('../templates');
|
||||||
|
|
||||||
|
|
||||||
module.exports = StrictView.extend({
|
module.exports = HumanView.extend({
|
||||||
template: templates.includes.contactListItem,
|
template: templates.includes.contactListItem,
|
||||||
classBindings: {
|
classBindings: {
|
||||||
show: '',
|
show: '',
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/*global $, app, me*/
|
/*global $, app, me*/
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var StrictView = require('strictview');
|
var HumanView = require('human-view');
|
||||||
var templates = require('../templates');
|
var templates = require('../templates');
|
||||||
var ContactListItem = require('../views/contactListItem');
|
var ContactListItem = require('../views/contactListItem');
|
||||||
|
|
||||||
|
|
||||||
module.exports = StrictView.extend({
|
module.exports = HumanView.extend({
|
||||||
template: templates.body,
|
template: templates.body,
|
||||||
events: {
|
events: {
|
||||||
'click a[href]': 'handleLinkClick'
|
'click a[href]': 'handleLinkClick'
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var _ = require('underscore');
|
var _ = require('underscore');
|
||||||
var StrictView = require('strictview');
|
var HumanView = require('human-view');
|
||||||
var templates = require('../templates');
|
var templates = require('../templates');
|
||||||
|
|
||||||
|
|
||||||
module.exports = StrictView.extend({
|
module.exports = HumanView.extend({
|
||||||
template: templates.includes.message,
|
template: templates.includes.message,
|
||||||
initialize: function (opts) {
|
initialize: function (opts) {
|
||||||
this.render();
|
this.render();
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
"node-uuid": "1.4.1",
|
"node-uuid": "1.4.1",
|
||||||
"semi-static": "0.0.4",
|
"semi-static": "0.0.4",
|
||||||
"sound-effect-manager": "0.0.5",
|
"sound-effect-manager": "0.0.5",
|
||||||
"strictmodel": "0.1.1",
|
"human-model": "0.3.0",
|
||||||
"strictview": "1.0.2",
|
"human-view": "1.1.0",
|
||||||
"templatizer": "0.1.2",
|
"templatizer": "0.1.2",
|
||||||
"underscore": "1.5.1"
|
"underscore": "1.5.1"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user