|
@@ -169,7 +169,7 @@ ${ commonheader(None, "hbase", user, request) | n,unicode }
|
|
|
% endif
|
|
% endif
|
|
|
% if can_write:
|
|
% if can_write:
|
|
|
<span class="pull-right">
|
|
<span class="pull-right">
|
|
|
- <a href="#new_table_modal" role="button" data-bind="click: function(){prepareNewTableForm(); hbaseApp.focusModel(hbaseApp.views.tables);}" class="btn" data-toggle="modal"><i class='fa fa-plus-circle'></i> ${_('New Table')}</a>
|
|
|
|
|
|
|
+ <a href="#new_table_modal" role="button" data-bind="click: function(){ huePubSub.publish('hbase.prepare.new.form'); hbaseApp.focusModel(hbaseApp.views.tables);}" class="btn" data-toggle="modal"><i class='fa fa-plus-circle'></i> ${_('New Table')}</a>
|
|
|
</span>
|
|
</span>
|
|
|
% endif
|
|
% endif
|
|
|
</div>
|
|
</div>
|
|
@@ -2515,10 +2515,10 @@ ${ commonheader(None, "hbase", user, request) | n,unicode }
|
|
|
$(this).trigger('reset');
|
|
$(this).trigger('reset');
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- var prepareNewTableForm = function () {
|
|
|
|
|
|
|
+ huePubSub.subscribe('hbase.prepare.new.form', function () {
|
|
|
$("#new_table_modal .modal-body ul").empty();
|
|
$("#new_table_modal .modal-body ul").empty();
|
|
|
addColumnToNewTableForm();
|
|
addColumnToNewTableForm();
|
|
|
- }
|
|
|
|
|
|
|
+ }, 'hbase');
|
|
|
|
|
|
|
|
var addColumnToNewTableForm = function () {
|
|
var addColumnToNewTableForm = function () {
|
|
|
var $li = $("<li>").addClass("column").css("marginBottom", "10px").html($("#columnTemplate").html());
|
|
var $li = $("<li>").addClass("column").css("marginBottom", "10px").html($("#columnTemplate").html());
|