summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-10-21 14:08:42 -0400
committerJules Laplace <jules@okfoc.us>2014-10-21 14:08:42 -0400
commit7d053a335808c8c07dffab7edd259c5da37efb5d (patch)
treeb7a6855c490a130b3cf84f1dd03f59a60b3b285e
parent3b0962d1d07ed4aa74536e3323feed1a2dbc5643 (diff)
parentd80ba1570ecf6e5fdb16d24c6f0ad189492a8bd8 (diff)
merge
-rw-r--r--public/assets/javascripts/ui/editor/WallpaperPicker.js4
-rw-r--r--views/controls/editor/media-drawer.ejs24
-rw-r--r--views/staff/_gallery.ejs38
-rw-r--r--views/staff/users/media.ejs4
4 files changed, 53 insertions, 17 deletions
diff --git a/public/assets/javascripts/ui/editor/WallpaperPicker.js b/public/assets/javascripts/ui/editor/WallpaperPicker.js
index 994fe74..6e0d5c6 100644
--- a/public/assets/javascripts/ui/editor/WallpaperPicker.js
+++ b/public/assets/javascripts/ui/editor/WallpaperPicker.js
@@ -40,9 +40,6 @@ var WallpaperPicker = UploadView.extend({
hide: function(){
this.toggle(false)
},
-// hide: function(){
-// this.__super__.hide.call(this)
-// },
toggle: function (state) {
Scenery.nextWallpaper = null
@@ -158,6 +155,7 @@ var WallpaperPicker = UploadView.extend({
pickWall: function(wall){
if (! wall.background || wall.background.src == "none") {
this.$wallpaperResizeControls.addClass('disabled')
+ this.$scale.val( 0.0 )
return;
}
this.$wallpaperResizeControls.removeClass('disabled')
diff --git a/views/controls/editor/media-drawer.ejs b/views/controls/editor/media-drawer.ejs
index 1404d86..3e64cc3 100644
--- a/views/controls/editor/media-drawer.ejs
+++ b/views/controls/editor/media-drawer.ejs
@@ -21,17 +21,6 @@
<a href="#" class="viewMore btn">view more</a>
</div>
- <span class="fileUpload">
- <input type="hidden" name="_csrf" value="[[- token ]]">
- <form>
- <span class="ion-ios7-upload-outline upload-icon"></span><br>
- Upload File
- <input type="file" accept="image/*" multiple>
- </form>
- <small>~ or ~</small><br>
- <input type="text" placeholder="Enter Vimeo or YouTube or image link" class="url">
- </span>
-
<div class="foundMedia">
<span class="container"></span>
</div>
@@ -40,4 +29,15 @@
<span class="container"></span>
</div>
-</div> \ No newline at end of file
+</div>
+
+<span class="fileUpload">
+ <input type="hidden" name="_csrf" value="[[- token ]]">
+ <form>
+ <span class="ion-ios7-upload-outline upload-icon"></span><br>
+ Upload File
+ <input type="file" accept="image/*" multiple>
+ </form>
+ <small>~ or ~</small><br>
+ <input type="text" placeholder="Enter Vimeo or YouTube or image link" class="url">
+</span>
diff --git a/views/staff/_gallery.ejs b/views/staff/_gallery.ejs
new file mode 100644
index 0000000..d5948e3
--- /dev/null
+++ b/views/staff/_gallery.ejs
@@ -0,0 +1,38 @@
+[[ media.forEach(function(media){ ]]
+ <div class="media">
+ [[ if (media.type == "image") { ]]
+ <a class="medialink" href="[[- media.url ]]" target="_blank"><img src="[[- media.url ]]"></a>
+ [[ } else { ]]
+ <a class="medialink" href="[[- media.url ]]" target="_blank">[[- media.shortUrl ]]</a>
+ [[ } ]]
+ <br>
+ <a href="/staff/media/[[- media._id ]]">[view]</a>
+ <a href="/staff/users/[[- media.user.username ]]">[[- media.user.username ]]</a>
+ [[- media.date ]]
+ </div>
+[[ }) ]]
+</table>
+
+<style>
+.media {
+ height: 28vw;
+ width: 24vw;
+ margin: 1vw;
+ display: inline-block;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.staff .body a.medialink {
+ width: 24vw;
+ height: 24vw;
+ display: block;
+ overflow: hidden;
+ color: #00f;
+ border: 0;
+ text-decoration: underline;
+}
+.staff .body a.medialink img {
+ max-width: 100%;
+}
+</style> \ No newline at end of file
diff --git a/views/staff/users/media.ejs b/views/staff/users/media.ejs
index b13e5fb..a44ad6a 100644
--- a/views/staff/users/media.ejs
+++ b/views/staff/users/media.ejs
@@ -1,6 +1,6 @@
[[ include ../_header ]]
- <h1>Users</h1>
+ <h1>User Media</h1>
<nav>
<a href="/staff">home</a>
@@ -12,7 +12,7 @@
<hr>
[[ include ../_pagination ]]
-[[ include ../_media ]]
+[[ include ../_gallery ]]
[[ include ../_pagination ]]
[[ include ../_footer ]]