diff --git a/js/plugins/alerts.js b/js/plugins/alerts.js index 9551196..bed6c4b 100644 --- a/js/plugins/alerts.js +++ b/js/plugins/alerts.js @@ -6,9 +6,9 @@ tinymce.PluginManager.add('bs_alerts', function(editor, url) { tinymce.activeEditor.windowManager.open({ title: 'Add an alert', url: url + '/alerts.html', - width: 480, - height: 180 - }); + width: Math.max(window.innerWidth * 0.4, 400), + height: Math.max(window.innerHeight * 0.6, 400) + }) } }); }); diff --git a/js/plugins/buttons.js b/js/plugins/buttons.js index 092a892..401d1c1 100644 --- a/js/plugins/buttons.js +++ b/js/plugins/buttons.js @@ -6,8 +6,8 @@ tinymce.PluginManager.add('bs_buttons', function(editor, url) { tinymce.activeEditor.windowManager.open({ title: 'Buttons', url: url + '/buttons.html', - width: 480, - height: 320 + width: Math.max(window.innerWidth * 0.4, 400), + height: Math.max(window.innerHeight * 0.6, 400) }); } }); diff --git a/js/plugins/grid.js b/js/plugins/grid.js index feb4370..44a8631 100644 --- a/js/plugins/grid.js +++ b/js/plugins/grid.js @@ -16,8 +16,8 @@ tinymce.PluginManager.add('bs_grid', function(editor, url) { tinymce.activeEditor.windowManager.open({ title: 'Custom Grid', url: url + '/grid.html', - width: 580, - height: 420 + width: Math.max(window.innerWidth * 0.4, 400), + height: Math.max(window.innerHeight * 0.6, 400) }); } } diff --git a/js/plugins/icons.js b/js/plugins/icons.js index ddbab1b..70787d8 100644 --- a/js/plugins/icons.js +++ b/js/plugins/icons.js @@ -6,8 +6,8 @@ tinymce.PluginManager.add('bs_icons', function(editor, url) { tinymce.activeEditor.windowManager.open({ title : 'Icons', url : url + '/icons.html', - width : 480, - height : 320 + width: Math.max(window.innerWidth * 0.4, 400), + height: Math.max(window.innerHeight * 0.6, 400) }); } }); diff --git a/js/plugins/labels.js b/js/plugins/labels.js index fa7a4f4..78f63fe 100644 --- a/js/plugins/labels.js +++ b/js/plugins/labels.js @@ -7,8 +7,8 @@ tinymce.PluginManager.add('bs_labels', function(editor, url) { tinymce.activeEditor.windowManager.open({ title: 'Labels', url: url + '/labels.html', - width: 480, - height: 320 + width: Math.max(window.innerWidth * 0.4, 400), + height: Math.max(window.innerHeight * 0.6, 400) }); } }); diff --git a/js/plugins/tabs.js b/js/plugins/tabs.js index da18ec5..617ae0a 100644 --- a/js/plugins/tabs.js +++ b/js/plugins/tabs.js @@ -6,8 +6,8 @@ tinymce.PluginManager.add('bs_tabs', function(editor, url) { tinymce.activeEditor.windowManager.open({ title: 'Tabs', url: url + '/tabs.html', - width: 480, - height: 320 + width: Math.max(window.innerWidth * 0.4, 400), + height: Math.max(window.innerHeight * 0.6, 400) }); } }); diff --git a/js/plugins/tooltip.js b/js/plugins/tooltip.js index 2b2b167..215bdd8 100644 --- a/js/plugins/tooltip.js +++ b/js/plugins/tooltip.js @@ -6,8 +6,8 @@ tinymce.PluginManager.add('bs_tooltip', function(editor, url) { tinymce.activeEditor.windowManager.open({ title: 'Tooltip', url: url + '/tooltip.html', - width: 480, - height: 320 + width: Math.max(window.innerWidth * 0.4, 400), + height: Math.max(window.innerHeight * 0.6, 400) }); } });