djgentelella 0.4.8__py3-none-any.whl → 0.4.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. djgentelella/__init__.py +1 -1
  2. djgentelella/firmador_digital/consumers/sign.py +15 -1
  3. djgentelella/firmador_digital/utils.py +11 -0
  4. djgentelella/locale/es/LC_MESSAGES/django.po +1 -0
  5. djgentelella/locale/es/LC_MESSAGES/djangojs.mo +0 -0
  6. djgentelella/locale/es/LC_MESSAGES/djangojs.po +9 -0
  7. djgentelella/serializers/firmador_digital.py +5 -0
  8. djgentelella/static/djgentelella.readonly.vendors.min.css +9 -5
  9. djgentelella/static/djgentelella.readonly.vendors.min.js +1 -1
  10. djgentelella/static/gentelella/css/custom.css +4 -0
  11. djgentelella/static/gentelella/js/base/digital_signature.js +164 -62
  12. djgentelella/static/gentelella/js/base/form.common.js +9 -4
  13. djgentelella/static/gentelella/js/base/select2_wrap.js +15 -1
  14. djgentelella/static/gentelella/js/base/select2related.js +5 -0
  15. djgentelella/static/gentelella/js/base.js +192 -65
  16. djgentelella/static/gentelella/js/custom.js +6 -1
  17. djgentelella/static/gentelella/js/obj_api_management.js +5 -3
  18. djgentelella/static/gentelella/js/widgets.js +6 -2
  19. djgentelella/static/vendors/timeline/css/timeline.css +9 -5
  20. djgentelella/static/vendors/timeline/js/timeline.js +1 -1
  21. djgentelella/templates/gentelella/app/sidebar.html +16 -16
  22. djgentelella/templates/gentelella/widgets/digital_signature.html +5 -3
  23. djgentelella/views/select2autocomplete.py +40 -0
  24. djgentelella/widgets/selects.py +47 -0
  25. {djgentelella-0.4.8.dist-info → djgentelella-0.4.10.dist-info}/METADATA +1 -1
  26. {djgentelella-0.4.8.dist-info → djgentelella-0.4.10.dist-info}/RECORD +30 -30
  27. {djgentelella-0.4.8.dist-info → djgentelella-0.4.10.dist-info}/AUTHORS +0 -0
  28. {djgentelella-0.4.8.dist-info → djgentelella-0.4.10.dist-info}/LICENSE.txt +0 -0
  29. {djgentelella-0.4.8.dist-info → djgentelella-0.4.10.dist-info}/WHEEL +0 -0
  30. {djgentelella-0.4.8.dist-info → djgentelella-0.4.10.dist-info}/top_level.txt +0 -0
@@ -553,6 +553,11 @@ function extract_select2_context(context, instance){
553
553
  }else{
554
554
  context.theme='bootstrap-5'
555
555
  }
556
+ let template = data.templateresult;
557
+ if(template != undefined){
558
+ context.templateResult=window[template];
559
+ context.templateSelection=window[template];
560
+ }
556
561
  }
557
562
 
558
563
  function add_selected_option(item, data){
@@ -828,7 +833,10 @@ function clear_action_form(form) {
828
833
  });
829
834
  $(form).find('[data-widget="TaggingInput"],[data-widget="EmailTaggingInput"]').each(function (i, e) {
830
835
  var tg = $(e).data().tagify;
831
- tg.removeAllTags();
836
+ if(tg != undefined){
837
+ tg.removeAllTags();
838
+ }
839
+
832
840
  });
833
841
  $(form).find('[data-widget="FileChunkedUpload"],[data-widget="FileInput"]').each(function (i, e) {
834
842
  var tg = $(e).data().fileUploadWidget;
@@ -909,9 +917,11 @@ function updateInstanceValuesForm(form, name, value) {
909
917
  }
910
918
  if (inputfield.data().widget === "TaggingInput" || inputfield.data().widget === "EmailTaggingInput") {
911
919
  var tagifyelement = inputfield.data().tagify;
912
- tagifyelement.removeAllTags();
913
- tagifyelement.loadOriginalValues(value);
914
- done = true;
920
+ if(tagifyelement!=undefined){
921
+ tagifyelement.removeAllTags();
922
+ tagifyelement.loadOriginalValues(value);
923
+ }
924
+ done = false;
915
925
  }
916
926
 
917
927
 
@@ -1529,6 +1539,21 @@ function decore_select2 (data) {
1529
1539
  return $wrapper;
1530
1540
  }
1531
1541
 
1542
+ function decore_img_select2 (data) {
1543
+ if(!data.url && data.text){
1544
+ return $('<span>'+data.text+'</span>');
1545
+ }
1546
+ if (!data.url) {
1547
+ return "";
1548
+ }
1549
+ let img_width = "2em"; let img_height="2em;";
1550
+ if(data.img_width != undefined){img_width=data.img_width;}
1551
+ if(data.img_height != undefined){ img_height=data.img_height; }
1552
+ var $state = $('<span><img style="width: '+img_width+'; height: '+img_height+';" src="' + data.url+ '" class="img-flag" /> ' + data.text + '</span>');
1553
+ return $state;
1554
+ };
1555
+
1556
+
1532
1557
  function load_date_range(instance, format='DD/MM/YYYY') {
1533
1558
  var options = {
1534
1559
  'autoUpdateInput': false,
@@ -2254,7 +2279,7 @@ function getMediaRecord(element, mediatype){
2254
2279
  var socket_connections = {};
2255
2280
  var socket_manager_instances = {};
2256
2281
  const max_close_inicialice = 5;
2257
- var count_close_inicialice=0;
2282
+ var count_close_inicialice = 0;
2258
2283
 
2259
2284
  // Configuración del MutationObserver
2260
2285
  const observer = new MutationObserver((mutations) => {
@@ -2262,18 +2287,18 @@ const observer = new MutationObserver((mutations) => {
2262
2287
  if (mutation.type === 'attributes' && mutation.attributeName === 'data-port') {
2263
2288
  let port = mutation.target.getAttribute('data-port');
2264
2289
  mutation.target.setAttribute("href",
2265
- "firmador:" + window.location.protocol + "//" + window.location.host + "#" + port);
2290
+ "firmador:" + window.location.protocol + "//" + window.location.host + "#" + port);
2266
2291
  }
2267
2292
  });
2268
2293
  });
2269
2294
 
2270
- build_cors_headers = function(instance){
2295
+ build_cors_headers = function (instance) {
2271
2296
  let port = instance.getAttribute('data-port');
2272
2297
  instance.setAttribute("href", "firmador:" + window.location.protocol + "//" + window.location.host + "#" + port);
2273
- observer.observe(instance, { attributes: true });
2298
+ observer.observe(instance, {attributes: true});
2274
2299
  }
2275
2300
 
2276
- build_ws_url = function(base){
2301
+ build_ws_url = function (base) {
2277
2302
  return base;
2278
2303
  }
2279
2304
 
@@ -2284,10 +2309,10 @@ build_digital_signature = function (instance) {
2284
2309
  const container = instance.closest(".widget-digital-signature");
2285
2310
  const container_tag = `container-${widgetId}`;
2286
2311
  const doc_instance = {
2287
- "pk": instance.getAttribute("data-pk"),
2288
- "cc": instance.getAttribute("data-cc"),
2289
- "value": instance.getAttribute("data-value")
2290
- }
2312
+ "pk": instance.getAttribute("data-pk"),
2313
+ "cc": instance.getAttribute("data-cc"),
2314
+ "value": instance.getAttribute("data-value")
2315
+ }
2291
2316
  const urls = {
2292
2317
  "logo": instance.getAttribute("data-logo"),
2293
2318
  "sign_doc": instance.getAttribute("data-renderurl"),
@@ -2306,8 +2331,17 @@ build_digital_signature = function (instance) {
2306
2331
  return;
2307
2332
  }
2308
2333
 
2334
+ //Custom Event
2335
+ const event = new CustomEvent("document:signed", {
2336
+ bubbles: true, // Important for global handlers
2337
+ detail: {
2338
+ message: "Signed document",
2339
+ instance: doc_instance,
2340
+ }
2341
+ });
2342
+
2309
2343
  // Signature
2310
- let signatureManager = new SignatureManager(widgetId, container, url_ws, pdfInstance);
2344
+ let signatureManager = new SignatureManager(widgetId, container, url_ws, pdfInstance, event);
2311
2345
  signatureManager.startSign(doc_instance, urls['logo']);
2312
2346
 
2313
2347
  // Store the instance in a global object with key per widget ID
@@ -2320,6 +2354,7 @@ build_digital_signature = function (instance) {
2320
2354
  window.pdfSignatureComponents[container_tag] = pdfInstance;
2321
2355
  }
2322
2356
 
2357
+
2323
2358
  }
2324
2359
 
2325
2360
  ///////////////////////////////////////////////
@@ -2330,8 +2365,8 @@ class PdfSignatureComponent {
2330
2365
  this.container = container;
2331
2366
  this.defaultPage = defaultPage;
2332
2367
  this.widgetId = container.getAttribute("data-widget-id");
2333
- this.urls=urls;
2334
- this.doc_instance=doc_instance;
2368
+ this.urls = urls;
2369
+ this.doc_instance = doc_instance;
2335
2370
 
2336
2371
  // Internal elements
2337
2372
  this.signature = container.querySelector('.signature');
@@ -2381,7 +2416,7 @@ class PdfSignatureComponent {
2381
2416
  console.warn("The variable 'sign_doc' is not defined.");
2382
2417
  return;
2383
2418
  }
2384
- pdfjsLib.getDocument(this.urls['sign_doc']+"?"+this.urls['renderattr']).promise.then((pdfDoc_) => {
2419
+ pdfjsLib.getDocument(this.urls['sign_doc'] + "?" + this.urls['renderattr']).promise.then((pdfDoc_) => {
2385
2420
  this.pdfDoc = pdfDoc_;
2386
2421
  this.page_count.textContent = pdfDoc_.numPages;
2387
2422
 
@@ -2643,11 +2678,11 @@ class PdfSignatureComponent {
2643
2678
  // Signature manager Digital Signature
2644
2679
  ///////////////////////////////////////////////
2645
2680
  class SignatureManager {
2646
- constructor(input_id, container, url_ws, pdfvisor) {
2647
- this.input_id=input_id;
2681
+ constructor(input_id, container, url_ws, pdfvisor, custom_event) {
2682
+ this.input_id = input_id;
2648
2683
  this.container = container;
2649
2684
  this.modal = new bootstrap.Modal(container.querySelector("#loading_sign"));
2650
- this.firmador = new DocumentClient(container, container.getAttribute("data-widget-id"), this, url_ws, this.doc_instance);
2685
+ this.firmador = new DocumentClient(container, container.getAttribute("data-widget-id"), this, url_ws, custom_event, this.doc_instance);
2651
2686
  this.signerBtn = container.querySelector(".btn_signer");
2652
2687
  this.errorsContainer = container.querySelector(".errors_signer");
2653
2688
  this.refreshBtn = container.querySelector(".btn_signer_refresh");
@@ -2753,24 +2788,26 @@ function responseManageTypeData(instance, err_json_fn, error_text_fn) {
2753
2788
 
2754
2789
  class SocketManager {
2755
2790
  constructor(url, signatureManager, instance) {
2756
- this.url=url;
2757
- this.signatureManager=signatureManager;
2791
+ this.url = url;
2792
+ this.signatureManager = signatureManager;
2758
2793
  this.instance = instance;
2759
2794
 
2760
2795
  this.connect();
2761
2796
  }
2762
- connect(){
2797
+
2798
+ connect() {
2763
2799
  socket_manager_instances[this.instance.socket_id] = this.instance;
2764
- if(!socket_connections.hasOwnProperty(this.url)){
2800
+ if (!socket_connections.hasOwnProperty(this.url)) {
2765
2801
  let ws = new WebSocket(this.url);
2766
- ws.onerror=this.fn_error(this);
2767
- ws.onclose=this.fn_close(this);
2768
- ws.onopen=this.fn_open(this);
2769
- ws.onmessage=this.fn_messages(this);
2770
- socket_connections[this.url]=ws;
2771
- }
2802
+ ws.onerror = this.fn_error(this);
2803
+ ws.onclose = this.fn_close(this);
2804
+ ws.onopen = this.fn_open(this);
2805
+ ws.onmessage = this.fn_messages(this);
2806
+ socket_connections[this.url] = ws;
2807
+ }
2772
2808
  }
2773
- fn_error(element){
2809
+
2810
+ fn_error(element) {
2774
2811
  return (event) => {
2775
2812
  // console.error("WebSocket error");
2776
2813
  element.signatureManager.hideLoading();
@@ -2778,47 +2815,51 @@ class SocketManager {
2778
2815
  element.signatureManager.socketError = true;
2779
2816
  }
2780
2817
  }
2781
- fn_close(element){
2818
+
2819
+ fn_close(element) {
2782
2820
  return (event) => {
2783
- console.warn("WebSocket cerrado "+event.type);
2784
- Reflect.deleteProperty(socket_connections, event.currentTarget.url);
2785
- if(count_close_inicialice < max_close_inicialice){
2821
+ console.warn("WebSocket cerrado " + event.type);
2822
+ Reflect.deleteProperty(socket_connections, event.currentTarget.url);
2823
+ if (count_close_inicialice < max_close_inicialice) {
2786
2824
  count_close_inicialice += 1;
2787
2825
  element.instance.inicialize();
2788
- }
2826
+ }
2789
2827
  };
2790
2828
  }
2791
- fn_open(element){
2829
+
2830
+ fn_open(element) {
2792
2831
  return (event) => {
2793
- // console.log("WebSocket conectado");
2832
+ // console.log("WebSocket conectado");
2794
2833
  element.signatureManager.socket_error = false;
2795
- count_close_inicialice=0;
2796
- };
2834
+ count_close_inicialice = 0;
2835
+ };
2797
2836
  }
2798
- fn_messages(element){
2799
- return (event)=>{
2837
+
2838
+ fn_messages(element) {
2839
+ return (event) => {
2800
2840
  try {
2801
2841
  const data = JSON.parse(event.data);
2802
- if (data.hasOwnProperty("socket_id") && socket_manager_instances.hasOwnProperty(data["socket_id"])){
2803
- socket_manager_instances[data["socket_id"]].receive_json(data);
2804
- }else{
2842
+ if (data.hasOwnProperty("socket_id") && socket_manager_instances.hasOwnProperty(data["socket_id"])) {
2843
+ socket_manager_instances[data["socket_id"]].receive_json(data);
2844
+ } else {
2805
2845
  console.error("Socket id not found");
2806
2846
  }
2807
2847
  } catch (err) {
2808
2848
  console.error("Error al parsear mensaje WS:", err);
2809
2849
  }
2810
- };
2850
+ };
2811
2851
  }
2812
- send(str){
2813
- if(!socket_connections.hasOwnProperty(this.url)){
2852
+
2853
+ send(str) {
2854
+ if (!socket_connections.hasOwnProperty(this.url)) {
2814
2855
  this.connect();
2815
- }else{
2816
- if(socket_connections[this.url].readyState != WebSocket.OPEN){
2856
+ } else {
2857
+ if (socket_connections[this.url].readyState != WebSocket.OPEN) {
2817
2858
  Reflect.deleteProperty(socket_connections, this.url);
2818
2859
  this.connect();
2819
2860
  }
2820
- }
2821
- if(socket_connections.hasOwnProperty(this.url)){
2861
+ }
2862
+ if (socket_connections.hasOwnProperty(this.url)) {
2822
2863
  socket_connections[this.url].send(str);
2823
2864
  }
2824
2865
  }
@@ -2873,7 +2914,7 @@ function FirmadorLibreLocal(docmanager, signatureManager) {
2873
2914
  callFetch(instance);
2874
2915
  },
2875
2916
  "sign": function (data) {
2876
- if(data.hasOwnProperty("socket_id")){
2917
+ if (data.hasOwnProperty("socket_id")) {
2877
2918
  Reflect.deleteProperty(data, "socket_id");
2878
2919
  }
2879
2920
  let json = JSON.stringify(data);
@@ -2917,7 +2958,7 @@ function FirmadorLibreLocal(docmanager, signatureManager) {
2917
2958
  }
2918
2959
 
2919
2960
  const generateRandomString = () => {
2920
- return Math.floor(Math.random() * Date.now()).toString(36);
2961
+ return Math.floor(Math.random() * Date.now()).toString(36);
2921
2962
  };
2922
2963
 
2923
2964
  function FirmadorLibreWS(docmanager, url, signatureManager) {
@@ -2977,11 +3018,13 @@ function FirmadorLibreWS(docmanager, url, signatureManager) {
2977
3018
  break;
2978
3019
  }
2979
3020
  }
2980
- }else{
3021
+ } else {
2981
3022
 
2982
- if(data.hasOwnProperty('tobesigned')){
3023
+ if (data.hasOwnProperty('report')) {
3024
+ docmanager.validate_document_remote_done(data['report']);
3025
+ } else if (data.hasOwnProperty('tobesigned')) {
2983
3026
  docmanager.do_sign_local(data);
2984
- }else{
3027
+ } else {
2985
3028
  docmanager.remote_done(data)
2986
3029
  }
2987
3030
 
@@ -2989,7 +3032,7 @@ function FirmadorLibreWS(docmanager, url, signatureManager) {
2989
3032
  },
2990
3033
 
2991
3034
  "inicialize": function () {
2992
- this.websocket = new SocketManager(url, signatureManager, this);
3035
+ this.websocket = new SocketManager(url, signatureManager, this);
2993
3036
 
2994
3037
  },
2995
3038
  "local_done": function (data) {
@@ -3017,12 +3060,24 @@ function FirmadorLibreWS(docmanager, url, signatureManager) {
3017
3060
  alertFunction(errorInterpreter(3), gettext("Error"), "error", false, closeModalSignature);
3018
3061
  }
3019
3062
  },
3063
+
3064
+ "validate_document": function (data) {
3065
+ data["action"] = "validate_document";
3066
+ data["socket_id"] = this.socket_id;
3067
+ signatureManager.showLoading();
3068
+ try {
3069
+ this.websocket.send(JSON.stringify(data));
3070
+ } catch (e) {
3071
+ signatureManager.hideLoading();
3072
+ alertFunction(errorInterpreter(3), gettext("Error"), "error", false, closeModalSignature);
3073
+ }
3074
+ }
3020
3075
  };
3021
3076
  firmador.inicialize();
3022
3077
  return firmador;
3023
3078
  }
3024
3079
 
3025
- function DocumentClient(container, widgetId, signatureManager, url_ws) {
3080
+ function DocumentClient(container, widgetId, signatureManager, url_ws, custom_event) {
3026
3081
  const docmanager = {
3027
3082
  "widgetId": widgetId,
3028
3083
  "container": container,
@@ -3032,6 +3087,7 @@ function DocumentClient(container, widgetId, signatureManager, url_ws) {
3032
3087
  "certificates": null,
3033
3088
  "doc_instance": null,
3034
3089
  "logo_url": null,
3090
+ "custom_event": custom_event,
3035
3091
 
3036
3092
  "start_sign": function (doc_instance, logo_url = null) {
3037
3093
  this.doc_instance = doc_instance;
@@ -3094,6 +3150,7 @@ function DocumentClient(container, widgetId, signatureManager, url_ws) {
3094
3150
  }
3095
3151
 
3096
3152
  },
3153
+
3097
3154
  "do_sign_local": function (data) {
3098
3155
  this.localsigner.sign(data);
3099
3156
  },
@@ -3103,21 +3160,91 @@ function DocumentClient(container, widgetId, signatureManager, url_ws) {
3103
3160
  this.remotesigner.complete_sign(data);
3104
3161
  },
3105
3162
  "remote_done": function (data) {
3106
- if(data.result !== null ){
3163
+ if (data.result !== null) {
3107
3164
  const l = btoa(JSON.stringify({'token': data.result}));
3108
- this.signatureManager.doc_instance['value'] =l;
3109
- this.signatureManager.pdfvisor.urls['renderattr']="value="+l;
3110
- document.getElementById(this.signatureManager.input_id).value=l;
3165
+ this.signatureManager.doc_instance['value'] = l;
3166
+ this.signatureManager.pdfvisor.urls['renderattr'] = "value=" + l;
3167
+ document.getElementById(this.signatureManager.input_id).value = l;
3111
3168
  this.signatureManager.pdfvisor.initPDFViewer();
3112
3169
  signatureManager.hideLoading();
3170
+ document.dispatchEvent(this.custom_event);
3113
3171
  alertFunction(
3114
3172
  gettext("The signing was successfully completed."),
3115
3173
  gettext("Success"),
3116
- "success", false, function(){}
3174
+ "success", false, function () {
3175
+ }
3117
3176
  );
3118
- }
3177
+ }
3178
+ },
3179
+
3180
+ "validate_document_remote": function () {
3181
+ data = {
3182
+ "instance": this.doc_instance,
3183
+ }
3184
+ document.dispatchEvent(this.custom_event);
3185
+ //this.remotesigner.validate_document(data);
3119
3186
  },
3120
3187
 
3188
+ "validate_document_remote_done": function (reportData) {
3189
+ signatureManager.hideLoading();
3190
+ if (!reportData || typeof reportData !== 'string') {
3191
+ alertFunction(
3192
+ gettext("Please, sign the document before saving"),
3193
+ gettext("Warning"),
3194
+ "warning", false, function () {
3195
+ }
3196
+ );
3197
+ return;
3198
+ }
3199
+
3200
+ if (reportData.includes("no est&aacute; firmado digitalmente")) {
3201
+ alertFunction(
3202
+ gettext("The document is not digitally signed. Please sign the document before saving."),
3203
+ gettext("Warning"),
3204
+ "warning", false,
3205
+ function () {
3206
+ }
3207
+ );
3208
+ return;
3209
+ }
3210
+
3211
+ const firmasMatch = reportData.match(/Contiene\s*([\d]+)\s*firma/);
3212
+ let numFirmas = 0;
3213
+ if (firmasMatch && firmasMatch[1]) {
3214
+ numFirmas = parseInt(firmasMatch[1], 10);
3215
+ }
3216
+
3217
+ if (numFirmas > 0) {
3218
+ if (typeof update_signed_document === "function") {
3219
+ update_signed_document(this.doc_instance);
3220
+ } else {
3221
+ console.log("warning: update_signed_document function not defined, using default action");
3222
+ alertFunction(
3223
+ gettext(`The document was saved`),
3224
+ gettext("Success"),
3225
+ "success", false,
3226
+ function () {
3227
+ const container = this.signatureManager.container;
3228
+ const form = container.closest('form');
3229
+ if (form) {
3230
+ form.submit();
3231
+ }
3232
+ }.bind(this)
3233
+ );
3234
+ }
3235
+
3236
+ } else {
3237
+ alertFunction(
3238
+ gettext("The document is not digitally signed. Please sign the document before saving."),
3239
+ gettext("Warning"),
3240
+ "warning", false,
3241
+ function () {
3242
+ }
3243
+ );
3244
+ }
3245
+ }
3246
+
3247
+
3121
3248
  };
3122
3249
 
3123
3250
  docmanager["remotesigner"] = new FirmadorLibreWS(docmanager, url_ws, signatureManager);
@@ -87,11 +87,16 @@ function init_sidebar() {
87
87
  // prevent closing menu if we are on child menu
88
88
  if (!$li.parent().is('.child_menu')) {
89
89
  $SIDEBAR_MENU.find('li').removeClass('active active-sm');
90
- $SIDEBAR_MENU.find('li ul').slideUp();
90
+ if ($BODY.is(".nav-sm")) {
91
+ $li.find('.child_menu').show();
92
+ }else{
93
+ $SIDEBAR_MENU.find('li ul').slideUp();
94
+ }
91
95
  } else {
92
96
  if ($BODY.is(".nav-sm")) {
93
97
  $SIDEBAR_MENU.find("li").removeClass("active active-sm");
94
98
  $SIDEBAR_MENU.find("li ul").slideUp();
99
+ ev.preventDefault();
95
100
  }
96
101
  }
97
102
  $li.addClass('active');
@@ -229,9 +229,11 @@ function GTBaseFormModal(modal_id, datatable_element, form_config) {
229
229
  }
230
230
  if (inputfield.data().widget === "TaggingInput" || inputfield.data().widget === "EmailTaggingInput") {
231
231
  var tagifyelement = inputfield.data().tagify;
232
- tagifyelement.removeAllTags();
233
- tagifyelement.loadOriginalValues(value);
234
- done = true;
232
+ if (tagifyelement != undefined){
233
+ tagifyelement.removeAllTags();
234
+ tagifyelement.loadOriginalValues(value);
235
+ }
236
+ done = false;
235
237
  }
236
238
  if (!done) {
237
239
  inputfield.val(value);
@@ -1,4 +1,5 @@
1
1
  document.formset = [];
2
+
2
3
  document.gtwidgets = {
3
4
  ImageRecordInput: function (instance) {
4
5
  instance.each(function (i, e) {
@@ -310,7 +311,8 @@ document.gtwidgets = {
310
311
  instance.each(function (i, e) {
311
312
  build_cors_headers(e);
312
313
  });
313
- }
314
+ },
315
+
314
316
  }
315
317
 
316
318
  function gt_find_initialize(instance) {
@@ -321,7 +323,9 @@ function gt_find_initialize(instance) {
321
323
  document.gtwidgets[widgetname](elems);
322
324
  }
323
325
  });
324
- var autocomplete = instance.find('[data-widget="AutocompleteSelectMultiple"],[data-widget="AutocompleteSelect"]');
326
+ let textautocomplete = '[data-widget="AutocompleteSelectMultiple"],[data-widget="AutocompleteSelect"]';
327
+ textautocomplete += ',[data-widget="AutocompleteSelectMultipleImage"],[data-widget="AutocompleteSelectImage"]';
328
+ var autocomplete = instance.find(textautocomplete);
325
329
  if (autocomplete.length > 0) {
326
330
  document.gtwidgets['GTAutocompleteSelect'](autocomplete);
327
331
  }
@@ -808,6 +808,7 @@
808
808
  position: relative;
809
809
  overflow: hidden;
810
810
  border-top: 1px solid #e5e5e5;
811
+ direction: ltr;
811
812
  }
812
813
  .tl-timenav .tl-timenav-line {
813
814
  position: absolute;
@@ -2018,7 +2019,6 @@
2018
2019
  .tl-slidenav-previous .tl-slidenav-content-container,
2019
2020
  .tl-slidenav-next .tl-slidenav-content-container {
2020
2021
  width: 100px;
2021
- position: absolute;
2022
2022
  }
2023
2023
  .tl-slidenav-previous .tl-slidenav-title,
2024
2024
  .tl-slidenav-next .tl-slidenav-title,
@@ -2104,7 +2104,7 @@
2104
2104
  .tl-slidenav-next {
2105
2105
  text-align: right;
2106
2106
  margin-right: 10px;
2107
- right: 100px;
2107
+ right: 0;
2108
2108
  }
2109
2109
  .tl-slidenav-next .tl-slidenav-title,
2110
2110
  .tl-slidenav-next .tl-slidenav-description {
@@ -2118,6 +2118,7 @@
2118
2118
  }
2119
2119
  .tl-slidenav-previous {
2120
2120
  text-align: left;
2121
+ left: 0;
2121
2122
  margin-left: 10px;
2122
2123
  }
2123
2124
  .tl-slidenav-previous .tl-slidenav-icon {
@@ -2126,6 +2127,12 @@
2126
2127
  .tl-slidenav-previous .tl-slidenav-icon:before {
2127
2128
  content: "\e650";
2128
2129
  }
2130
+ [dir="rtl"] .tl-slidenav-previous {
2131
+ direction: ltr;
2132
+ }
2133
+ [dir="rtl"] .tl-slidenav-next:hover .tl-slidenav-icon {
2134
+ margin-right: -4px;
2135
+ }
2129
2136
  /* NAVIGATION HOVER
2130
2137
  ================================================== */
2131
2138
  .tl-slidenav-previous:hover .tl-slidenav-title,
@@ -2154,9 +2161,6 @@
2154
2161
  .tl-slidenav-previous:focus-visible .tl-slidenav-icon {
2155
2162
  margin-left: -4px;
2156
2163
  }
2157
- .tl-skinny .tl-slidenav-next {
2158
- right: 32px;
2159
- }
2160
2164
  .tl-skinny .tl-slidenav-next .tl-slidenav-icon {
2161
2165
  margin-left: 8px;
2162
2166
  }