diff options
| -rw-r--r-- | public/assets/javascripts/ui/editor/MediaEditor.js | 12 | ||||
| -rwxr-xr-x | public/assets/stylesheets/app.css | 6 | ||||
| -rw-r--r-- | views/partials/header.ejs | 2 | ||||
| -rw-r--r-- | views/projects/list-projects.ejs | 25 |
4 files changed, 37 insertions, 8 deletions
diff --git a/public/assets/javascripts/ui/editor/MediaEditor.js b/public/assets/javascripts/ui/editor/MediaEditor.js index 59fdc70..e4f93df 100644 --- a/public/assets/javascripts/ui/editor/MediaEditor.js +++ b/public/assets/javascripts/ui/editor/MediaEditor.js @@ -177,12 +177,12 @@ var MediaEditor = FormView.extend({ }, destroy: function(){ - ConfirmModal.confirm("Are you sure you want delete this object?", function(){ - var scenery = this.scenery - this.hide() - Scenery.remove(scenery.id) - Scenery.resize.hide() - }.bind(this)) +// ConfirmModal.confirm("Are you sure you want delete this object?", function(){ +// }.bind(this)) + var scenery = this.scenery + this.hide() + Scenery.remove(scenery.id) + Scenery.resize.hide() }, }) diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index 9ab878c..54060cc 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -67,6 +67,12 @@ a{ left: 0; z-index: 6; } +#help-button { + display: none; +} +.editing #help-button { + display: inline; +} .topLinks a.icon-help-circled { font-size: 24px; padding: 21px 27px 0 8px; diff --git a/views/partials/header.ejs b/views/partials/header.ejs index 43bcc49..88d832d 100644 --- a/views/partials/header.ejs +++ b/views/partials/header.ejs @@ -67,7 +67,7 @@ [[ } else if (! profile) { ]] <a href="/profile" class="topLink">Profile</a> [[ } ]] - <a href="#" class="icon-help-circled"></a> + <a href="#" class="icon-help-circled" id="help-button"></a> [[ } else { ]] <a href="/signup" data-role="show-signup-modal" class="signUp topLink">Sign Up</a> diff --git a/views/projects/list-projects.ejs b/views/projects/list-projects.ejs index 537d409..c110934 100644 --- a/views/projects/list-projects.ejs +++ b/views/projects/list-projects.ejs @@ -5,7 +5,14 @@ [[ projects.forEach(function(project, i) { ]] <span class="room"> - <iframe src="/project/[[- project.slug ]]/view?noui=1&mute=1" class="embed"></iframe> + <span class="images"> + [[ mediaCount = 0 ]] + [[ project.media.some(function(media){ ]] + [[ if (media.media.type != "image") { return false } ]] + [[ if (++mediaCount > 3) { return true } ]] + <img src="[[- media.media.url ]]"> + [[ }) ]] + </span> [[ if (String(user._id) == String(project.user_id)) { ]] <a href="/project/[[- project.slug ]]/edit"><div class="editBtn">edit</div></a> [[ } ]] @@ -21,3 +28,19 @@ </div> [[ } ]] + +<style> +.room .images { + position: absolute; + top: 0; left: 0; + z-index: -1; + width: 100%; + height: 100%; + text-align: center; + overflow: hidden; +} +.room .images img { + max-height: 100%; + max-width: 100%; +} +</style> |
