diff --git a/src/web/app/common/tags/uploader.tag b/src/web/app/common/tags/uploader.tag index f6e99892a1..51520d9abd 100644 --- a/src/web/app/common/tags/uploader.tag +++ b/src/web/app/common/tags/uploader.tag @@ -142,54 +142,57 @@ diff --git a/src/web/app/desktop/tags/drive/browser.tag b/src/web/app/desktop/tags/drive/browser.tag index 51c26943a2..1c6ed53cae 100644 --- a/src/web/app/desktop/tags/drive/browser.tag +++ b/src/web/app/desktop/tags/drive/browser.tag @@ -238,6 +238,8 @@ diff --git a/src/web/app/desktop/tags/drive/file.tag b/src/web/app/desktop/tags/drive/file.tag index 58c6b40a41..e35d204b61 100644 --- a/src/web/app/desktop/tags/drive/file.tag +++ b/src/web/app/desktop/tags/drive/file.tag @@ -200,10 +200,10 @@ // 親ブラウザに対して、ドラッグが開始されたフラグを立てる // (=あなたの子供が、ドラッグを開始しましたよ) - this.browser.is-drag-source = true + this.browser.isDragSource = true this.ondragend = (e) => { this.is-dragging = false - this.browser.is-drag-source = false + this.browser.isDragSource = false diff --git a/src/web/app/desktop/tags/drive/folder.tag b/src/web/app/desktop/tags/drive/folder.tag index c9bc5d7f04..abc9368f48 100644 --- a/src/web/app/desktop/tags/drive/folder.tag +++ b/src/web/app/desktop/tags/drive/folder.tag @@ -155,11 +155,11 @@ // 親ブラウザに対して、ドラッグが開始されたフラグを立てる // (=あなたの子供が、ドラッグを開始しましたよ) - this.browser.is-drag-source = true + this.browser.isDragSource = true this.ondragend = (e) => { this.is-dragging = false - this.browser.is-drag-source = false + this.browser.isDragSource = false this.oncontextmenu = (e) => { e.preventDefault(); diff --git a/src/web/app/desktop/tags/following-setuper.tag b/src/web/app/desktop/tags/following-setuper.tag index 6381e4d8d9..03b26b10ef 100644 --- a/src/web/app/desktop/tags/following-setuper.tag +++ b/src/web/app/desktop/tags/following-setuper.tag @@ -133,7 +133,7 @@ this.page = 0 this.on('mount', () => { - @load! + this.load(); this.load = () => { this.loading = true @@ -155,7 +155,7 @@ this.page = 0 else this.page++ - @load! + this.load(); this.close = () => { this.unmount(); diff --git a/src/web/app/desktop/tags/home-widgets/photo-stream.tag b/src/web/app/desktop/tags/home-widgets/photo-stream.tag index 042e3ea209..3ebbf6a1e2 100644 --- a/src/web/app/desktop/tags/home-widgets/photo-stream.tag +++ b/src/web/app/desktop/tags/home-widgets/photo-stream.tag @@ -64,7 +64,7 @@ this.initializing = true this.on('mount', () => { - this.stream.on 'drive_file_created' this.on-stream-drive-file-created + this.stream.on 'drive_file_created' this.onStreamDriveFileCreated this.api('drive/stream', { type: 'image/*' @@ -75,9 +75,9 @@ this.update(); this.on('unmount', () => { - this.stream.off 'drive_file_created' this.on-stream-drive-file-created + this.stream.off 'drive_file_created' this.onStreamDriveFileCreated - this.on-stream-drive-file-created = (file) => { + this.onStreamDriveFileCreated = (file) => { if /^image\/.+$/.test file.type @images.unshift file if @images.length > 9 diff --git a/src/web/app/desktop/tags/home-widgets/timeline.tag b/src/web/app/desktop/tags/home-widgets/timeline.tag index 30acc75acd..69417aa83b 100644 --- a/src/web/app/desktop/tags/home-widgets/timeline.tag +++ b/src/web/app/desktop/tags/home-widgets/timeline.tag @@ -98,10 +98,10 @@ this.refs.timeline.add-post post this.on-stream-follow = () => { - @load! + this.load(); this.on-stream-unfollow = () => { - @load! + this.load(); this.on-scroll = () => { current = window.scrollY + window.inner-height diff --git a/src/web/app/desktop/tags/images-viewer.tag b/src/web/app/desktop/tags/images-viewer.tag index 8d10ec6564..e1ceeb0f53 100644 --- a/src/web/app/desktop/tags/images-viewer.tag +++ b/src/web/app/desktop/tags/images-viewer.tag @@ -30,7 +30,7 @@ this.image = @images.0 this.mousemove = (e) => { - rect = this.refs.view.get-bounding-client-rect! + rect = this.refs.view.getBoundingClientRect(); mouse-x = e.client-x - rect.left mouse-y = e.client-y - rect.top xp = mouse-x / this.refs.view.offset-width * 100 diff --git a/src/web/app/desktop/tags/post-form.tag b/src/web/app/desktop/tags/post-form.tag index cb1693420c..737c77dbfc 100644 --- a/src/web/app/desktop/tags/post-form.tag +++ b/src/web/app/desktop/tags/post-form.tag @@ -324,7 +324,7 @@ this.on('mount', () => { this.refs.uploader.on('uploaded', (file) => { - @add-file file + this.addFile file this.refs.uploader.on('change-uploads', (uploads) => { this.trigger 'change-uploading-files' uploads @@ -382,7 +382,7 @@ // (ドライブの)ファイルだったら if obj.type == 'file' - @add-file obj.file + this.addFile obj.file catch // ignore @@ -409,7 +409,7 @@ i = riot.mount browser, do multiple: true i[0].one 'selected' (files) => - files.forEach @add-file + files.forEach this.addFile this.change-file = () => { files = this.refs.file.files diff --git a/src/web/app/mobile/tags/drive.tag b/src/web/app/mobile/tags/drive.tag index 8d4383f6ef..36c037d1a9 100644 --- a/src/web/app/mobile/tags/drive.tag +++ b/src/web/app/mobile/tags/drive.tag @@ -146,10 +146,10 @@ this.multiple = if this.opts.multiple? then this.opts.multiple else false this.on('mount', () => { - this.stream.on 'drive_file_created' this.on-stream-drive-file-created - this.stream.on 'drive_file_updated' this.on-stream-drive-file-updated - this.stream.on 'drive_folder_created' this.on-stream-drive-folder-created - this.stream.on 'drive_folder_updated' this.on-stream-drive-folder-updated + this.stream.on 'drive_file_created' this.onStreamDriveFileCreated + this.stream.on 'drive_file_updated' this.onStreamDriveFileUpdated + this.stream.on 'drive_folder_created' this.onStreamDriveFolderCreated + this.stream.on 'drive_folder_updated' this.onStreamDriveFolderUpdated // Riotのバグでnullを渡しても""になる // https://github.com/riot/riot/issues/2080 @@ -159,36 +159,36 @@ else if this.opts.file? and this.opts.file != '' @cf this.opts.file, true else - @load! + this.load(); this.on('unmount', () => { - this.stream.off 'drive_file_created' this.on-stream-drive-file-created - this.stream.off 'drive_file_updated' this.on-stream-drive-file-updated - this.stream.off 'drive_folder_created' this.on-stream-drive-folder-created - this.stream.off 'drive_folder_updated' this.on-stream-drive-folder-updated + this.stream.off 'drive_file_created' this.onStreamDriveFileCreated + this.stream.off 'drive_file_updated' this.onStreamDriveFileUpdated + this.stream.off 'drive_folder_created' this.onStreamDriveFolderCreated + this.stream.off 'drive_folder_updated' this.onStreamDriveFolderUpdated - this.on-stream-drive-file-created = (file) => { - @add-file file, true + this.onStreamDriveFileCreated = (file) => { + this.addFile file, true - this.on-stream-drive-file-updated = (file) => { + this.onStreamDriveFileUpdated = (file) => { current = if this.folder? then this.folder.id else null if current != file.folder_id @remove-file file else - @add-file file, true + this.addFile file, true - this.on-stream-drive-folder-created = (folder) => { - @add-folder folder, true + this.onStreamDriveFolderCreated = (folder) => { + this.addFolder folder, true - this.on-stream-drive-folder-updated = (folder) => { + this.onStreamDriveFolderUpdated = (folder) => { current = if this.folder? then this.folder.id else null if current != folder.parent_id - @remove-folder folder + this.removeFolder folder else - @add-folder folder, true + this.addFolder folder, true @_move = (ev) => - @move ev.item.folder + this.move ev.item.folder this.move = (target-folder) => { @cd target-folder @@ -222,7 +222,7 @@ this.update(); this.trigger 'open-folder' this.folder, silent - @load! + this.load(); .catch (err, text-status) -> console.error err @@ -278,7 +278,7 @@ this.hierarchyFolders = [] this.update(); this.trigger('move-root'); - @load! + this.load(); this.load = () => { this.folders = [] @@ -326,9 +326,9 @@ complete = => if flag load-folders.forEach (folder) => - @add-folder folder + this.addFolder folder load-files.forEach (file) => - @add-file file + this.addFile file this.loading = false this.update(); diff --git a/src/web/app/mobile/tags/post-form.tag b/src/web/app/mobile/tags/post-form.tag index 43643f88c6..27c6c005ce 100644 --- a/src/web/app/mobile/tags/post-form.tag +++ b/src/web/app/mobile/tags/post-form.tag @@ -193,7 +193,7 @@ this.on('mount', () => { this.refs.uploader.on('uploaded', (file) => { - @add-file file + this.addFile file this.refs.uploader.on('change-uploads', (uploads) => { this.trigger 'change-uploading-files' uploads @@ -225,7 +225,7 @@ multiple: true .0 browser.on('selected', (files) => { - files.forEach @add-file + files.forEach this.addFile this.change-file = () => { files = this.refs.file.files