|
@@ -1,19 +1,19 @@
|
|
|
<style>
|
|
|
/* just because */
|
|
|
-body {
|
|
|
- /* fallback */
|
|
|
- background-color: #eee;
|
|
|
- background-image: url(images/radial_bg.png);
|
|
|
- background-position: center center;
|
|
|
- background-repeat: no-repeat;
|
|
|
-
|
|
|
- /* Safari 4-5, Chrome 1-9 */ /* Can't specify a percentage size? Laaaaaame. */
|
|
|
- background: -webkit-gradient(radial, center center, 0, center center, 460, from(#eee), to(#666));
|
|
|
- /* Safari 5.1+, Chrome 10+ */
|
|
|
- background: -webkit-radial-gradient(circle, #eee, #666);
|
|
|
- /* Firefox 3.6+ */
|
|
|
- background: -moz-radial-gradient(circle, #eee, #666);
|
|
|
- /* IE 10 */
|
|
|
+body {
|
|
|
+ /* fallback */
|
|
|
+ background-color: #eee;
|
|
|
+ background-image: url(images/radial_bg.png);
|
|
|
+ background-position: center center;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+
|
|
|
+ /* Safari 4-5, Chrome 1-9 */ /* Can't specify a percentage size? Laaaaaame. */
|
|
|
+ background: -webkit-gradient(radial, center center, 0, center center, 460, from(#eee), to(#666));
|
|
|
+ /* Safari 5.1+, Chrome 10+ */
|
|
|
+ background: -webkit-radial-gradient(circle, #eee, #666);
|
|
|
+ /* Firefox 3.6+ */
|
|
|
+ background: -moz-radial-gradient(circle, #eee, #666);
|
|
|
+ /* IE 10 */
|
|
|
background: -ms-radial-gradient(circle, #eee, #666);
|
|
|
}
|
|
|
</style>
|
|
@@ -30,30 +30,30 @@ var space_between_blocks_y = {{skill_visualizer.space_between_blocks_y}};
|
|
|
var center_x = {{skill_visualizer.center_x}};
|
|
|
var block_size = {{skill_visualizer.block_size}};
|
|
|
|
|
|
-$(window).resize(function() {
|
|
|
- jsPlumb.repaintEverything();
|
|
|
- /*jsPlumb.repaint(".skill_root");
|
|
|
+$(window).resize(function () {
|
|
|
+ jsPlumb.repaintEverything();
|
|
|
+ /*jsPlumb.repaint(".skill_root");
|
|
|
// When resize repaint everything + fix the root position
|
|
|
- normal_weight = $('.skill_child :first-child').width();
|
|
|
+ normal_weight = $('.skill_child :first-child').width();
|
|
|
sum = $('body').width() / 2 - normal_weight/2;
|
|
|
$('.skill_root').animate({ left: sum, top:0 }, { duration: 100 });*/
|
|
|
});
|
|
|
|
|
|
jsPlumb.ready(function() {
|
|
|
//Setting the loading dialog
|
|
|
- var loading = $( "#dialog-loading" );
|
|
|
+ var loading = $("#dialog-loading");
|
|
|
loading.dialog( "destroy" );
|
|
|
loading.dialog({
|
|
|
autoOpen:false,
|
|
|
height: 120,
|
|
|
modal: true,
|
|
|
zIndex: 10000,
|
|
|
- resizable :false,
|
|
|
+ resizable: false,
|
|
|
closeOnEscape : false,
|
|
|
- disabled: true,
|
|
|
+ disabled: true,
|
|
|
open: function(event, ui) { $(this).parent().children().children('.ui-dialog-titlebar-close').hide(); }
|
|
|
- });
|
|
|
-
|
|
|
+ });
|
|
|
+
|
|
|
jQuery.ajaxSetup({
|
|
|
beforeSend: function() {
|
|
|
loading.dialog( "open" );
|
|
@@ -61,31 +61,31 @@ jsPlumb.ready(function() {
|
|
|
console.log('before------------------->>');
|
|
|
},
|
|
|
complete: function(){
|
|
|
- loading.dialog( "close" );
|
|
|
+ loading.dialog("close");
|
|
|
//$('#skill_tree').show();
|
|
|
console.log('complete------------------->>');
|
|
|
},
|
|
|
success: function() {}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
//Return to root button
|
|
|
$('#return_to_root').click(function(){
|
|
|
clean_values();
|
|
|
- console.log('Clean values');
|
|
|
+ console.log('Clean values');
|
|
|
console.log('Reopen the root ');
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
//Open dialog
|
|
|
$("#dialog-form").dialog({
|
|
|
autoOpen: false,
|
|
|
- modal : true,
|
|
|
- width : 550,
|
|
|
+ modal: true,
|
|
|
+ width: 550,
|
|
|
height : 480
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
//Filling skills select
|
|
|
/*
|
|
|
- $.getJSON("{{url}}&a=get_skills&parent_id="+parents[0], {},
|
|
|
+ $.getJSON("{{ url }}&a=get_skills&parent_id="+parents[0], {},
|
|
|
function(data) {
|
|
|
$.each(data, function(n, parent) {
|
|
|
// add a new option with the JSON-specified value and text
|
|
@@ -93,9 +93,9 @@ jsPlumb.ready(function() {
|
|
|
});
|
|
|
}
|
|
|
);*/
|
|
|
-
|
|
|
+
|
|
|
//Filling gradebook select
|
|
|
- $.getJSON("{{url}}&a=get_gradebooks", {},
|
|
|
+ $.getJSON("{{ url }}&a=get_gradebooks", {},
|
|
|
function(data) {
|
|
|
$.each(data, function(n, gradebook) {
|
|
|
// add a new option with the JSON-specified value and text
|
|
@@ -103,26 +103,25 @@ jsPlumb.ready(function() {
|
|
|
});
|
|
|
}
|
|
|
);
|
|
|
-
|
|
|
- //Add button on click
|
|
|
- $("#add_item_link").click(function() {
|
|
|
+
|
|
|
+ //Add button on click
|
|
|
+ $("#add_item_link").click(function () {
|
|
|
$("#name").attr('value', '');
|
|
|
- $("#description").attr('value', '');
|
|
|
+ $("#description").attr('value', '');
|
|
|
$("#parent_id option:selected").removeAttr('selected');
|
|
|
- $("#gradebook_id option:selected").removeAttr('selected');
|
|
|
+ $("#gradebook_id option:selected").removeAttr('selected');
|
|
|
$("#dialog-form").dialog("open");
|
|
|
-
|
|
|
+
|
|
|
//Filling skills select
|
|
|
var my_id = 1;
|
|
|
-
|
|
|
+
|
|
|
if (parents.length > 1) {
|
|
|
- my_id = parents[1].split('_')[1];
|
|
|
+ my_id = parents[1].split('_')[1];
|
|
|
}
|
|
|
//Remove all options
|
|
|
$("#parent_id").find('option').remove();
|
|
|
|
|
|
- $.getJSON("{{url}}&a=get_skills&id="+my_id, {
|
|
|
- },
|
|
|
+ $.getJSON("{{url}}&a=get_skills&id="+my_id, {},
|
|
|
function(data) {
|
|
|
$.each(data, function(n, parent) {
|
|
|
// add a new option with the JSON-specified value and text
|
|
@@ -131,219 +130,222 @@ jsPlumb.ready(function() {
|
|
|
}
|
|
|
);
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
//Add button process
|
|
|
-
|
|
|
+
|
|
|
var name = $( "#name" ),
|
|
|
- description = $( "#description" ),
|
|
|
- allFields = $( [] ).add( name ).add( description ), tips = $(".validateTips");
|
|
|
-
|
|
|
+ description = $("#description"),
|
|
|
+ allFields = $([]).add(name).add(description), tips = $(".validateTips");
|
|
|
+
|
|
|
$("#dialog-form").css('z-index', '9001');
|
|
|
-
|
|
|
- $("#dialog-form").dialog({
|
|
|
+
|
|
|
+ $("#dialog-form").dialog({
|
|
|
buttons: {
|
|
|
- "{{"Add"|get_lang}}" : function() {
|
|
|
+ "{{ "Add"|trans }}": function () {
|
|
|
var bValid = true;
|
|
|
bValid = bValid && checkLength( name, "name", 1, 255 );
|
|
|
-
|
|
|
+
|
|
|
if (bValid) {
|
|
|
var params = $("#add_item").serialize();
|
|
|
-
|
|
|
+
|
|
|
$.ajax({
|
|
|
async: false,
|
|
|
url: url+'&a=add&'+params,
|
|
|
- success:function(my_id) {
|
|
|
+ success: function (my_id) {
|
|
|
//Setting the selected id from the form
|
|
|
- parent_id = $("#parent_id option:selected").attr('value');
|
|
|
-
|
|
|
+ parent_id = $("#parent_id option:selected").attr('value');
|
|
|
+
|
|
|
//Reseting jsplumb
|
|
|
- jsPlumb.reset();
|
|
|
+ jsPlumb.reset();
|
|
|
//Deletes all windows
|
|
|
$('.skill_root').remove();
|
|
|
$('.skill_child').remove();
|
|
|
-
|
|
|
+
|
|
|
//cleaning skills
|
|
|
skills = [];
|
|
|
-
|
|
|
+
|
|
|
//Setting the first parent
|
|
|
first_parent = parents[0];
|
|
|
-
|
|
|
+
|
|
|
//Deleting the first parent
|
|
|
console.log('parents before '+parents);
|
|
|
- parents.splice(0,1);
|
|
|
- console.log('parents now '+parents);
|
|
|
-
|
|
|
- //Remove parent block
|
|
|
+ parents.splice(0, 1);
|
|
|
+ console.log('parents now ' + parents);
|
|
|
+
|
|
|
+ //Remove parent block
|
|
|
$('#block_'+parent_id).remove();
|
|
|
-
|
|
|
- //Open the block
|
|
|
- open_block('block_'+parent_id, 0, 1);
|
|
|
-
|
|
|
+
|
|
|
+ //Open the block
|
|
|
+ open_block('block_' + parent_id, 0, 1);
|
|
|
+
|
|
|
//Close dialog
|
|
|
- $("#dialog-form").dialog("close");
|
|
|
- }
|
|
|
+ $("#dialog-form").dialog("close");
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
- },
|
|
|
- close: function() {
|
|
|
+ },
|
|
|
+ close: function () {
|
|
|
$("#name").attr('value', '');
|
|
|
- $("#description").attr('value', '');
|
|
|
+ $("#description").attr('value', '');
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
//Clicking in a box skill (we use live instead of bind because we're creating divs on the fly )
|
|
|
$(".open_block").click(function() {
|
|
|
var id = $(this).attr('id');
|
|
|
-
|
|
|
+
|
|
|
console.log('click.open_block id: ' + id);
|
|
|
console.log('parents: ' + parents);
|
|
|
-
|
|
|
+
|
|
|
//if is root
|
|
|
if (parents[0] == id) {
|
|
|
parents = [id];
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
+
|
|
|
if (parents[1] != id) {
|
|
|
console.log('parents.length ' +parents.length);
|
|
|
-
|
|
|
+
|
|
|
//If there are 2 parents in the skill_tree
|
|
|
if (parents.length == 2 ) {
|
|
|
- first_parent = parents[0];
|
|
|
+ first_parent = parents[0];
|
|
|
$('#'+parents[1]).css('top', '0px');
|
|
|
- //console.log('deleting: '+parents[0]);
|
|
|
+ //console.log('deleting: '+parents[0]);
|
|
|
//removing father
|
|
|
console.log("first_parent " + first_parent);
|
|
|
-
|
|
|
- for (var i = 0; i < skills.length; i++) {
|
|
|
+
|
|
|
+ for (var i = 0; i < skills.length; i++) {
|
|
|
//console.log('looping '+skills[i].element + ' ');
|
|
|
if (skills[i].element == parents[0] ) {
|
|
|
- console.log('deleting parent:'+ skills[i].element + ' here ');
|
|
|
+ console.log('deleting parent:' + skills[i].element + ' here ');
|
|
|
jsPlumb.deleteEndpoint(skills[i].element);
|
|
|
jsPlumb.detachAllConnections(skills[i].element);
|
|
|
- jsPlumb.removeAllEndpoints(skills[i].element);
|
|
|
+ jsPlumb.removeAllEndpoints(skills[i].element);
|
|
|
$("#"+skills[i].element).remove();
|
|
|
}
|
|
|
- }
|
|
|
- parents.splice(0,1);
|
|
|
+ }
|
|
|
+ parents.splice(0, 1);
|
|
|
parents.push(id);
|
|
|
console.log('parents after slice/push: ' + parents);
|
|
|
- }
|
|
|
-
|
|
|
- if ($(this).hasClass('first_window')) {
|
|
|
+ }
|
|
|
+
|
|
|
+ if ($(this).hasClass('first_window')) {
|
|
|
console.log('im in a first_window (root)');
|
|
|
$('#'+first_parent).css('top', '0px');
|
|
|
//show the first_parent
|
|
|
//if (first_parent != '') {
|
|
|
- parents = [first_parent, id];
|
|
|
+ parents = [first_parent, id];
|
|
|
open_parent(first_parent, id);
|
|
|
//}
|
|
|
}
|
|
|
-
|
|
|
- if (jQuery.inArray(id, parents) == -1) {
|
|
|
+
|
|
|
+ if (jQuery.inArray(id, parents) == -1) {
|
|
|
parents.push(id);
|
|
|
console.log('parents push: ' + parents);
|
|
|
}
|
|
|
- open_block(id, 0, 0);
|
|
|
+ open_block(id, 0, 0);
|
|
|
}
|
|
|
-
|
|
|
- //Setting class
|
|
|
- cleanclass($(this));
|
|
|
+
|
|
|
+ //Setting class
|
|
|
+ cleanclass($(this));
|
|
|
$(this).addClass('second_window');
|
|
|
-
|
|
|
+
|
|
|
parent_div = $("#"+parents[0]);
|
|
|
cleanclass(parent_div);
|
|
|
parent_div.addClass('first_window');
|
|
|
parent_div.addClass('skill_root');
|
|
|
-
|
|
|
- parent_div = $("#"+parents[1]);
|
|
|
+
|
|
|
+ parent_div = $("#" + parents[1]);
|
|
|
cleanclass(parent_div);
|
|
|
parent_div.addClass('second_window');
|
|
|
-
|
|
|
+
|
|
|
//console.log(parents);
|
|
|
- // console.log(skills);
|
|
|
- console.log('first_parent : ' + first_parent);
|
|
|
-
|
|
|
+ // console.log(skills);
|
|
|
+ console.log('first_parent : ' + first_parent);
|
|
|
+
|
|
|
//redraw
|
|
|
jsPlumb.repaintEverything();
|
|
|
jsPlumb.repaint(id);
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
-
|
|
|
- //Skill title click
|
|
|
+
|
|
|
+ //Skill title click
|
|
|
$(".edit_block").click(function() {
|
|
|
var my_id = $(this).attr('id');
|
|
|
my_id = my_id.split('_')[2];
|
|
|
-
|
|
|
+
|
|
|
//Cleaning selected
|
|
|
$("#parent_id option:selected").removeAttr('selected');
|
|
|
$("#gradebook_id option:selected").removeAttr('selected');
|
|
|
-
|
|
|
+
|
|
|
$.ajax({
|
|
|
- url: url+'&a=get_skill_info&id='+my_id,
|
|
|
+ url: url + '&a=get_skill_info&id=' + my_id,
|
|
|
success: function(json) {
|
|
|
var skill = jQuery.parseJSON(json);
|
|
|
$("#name").attr('value', skill.name);
|
|
|
- $("#id").attr('value', skill.id);
|
|
|
- $("#description").attr('value', skill.description);
|
|
|
+ $("#id").attr('value', skill.id);
|
|
|
+ $("#description").attr('value', skill.description);
|
|
|
//filling parent_id
|
|
|
$("#parent_id option[value='"+skill.extra.parent_id+"']").attr('selected', 'selected');
|
|
|
- //filling the gradebook_id
|
|
|
- jQuery.each(skill.gradebooks, function(index, data) {
|
|
|
- $("#gradebook_id option[value='"+data.id+"']").attr('selected', 'selected');
|
|
|
+ //filling the gradebook_id
|
|
|
+ jQuery.each(skill.gradebooks, function (index, data) {
|
|
|
+ $("#gradebook_id option[value='" + data.id + "']").attr('selected', 'selected');
|
|
|
});
|
|
|
}
|
|
|
- });
|
|
|
-
|
|
|
+ });
|
|
|
+
|
|
|
$("#gradebook_id").trigger("liszt:updated");
|
|
|
$("#parent_id").trigger("liszt:updated");
|
|
|
$("#dialog-form").dialog("open");
|
|
|
return false;
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
//Clicking in a box
|
|
|
$(".window").bind('click', function() {
|
|
|
var id = $(this).attr('id');
|
|
|
id = id.split('_')[1];
|
|
|
- });
|
|
|
+ });
|
|
|
|
|
|
// chrome fix.
|
|
|
- document.onselectstart = function () { return false; };
|
|
|
+ document.onselectstart = function () {
|
|
|
+ return false;
|
|
|
+ };
|
|
|
|
|
|
// render mode
|
|
|
var resetRenderMode = function(desiredMode) {
|
|
|
- var newMode = jsPlumb.setRenderMode(desiredMode);
|
|
|
+ var newMode = jsPlumb.setRenderMode(desiredMode);
|
|
|
jsPlumbDemo.init();
|
|
|
};
|
|
|
- resetRenderMode(jsPlumb.CANVAS);
|
|
|
+ resetRenderMode(jsPlumb.CANVAS);
|
|
|
});
|
|
|
-
|
|
|
-;(function() {
|
|
|
+
|
|
|
+;
|
|
|
+(function () {
|
|
|
prepare = function(div, endpointOptions) {
|
|
|
console.log('preparing = '+div);
|
|
|
console.log('endpointOptions = '+endpointOptions);
|
|
|
//jsPlumbDemo.initHover(elId);
|
|
|
-
|
|
|
- var endPoint = jsPlumb.addEndpoint(div, endpointOptions);
|
|
|
+
|
|
|
+ var endPoint = jsPlumb.addEndpoint(div, endpointOptions);
|
|
|
skills.push({
|
|
|
element: div, endp:endPoint
|
|
|
});
|
|
|
- return endPoint;
|
|
|
- },
|
|
|
- window.jsPlumbDemo = {
|
|
|
+ return endPoint;
|
|
|
+ },
|
|
|
+ window.jsPlumbDemo = {
|
|
|
init : function() {
|
|
|
- console.log('Import defaults');
|
|
|
- jsPlumb.Defaults.Anchors = [ "BottomCenter", "TopCenter" ];
|
|
|
+ console.log('Import defaults');
|
|
|
+ jsPlumb.Defaults.Anchors = ["BottomCenter", "TopCenter"];
|
|
|
jsPlumb.Defaults.Container = "skill_tree";
|
|
|
-
|
|
|
+
|
|
|
open_block('block_1', 0, 1);
|
|
|
-
|
|
|
- // listen for clicks on connections, and offer to delete connections on click.
|
|
|
+
|
|
|
+ // listen for clicks on connections, and offer to delete connections on click.
|
|
|
jsPlumb.bind("click", function(conn, originalEvent) {
|
|
|
/*if (confirm("Delete connection from " + conn.sourceId + " to " + conn.targetId + "?"))
|
|
|
jsPlumb.detach(conn); */
|
|
|
- });
|
|
|
+ });
|
|
|
}
|
|
|
};
|
|
|
})();
|
|
@@ -351,33 +353,33 @@ jsPlumb.ready(function() {
|
|
|
$(document).ready(function() {
|
|
|
/*
|
|
|
//When creating a connection see
|
|
|
- //http://jsplumb.org/apidocs/files/jsPlumb-1-3-2-all-js.html#bind
|
|
|
+ //http://jsplumb.org/apidocs/files/jsPlumb-1-3-2-all-js.html#bind
|
|
|
jsPlumb.bind("jsPlumbConnection", function(conn) {
|
|
|
//alert("Connection created " + conn.sourceId + " to " + conn.targetId + " ");
|
|
|
- //jsPlumb.detach(conn);
|
|
|
+ //jsPlumb.detach(conn);
|
|
|
});
|
|
|
//When double clicking a connection
|
|
|
- jsPlumb.bind("click", function(conn) {
|
|
|
+ jsPlumb.bind("click", function(conn) {
|
|
|
if (confirm("Delete connection from " + conn.sourceId + " to " + conn.targetId + "?"))
|
|
|
- jsPlumb.detach(conn);
|
|
|
+ jsPlumb.detach(conn);
|
|
|
});
|
|
|
-
|
|
|
- //When double clicking a connection
|
|
|
+
|
|
|
+ //When double clicking a connection
|
|
|
jsPlumb.bind("click", function(endpoint) {
|
|
|
if (confirm("Delete connection from " + conn.sourceId + " to " + conn.targetId + "?"))
|
|
|
- jsPlumb.detach(conn);
|
|
|
+ jsPlumb.detach(conn);
|
|
|
});*/
|
|
|
-
|
|
|
+
|
|
|
$(".chzn-select").chosen();
|
|
|
$("#menu").draggable();
|
|
|
});
|
|
|
|
|
|
;(function() {
|
|
|
-
|
|
|
+
|
|
|
jsPlumbDemo.getSelector = function(spec) {
|
|
|
return $(spec);
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
jsPlumbDemo.attachBehaviour = function() {
|
|
|
$(".hide").click(function() {
|
|
|
jsPlumb.toggle($(this).attr("rel"));
|
|
@@ -394,8 +396,9 @@ $(document).ready(function() {
|
|
|
jsPlumb.detachAll($(this).attr("rel"));
|
|
|
});
|
|
|
|
|
|
- $("#clear").click(function() {
|
|
|
- jsPlumb.detachEverything(); showConnections();
|
|
|
+ $("#clear").click(function () {
|
|
|
+ jsPlumb.detachEverything();
|
|
|
+ showConnections();
|
|
|
});
|
|
|
};
|
|
|
})();
|
|
@@ -405,58 +408,65 @@ $(document).ready(function() {
|
|
|
<div id="dialog-loading">
|
|
|
<div class="modal-body">
|
|
|
<p style="text-align:center">
|
|
|
- {{ "Loading"|get_lang }}
|
|
|
+ {{ "Loading"|trans }}
|
|
|
<img src="{{ _p.web_img}}loadingAnimation.gif"/>
|
|
|
</p>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<div id="menu" class="well" style="top:20px; left:20px; width:380px; z-index: 9000; opacity: 0.9;">
|
|
|
- <h3>{{'Skills'|get_lang}}</h3>
|
|
|
+ <h3>{{ 'Skills'|trans }}</h3>
|
|
|
<div class="btn-group">
|
|
|
- <a style="z-index: 1000" class="btn" id="add_item_link" href="#">{{'AddSkill'|get_lang}}</a>
|
|
|
- <a style="z-index: 1000" class="btn btn-default" id="return_to_root" href="#">{{'Root'|get_lang}}</a>
|
|
|
- <a style="z-index: 1000" class="btn btn-default" id="return_to_admin" href="{{_p.web_main}}admin">{{'BackToAdmin'|get_lang}}</a>
|
|
|
-
|
|
|
+ <a style="z-index: 1000" class="btn" id="add_item_link"
|
|
|
+ href="#">{{ 'AddSkill'|trans }}</a>
|
|
|
+ <a style="z-index: 1000" class="btn btn-default" id="return_to_root"
|
|
|
+ href="#">{{ 'Root'|trans }}</a>
|
|
|
+ <a style="z-index: 1000" class="btn btn-default" id="return_to_admin"
|
|
|
+ href="{{ url('web.main') }}admin">{{ 'BackToAdmin'|trans }}</a>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div id="skill_tree"></div>
|
|
|
|
|
|
-<div id="dialog-form" style="display:none; z-index:9001;">
|
|
|
+<div id="dialog-form" style="display:none; z-index:9001;">
|
|
|
<p class="validateTips"></p>
|
|
|
<form class="form-horizontal" id="add_item" name="form">
|
|
|
<fieldset>
|
|
|
<input type="hidden" name="id" id="id"/>
|
|
|
- <div class="control-group">
|
|
|
- <label class="control-label" for="name">{{'Name'|get_lang}}</label>
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label"
|
|
|
+ for="name">{{ 'Name'|trans }}</label>
|
|
|
<div class="controls">
|
|
|
- <input type="text" name="name" id="name" size="40" />
|
|
|
+ <input type="text" name="name" id="name" size="40"/>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="control-group">
|
|
|
- <label class="control-label" for="name">{{'Parent'|get_lang}}</label>
|
|
|
+ </div>
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label"
|
|
|
+ for="name">{{ 'Parent'|trans }}</label>
|
|
|
<div class="controls">
|
|
|
<select id="parent_id" name="parent_id" />
|
|
|
- </select>
|
|
|
+ </select>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="control-group">
|
|
|
- <label class="control-label" for="name">{{'Gradebook'|get_lang}}</label>
|
|
|
+ </div>
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label"
|
|
|
+ for="name">{{ 'Gradebook'|trans }}</label>
|
|
|
<div class="controls">
|
|
|
<select id="gradebook_id" name="gradebook_id[]" multiple="multiple"/>
|
|
|
- </select>
|
|
|
+ </select>
|
|
|
<span class="help-block">
|
|
|
- {{'WithCertificate'|get_lang}}
|
|
|
- </span>
|
|
|
+ {{ 'WithCertificate'|trans }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="control-group">
|
|
|
- <label class="control-label" for="name">{{'Description'|get_lang}}</label>
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label"
|
|
|
+ for="name">{{ 'Description'|trans }}</label>
|
|
|
<div class="controls">
|
|
|
<textarea name="description" id="description" rows="7"></textarea>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</fieldset>
|
|
|
- </form>
|
|
|
-</div>
|
|
|
+ </form>
|
|
|
+</div>
|