diff --git a/package.json b/package.json index f37bfca434..054d3bd315 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,9 @@ "emailjs": "0.3.4", "cookie": "0.0.6", "connect-redis": "1.4.5", - "passport": "0.1.16", + "passport": "0.1.17", "passport-local": "0.1.6", - "passport-twitter": "0.1.4", + "passport-twitter": "0.1.5", "passport-google-oauth": "0.1.5", "passport-facebook": "0.1.5", "less-middleware": "0.1.12", diff --git a/public/css/style.less b/public/css/style.less index 53e4d8688e..b3ade8d0b5 100644 --- a/public/css/style.less +++ b/public/css/style.less @@ -504,8 +504,8 @@ body .navbar .nodebb-inline-block { .post-window { position: fixed; bottom: 45px; - height: 450px; display: none; + height: 450px; > div { position: absolute; @@ -528,7 +528,7 @@ body .navbar .nodebb-inline-block { input { width: 100%; text-align: center; - background: rgba(255, 255, 255, 0.9); + background: rgba(255, 255, 255, 0.5); border: none; padding: 0.5em 0; -webkit-border-radius: 0px; @@ -547,6 +547,29 @@ body .navbar .nodebb-inline-block { color: white; height: 330px; } + + #imagedrop { + background: rgba(64, 64, 64, 0.95); + padding: 0.5em; + display: block; + width: 90%; + min-height:25px; + margin: 1em auto; + resize: none; + color:white; + font-size:20px; + div { + margin-right:10px; + } + span { + line-height:20px; + float:left; + } + button { + padding-left:5px; + } + } + } } diff --git a/public/css/topic.less b/public/css/topic.less index 1bd3cbf9e9..4cb218dd28 100644 --- a/public/css/topic.less +++ b/public/css/topic.less @@ -48,6 +48,10 @@ padding: 2px 5px 0 5px; word-wrap: break-word; } + + .post-images{ + padding: 2px 5px 0 5px; + } .post-block { .post-buttons { diff --git a/public/src/modules/composer.js b/public/src/modules/composer.js index 0d5445fb1e..feff528dc8 100644 --- a/public/src/modules/composer.js +++ b/public/src/modules/composer.js @@ -7,10 +7,88 @@ define(['taskbar'], function(taskbar) { postContainer: undefined, }; + function loadFile(file) { + var reader = new FileReader(); + var dropDiv = $('#imagedrop'); + var uuid = dropDiv.parents('[data-uuid]').attr('data-uuid'); + var posts = composer.posts[uuid]; + + $(reader).on('loadend', function(e) { + var bin = this.result; + bin = bin.split(',')[1]; + + var img = { + name: file.name, + data: bin + }; + + posts.images.push(img); + + var imageLabel = $('