diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-02-21 01:02:32 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-02-21 01:02:32 +0900 |
| commit | c5a26efda4ab0d2fce4b47250381c67151dee0fc (patch) | |
| tree | 24b14f75f007ff7ca0759a7568401e857012d02b /src/web/app/mobile | |
| parent | Merge remote-tracking branch 'refs/remotes/origin/master' into no-tag-ls (diff) | |
| download | misskey-c5a26efda4ab0d2fce4b47250381c67151dee0fc.tar.gz misskey-c5a26efda4ab0d2fce4b47250381c67151dee0fc.tar.bz2 misskey-c5a26efda4ab0d2fce4b47250381c67151dee0fc.zip | |
wip
Diffstat (limited to 'src/web/app/mobile')
| -rw-r--r-- | src/web/app/mobile/tags/drive.tag | 46 | ||||
| -rw-r--r-- | src/web/app/mobile/tags/post-form.tag | 4 |
2 files changed, 25 insertions, 25 deletions
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 |