Use consistent boiler plate throughout js files

This commit is contained in:
lilia 2015-03-05 15:44:53 -08:00
parent f89cf890df
commit 2ee34343a8
15 changed files with 25 additions and 40 deletions

View File

@ -15,7 +15,6 @@
*/
(function () {
'use strict';
window.Whisper = window.Whisper || {};
// TODO: Factor out private and group subclasses of Conversation

View File

@ -15,7 +15,6 @@
*/
(function () {
'use strict';
window.Whisper = window.Whisper || {};
var Message = Backbone.Model.extend({

View File

@ -13,10 +13,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var Whisper = Whisper || {};
(function () {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.AttachmentPreviewView = Whisper.View.extend({
className: 'attachment-preview',
template: $('#attachment-preview').html(),

View File

@ -13,11 +13,9 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
(function () {
'use strict';
var Whisper = Whisper || {};
window.Whisper = window.Whisper || {};
// list of conversations, showing user/group and last message sent
Whisper.ConversationListItemView = Whisper.View.extend({

View File

@ -13,23 +13,20 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var Whisper = Whisper || {};
(function () {
'use strict';
'use strict';
window.Whisper = window.Whisper || {};
Whisper.ConversationListView = Whisper.ListView.extend({
tagName: 'div',
itemView: Whisper.ConversationListItemView,
events: {
'click .contact': 'select',
},
select: function(e) {
var target = $(e.target).closest('.contact');
target.siblings().removeClass('selected');
return false;
},
});
Whisper.ConversationListView = Whisper.ListView.extend({
tagName: 'div',
itemView: Whisper.ConversationListItemView,
events: {
'click .contact': 'select',
},
select: function(e) {
var target = $(e.target).closest('.contact');
target.siblings().removeClass('selected');
return false;
}
});
})();

View File

@ -13,10 +13,9 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var Whisper = Whisper || {};
(function () {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.FileSizeToast = Whisper.ToastView.extend({
template: $('#file-size-modal').html()

View File

@ -15,7 +15,6 @@
*/
(function () {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.KeyVerificationView = Whisper.View.extend({

View File

@ -13,10 +13,9 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var Whisper = Whisper || {};
(function () {
'use strict';
window.Whisper = window.Whisper || {};
/*
* Generic list view that watches a given collection, wraps its members in

View File

@ -15,7 +15,6 @@
*/
(function () {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.MessageDetailView = Whisper.View.extend({

View File

@ -13,10 +13,9 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var Whisper = Whisper || {};
(function () {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.MessageListView = Whisper.ListView.extend({
tagName: 'ul',

View File

@ -15,7 +15,6 @@
*/
(function () {
'use strict';
window.Whisper = window.Whisper || {};
var ErrorView = Backbone.View.extend({

View File

@ -13,10 +13,9 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
(function () {
'use strict';
var Whisper = Whisper || {};
window.Whisper = window.Whisper || {};
var ContactsTypeahead = Backbone.TypeaheadCollection.extend({
typeaheadAttributes: [

View File

@ -15,7 +15,6 @@
*/
(function () {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.NewGroupUpdateView = Whisper.View.extend({

View File

@ -13,10 +13,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var Whisper = Whisper || {};
(function () {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.PhoneInputView = Whisper.View.extend({
tagName: 'div',
className: 'phone-input',

View File

@ -13,10 +13,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var Whisper = Whisper || {};
(function () {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.ToastView = Whisper.View.extend({
className: 'toast',
initialize: function() {