mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Fixed more buttons in treema.
This commit is contained in:
parent
84d21490ab
commit
8ab50205aa
2 changed files with 13 additions and 13 deletions
|
@ -70,11 +70,11 @@ class SoundFileTreema extends TreemaNode.nodeMap.string
|
|||
|
||||
buildValueForDisplay: (valEl) ->
|
||||
mimetype = "audio/#{@keyForParent}"
|
||||
pickButton = $('<a class="btn btn-primary btn-xs"><span class="glyphicon glyphicon-upload"></i></a>')
|
||||
pickButton = $('<a class="btn btn-primary btn-xs"><span class="glyphicon glyphicon-upload"></span></a>')
|
||||
.click(=> filepicker.pick {mimetypes:[mimetype]}, @onFileChosen)
|
||||
playButton = $('<a class="btn btn-primary btn-xs"><span class="glyphicon glyphicon-play"></i></a>')
|
||||
playButton = $('<a class="btn btn-primary btn-xs"><span class="glyphicon glyphicon-play"></span></a>')
|
||||
.click(@playFile)
|
||||
stopButton = $('<a class="btn btn-primary btn-xs"><span class="glyphicon glyphicon-stop"></i></a>')
|
||||
stopButton = $('<a class="btn btn-primary btn-xs"><span class="glyphicon glyphicon-stop"></span></a>')
|
||||
.click(@stopFile)
|
||||
|
||||
dropdown = $('<div class="btn-group dropdown"></div>')
|
||||
|
@ -168,7 +168,7 @@ class ImageFileTreema extends TreemaNode.nodeMap.string
|
|||
|
||||
buildValueForDisplay: (valEl) ->
|
||||
mimetype = 'image/*'
|
||||
pickButton = $('<a class="btn btn-sm btn-primary"><i class="icon-upload"></i> Upload Picture</a>')
|
||||
pickButton = $('<a class="btn btn-sm btn-primary"><span class="glyphicon glyphicon-upload"></span> Upload Picture</a>')
|
||||
.click(=> filepicker.pick {mimetypes:[mimetype]}, @onFileChosen)
|
||||
|
||||
valEl.append(pickButton)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
WorldSelectModal = require './modal/world_select'
|
||||
ThangType = require '/models/ThangType'
|
||||
|
||||
makeButton = -> $('<a class="btn treema-map-button"><i class="icon-screenshot"></i></a>')
|
||||
makeButton = -> $('<a class="btn btn-primary btn-xs treema-map-button"><span class="glyphicon glyphicon-screenshot"></span></a>')
|
||||
shorten = (f) -> parseFloat(f.toFixed(1))
|
||||
WIDTH = 1848
|
||||
|
||||
|
@ -13,11 +13,11 @@ module.exports.WorldPointNode = class WorldPointNode extends TreemaNode.nodeMap.
|
|||
|
||||
buildValueForDisplay: (valEl) ->
|
||||
super(valEl)
|
||||
valEl.prepend(makeButton())
|
||||
valEl.find('.treema-shortened').prepend(makeButton())
|
||||
|
||||
buildValueForEditing: (valEl) ->
|
||||
super(valEl)
|
||||
valEl.prepend(makeButton())
|
||||
valEl.find('.treema-shortened').prepend(makeButton())
|
||||
|
||||
onClick: (e) ->
|
||||
btn = $(e.target).closest('.treema-map-button')
|
||||
|
@ -44,11 +44,11 @@ class WorldRegionNode extends TreemaNode.nodeMap.object
|
|||
|
||||
buildValueForDisplay: (valEl) ->
|
||||
super(valEl)
|
||||
valEl.prepend(makeButton())
|
||||
valEl.find('.treema-shortened').prepend(makeButton())
|
||||
|
||||
buildValueForEditing: (valEl) ->
|
||||
super(valEl)
|
||||
valEl.prepend(makeButton())
|
||||
valEl.find('.treema-shortened').prepend(makeButton())
|
||||
|
||||
onClick: (e) ->
|
||||
btn = $(e.target).closest('.treema-map-button')
|
||||
|
@ -80,11 +80,11 @@ module.exports.WorldViewportNode = class WorldViewportNode extends TreemaNode.no
|
|||
|
||||
buildValueForDisplay: (valEl) ->
|
||||
super(valEl)
|
||||
valEl.prepend(makeButton())
|
||||
valEl.find('.treema-shortened').prepend(makeButton())
|
||||
|
||||
buildValueForEditing: (valEl) ->
|
||||
super(valEl)
|
||||
valEl.prepend(makeButton())
|
||||
valEl.find('.treema-shortened').prepend(makeButton())
|
||||
|
||||
onClick: (e) ->
|
||||
btn = $(e.target).closest('.treema-map-button')
|
||||
|
@ -121,11 +121,11 @@ module.exports.WorldBoundsNode = class WorldBoundsNode extends TreemaNode.nodeMa
|
|||
|
||||
buildValueForDisplay: (valEl) ->
|
||||
super(valEl)
|
||||
valEl.prepend(makeButton())
|
||||
valEl.find('.treema-shortened').prepend(makeButton())
|
||||
|
||||
buildValueForEditing: (valEl) ->
|
||||
super(valEl)
|
||||
valEl.prepend(makeButton())
|
||||
valEl.find('.treema-shortened').prepend(makeButton())
|
||||
|
||||
onClick: (e) ->
|
||||
btn = $(e.target).closest('.treema-map-button')
|
||||
|
|
Loading…
Reference in a new issue