fixed new composer posting (woot)

v1.18.x
Julian Lam 11 years ago
parent 83f20c1cdb
commit 289e081e2e

@ -162,7 +162,7 @@ define(['taskbar'], function(taskbar) {
resizeEl = jPostContainer.find('.resizer');
jPostContainer.on('change', 'input, textarea', function() {
var uuid = $(this).parents('.post-window')[0].getAttribute('data-uuid');
var uuid = $(this).parents('.composer').attr('data-uuid');
if (this.nodeName === 'INPUT') composer.posts[uuid].title = this.value;
else if (this.nodeName === 'TEXTAREA') composer.posts[uuid].body = this.value;
@ -172,7 +172,7 @@ define(['taskbar'], function(taskbar) {
jPostContainer.on('click', '.action-bar button', function() {
var action = this.getAttribute('data-action'),
uuid = $(this).parents('.post-window').attr('data-uuid');
uuid = $(this).parents('.composer').attr('data-uuid');
switch(action) {
case 'post': composer.post(uuid); break;
case 'discard':
@ -458,7 +458,7 @@ define(['taskbar'], function(taskbar) {
}
composer.minimize = function(uuid) {
composer.postContainer.style.display = 'none';
composer.postContainer.style.visibility = 'hidden';
composer.active = undefined;
taskbar.minimize('composer', uuid);
}

@ -11,11 +11,12 @@
<div class="btn btn-link pull-right">Preview</div>
</div>
<textarea tabIndex="2"></textarea>
<div class="preview"></div>
<div class="imagedrop"><div>Drag and Drop Images Here</div></div>
<div class="btn-toolbar action-bar">
<div class="btn-group pull-right">
<button class="btn" data-action="discard" tabIndex="5"><i class="fa fa-times"></i> Discard</button>
<button data-action="post" class="btn" tabIndex="3"><i class="fa fa-check"></i> Submit</button>
<button class="btn btn-default" data-action="discard" tabIndex="5"><i class="fa fa-times"></i> Discard</button>
<button data-action="post" class="btn btn-default" tabIndex="3"><i class="fa fa-check"></i> Submit</button>
</div>
</div>
<div class="resizer"><div class="trigger"><i class="fa fa-chevron-left"></i></div></div>

Loading…
Cancel
Save