Add table title

This commit is contained in:
YNH Webdev
2013-09-24 00:22:56 +02:00
parent 3f089d6811
commit 24f760c043
4 changed files with 5 additions and 4 deletions

View File

@@ -90,7 +90,7 @@ feature
handle_click2 handle_click2
do do
start_modal ("/") start_modal ("/","My first modal")
end end
handle_click handle_click

View File

@@ -441,7 +441,7 @@ start_modal = (action)->
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Modal title</h4> <h4 class="modal-title">#{action.title}</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">

View File

@@ -773,7 +773,7 @@ show_alert = function(action) {
start_modal = function(action) { start_modal = function(action) {
var modal; var modal;
modal = $("<div class=\"modal fade\">\n<div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button>\n <h4 class=\"modal-title\">Modal title</h4>\n </div>\n <div class=\"modal-body\">\n \n </div>\n </div>\n</div>\n</div>"); modal = $("<div class=\"modal fade\">\n<div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button>\n <h4 class=\"modal-title\">" + action.title + "</h4>\n </div>\n <div class=\"modal-body\">\n \n </div>\n </div>\n</div>\n</div>");
modal.appendTo('body'); modal.appendTo('body');
modal.modal('show'); modal.modal('show');
modal.on('hidden.bs.modal', function() { modal.on('hidden.bs.modal', function() {

View File

@@ -37,7 +37,7 @@ feature {NONE} -- Initialization
feature -- Actions feature -- Actions
start_modal(url:STRING) start_modal(url:STRING; title:STRING)
--Start a modal window containg an other or the same page --Start a modal window containg an other or the same page
local local
modal:JSON_OBJECT modal:JSON_OBJECT
@@ -45,6 +45,7 @@ feature -- Actions
create modal.make create modal.make
modal.put (create {JSON_STRING}.make_json("start_modal"), "type") modal.put (create {JSON_STRING}.make_json("start_modal"), "type")
modal.put (create {JSON_STRING}.make_json(url), "url") modal.put (create {JSON_STRING}.make_json(url), "url")
modal.put (create {JSON_STRING}.make_json(title), "title")
actions.add (modal) actions.add (modal)
end end