mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 14:03:28 -04:00
Don't be draggin' all these images around yo.
This commit is contained in:
parent
09087428b9
commit
afff1056cb
13 changed files with 32 additions and 31 deletions
app
templates
game-menu
play
views
|
@ -1,6 +1,6 @@
|
|||
.modal-dialog
|
||||
.modal-content
|
||||
img(src="/images/pages/play/modal/game-menu-background.png")#game-menu-background
|
||||
img(src="/images/pages/play/modal/game-menu-background.png", draggable="false")#game-menu-background
|
||||
|
||||
div#close-modal
|
||||
span.glyphicon.glyphicon-remove
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.modal-dialog
|
||||
.modal-content
|
||||
img(src="/images/pages/play/modal/inventory-background.png")#play-items-modal-narrow-bg
|
||||
img(src="/images/pages/play/modal/inventory-background.png", draggable="false")#play-items-modal-narrow-bg
|
||||
|
||||
div#gems-count-container
|
||||
span#gems-count.big-font= gems
|
||||
|
@ -38,14 +38,14 @@
|
|||
h4#restricted-description(data-i18n="inventory.restricted_title")
|
||||
for item in itemGroups.restrictedItems.models
|
||||
.item(class=item.classes, data-item-id=item.id)
|
||||
img(src=item.getPortraitURL())
|
||||
img(src=item.getPortraitURL(), draggable="false")
|
||||
.clearfix
|
||||
|
||||
if itemGroups.lockedItems.models.length
|
||||
h4#locked-description(data-i18n="play.locked")
|
||||
for item in itemGroups.lockedItems.models
|
||||
.item(class=item.classes, data-item-id=item.id)
|
||||
img(src=item.getPortraitURL())
|
||||
img(src=item.getPortraitURL(), draggable="false")
|
||||
.clearfix
|
||||
|
||||
#item-details-view
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#player-avatar-container(title="Click to change your avatar")
|
||||
if !me.get('photoURL')
|
||||
.editable-icon.glyphicon.glyphicon-pencil
|
||||
img.profile-photo(src=me.getPhotoURL(230))
|
||||
img.profile-photo(src=me.getPhotoURL(230), draggable="false")
|
||||
.form-group
|
||||
input#player-name.profile-caption(name="playerName", type="text", value=me.get('name', true))
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
span.help-block(data-i18n="options.autorun_description") Control automatic code execution.
|
||||
|
||||
|
||||
img.hr(src="/images/pages/play/modal/hr.png")
|
||||
img.hr(src="/images/pages/play/modal/hr.png", draggable="false")
|
||||
|
||||
h3(data-i18n="options.editor_config_title") Editor Configuration
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
.thang-avatar-wrapper(class="team-" + (thang.team || "neutral"))
|
||||
//canvas(width=100, height=100, title=thang.id + " - " + thang.team)
|
||||
//- var title = thang.id + " - " + thang.team + (thang.type ? ' - type: "' + thang.type + '"' : '')
|
||||
img.avatar(src=avatarURL)
|
||||
img.avatar-frame(src="/images/level/thang_avatar_frame.png")
|
||||
img.avatar(src=avatarURL, draggable="false")
|
||||
img.avatar-frame(src="/images/level/thang_avatar_frame.png", draggable="false")
|
||||
.badge.problems
|
||||
.badge.shared-thangs
|
||||
if includeName
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
img(src="/images/level/code_palette_wood_background.png").code-palette-background
|
||||
img(src="/images/level/code_palette_wood_background.png", draggable="false").code-palette-background
|
||||
span.code-palette-background
|
||||
if entryGroupSlugs
|
||||
// Non-hero; group by entry groups, or maybe nothing.
|
||||
|
@ -15,3 +15,4 @@ else
|
|||
// Hero; group by items, no tabs.
|
||||
h4(data-i18n="play_level.tome_your_skills")
|
||||
.properties
|
||||
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
.nano
|
||||
.nano-content
|
||||
#item-container
|
||||
img.item-img(src=item.getPortraitURL())
|
||||
img.item-shadow(src=item.getPortraitURL())
|
||||
img.item-img(src=item.getPortraitURL(), draggable="false")
|
||||
img.item-shadow(src=item.getPortraitURL(), draggable="false")
|
||||
|
||||
img.hr(src="/images/pages/play/modal/hr.png")
|
||||
img.hr(src="/images/pages/play/modal/hr.png", draggable="false")
|
||||
|
||||
for stat in stats
|
||||
div.stat-row.big-font
|
||||
div.stat-label= stat.name
|
||||
div.stat= stat.display
|
||||
img.hr(src="/images/pages/play/modal/hr.png" class=stat.isLast ? "" : "faded")
|
||||
img.hr(src="/images/pages/play/modal/hr.png", class=stat.isLast ? "" : "faded", draggable="false")
|
||||
|
||||
if props.length
|
||||
#skills
|
||||
|
@ -40,5 +40,5 @@ if item && !item.owned
|
|||
button#selected-item-unlock-button.btn.big-font.unlock-button(disabled=!item.affordable, data-item-id=item.id)
|
||||
span(data-i18n="play.unlock") Unlock
|
||||
span.spl= '('+item.get('gems')
|
||||
img(src="/images/common/gem.png")
|
||||
img(src="/images/common/gem.png", draggable="false")
|
||||
span )
|
||||
|
|
|
@ -7,7 +7,7 @@ block modal-body-content
|
|||
for achievement in achievements
|
||||
.panel(class=achievement.earned ? 'earned' : '')
|
||||
.panel-body
|
||||
img.icon(src=achievement.getImageURL())
|
||||
img.icon(src=achievement.getImageURL(), draggable="false")
|
||||
h3= achievement.name
|
||||
p= achievement.description
|
||||
|
||||
|
@ -22,7 +22,7 @@ block modal-body-content
|
|||
if rewards && rewards.gems
|
||||
span.gems.label.label-default
|
||||
span= rewards.gems
|
||||
img.gem(src="/images/common/gem.png")
|
||||
img.gem(src="/images/common/gem.png", draggable="false")
|
||||
|
||||
- worth = achievement.get('worth')
|
||||
if worth
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.modal-dialog
|
||||
.modal-content
|
||||
|
||||
img(src="/images/pages/play/modal/heroes-background.png")#play-heroes-background
|
||||
img(src="/images/pages/play/modal/heroes-background.png", draggable="false")#play-heroes-background
|
||||
|
||||
h1(data-i18n="choose_hero.choose_hero")
|
||||
|
||||
|
@ -15,13 +15,13 @@
|
|||
li(data-hero-id=hero.get('original'), title=hero.name, data-slide-to=index, data-target="#hero-carousel", class="hero-indicator hero-index-" + index + (hero.locked ? " locked" : ""))
|
||||
.hero-avatar
|
||||
if hero.locked
|
||||
img.lock-indicator(src="/images/pages/game-menu/lock.png")
|
||||
img.lock-indicator(src="/images/pages/game-menu/lock.png", draggable="false")
|
||||
.carousel-inner
|
||||
for hero in heroes
|
||||
div(class="item hero-item" + (hero.locked ? " locked" : ""), data-hero-id=hero.get('original'))
|
||||
canvas.hero-canvas
|
||||
.hero-feature-image
|
||||
img
|
||||
img(draggable="false")
|
||||
.hero-stats
|
||||
h2= hero.name
|
||||
.hero-description= hero.description
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.modal-dialog
|
||||
.modal-content
|
||||
img(src="/images/pages/play/modal/items-background.png")#play-items-modal-bg
|
||||
img(src="/images/pages/play/modal/items-background-narrow.png")#play-items-modal-narrow-bg
|
||||
img(src="/images/pages/play/modal/items-background.png", draggable="false")#play-items-modal-bg
|
||||
img(src="/images/pages/play/modal/items-background-narrow.png", draggable="false")#play-items-modal-narrow-bg
|
||||
|
||||
h1.big-font(data-i18n="play.items")
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
|||
for category, index in itemCategories
|
||||
li(class=index ? "" : "active")
|
||||
a.one-line(href="#item-category-" + category, data-toggle="tab")
|
||||
img.tab-icon(src="/images/pages/play/modal/item-icon-"+category+".png")
|
||||
img.tab-icon(src="/images/pages/play/modal/item-icon-"+category+".png", draggable="false")
|
||||
span.big-font= itemCategoryNames[index]
|
||||
|
||||
|
||||
|
@ -31,15 +31,15 @@
|
|||
if item.silhouetted && !item.owned
|
||||
span.glyphicon.glyphicon-lock.bolder
|
||||
span.glyphicon.glyphicon-lock
|
||||
img.item-silhouette(src=item.getPortraitURL())
|
||||
img.item-silhouette(src=item.getPortraitURL(), draggable="false")
|
||||
if item.level
|
||||
.required-level
|
||||
div(data-i18n="general.player_level")
|
||||
div= item.level
|
||||
else
|
||||
strong.big-font= item.name
|
||||
img.item-img(src=item.getPortraitURL())
|
||||
img.item-shadow(src=item.getPortraitURL())
|
||||
img.item-img(src=item.getPortraitURL(), draggable="false")
|
||||
img.item-shadow(src=item.getPortraitURL(), draggable="false")
|
||||
|
||||
if item.owned
|
||||
span.big-font.owned(data-i18n="play.owned")
|
||||
|
@ -47,7 +47,7 @@
|
|||
span.big-font.locked(data-i18n="play.locked")
|
||||
else
|
||||
span.cost
|
||||
img(src="/images/common/gem.png")
|
||||
img(src="/images/common/gem.png", draggable="false")
|
||||
span.big-font= item.get('gems')
|
||||
if item.equippable
|
||||
// Temp, while we only have Warriors: prevent them from buying non-Warrior stuff
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
.gradient.vertical-gradient.right-gradient
|
||||
.gradient.horizontal-gradient.bottom-gradient
|
||||
.gradient.vertical-gradient.left-gradient
|
||||
img.map-background(src="/images/pages/play/map_" + mapType + ".jpg", alt="")
|
||||
img.map-background(src="/images/pages/play/map_" + mapType + ".jpg", alt="", draggable="false")
|
||||
|
||||
- var seenNext = nextLevel;
|
||||
each level in campaign.levels
|
||||
|
|
|
@ -84,7 +84,7 @@ module.exports = class InventoryModal extends ModalView
|
|||
|
||||
# sort into one of the four groups
|
||||
locked = not (item.get('original') in me.items())
|
||||
locked = false if me.get('slug') is 'nick'
|
||||
#locked = false if me.get('slug') is 'nick'
|
||||
|
||||
if not item.getFrontFacingStats().props.length and not _.size(item.getFrontFacingStats().stats) and not locked # Temp: while there are placeholder items
|
||||
null # Don't put into a collection
|
||||
|
|
|
@ -79,7 +79,7 @@ module.exports = class LevelHUDView extends CocoView
|
|||
wrapper.removeClass (i, css) -> (css.match(/\bteam-\S+/g) or []).join ' '
|
||||
wrapper.addClass "team-#{team}"
|
||||
if thangType.get('raster')
|
||||
wrapper.empty().append($('<img />').addClass('avatar').attr('src', '/file/'+thangType.get('raster')))
|
||||
wrapper.empty().append($('<img draggable="false"/>').addClass('avatar').attr('src', '/file/'+thangType.get('raster')))
|
||||
else
|
||||
return unless stage = thangType.getPortraitStage options, 100
|
||||
newCanvas = $(stage.canvas).addClass('thang-canvas avatar')
|
||||
|
@ -87,7 +87,7 @@ module.exports = class LevelHUDView extends CocoView
|
|||
stage.update()
|
||||
@stage?.stopTalking()
|
||||
@stage = stage
|
||||
wrapper.append($('<img />').addClass('avatar-frame').attr('src', '/images/level/thang_avatar_frame.png'))
|
||||
wrapper.append($('<img draggable="false" />').addClass('avatar-frame').attr('src', '/images/level/thang_avatar_frame.png'))
|
||||
|
||||
onThangBeganTalking: (e) ->
|
||||
return unless @stage and @thang is e.thang
|
||||
|
|
|
@ -51,7 +51,7 @@ module.exports = class SpellPaletteView extends CocoView
|
|||
@entryGroupElements = {}
|
||||
for group, entries of @entryGroups
|
||||
@entryGroupElements[group] = itemGroup = $('<div class="property-entry-item-group"></div>').appendTo @$el.find('.properties')
|
||||
itemGroup.append $('<img class="item-image"></img>').attr('src', entries[0].options.item.getPortraitURL()).css('top', Math.max(0, 19 * (entries.length - 2) / 2) + 2) if entries[0].options.item?.getPortraitURL
|
||||
itemGroup.append $('<img class="item-image" draggable=false></img>').attr('src', entries[0].options.item.getPortraitURL()).css('top', Math.max(0, 19 * (entries.length - 2) / 2) + 2) if entries[0].options.item?.getPortraitURL
|
||||
for entry in entries
|
||||
itemGroup.append entry.el
|
||||
entry.render() # Render after appending so that we can access parent container for popover
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue