mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
fixed new composer posting (woot)
This commit is contained in:
@@ -162,7 +162,7 @@ define(['taskbar'], function(taskbar) {
|
|||||||
resizeEl = jPostContainer.find('.resizer');
|
resizeEl = jPostContainer.find('.resizer');
|
||||||
|
|
||||||
jPostContainer.on('change', 'input, textarea', function() {
|
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;
|
if (this.nodeName === 'INPUT') composer.posts[uuid].title = this.value;
|
||||||
else if (this.nodeName === 'TEXTAREA') composer.posts[uuid].body = 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() {
|
jPostContainer.on('click', '.action-bar button', function() {
|
||||||
var action = this.getAttribute('data-action'),
|
var action = this.getAttribute('data-action'),
|
||||||
uuid = $(this).parents('.post-window').attr('data-uuid');
|
uuid = $(this).parents('.composer').attr('data-uuid');
|
||||||
switch(action) {
|
switch(action) {
|
||||||
case 'post': composer.post(uuid); break;
|
case 'post': composer.post(uuid); break;
|
||||||
case 'discard':
|
case 'discard':
|
||||||
@@ -458,7 +458,7 @@ define(['taskbar'], function(taskbar) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
composer.minimize = function(uuid) {
|
composer.minimize = function(uuid) {
|
||||||
composer.postContainer.style.display = 'none';
|
composer.postContainer.style.visibility = 'hidden';
|
||||||
composer.active = undefined;
|
composer.active = undefined;
|
||||||
taskbar.minimize('composer', uuid);
|
taskbar.minimize('composer', uuid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,11 +11,12 @@
|
|||||||
<div class="btn btn-link pull-right">Preview</div>
|
<div class="btn btn-link pull-right">Preview</div>
|
||||||
</div>
|
</div>
|
||||||
<textarea tabIndex="2"></textarea>
|
<textarea tabIndex="2"></textarea>
|
||||||
|
<div class="preview"></div>
|
||||||
<div class="imagedrop"><div>Drag and Drop Images Here</div></div>
|
<div class="imagedrop"><div>Drag and Drop Images Here</div></div>
|
||||||
<div class="btn-toolbar action-bar">
|
<div class="btn-toolbar action-bar">
|
||||||
<div class="btn-group pull-right">
|
<div class="btn-group pull-right">
|
||||||
<button class="btn" data-action="discard" tabIndex="5"><i class="fa fa-times"></i> Discard</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" tabIndex="3"><i class="fa fa-check"></i> Submit</button>
|
<button data-action="post" class="btn btn-default" tabIndex="3"><i class="fa fa-check"></i> Submit</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="resizer"><div class="trigger"><i class="fa fa-chevron-left"></i></div></div>
|
<div class="resizer"><div class="trigger"><i class="fa fa-chevron-left"></i></div></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user