Gitlab CSE Unil

Commit d4d4daf9 authored by M. Chardon's avatar M. Chardon
Browse files

corrections pb bdd sur serveur test

parent 03c70941
define(["jquery","core/ajax","core/notification"],function(a,b,c){function d(){this.init(),this.initTriggers()}return d.prototype.init=function(){a('input[name^="color"]').attr("type","color"),a('input[name^="color"]').removeClass("form-control")},d.prototype.initTriggers=function(){a('input[name^="color"]').on("change",function(){var b=a(this).parents("tr").data("tag");a('input[name="isColorEdit'+b+'"]').val(1)}),a("#btnadd").on("click",function(){var a="id="+M.cfg.courseid+"&action=addtag";alert(a),b.call([{methodname:"mod_audioannotation_addtag_form",args:{jsonformdata:JSON.stringify(a)}}])[0].done(function(a){"error"===a.message}).fail(c.exception)}),a(".btntagsuppr").on("click",function(){var b=a(this).data("status");b&&"active"!==b?(a(this).removeClass("disabled"),a(this).addClass("btn-danger"),a(this).removeClass("btn-info"),a(this).find("i").addClass("fa-times"),a(this).find("i").removeClass("fa-undo"),a('tr[data-tag="'+a(this).data("tag")+'"]').prop("style",""),a('tr[data-tag="'+a(this).data("tag")+'"]').find("div").each(function(){a(this).show()}),a('input[name="del'+a(this).data("tag")+'"]').val(0),a(this).data("status","active")):(a(this).addClass("disabled"),a(this).addClass("btn-info"),a(this).removeClass("btn-danger"),a(this).find("i").addClass("fa-undo"),a(this).find("i").removeClass("fa-times"),a('tr[data-tag="'+a(this).data("tag")+'"]').css("background-color","grey"),a('tr[data-tag="'+a(this).data("tag")+'"]').find("div").each(function(){a(this).hide()}),a('input[name="del'+a(this).data("tag")+'"]').val(1),a(this).data("status","deactive"))})},d});
\ No newline at end of file
define(["jquery"],function(a){function b(){this.init(),this.initTriggers()}return b.prototype.init=function(){a('input[name^="color"]').attr("type","color"),a('input[name^="color"]').removeClass("form-control")},b.prototype.initTriggers=function(){a('input[name^="color"]').on("change",function(){var b=a(this).parents("tr").data("tag");b?a('input[name="isColorEdit'+b+'"]').val(1):a('input[name="isColorEdit"]').val(1)}),a("#btnadd").on("click",function(){a('form[name="addTag"]').submit()}),a("#btnexport").on("click",function(){a('form[name="exportTags"]').submit()}),a(".btnimport").on("click",function(){var b=a(this).data("model");a('form[name="importTags"] input[name="model"]').val(b),a('form[name="importTags"]').submit()}),a(".btnsuppr").on("click",function(){var b=a(this).data("model");a('form[name="deleteModel"] input[name="model"]').val(b),a('form[name="deleteModel"]').submit()}),a(".btntagsuppr").on("click",function(){var b=a(this).data("status");b&&"active"!==b?(a(this).removeClass("disabled"),a(this).addClass("btn-danger"),a(this).removeClass("btn-info"),a(this).find("i").addClass("fa-times"),a(this).find("i").removeClass("fa-undo"),a('tr[data-tag="'+a(this).data("tag")+'"]').prop("style",""),a('tr[data-tag="'+a(this).data("tag")+'"]').find("div").each(function(){a(this).show()}),a('input[name="del'+a(this).data("tag")+'"]').val(0),a(this).data("status","active")):(a(this).addClass("disabled"),a(this).addClass("btn-info"),a(this).removeClass("btn-danger"),a(this).find("i").addClass("fa-undo"),a(this).find("i").removeClass("fa-times"),a('tr[data-tag="'+a(this).data("tag")+'"]').css("background-color","grey"),a('tr[data-tag="'+a(this).data("tag")+'"]').find("div").each(function(){a(this).hide()}),a('input[name="del'+a(this).data("tag")+'"]').val(1),a(this).data("status","deactive"))})},b});
\ No newline at end of file
......@@ -14,7 +14,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/*
* @package mod_audioannotation
* @copyright 2018 Université de Lausanne
* @copyright 2019 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
......@@ -25,12 +25,10 @@
*
* @module mod_audioannotation/TagsManager
* @param {Jquery} $
* @param {core/ajax} ajax
* @param {core/notification} notification
* inspired by https://github.com/webrtc/samples/blob/gh-pages/src/content/getusermedia/record/js/main.js
*/
define(['jquery', 'core/ajax', 'core/notification'],
function ($, ajax, notification) {
define(['jquery'],
function ($) {
/*************
* CONSTANTES *
......
......@@ -88,7 +88,7 @@
<INDEXES>
<INDEX NAME="assignementpart" UNIQUE="false" FIELDS="assignementpart"/>
<!--INDEX NAME="validation" UNIQUE="false" FIELDS="typevalidation"/-->
<INDEX NAME="mainmessage" UNIQUE="true" FIELDS="mainmessage"/>
<INDEX NAME="mainmessage" UNIQUE="false" FIELDS="mainmessage"/>
<INDEX NAME="tag" UNIQUE="false" FIELDS="tag"/>
</INDEXES>
</TABLE>
......
......@@ -22,14 +22,14 @@
* See https://docs.moodle.org/dev/version.php for more info.
*
* @package mod_audioannotation
* @copyright 2018 Université de Lausanne
* @copyright 2019 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'mod_audioannotation';
$plugin->version = 2019012100;
$plugin->release = 'v0.4';
$plugin->version = 2019020400;
$plugin->release = 'v0.5';
$plugin->requires = 2018050800;
$plugin->maturity = MATURITY_ALPHA;
$plugin->cron = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment