Projet

Général

Profil

0001-remove-width-aand-height-inputs-from-ckeditor-image-.patch

Anonyme, 15 mars 2018 14:48

Télécharger (1,86 ko)

Voir les différences:

Subject: [PATCH] remove width aand height inputs from ckeditor image dialog
 box

 combo/manager/templates/combo/manager_base.html | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
combo/manager/templates/combo/manager_base.html
31 31
{{ block.super }}
32 32
<script src="{% static "ckeditor/ckeditor/ckeditor.js" %}"></script>
33 33
<script type="text/javascript" src="{% static "ckeditor/ckeditor-init.js" %}"></script>
34
<script>
35
(function(){
36
  // When opening a dialog, its "definition" is created for it, for
37
  // each editor instance. The "dialogDefinition" event is then
38
  // fired. We should use this event to make customizations to the
39
  // definition of existing dialogs.
40
  CKEDITOR.on( 'dialogDefinition', function( ev ) {
41
    // Take the dialog name and its definition from the event data.
42
    var dialogName = ev.data.name;
43
    var dialogDefinition = ev.data.definition;
44
    // Check if the definition is from the dialog we're
45
    // interested on (the "Link" dialog).
46
    if ( dialogName == 'image') {
47
      // Get a reference to the "Info tab" tab.
48
      var infoTab = dialogDefinition.getContents('info');
49
      // Remove the "txtWidth" field from the "infoTab > basic" section.
50
      infoTab.remove('txtWidth');
51
      infoTab.remove('txtHeight');
52
      infoTab.remove('ratio');
53
    }
54
  });
55
}());
56
</script>
34 57
<script src="{% static "js/combo.manager.js" %}"></script>
35 58
<script src="{% static "xstatic/leaflet.js" %}"></script>
36 59
<script src="{% static "js/combo.map.js" %}"></script>
37
-