Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert <script> based HTML5 standart #403

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function getOptions( $string )
echo $html;
?>

<script type="text/javascript">
<script>
function CCK_setOptions(type) {
var elem = jQuery("#jform_params_"+type);
var len = type.length + 1;
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_cck/views/field/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
Helper_Display::quickCopyright();
?>

<script type="text/javascript">
<script>
(function ($){
JCck.Dev = {
doTranslation:"<?php echo JCck::getConfig_Param( 'language_jtext', 0 ); ?>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
Helper_Display::quickCopyright();
?>

<script type="text/javascript">
<script>
(function ($){
JCck.Dev = {
submit: function(task) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
</div>
</div>

<script type="text/javascript">
<script>
jQuery(document).ready(function($) {
$(".app-download").on("click", function() {
var id = $(this).attr("data-id");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
?>

<script type="text/javascript">
<script>
<?php echo $this->config['submit']; ?> = function(task) { <?php echo $js; ?> }
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
JFactory::getDocument()->addStyleDeclaration( $css );
?>

<script type="text/javascript">
<script>
<?php echo $this->config['submit']; ?> = function(task) { <?php echo $js; ?> }
Joomla.submitbutton = function(task, cid)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
JText::script( 'COM_CCK_GET_FIELDS_FROM_VIEW_CONFIRM' );
?>

<script type="text/javascript">
<script>
(function ($){
JCck.Dev = {
block_item:<?php echo $block_item; ?>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<div class="layers" id="layer_fields" <?php echo ( $this->item->layer == 'fields' ) ? '' : 'style="display: none;"'; ?>><?php include_once __DIR__.'/edit_fields_'.$this->uix.'.php'; ?></div>
<div class="layers" id="layer_configuration" <?php echo ( $this->item->layer == 'configuration' ) ? '' : 'style="display: none;"'; ?>><?php include_once __DIR__.'/edit_configuration.php'; ?></div>
<div class="layers" id="layer_template" <?php echo ( $this->item->layer == 'template' ) ? '' : 'style="display: none;"'; ?>><?php include_once __DIR__.'/edit_template.php'; ?></div>
<script type="text/javascript">
<script>
JCck.DevHelper.setSidebar();
(function ($){
$("#pos-1 input:radio[name='positions']").prop("checked", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
Helper_Display::quickCopyright();
?>

<script type="text/javascript">
<script>
Joomla.submitbutton = function(task)
{
JCck.submitForm(task, document.getElementById('adminForm'));
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_cck/views/site/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
Helper_Display::quickCopyright();
?>

<script type="text/javascript">
<script>
(function ($){
JCck.Dev = {
submit: function(task) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
Helper_Display::quickCopyright();
?>

<script type="text/javascript">
<script>
(function ($){
JCck.Dev = {
submit: function(task) {
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_cck/views/type/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
JText::script( 'COM_CCK_GET_FIELDS_FROM_VIEW_CONFIRM' );
?>

<script type="text/javascript">
<script>
(function ($){
JCck.Dev = {
block_item:0,
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_cck/views/type/tmpl/edit2.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<div class="layers" id="layer_fields" <?php echo ( $this->item->layer == 'fields' ) ? '' : 'style="display: none;"'; ?>><?php include_once __DIR__.'/edit_fields_'.$this->uix.'.php'; ?></div>
<div class="layers" id="layer_configuration" <?php echo ( $this->item->layer == 'configuration' ) ? '' : 'style="display: none;"'; ?>><?php include_once __DIR__.'/edit_configuration.php'; ?></div>
<div class="layers" id="layer_template" <?php echo ( $this->item->layer == 'template' ) ? '' : 'style="display: none;"'; ?>><?php include_once __DIR__.'/edit_template.php'; ?></div>
<script type="text/javascript">
<script>
JCck.DevHelper.setSidebar();
(function ($){
$("#pos-1 input:radio[name='positions']").prop("checked", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
</div>
<div class="clr" id="seblod-cleaner"></div>

<script type="text/javascript">
<script>
jQuery(document).ready(function($){
$("div#scroll").slideToggle();
$(document).on("click", "#more_positions", function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Helper_Include::addDependencies( $this->getName(), $this->getLayout() );
?>

<script type="text/javascript">
<script>
Joomla.submitbutton = function(task)
{
JCck.submitForm(task, document.getElementById('adminForm'));
Expand Down
4 changes: 2 additions & 2 deletions components/com_cck/helpers/helper_include.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public static function addValidation( $rules, $options, $id = '', &$config = arr

if ( $app->input->get( 'tmpl' ) == 'raw' ) {
echo '<link rel="stylesheet" href="'.$root.'/media/cck/css/cck.validation-3.9.0.css" type="text/css" />';
echo '<script src="'.$root.'/media/cck/js/cck.validation-3.11.1.min.js" type="text/javascript"></script>';
echo '<script type="text/javascript">'.$js.'</script>';
echo '<script src="'.$root.'/media/cck/js/cck.validation-3.11.1.min.js"></script>';
echo '<script>'.$js.'</script>';
} else {
$doc->addStyleSheet( $root.'/media/cck/css/cck.validation-3.9.0.css' );
$doc->addScript( $root.'/media/cck/js/cck.validation-3.11.1.min.js' );
Expand Down
2 changes: 1 addition & 1 deletion components/com_cck/views/form/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
$js = 'if (jQuery("#'.$this->form_id.'").isStillReady() === true) { jQuery("#'.$this->form_id.' input[name=\'config[unique]\']").val("'.$this->unique.'"); JCck.Core.submitForm(task, document.getElementById("'.$this->form_id.'")); }';
}
?>
<script type="text/javascript">
<script>
<?php echo $this->config['submit']; ?> = function(task) { <?php echo $js; ?> }
</script>
<?php
Expand Down
4 changes: 2 additions & 2 deletions components/com_cck/views/list/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
}
}
?>
<script type="text/javascript">
<script>
(function ($){
JCck.Core.loadmore = function(more,stop,search) {
var elem = "<?php echo $pre; ?>.cck-loading-more";
Expand Down Expand Up @@ -161,7 +161,7 @@
}
$url = JUri::getInstance()->toString( array( 'scheme', 'host', 'port' ) ).$url;
?>
<script type="text/javascript">
<script>
(function ($){
JCck.Core.loadfragment = JCck.Core.getModal(<?php echo $this->json_resource ? $this->json_resource : '{}'; ?>);
$(document).ready(function() {
Expand Down
2 changes: 1 addition & 1 deletion libraries/cck/construction/field/cck.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ protected function _addScripts( $id, $events, $format )
$js = 'jQuery(document).ready(function($){'.$js.' '.$js2.' '.$js3.$js4.'});';

if ( $format == 'raw' ) {
return '<script type="text/javascript">'.$js.'</script>';
return '<script>'.$js.'</script>';
} else {
$doc->addScriptDeclaration( $js );
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/cck/construction/field/cckjs.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ protected function _addScripts( $id, $events, $format )
$js = 'jQuery(document).ready(function($){'.$js.' '.$js2.' '.$js3.'});';

if ( $format == 'raw' ) {
return '<script type="text/javascript">'.$js.'</script>';
return '<script>'.$js.'</script>';
} else {
$doc->addScriptDeclaration( $js );
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/cck/construction/field/cckpicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected function _addScripts( $id, $params, $format )
$js = 'jQuery(document).ready(function($){'.$js.'});';

if ( $format == 'raw' ) {
return '<script type="text/javascript">'.$js.'</script>';
return '<script>'.$js.'</script>';
} else {
$doc->addScriptDeclaration( $js );
}
Expand Down
4 changes: 2 additions & 2 deletions libraries/cck/rendering/rendering.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ public function finalize()
$js = '(function ($){'.$js."\n".'$(document).ready(function(){'.$this->js.'});})(jQuery);';

if ( $tmpl == 'raw' ) {
echo '<script type="text/javascript">'.$js.'</script>';
echo '<script>'.$js.'</script>';
} else {
$doc->addScriptDeclaration( $js );
}
Expand All @@ -410,7 +410,7 @@ public function finalize()
$js = '(function ($){$(window).load(function(){'.$this->js2.'});})(jQuery);';

if ( $tmpl == 'raw' ) {
echo '<script type="text/javascript">'.$js.'</script>';
echo '<script>'.$js.'</script>';
} else {
$doc->addScriptDeclaration( $js );
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/cck/cck.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public static function loadjQuery( $noconflict = true, $more = true, $dev = fals
} elseif ( is_array( $dev ) && count( $dev ) ) {
if ( $app->input->get( 'tmpl' ) == 'raw' ) {
foreach ( $dev as $v ) {
echo '<script src="'.$root.'/media/cck/js/'.$v.'" type="text/javascript"></script>';
echo '<script src="'.$root.'/media/cck/js/'.$v.'"></script>';
}
} else {
foreach ( $dev as $v ) {
Expand Down
4 changes: 2 additions & 2 deletions libraries/cms/cck/dev.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static function forceStorage( $value = 'none', $allowed = '' )
$js = 'if ( !$("#myid").val() ) { $("#storage").val( "'.$value.'" ); $("#force_storage").val( "1" ); }';
}

echo '<script type="text/javascript">jQuery(document).ready(function($){'.$js.'});</script>';
echo '<script>jQuery(document).ready(function($){'.$js.'});</script>';
}

public static function getMergedScript( $url )
Expand Down Expand Up @@ -359,7 +359,7 @@ public static function initScript( $type, &$elem, $options = array() )
echo '<style type="text/css">'.$css.'</style>';
}
if ( $js || $js2 ) {
echo '<script type="text/javascript">'.'jQuery(document).ready(function($){'.$js.$js2.'});'.$js3.'</script>';
echo '<script>'.'jQuery(document).ready(function($){'.$js.$js2.'});'.$js3.'</script>';
}

return;
Expand Down
4 changes: 2 additions & 2 deletions libraries/cms/cck/dev/tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static function open( $selector, $id, $text )
'active'=>$active,
'title' => $text
) );
$html .= '<script type="text/javascript">'.$js.'</script>';
$html .= '<script>'.$js.'</script>';
}

return $html;
Expand All @@ -63,7 +63,7 @@ public static function start( $selector, $id, $text, $params )
) );

$js .= JLayoutHelper::render( 'libraries.cms.html.bootstrap.starttabsetscript', array( 'selector' => $selector ) );;
$html .= '<script type="text/javascript">'.$js.'</script>';
$html .= '<script>'.$js.'</script>';
}

return $html;
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/cck/plugin/field.php
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ public static function g_addProcess( $event, $type, &$config, $params, $priority
public static function g_addScriptDeclaration( $script )
{
if ( JFactory::getApplication()->input->get( 'tmpl' ) == 'raw' ) {
echo '<script type="text/javascript">jQuery(document).ready(function($){'.$script.'});</script>';
echo '<script>jQuery(document).ready(function($){'.$script.'});</script>';
} else {
JFactory::getDocument()->addScriptDeclaration( 'jQuery(document).ready(function($){'.$script.'});' );
}
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_cck_form/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
$js = 'if (jQuery("#'.$formId.'").isStillReady() === true) { jQuery("#'.$formId.' input[name=\'config[unique]\']").val("'.$formId.'"); JCck.Core.submitForm("save", document.getElementById("'.$formId.'")); }';
}
?>
<script type="text/javascript">
<script>
<?php echo $config['submit']; ?> = function(task) { <?php echo $js; ?> }
</script>
<?php
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_cck_search/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
$js = 'JCck.Core.submitForm("search", document.getElementById("'.$formId.'"));';
}
?>
<script type="text/javascript">
<script>
<?php echo $config['submit']; ?> = function(task) { <?php echo $js; ?> }
</script>
<?php
Expand Down
2 changes: 1 addition & 1 deletion plugins/cck_field/button_free/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</ul>
</div>

<script type="text/javascript">
<script>
jQuery(document).ready(function($) {
$('#json_options2_icon').isVisibleWhen('bool6','1,2,3',false);
$('#bool3').isVisibleWhen('bool2','1,2');
Expand Down
2 changes: 1 addition & 1 deletion plugins/cck_field/button_submit/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
</ul>
</div>

<script type="text/javascript">
<script>
jQuery(document).ready(function($) {
$('#bool6').isVisibleWhen('bool','1');
$('#blank_li3').isVisibleWhen('bool','0');
Expand Down
6 changes: 3 additions & 3 deletions plugins/cck_field/calendar/calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ protected static function _addScripts( $params = array() )
echo '<link rel="stylesheet" href="'.self::$path.'assets/css/jscal2.css'.'" type="text/css" />';
echo '<link rel="stylesheet" href="'.self::$path.'assets/css/border-radius.css'.'" type="text/css" />';
echo '<link rel="stylesheet" href="'.self::$path.'assets/css/theme/'.$params['theme'].'/'.$params['theme'].'.css'.'" type="text/css" />';
echo '<script src="'.self::$path.'assets/js/jscal2.js'.'" type="text/javascript"></script>';
echo '<script src="'.self::$path.$path.'" type="text/javascript"></script>';
echo '<script src="'.self::$path.'assets/js/jscal2.js'.'"></script>';
echo '<script src="'.self::$path.$path.'"></script>';
} else {
$doc->addStyleSheet( self::$path.'assets/css/jscal2.css' );
$doc->addStyleSheet( self::$path.'assets/css/border-radius.css' );
Expand All @@ -352,7 +352,7 @@ protected static function _addScripts( $params = array() )
protected static function _addScript( $id, $params = array() )
{
$js = '
<script type="text/javascript">
<script>
var cal = Calendar.setup({';
if ( $params['type'] == 'form' ) {
$id1 = $id;
Expand Down
2 changes: 1 addition & 1 deletion plugins/cck_field/calendar/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</ul>
</div>

<script type="text/javascript">
<script>
jQuery(document).ready(function($) {
$('#json_options2_time_pos').isVisibleWhen('json_options2_time','12,24',false);
$('#json_options2_default_hour').isVisibleWhen('json_options2_time','0');
Expand Down
2 changes: 1 addition & 1 deletion plugins/cck_field/checkbox/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</ul>
</div>

<script type="text/javascript">
<script>
jQuery(document).ready(function($) {
$('#bool2').isVisibleWhen('bool','1',false);
});
Expand Down
2 changes: 1 addition & 1 deletion plugins/cck_field/colorpicker/colorpicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ protected static function _addScripts( $id, $params = array(), &$config = array(
';

if ( isset( $config['tmpl'] ) && $config['tmpl'] == 'ajax' ) {
echo '<script type="text/javascript">'.$js.'</script>';
echo '<script>'.$js.'</script>';
} else {
$doc->addStyleSheet( $s_css );
$doc->addScript( $s_js );
Expand Down
2 changes: 1 addition & 1 deletion plugins/cck_field/email/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</ul>
</div>

<script type="text/javascript">
<script>
jQuery(document).ready(function($) {
$('#json_options2_from_param').isVisibleWhen('json_options2_from','1,3',true,'visibility');
$('#json_options2_from_name_param').isVisibleWhen('json_options2_from_name','1,3',true,'visibility');
Expand Down
4 changes: 2 additions & 2 deletions plugins/cck_field/field_x/field_x.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,10 @@ protected static function _addScripts( $id, $params = array(), &$config = array(

if ( isset( $config['tmpl'] ) && $config['tmpl'] == 'ajax' ) {
echo '<link rel="stylesheet" href="'.$css_s.'" type="text/css" />';
echo '<script type="text/javascript">'.$js.'</script>';
echo '<script>'.$js.'</script>';
} elseif ( $app->input->get( 'tmpl' ) == 'raw' ) {
echo '<link rel="stylesheet" href="'.$css_s.'" type="text/css" />';
echo '<script type="text/javascript">'.$js.'</script>';
echo '<script>'.$js.'</script>';
} else {
JCck::loadjQuery();
JCck::loadjQueryUI();
Expand Down
2 changes: 1 addition & 1 deletion plugins/cck_field/group/group.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ protected static function _getHtml( $field, $group, $i, $size_group, &$config )

if ( $js ) {
if ( JFactory::getApplication()->input->get( 'tmpl' ) == 'raw' ) {
echo '<script type="text/javascript">jQuery(document).ready(function($){'.$js.'});</script>';
echo '<script>jQuery(document).ready(function($){'.$js.'});</script>';
} else {
JFactory::getDocument()->addScriptDeclaration( 'jQuery(document).ready(function($){'.$js.'});' );
}
Expand Down
Loading