Fix notifications, disable qtip2 (tooltip)

pull/3844/head
Julio Montoya 5 years ago
parent 5506f91c1d
commit 4c4023e32a
  1. 25
      assets/js/app.js
  2. 2
      assets/js/vendor.js
  3. 42
      assets/vue/components/Snackbar.vue
  4. 4
      assets/vue/mixins/NotificationMixin.js
  5. 2
      webpack.config.js

@ -3,11 +3,13 @@
// Load symfony routes in order to use it in a js
const routes = require('../../public/js/fos_js_routes.json');
import Routing from '../../vendor/friendsofsymfony/jsrouting-bundle/Resources/public/js/router.min.js';
import $ from 'jquery';
//import $ from 'jquery';
const $ = require('jquery');
window.jQuery = $;
window.$ = $;
global.jQuery = $;
global.$ = global.jQuery = $
Routing.setRoutingData(routes);
@ -41,9 +43,6 @@ const webAjax = homePublicUrl + 'main/inc/ajax/';
var ajax_url = webAjax + 'chat.ajax.php';
var online_button = '<img src="' + homePublicUrl + 'img/statusonline.png">';
var offline_button = '<img src="' + homePublicUrl + 'img/statusoffline.png">';
/*var connect_lang = '{{ "ChatConnected"|get_lang }}';
var disconnect_lang = '{{ "ChatDisconnected"|get_lang }}';*/
var connect_lang = 'ChatConnected';
var disconnect_lang = 'ChatDisconnected';
@ -263,8 +262,8 @@ $(function () {
// Date time settings.
//moment.locale(locale);
$.datepicker.setDefaults($.datepicker.regional[locale]);
$.datepicker.regional["local"] = $.datepicker.regional[locale];
//$.datepicker.setDefaults($.datepicker.regional[locale]);
//$.datepicker.regional["local"] = $.datepicker.regional[locale];
// Fix old calls of "inc/lib/mediaplayer/player.swf" and convert to <audio> tag, then rendered by media element js
// see BT#13405
@ -274,7 +273,7 @@ $(function () {
var audioId = Math.floor(Math.random() * 99999);
flashVars = flashVars.replace('&autostart=false', '');
flashVars = flashVars.replace('&autostart=true', '');
var audioDiv = '<audio id="'+audioId+'" controls="controls" style="width:400px;" width:"400px;" src="'+flashVars+'" ><source src="'+flashVars+'" type="audio/mp3" ></source></audio>';
var audioDiv = '<audio id="'+audioId+'" controls="controls" style="width:400px;" width:"400px;" src="'+flashVars+'" ><source src="'+flashVars+'" type="audio/mp3"></source></audio>';
$(this).hide();
$(this).after(audioDiv);
}
@ -328,8 +327,6 @@ $(function () {
$("#column-left").addClass('col-md-12');
$("#column-right").addClass('col-md-12');
}
if ($("#preview_course_add_course").length >= 0) {
$("#preview_course_add_course").toggle();
}
@ -384,7 +381,7 @@ $(function () {
var tip_options = {
placement: 'right'
};
$('.boot-tooltip').tooltip(tip_options);
//$('.boot-tooltip').tooltip(tip_options);
$('.star-rating li a').on('click', function (event) {
var id = $(this).parents('ul').attr('id');
@ -421,8 +418,8 @@ $(document).scroll(function () {
$('.bottom_actions').addClass('bottom_actions_fixed');
}
//Exercise warning fixed at the top
var fixed = $("#exercise_clock_warning");
// Exercise warning fixed at the top.
var fixed = $("#exercise_clock_warning");
if (fixed.length) {
if (!fixed.attr('data-top')) {
// If already fixed, then do nothing
@ -532,7 +529,7 @@ function hideUnhide(inId, inIdTxt, inTxtHide, inTxtUnhide)
}
}
function expandColumnToogle(buttonSelector, col1Info, col2Info)
function expandColumnToggle(buttonSelector, col1Info, col2Info)
{
$(buttonSelector).on('click', function (e) {
e.preventDefault();
@ -674,7 +671,7 @@ function copyTextToClipBoard(elementId)
// Expose functions to be use inside chamilo.
// @todo check if there's a better way to expose functions.
window.expandColumnToogle = expandColumnToogle;
window.expandColumnToggle = expandColumnToggle;
window.get_url_params = get_url_params;
window.setCheckbox = setCheckbox;
window.action_click = action_click;

@ -1,7 +1,7 @@
// require('mediaelement');
// import('multiselect-two-sides');
// require('@fortawesome/fontawesome-free');
require('qtip2');
require('image-map-resizer/js/imageMapResizer.js');
require('cropper');
// require('jquery-ui-timepicker-addon/dist/jquery-ui-timepicker-addon');

@ -0,0 +1,42 @@
<template>
<div>
<span v-html="message"></span>
</div>
<!-- <v-snackbar-->
<!-- v-model="show"-->
<!-- :color="color"-->
<!-- :multi-line="true"-->
<!-- :timeout="timeout"-->
<!-- right-->
<!-- top-->
<!-- >-->
<!-- {{ text }}-->
<!-- <template v-if="subText">-->
<!-- <p>{{ subText }}</p>-->
<!-- </template>-->
<!-- <v-btn-->
<!-- dark-->
<!-- text-->
<!-- @click.native="close"-->
<!-- >-->
<!-- {{ $t('Close') }}-->
<!-- </v-btn>-->
<!-- </v-snackbar>-->
</template>
<script>
import { mapFields } from 'vuex-map-fields';
export default {
props: {
message: String,
},
/*computed: {
...mapFields('notifications', ['color', 'show', 'subText', 'text', 'timeout'])
},
methods: {
close() {
this.show = false;
}
}*/
};
</script>

@ -1,5 +1,5 @@
import {mapFields} from 'vuex-map-fields';
//import Component from "../components/Snackbar.vue";
import Component from "../components/Snackbar.vue";
export default {
computed: {
@ -18,7 +18,7 @@ export default {
showMessage(message, type = 'success') {
const content = {
// Your component or JSX template
//component: Component,
component: Component,
// Props are just regular props, but these won't be reactive
props: {

@ -180,8 +180,6 @@ themes.forEach(function (theme) {
// }
// }));
//module.exports = Encore.getWebpackConfig();
const config = Encore.getWebpackConfig();
config.resolve.alias = {

Loading…
Cancel
Save