Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2c439fb

Browse files
committedMar 18, 2019
Remove widget html head entries from PHP
1 parent bcaf7ad commit 2c439fb

40 files changed

+0
-416
lines changed
 

‎Swat/SwatAbstractOverlay.php

-12
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,7 @@ abstract class SwatAbstractOverlay extends SwatInputControl implements SwatState
4949
public function __construct($id = null)
5050
{
5151
parent::__construct($id);
52-
5352
$this->requires_id = true;
54-
55-
$yui = new SwatYUI(array('dom', 'event', 'container'));
56-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
57-
58-
$this->addJavaScript(
59-
'packages/swat/javascript/swat-abstract-overlay.js'
60-
);
61-
62-
$this->addJavaScript(
63-
'packages/swat/javascript/swat-z-index-manager.js'
64-
);
6553
}
6654

6755
// }}}

‎Swat/SwatAccordion.php

-7
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,7 @@ class SwatAccordion extends SwatNoteBook
4343
public function __construct($id = null)
4444
{
4545
parent::__construct($id);
46-
4746
$this->requires_id = true;
48-
49-
$yui = new SwatYUI(array('yahoo', 'dom', 'event', 'animation'));
50-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
51-
52-
$this->addStyleSheet('packages/swat/styles/swat-accordion.css');
53-
$this->addJavaScript('packages/swat/javascript/swat-accordion.js');
5447
}
5548

5649
// }}}

‎Swat/SwatActions.php

-20
Original file line numberDiff line numberDiff line change
@@ -79,26 +79,6 @@ class SwatActions extends SwatControl implements SwatUIParent
7979
*/
8080
private $selector;
8181

82-
// }}}
83-
// {{{ public function __construct()
84-
85-
/**
86-
* Creates a new actions list
87-
*
88-
* @param string $id a non-visible unique id for this widget.
89-
*
90-
* @see SwatWidget::__construct()
91-
*/
92-
public function __construct($id = null)
93-
{
94-
parent::__construct($id);
95-
96-
$yui = new SwatYUI(array('dom', 'event', 'animation'));
97-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
98-
$this->addJavaScript('packages/swat/javascript/swat-actions.js');
99-
$this->addStyleSheet('packages/swat/styles/swat-actions.css');
100-
}
101-
10282
// }}}
10383
// {{{ public function init()
10484

‎Swat/SwatButton.php

-5
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,6 @@ class SwatButton extends SwatInputControl
116116
public function __construct($id = null)
117117
{
118118
parent::__construct($id);
119-
120-
$yui = new SwatYUI(array('dom', 'event', 'animation'));
121-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
122-
$this->addJavaScript('packages/swat/javascript/swat-button.js');
123-
124119
$this->requires_id = true;
125120
}
126121

‎Swat/SwatCalendar.php

-10
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,7 @@ class SwatCalendar extends SwatControl
4141
public function __construct($id = null)
4242
{
4343
parent::__construct($id);
44-
4544
$this->requires_id = true;
46-
47-
$yui = new SwatYUI(array('dom', 'container'));
48-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
49-
50-
$this->addStyleSheet('packages/swat/styles/swat-calendar.css');
51-
$this->addJavaScript('packages/swat/javascript/swat-calendar.js');
52-
$this->addJavaScript(
53-
'packages/swat/javascript/swat-z-index-manager.js'
54-
);
5545
}
5646

5747
// }}}

‎Swat/SwatCascadeFlydown.php

-6
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,7 @@ class SwatCascadeFlydown extends SwatFlydown
5555
public function __construct($id = null)
5656
{
5757
parent::__construct($id);
58-
5958
$this->requires_id = true;
60-
61-
$yui = new SwatYUI(array('event'));
62-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
63-
64-
$this->addJavaScript('packages/swat/javascript/swat-cascade.js');
6559
}
6660

6761
// }}}

‎Swat/SwatChangeOrder.php

-9
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,6 @@ public function __construct($id = null)
5555
{
5656
parent::__construct($id);
5757
$this->requires_id = true;
58-
59-
$yui = new SwatYUI(array('dom', 'event'));
60-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
61-
62-
$this->addStyleSheet('packages/swat/styles/swat-change-order.css');
63-
$this->addJavaScript('packages/swat/javascript/swat-change-order.js');
64-
$this->addJavaScript(
65-
'packages/swat/javascript/swat-z-index-manager.js'
66-
);
6758
}
6859

6960
// }}}

‎Swat/SwatCheckAll.php

-3
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ public function __construct($id = null)
7373
{
7474
parent::__construct($id);
7575
$this->title = Swat::_('Select All');
76-
$yui = new SwatYUI(array('event'));
77-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
78-
$this->addJavaScript('packages/swat/javascript/swat-check-all.js');
7976
}
8077

8178
// }}}

‎Swat/SwatCheckboxCellRenderer.php

-6
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@ public function __construct()
9090

9191
$this->makePropertyStatic('id');
9292

93-
$yui = new SwatYUI(array('dom'));
94-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
95-
$this->addJavaScript(
96-
'packages/swat/javascript/swat-checkbox-cell-renderer.js'
97-
);
98-
9993
// auto-generate an id to use if no id is set
10094
$this->id = $this->getUniqueId();
10195
}

‎Swat/SwatCheckboxEntryList.php

-26
Original file line numberDiff line numberDiff line change
@@ -54,32 +54,6 @@ class SwatCheckboxEntryList extends SwatCheckboxList
5454
*/
5555
protected $entry_widgets = array();
5656

57-
// }}}
58-
// {{{ public function __construct()
59-
60-
/**
61-
* Creates a new checkbox entry list
62-
*
63-
* @param string $id a non-visible unique id for this widget.
64-
*
65-
* @see SwatCheckboxList::__construct()
66-
*/
67-
public function __construct($id = null)
68-
{
69-
parent::__construct($id);
70-
71-
$yui = new SwatYUI(array('dom', 'event'));
72-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
73-
74-
$this->addJavaScript(
75-
'packages/swat/javascript/swat-checkbox-entry-list.js'
76-
);
77-
78-
$this->addStyleSheet(
79-
'packages/swat/styles/swat-checkbox-entry-list.css'
80-
);
81-
}
82-
8357
// }}}
8458
// {{{ public function display()
8559

‎Swat/SwatCheckboxList.php

-4
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ public function __construct($id = null)
6666
{
6767
parent::__construct($id);
6868
$this->requires_id = true;
69-
$yui = new SwatYUI(array('event'));
70-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
71-
$this->addJavaScript('packages/swat/javascript/swat-checkbox-list.js');
72-
$this->addStyleSheet('packages/swat/styles/swat.css');
7369
}
7470

7571
// }}}

‎Swat/SwatDateEntry.php

-4
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@ public function __construct($id = null)
128128
$this->setValidRange(-20, 20);
129129

130130
$this->requires_id = true;
131-
132-
$yui = new SwatYUI(array('event'));
133-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
134-
$this->addJavaScript('packages/swat/javascript/swat-date-entry.js');
135131
}
136132

137133
// }}}

‎Swat/SwatDetailsView.php

-17
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,6 @@ class SwatDetailsView extends SwatControl implements SwatUIParent
4848
*/
4949
private $fields_by_id = array();
5050

51-
// }}}
52-
// {{{ public function __construct()
53-
54-
/**
55-
* Creates a new details view
56-
*
57-
* @param string $id a non-visible unique id for this widget.
58-
*
59-
* @see SwatWidget::__construct()
60-
*/
61-
public function __construct($id = null)
62-
{
63-
parent::__construct($id);
64-
65-
$this->addStyleSheet('packages/swat/styles/swat-details-view.css');
66-
}
67-
6851
// }}}
6952
// {{{ public function init()
7053

‎Swat/SwatDisclosure.php

-6
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ public function __construct($id = null)
3939
{
4040
parent::__construct($id);
4141
$this->requires_id = true;
42-
43-
$yui = new SwatYUI(array('dom', 'animation'));
44-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
45-
46-
$this->addJavaScript('packages/swat/javascript/swat-disclosure.js');
47-
$this->addStyleSheet('packages/swat/styles/swat-disclosure.css');
4842
}
4943

5044
// }}}

‎Swat/SwatFieldset.php

-6
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,7 @@ class SwatFieldset extends SwatDisplayableContainer implements SwatTitleable
5353
public function __construct($id = null)
5454
{
5555
parent::__construct($id);
56-
5756
$this->requires_id = true;
58-
59-
// JavaScript for IE peekaboo hack
60-
$yui = new SwatYUI(array('event'));
61-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
62-
$this->addJavaScript('packages/swat/javascript/swat-fieldset.js');
6357
}
6458

6559
// }}}

‎Swat/SwatForm.php

-9
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,6 @@ public function __construct($id = null)
256256
}
257257

258258
$this->requires_id = true;
259-
260-
$this->addJavaScript('packages/swat/javascript/swat-form.js');
261259
}
262260

263261
// }}}
@@ -325,13 +323,6 @@ public function display()
325323
$this->displayHiddenFields();
326324
$form_tag->close();
327325

328-
if ($this->connection_close_uri != '') {
329-
$yui = new SwatYUI(array('event'));
330-
$this->html_head_entry_set->addEntrySet(
331-
$yui->getHtmlHeadEntrySet()
332-
);
333-
}
334-
335326
Swat::displayInlineJavaScript($this->getInlineJavaScript());
336327
}
337328

‎Swat/SwatFrameDisclosure.php

-17
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@
99
*/
1010
class SwatFrameDisclosure extends SwatDisclosure
1111
{
12-
// {{{ public function __construct()
13-
14-
/**
15-
* Creates a new frame disclosure container
16-
*
17-
* @param string $id a non-visible unique id for this widget.
18-
*
19-
* @see SwatWidget::__construct()
20-
*/
21-
public function __construct($id = null)
22-
{
23-
parent::__construct($id);
24-
25-
$this->addStyleSheet('packages/swat/styles/swat-frame-disclosure.css');
26-
}
27-
28-
// }}}
2912
// {{{ public function display()
3013

3114
/**

‎Swat/SwatImageCropper.php

-6
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,7 @@ class SwatImageCropper extends SwatInputControl
142142
public function __construct($id = null)
143143
{
144144
parent::__construct($id);
145-
146145
$this->requires_id = true;
147-
148-
$yui = new SwatYUI(array('imagecropper'));
149-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
150-
151-
$this->addJavaScript('packages/swat/javascript/swat-image-cropper.js');
152146
}
153147

154148
// }}}

‎Swat/SwatImagePreviewDisplay.php

-17
Original file line numberDiff line numberDiff line change
@@ -153,24 +153,7 @@ class SwatImagePreviewDisplay extends SwatImageDisplay
153153
public function __construct($id = null)
154154
{
155155
parent::__construct($id);
156-
157156
$this->requires_id = true;
158-
159-
$yui = new SwatYUI(array('dom', 'event'));
160-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
161-
162-
$this->addJavaScript(
163-
'packages/swat/javascript/swat-z-index-manager.js'
164-
);
165-
166-
$this->addJavaScript(
167-
'packages/swat/javascript/swat-image-preview-display.js'
168-
);
169-
170-
$this->addStyleSheet(
171-
'packages/swat/styles/swat-image-preview-display.css'
172-
);
173-
174157
$this->title = Swat::_('View Larger Image');
175158
}
176159

‎Swat/SwatMessageDisplay.php

-11
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,7 @@ class SwatMessageDisplay extends SwatControl
7676
public function __construct($id = null)
7777
{
7878
parent::__construct($id);
79-
8079
$this->requires_id = true;
81-
82-
$yui = new SwatYUI(array('animation'));
83-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
84-
85-
$this->addJavaScript(
86-
'packages/swat/javascript/swat-message-display.js'
87-
);
88-
89-
$this->addStyleSheet('packages/swat/styles/swat-message.css');
90-
$this->addStyleSheet('packages/swat/styles/swat-message-display.css');
9180
}
9281

9382
// }}}

‎Swat/SwatMoneyCellRenderer.php

-15
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,6 @@ class SwatMoneyCellRenderer extends SwatCellRenderer
7575
*/
7676
public $null_display_value = null;
7777

78-
// }}}
79-
// {{{ public function __construct()
80-
81-
/**
82-
* Creates a money cell renderer
83-
*/
84-
public function __construct()
85-
{
86-
parent::__construct();
87-
88-
$this->addStyleSheet(
89-
'packages/swat/styles/swat-money-cell-renderer.css'
90-
);
91-
}
92-
9378
// }}}
9479
// {{{ public function render()
9580

‎Swat/SwatNoteBook.php

-6
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,7 @@ class SwatNoteBook extends SwatWidget implements SwatUIParent
8080
public function __construct($id = null)
8181
{
8282
parent::__construct($id);
83-
8483
$this->requires_id = true;
85-
86-
$yui = new SwatYUI(array('tabview'));
87-
$this->html_head_entry_set->addEntrySet($yui->getHtmlHeadEntrySet());
88-
89-
$this->addStyleSheet('packages/swat/styles/swat-note-book.css');
9084
}
9185

9286
// }}}

0 commit comments

Comments
 (0)
Please sign in to comment.