-- cgit v1.2.3 From 1f8af59dc552d1a825d3575bff8e7ed403d125ba Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 24 Jun 2010 19:44:49 +0000 Subject: Adding html5 plugin -- all it does now is provide the appropriate header --- start.php | 1 + views/default/page_elements/header.php | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 start.php create mode 100644 views/default/page_elements/header.php diff --git a/start.php b/start.php new file mode 100644 index 000000000..6fd199e66 --- /dev/null +++ b/start.php @@ -0,0 +1 @@ + + + + + + \ No newline at end of file -- cgit v1.2.3 From f9bebb9bf5580d922cca3715ef852cd28c12ff5c Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 24 Jun 2010 21:08:55 +0000 Subject: Added IE support to html5 plugin --- start.php | 11 +++++++++++ views/default/html5/css.php | 2 ++ views/default/scripts/html5.php | 3 +++ 3 files changed, 16 insertions(+) create mode 100644 views/default/html5/css.php create mode 100644 views/default/scripts/html5.php diff --git a/start.php b/start.php index 6fd199e66..6598fd887 100644 --- a/start.php +++ b/start.php @@ -1 +1,12 @@ + + \ No newline at end of file -- cgit v1.2.3 -- cgit v1.2.3 From 6bfbc7e58ba48a186d1ea9048aa949d5ebb4ffd6 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 1 Jul 2010 21:47:11 +0000 Subject: Added all valid html5 input types --- views/default/input/button.php | 9 +++++ views/default/input/checkbox.php | 9 +++++ views/default/input/color.php | 9 +++++ views/default/input/date.php | 9 +++++ views/default/input/datetime-local.php | 9 +++++ views/default/input/datetime.php | 9 +++++ views/default/input/default.php | 71 ++++++++++++++++++++++++++++++++++ views/default/input/email.php | 9 +++++ views/default/input/file.php | 10 +++++ views/default/input/hidden.php | 9 +++++ views/default/input/image.php | 9 +++++ views/default/input/month.php | 9 +++++ views/default/input/number.php | 9 +++++ views/default/input/password.php | 9 +++++ views/default/input/radio.php | 9 +++++ views/default/input/range.php | 9 +++++ views/default/input/reset.php | 9 +++++ views/default/input/search.php | 9 +++++ views/default/input/submit.php | 9 +++++ views/default/input/tel.php | 9 +++++ views/default/input/text.php | 9 +++++ views/default/input/time.php | 9 +++++ views/default/input/url.php | 9 +++++ views/default/input/week.php | 9 +++++ 24 files changed, 279 insertions(+) create mode 100644 views/default/input/button.php create mode 100644 views/default/input/checkbox.php create mode 100644 views/default/input/color.php create mode 100644 views/default/input/date.php create mode 100644 views/default/input/datetime-local.php create mode 100644 views/default/input/datetime.php create mode 100644 views/default/input/default.php create mode 100644 views/default/input/email.php create mode 100644 views/default/input/file.php create mode 100644 views/default/input/hidden.php create mode 100644 views/default/input/image.php create mode 100644 views/default/input/month.php create mode 100644 views/default/input/number.php create mode 100644 views/default/input/password.php create mode 100644 views/default/input/radio.php create mode 100644 views/default/input/range.php create mode 100644 views/default/input/reset.php create mode 100644 views/default/input/search.php create mode 100644 views/default/input/submit.php create mode 100644 views/default/input/tel.php create mode 100644 views/default/input/text.php create mode 100644 views/default/input/time.php create mode 100644 views/default/input/url.php create mode 100644 views/default/input/week.php diff --git a/views/default/input/button.php b/views/default/input/button.php new file mode 100644 index 000000000..6fc1fb762 --- /dev/null +++ b/views/default/input/button.php @@ -0,0 +1,9 @@ + 'button', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/checkbox.php b/views/default/input/checkbox.php new file mode 100644 index 000000000..ff9a4b433 --- /dev/null +++ b/views/default/input/checkbox.php @@ -0,0 +1,9 @@ + 'checkbox', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/color.php b/views/default/input/color.php new file mode 100644 index 000000000..fa8dc7497 --- /dev/null +++ b/views/default/input/color.php @@ -0,0 +1,9 @@ + 'color', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/date.php b/views/default/input/date.php new file mode 100644 index 000000000..08195afcf --- /dev/null +++ b/views/default/input/date.php @@ -0,0 +1,9 @@ + 'date', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/datetime-local.php b/views/default/input/datetime-local.php new file mode 100644 index 000000000..e3f7e1915 --- /dev/null +++ b/views/default/input/datetime-local.php @@ -0,0 +1,9 @@ + 'datetime-local', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/datetime.php b/views/default/input/datetime.php new file mode 100644 index 000000000..8cc9d9087 --- /dev/null +++ b/views/default/input/datetime.php @@ -0,0 +1,9 @@ + 'datetime', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/default.php b/views/default/input/default.php new file mode 100644 index 000000000..59ad357e7 --- /dev/null +++ b/views/default/input/default.php @@ -0,0 +1,71 @@ +$value) { + unset($vars[$key]); +} + +// backwards compatibility code +if (isset($vars['internalname'])) { + $vars['name'] = $vars['internalname']; + unset($vars['internalname']); +} + +if (isset($vars['internalid'])) { + $vars['id'] = $vars['internalid']; + unset($vars['internalid']); +} + +$js = ''; +if (isset($vars['js'])) { + $js = $vars['js']; + unset($vars['js']); +} + +// default attributes +$defaults = array( + 'type' => 'text', + 'value' => '', +); + +$attributes = array_merge($defaults, $vars); + +$attributes['value'] = htmlspecialchars($attributes['value'], ENT_QUOTES, 'UTF-8'); + + +//Build the input +$element = array(); + +$element[] = " $val) { + if ($val === TRUE) { + $element[] = $attr; + } elseif ($val !== FALSE) { + $val = addslashes($val); + $element[] = "$attr=\"$val\""; + } +} +$element[] = $js; +$element[] = "/>"; + +echo implode(" ", $tag); \ No newline at end of file diff --git a/views/default/input/email.php b/views/default/input/email.php new file mode 100644 index 000000000..2b1dcfe7b --- /dev/null +++ b/views/default/input/email.php @@ -0,0 +1,9 @@ + 'email', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/file.php b/views/default/input/file.php new file mode 100644 index 000000000..4fdc24947 --- /dev/null +++ b/views/default/input/file.php @@ -0,0 +1,10 @@ + 'file', + 'value' => FALSE, +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/hidden.php b/views/default/input/hidden.php new file mode 100644 index 000000000..422d6449a --- /dev/null +++ b/views/default/input/hidden.php @@ -0,0 +1,9 @@ + 'hidden', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/image.php b/views/default/input/image.php new file mode 100644 index 000000000..8b0a6728d --- /dev/null +++ b/views/default/input/image.php @@ -0,0 +1,9 @@ + 'image', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/month.php b/views/default/input/month.php new file mode 100644 index 000000000..cad6562a9 --- /dev/null +++ b/views/default/input/month.php @@ -0,0 +1,9 @@ + 'month', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/number.php b/views/default/input/number.php new file mode 100644 index 000000000..0944f8034 --- /dev/null +++ b/views/default/input/number.php @@ -0,0 +1,9 @@ + 'number', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/password.php b/views/default/input/password.php new file mode 100644 index 000000000..21ed2bea0 --- /dev/null +++ b/views/default/input/password.php @@ -0,0 +1,9 @@ + 'password', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/radio.php b/views/default/input/radio.php new file mode 100644 index 000000000..bce969b07 --- /dev/null +++ b/views/default/input/radio.php @@ -0,0 +1,9 @@ + 'radio', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/range.php b/views/default/input/range.php new file mode 100644 index 000000000..3c93d49c2 --- /dev/null +++ b/views/default/input/range.php @@ -0,0 +1,9 @@ + 'range', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/reset.php b/views/default/input/reset.php new file mode 100644 index 000000000..eb92982c6 --- /dev/null +++ b/views/default/input/reset.php @@ -0,0 +1,9 @@ + 'reset', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/search.php b/views/default/input/search.php new file mode 100644 index 000000000..33fa4d4ff --- /dev/null +++ b/views/default/input/search.php @@ -0,0 +1,9 @@ + 'search', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/submit.php b/views/default/input/submit.php new file mode 100644 index 000000000..32ffb8087 --- /dev/null +++ b/views/default/input/submit.php @@ -0,0 +1,9 @@ + 'submit', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/tel.php b/views/default/input/tel.php new file mode 100644 index 000000000..973bb9311 --- /dev/null +++ b/views/default/input/tel.php @@ -0,0 +1,9 @@ + 'tel', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/text.php b/views/default/input/text.php new file mode 100644 index 000000000..b952108f4 --- /dev/null +++ b/views/default/input/text.php @@ -0,0 +1,9 @@ + 'text', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/time.php b/views/default/input/time.php new file mode 100644 index 000000000..c6b1c458b --- /dev/null +++ b/views/default/input/time.php @@ -0,0 +1,9 @@ + 'time', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/url.php b/views/default/input/url.php new file mode 100644 index 000000000..5068da207 --- /dev/null +++ b/views/default/input/url.php @@ -0,0 +1,9 @@ + 'url', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/week.php b/views/default/input/week.php new file mode 100644 index 000000000..d34758eca --- /dev/null +++ b/views/default/input/week.php @@ -0,0 +1,9 @@ + 'week', +); + +$args = array_merge($vars, $overrides); + +echo elgg_view('input/default', $args); \ No newline at end of file -- cgit v1.2.3 From 0945a838dffa647b16eb1e9e7a4ad212eb4aa8c1 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 1 Jul 2010 21:47:53 +0000 Subject: Added a manifest.xml file --- manifest.xml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 manifest.xml diff --git a/manifest.xml b/manifest.xml new file mode 100644 index 000000000..c48ca01a3 --- /dev/null +++ b/manifest.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file -- cgit v1.2.3 From bd0fb6d30186d70105a4df10f4dbb1a86f3f6952 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Fri, 2 Jul 2010 09:47:48 +0000 Subject: Forgot to bootstrap the html5_init function! --- start.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/start.php b/start.php index 6598fd887..44e4be096 100644 --- a/start.php +++ b/start.php @@ -8,5 +8,6 @@ function html5_init() { elgg_extend_view('css', 'html5/css'); elgg_view_register_simplecache('scripts/html5'); - elgg_view_register_simplecache('html5/css'); -} \ No newline at end of file +} + +register_elgg_event_handler('init', 'system', 'html5_init'); -- cgit v1.2.3 From 434e44174ab3689a15d0d23deeaa191c6695fcf8 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Wed, 7 Jul 2010 00:18:13 +0000 Subject: Changed $tag to $element in html5 input/default which was causing inputs to not be displayed --- views/default/input/default.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/views/default/input/default.php b/views/default/input/default.php index 59ad357e7..050e3b765 100644 --- a/views/default/input/default.php +++ b/views/default/input/default.php @@ -50,9 +50,6 @@ $defaults = array( $attributes = array_merge($defaults, $vars); -$attributes['value'] = htmlspecialchars($attributes['value'], ENT_QUOTES, 'UTF-8'); - - //Build the input $element = array(); @@ -61,11 +58,10 @@ foreach ($attributes as $attr => $val) { if ($val === TRUE) { $element[] = $attr; } elseif ($val !== FALSE) { - $val = addslashes($val); $element[] = "$attr=\"$val\""; } } $element[] = $js; $element[] = "/>"; -echo implode(" ", $tag); \ No newline at end of file +echo implode(" ", $element); \ No newline at end of file -- cgit v1.2.3 From 221090bb40a53622d990b63432160729e6d02aa5 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Fri, 16 Jul 2010 20:28:02 +0000 Subject: Escapes input attribute values with htmlspecialchars and removes default empty value from default inputs --- views/default/input/default.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/default/input/default.php b/views/default/input/default.php index 050e3b765..0577b34e5 100644 --- a/views/default/input/default.php +++ b/views/default/input/default.php @@ -45,7 +45,6 @@ if (isset($vars['js'])) { // default attributes $defaults = array( 'type' => 'text', - 'value' => '', ); $attributes = array_merge($defaults, $vars); @@ -58,6 +57,7 @@ foreach ($attributes as $attr => $val) { if ($val === TRUE) { $element[] = $attr; } elseif ($val !== FALSE) { + $val = htmlspecialchars($val); $element[] = "$attr=\"$val\""; } } -- cgit v1.2.3 From 8913932d656671e64aa6f63a77f9b364011816d8 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Fri, 16 Jul 2010 20:55:48 +0000 Subject: changed doctype to lower case --- views/default/page_elements/header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/default/page_elements/header.php b/views/default/page_elements/header.php index c50831043..13e2f6e01 100644 --- a/views/default/page_elements/header.php +++ b/views/default/page_elements/header.php @@ -15,7 +15,7 @@ header('Content-type: text/html; charset=utf-8'); ?> - + \ No newline at end of file -- cgit v1.2.3 From c7cab3a3bde627d52d94b4d99dd7372d85759c53 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Fri, 16 Jul 2010 23:49:54 +0000 Subject: HTML5 plugin no longer uses custom page_elements/head view --- views/default/page_elements/header.php | 76 +++++++++++++++++++++++++++++++--- 1 file changed, 71 insertions(+), 5 deletions(-) diff --git a/views/default/page_elements/header.php b/views/default/page_elements/header.php index 13e2f6e01..a69f79cba 100644 --- a/views/default/page_elements/header.php +++ b/views/default/page_elements/header.php @@ -1,21 +1,87 @@ sitename; +} else if (empty($vars['config']->sitename)) { + $title = $vars['title']; +} else { + $title = $vars['config']->sitename . ": " . $vars['title']; +} + +global $autofeed; +if (isset($autofeed) && $autofeed == true) { + $url = $url2 = full_url(); + if (substr_count($url,'?')) { + $url .= "&view=rss"; + } else { + $url .= "?view=rss"; + } + if (substr_count($url2,'?')) { + $url2 .= "&view=odd"; + } else { + $url2 .= "?view=opendd"; + } + $feedref = << + + +END; +} else { + $feedref = ""; +} + // we won't trust server configuration but specify utf-8 header('Content-type: text/html; charset=utf-8'); +$version = get_version(); +$release = get_version(true); ?> - - - \ No newline at end of file + + + + + <?php echo $title; ?> + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 182e0ce5039262e5ec2afb9166ea10d8bacafffd Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Tue, 27 Jul 2010 00:50:47 +0000 Subject: Date now provides a placeholder hint by default to show what the format of the date should be. --- views/default/input/date.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/views/default/input/date.php b/views/default/input/date.php index 08195afcf..b347f835d 100644 --- a/views/default/input/date.php +++ b/views/default/input/date.php @@ -1,9 +1,10 @@ 'yyyy-mm-dd', +); $overrides = array( 'type' => 'date', ); -$args = array_merge($vars, $overrides); - -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file -- cgit v1.2.3 From 9ab7cf5f022c699b3ebcb5fc2d11e30f24beb802 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Wed, 4 Aug 2010 07:51:25 +0000 Subject: Added application cache support to really make things zippy! --- cache.manifest.php | 32 ++++++++++++++++++++++++++++++++ views/default/page_elements/header.php | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 cache.manifest.php diff --git a/cache.manifest.php b/cache.manifest.php new file mode 100644 index 000000000..db963aeef --- /dev/null +++ b/cache.manifest.php @@ -0,0 +1,32 @@ +lastcache} + +CACHE: +# CSS +{$CONFIG->url}_css/css.css?lastcache={$CONFIG->lastcache}&viewtype=$viewtype + +# Scripts +{$CONFIG->url}vendors/jquery/jquery-1.3.2.min.js +{$CONFIG->url}vendors/jquery/jquery-ui-1.7.2.min.js +{$CONFIG->url}vendors/jquery/jquery.form.js +{$CONFIG->url}vendors/jquery/jquery.easing.1.3.packed.js +{$CONFIG->url}_css/js.php?js=initialise_elgg&viewtype=$viewtype&lastcache={$CONFIG->lastcache} +{$CONFIG->url}_css/js.php?js=friendsPickerv1&viewtype=$viewtype&lastcache={$CONFIG->lastcache} + +NETWORK: +* + +MANIFEST; + +echo $manifest; \ No newline at end of file diff --git a/views/default/page_elements/header.php b/views/default/page_elements/header.php index a69f79cba..65166c3dc 100644 --- a/views/default/page_elements/header.php +++ b/views/default/page_elements/header.php @@ -52,7 +52,7 @@ $version = get_version(); $release = get_version(true); ?> - + -- cgit v1.2.3 From 73d0be2e63fdeed67193e1e89c859a09468a3c4d Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Wed, 4 Aug 2010 08:13:54 +0000 Subject: Updating cache manifest to match external js includes exactly --- cache.manifest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cache.manifest.php b/cache.manifest.php index db963aeef..4d002efaa 100644 --- a/cache.manifest.php +++ b/cache.manifest.php @@ -21,8 +21,8 @@ CACHE: {$CONFIG->url}vendors/jquery/jquery-ui-1.7.2.min.js {$CONFIG->url}vendors/jquery/jquery.form.js {$CONFIG->url}vendors/jquery/jquery.easing.1.3.packed.js -{$CONFIG->url}_css/js.php?js=initialise_elgg&viewtype=$viewtype&lastcache={$CONFIG->lastcache} -{$CONFIG->url}_css/js.php?js=friendsPickerv1&viewtype=$viewtype&lastcache={$CONFIG->lastcache} +{$CONFIG->url}_css/js.php?lastcache={$CONFIG->lastcache}&js=initialise_elgg&viewtype=$viewtype +{$CONFIG->url}_css/js.php?lastcache={$CONFIG->lastcache}&js=friendsPickerv1&viewtype=$viewtype NETWORK: * -- cgit v1.2.3 From d29340b0fda7a768f6941088808de7e9e41aa616 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Wed, 4 Aug 2010 17:57:18 +0000 Subject: Updating date-related inputs to accept timestamps as well as string input --- views/default/input/date.php | 4 ++++ views/default/input/datetime-local.php | 9 +++++++-- views/default/input/datetime.php | 9 +++++++-- views/default/input/month.php | 9 +++++++-- 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/views/default/input/date.php b/views/default/input/date.php index b347f835d..7e35c7beb 100644 --- a/views/default/input/date.php +++ b/views/default/input/date.php @@ -7,4 +7,8 @@ $overrides = array( 'type' => 'date', ); +if (isset($vars['value']) && is_int($vars['value'])) { + $vars['value'] = date("Y-m-d", $vars['value']); +} + echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/datetime-local.php b/views/default/input/datetime-local.php index e3f7e1915..9b67a7b67 100644 --- a/views/default/input/datetime-local.php +++ b/views/default/input/datetime-local.php @@ -1,9 +1,14 @@ 'yyyy-mm-ddThh:mm:ss+hh:mm', +); $overrides = array( 'type' => 'datetime-local', ); -$args = array_merge($vars, $overrides); +if (isset($vars['value']) && is_int($vars['value'])) { + $vars['value'] = date("c", $vars['value']); +} -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/datetime.php b/views/default/input/datetime.php index 8cc9d9087..d7d0a4291 100644 --- a/views/default/input/datetime.php +++ b/views/default/input/datetime.php @@ -1,9 +1,14 @@ 'yyyy-mm-ddThh:mm:ss', +); $overrides = array( 'type' => 'datetime', ); -$args = array_merge($vars, $overrides); +if (isset($vars['value']) && is_int($vars['value'])) { + $vars['value'] = date("Y-m-d\TH:i:s", $vars['value']); +} -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/month.php b/views/default/input/month.php index cad6562a9..01ecae384 100644 --- a/views/default/input/month.php +++ b/views/default/input/month.php @@ -1,9 +1,14 @@ 'yyyy-mm', +); $overrides = array( 'type' => 'month', ); -$args = array_merge($vars, $overrides); +if (isset($vars['value']) && is_int($vars['value'])) { + $vars['value'] = date("Y-m", $vars['value']); +} -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file -- cgit v1.2.3 From 53094c560710a320455d180561f528b4c5ffc85c Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 5 Aug 2010 18:42:33 +0000 Subject: Had the semantics of datetime and datetime-local reversed --- views/default/input/datetime-local.php | 4 ++-- views/default/input/datetime.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/views/default/input/datetime-local.php b/views/default/input/datetime-local.php index 9b67a7b67..14bcac633 100644 --- a/views/default/input/datetime-local.php +++ b/views/default/input/datetime-local.php @@ -1,6 +1,6 @@ 'yyyy-mm-ddThh:mm:ss+hh:mm', + 'placeholder' => 'yyyy-mm-ddThh:mm:ss', ); $overrides = array( @@ -8,7 +8,7 @@ $overrides = array( ); if (isset($vars['value']) && is_int($vars['value'])) { - $vars['value'] = date("c", $vars['value']); + $vars['value'] = date("Y-m-d\TH:i:s", $vars['value']); } echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/datetime.php b/views/default/input/datetime.php index d7d0a4291..3a5f39bcb 100644 --- a/views/default/input/datetime.php +++ b/views/default/input/datetime.php @@ -1,6 +1,6 @@ 'yyyy-mm-ddThh:mm:ss', + 'placeholder' => 'yyyy-mm-ddThh:mm:ss+hh:mm', ); $overrides = array( @@ -8,7 +8,7 @@ $overrides = array( ); if (isset($vars['value']) && is_int($vars['value'])) { - $vars['value'] = date("Y-m-d\TH:i:s", $vars['value']); + $vars['value'] = date("c", $vars['value']); } echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file -- cgit v1.2.3 From 58a11a216ffb1f34984d47ffbda6eaa23763dd6e Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Fri, 13 Aug 2010 07:02:26 +0000 Subject: Removes cache manifest (not appropriate for use with elgg). --- cache.manifest.php | 32 -------------------------------- views/default/page_elements/header.php | 2 +- 2 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 cache.manifest.php diff --git a/cache.manifest.php b/cache.manifest.php deleted file mode 100644 index 4d002efaa..000000000 --- a/cache.manifest.php +++ /dev/null @@ -1,32 +0,0 @@ -lastcache} - -CACHE: -# CSS -{$CONFIG->url}_css/css.css?lastcache={$CONFIG->lastcache}&viewtype=$viewtype - -# Scripts -{$CONFIG->url}vendors/jquery/jquery-1.3.2.min.js -{$CONFIG->url}vendors/jquery/jquery-ui-1.7.2.min.js -{$CONFIG->url}vendors/jquery/jquery.form.js -{$CONFIG->url}vendors/jquery/jquery.easing.1.3.packed.js -{$CONFIG->url}_css/js.php?lastcache={$CONFIG->lastcache}&js=initialise_elgg&viewtype=$viewtype -{$CONFIG->url}_css/js.php?lastcache={$CONFIG->lastcache}&js=friendsPickerv1&viewtype=$viewtype - -NETWORK: -* - -MANIFEST; - -echo $manifest; \ No newline at end of file diff --git a/views/default/page_elements/header.php b/views/default/page_elements/header.php index 65166c3dc..a69f79cba 100644 --- a/views/default/page_elements/header.php +++ b/views/default/page_elements/header.php @@ -52,7 +52,7 @@ $version = get_version(); $release = get_version(true); ?> - + -- cgit v1.2.3 From f836bb2d109261a9b1bcdb2de4d6f8274df73e38 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Fri, 13 Aug 2010 07:03:23 +0000 Subject: Add's Modernizr (html5 feature detection library) + support for placeholders in browsers that don't support it natively. --- js/Modernizr-1.5.min.js | 28 ++++++++++++++++++++ js/jquery.placeholder-1.0.1.js | 58 +++++++++++++++++++++++++++++++++++++++++ start.php | 6 +---- views/default/js/html5.php | 12 +++++++++ views/default/scripts/html5.php | 3 --- 5 files changed, 99 insertions(+), 8 deletions(-) create mode 100644 js/Modernizr-1.5.min.js create mode 100644 js/jquery.placeholder-1.0.1.js create mode 100644 views/default/js/html5.php delete mode 100644 views/default/scripts/html5.php diff --git a/js/Modernizr-1.5.min.js b/js/Modernizr-1.5.min.js new file mode 100644 index 000000000..a8dc724e6 --- /dev/null +++ b/js/Modernizr-1.5.min.js @@ -0,0 +1,28 @@ +/*! + * Modernizr JavaScript library 1.5 + * http://www.modernizr.com/ + * + * Copyright (c) 2009-2010 Faruk Ates - http://farukat.es/ + * Dual-licensed under the BSD and MIT licenses. + * http://www.modernizr.com/license/ + * + * Featuring major contributions by + * Paul Irish - http://paulirish.com + */ + window.Modernizr=function(i,e,I){function C(a,b){for(var c in a)if(m[a[c]]!==I&&(!b||b(a[c],D)))return true}function r(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);return!!C([a,"Webkit"+c,"Moz"+c,"O"+c,"ms"+c,"Khtml"+c],b)}function P(){j[E]=function(a){for(var b=0,c=a.length;b7)};d.historymanagement=function(){return!!(i.history&&history.pushState)};d.draganddrop=function(){return u("drag")&&u("dragstart")&&u("dragenter")&&u("dragover")&&u("dragleave")&&u("dragend")&&u("drop")};d.websockets=function(){return"WebSocket"in i};d.rgba=function(){m.cssText="background-color:rgba(150,255,150,.5)";return(""+m.backgroundColor).indexOf("rgba")!==-1};d.hsla=function(){m.cssText="background-color:hsla(120,40%,100%,.5)";return(""+ + m.backgroundColor).indexOf("rgba")!==-1};d.multiplebgs=function(){m.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(m.background)};d.backgroundsize=function(){return r("backgroundSize")};d.borderimage=function(){return r("borderImage")};d.borderradius=function(){return r("borderRadius","",function(a){return(""+a).indexOf("orderRadius")!==-1})};d.boxshadow=function(){return r("boxShadow")};d.opacity=function(){var a=y.join("opacity:.5;")+"";m.cssText=a;return(""+m.opacity).indexOf("0.5")!== + -1};d.cssanimations=function(){return r("animationName")};d.csscolumns=function(){return r("columnCount")};d.cssgradients=function(){var a=("background-image:"+y.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+y.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);m.cssText=a;return(""+m.backgroundImage).indexOf("gradient")!==-1};d.cssreflections=function(){return r("boxReflect")};d.csstransforms=function(){return!!C(["transformProperty", + "WebkitTransform","MozTransform","OTransform","msTransform"])};d.csstransforms3d=function(){var a=!!C(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);if(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent="@media ("+y.join("transform-3d),(")+"modernizr){#modernizr{height:3px}}";e.getElementsByTagName("head")[0].appendChild(b);c.id="modernizr";s.appendChild(c);a=c.offsetHeight===3;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}return a}; + d.csstransitions=function(){return r("transitionProperty")};d.fontface=function(){var a;if(/*@cc_on@if(@_jscript_version>=5)!@end@*/0)a=true;else{var b=e.createElement("style"),c=e.createElement("span"),h,t=false,g=e.body,o,w;b.textContent="@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAAAAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAAAAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAAAK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZXAwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAAAAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDAAAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoAAwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC88sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCqv1WIgJmAAACAFUAAAIRAc0ADwAfAAATFRQWOwEyNj0BNCYrASIGARQGKwEiJj0BNDY7ATIWFX8aIvAiGhoi8CIaAZIoN/43KCg3/jcoAWD0JB4eJPQkHh7++EY2NkbVRjY2RgAAAAABAEH/+QCdAEEACQAANjQ2MzIWFAYjIkEeEA8fHw8QDxwWFhwWAAAAAQAAAAIAAIuYbWpfDzz1AAsEAAAAAADFn9IuAAAAAMWf0i797/8zA4gDMwAAAAgAAgAAAAAAAAABAAADM/8zAFwDx/3v/98DiAABAAAAAAAAAAAAAAAAAAAABQF2ACIAAAAAAVUAAAJmAFUA3QBBAAAAKgAqACoAWgBuAAEAAAAFAFAABwBUAAQAAgAAAAEAAQAAAEAALgADAAMAAAAQAMYAAQAAAAAAAACLAAAAAQAAAAAAAQAhAIsAAQAAAAAAAgAFAKwAAQAAAAAAAwBDALEAAQAAAAAABAAnAPQAAQAAAAAABQAKARsAAQAAAAAABgAmASUAAQAAAAAADgAaAUsAAwABBAkAAAEWAWUAAwABBAkAAQBCAnsAAwABBAkAAgAKAr0AAwABBAkAAwCGAscAAwABBAkABABOA00AAwABBAkABQAUA5sAAwABBAkABgBMA68AAwABBAkADgA0A/tDb3B5cmlnaHQgMjAwOSBieSBEYW5pZWwgSm9obnNvbi4gIFJlbGVhc2VkIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgT3BlbiBGb250IExpY2Vuc2UuIEtheWFoIExpIGdseXBocyBhcmUgcmVsZWFzZWQgdW5kZXIgdGhlIEdQTCB2ZXJzaW9uIDMuYmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhTGlnaHRiYWVjMmE5MmJmZmU1MDMyIC0gc3Vic2V0IG9mIEZvbnRGb3JnZSAyLjAgOiBKdXJhIExpZ2h0IDogMjMtMS0yMDA5YmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhIExpZ2h0VmVyc2lvbiAyIGJhZWMyYTkyYmZmZTUwMzIgLSBzdWJzZXQgb2YgSnVyYUxpZ2h0aHR0cDovL3NjcmlwdHMuc2lsLm9yZy9PRkwAQwBvAHAAeQByAGkAZwBoAHQAIAAyADAAMAA5ACAAYgB5ACAARABhAG4AaQBlAGwAIABKAG8AaABuAHMAbwBuAC4AIAAgAFIAZQBsAGUAYQBzAGUAZAAgAHUAbgBkAGUAcgAgAHQAaABlACAAdABlAHIAbQBzACAAbwBmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUALgAgAEsAYQB5AGEAaAAgAEwAaQAgAGcAbAB5AHAAaABzACAAYQByAGUAIAByAGUAbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAEcAUABMACAAdgBlAHIAcwBpAG8AbgAgADMALgBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQBMAGkAZwBoAHQAYgBhAGUAYwAyAGEAOQAyAGIAZgBmAGUANQAwADMAMgAgAC0AIABzAHUAYgBzAGUAdAAgAG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAAgADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgAEwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGIAYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAIAAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBhAEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==')}"; + e.getElementsByTagName("head")[0].appendChild(b);c.setAttribute("style","font:99px _,arial,helvetica;position:absolute;visibility:hidden");if(!g){g=s.appendChild(e.createElement("fontface"));t=true}c.innerHTML="........";c.id="fonttest";g.appendChild(c);h=c.offsetWidth*c.offsetHeight;c.style.font="99px testfont,_,arial,helvetica";a=h!==c.offsetWidth*c.offsetHeight;var v=function(){if(g.parentNode){a=j.fontface=h!==c.offsetWidth*c.offsetHeight;s.className=s.className.replace(/(no-)?fontface\b/,"")+ + (a?" ":" no-")+"fontface"}};setTimeout(v,75);setTimeout(v,150);addEventListener("load",function(){v();(w=true)&&o&&o(a);setTimeout(function(){t||(g=c);g.parentNode.removeChild(g);b.parentNode.removeChild(b)},50)},false)}j._fontfaceready=function(p){w||a?p(a):(o=p)};return a||h!==c.offsetWidth};d.video=function(){var a=e.createElement("video"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('video/ogg; codecs="theora"');b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"');b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return b}; + d.audio=function(){var a=e.createElement("audio"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');b.mp3=a.canPlayType("audio/mpeg;");b.wav=a.canPlayType('audio/wav; codecs="1"');b.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}return b};d.localStorage=function(){return"localStorage"in i&&i.localStorage!==null};d.sessionStorage=function(){try{return"sessionStorage"in i&&i.sessionStorage!==null}catch(a){return false}};d.webworkers=function(){return!!i.Worker}; + d.applicationCache=function(){var a=i.applicationCache;return!!(a&&typeof a.status!="undefined"&&typeof a.update=="function"&&typeof a.swapCache=="function")};d.svg=function(){return!!e.createElementNS&&!!e.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect};d.smil=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg","animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg", + "clipPath")))};for(var z in d)if(O(d,z))N.push(((j[z.toLowerCase()]=d[z]())?"":"no-")+z.toLowerCase());j[E]||P();j.addTest=function(a,b){a=a.toLowerCase();if(!j[a]){b=!!b();s.className+=" "+(b?"":"no-")+a;j[a]=b;return j}};m.cssText="";D=n=null;(function(){var a=e.createElement("div");a.innerHTML="";return a.childNodes.length!==1})()&&function(a,b){function c(f,k){if(o[f])o[f].styleSheet.cssText+=k;else{var l=t[G],q=b[A]("style");q.media=f;l.insertBefore(q,l[G]);o[f]=q;c(f,k)}}function h(f, + k){for(var l=new RegExp("\\b("+w+")\\b(?!.*[;}])","gi"),q=function(B){return".iepp_"+B},x=-1;++x\\s*$","i");g.innerHTML=f.outerHTML.replace(/\r|\n/g," ").replace(l,f.currentStyle.display=="block"?"":"");l=g.childNodes[0];l.className+=" iepp_"+q;l=p[p.length]=[f,l];f.parentNode.replaceChild(l[1],l[0])}h(b.styleSheets,"all")});a.attachEvent("onafterprint", + function(){for(var f=-1,k;++fpluginspath.'html5/js/Modernizr-1.5.min.js'; + +$placeholder_script = $vars['url'].'mod/html5/js/jquery.placeholder-1.0.1.js'; +?> + +if (!Modernizr.input.placeholder) { + $(function() { $('[placeholder]').placeholder({className:'html5-placeholder'}); }); + document.write(''); +} diff --git a/views/default/scripts/html5.php b/views/default/scripts/html5.php deleted file mode 100644 index 82ad63146..000000000 --- a/views/default/scripts/html5.php +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file -- cgit v1.2.3 From 0c8186592c6566bede22e4f567b04dddad7c493b Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Mon, 13 Sep 2010 20:32:08 +0000 Subject: radio input was overriding other radio inputs in a non-backwards-compatible way --- views/default/input/radio.php | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 views/default/input/radio.php diff --git a/views/default/input/radio.php b/views/default/input/radio.php deleted file mode 100644 index bce969b07..000000000 --- a/views/default/input/radio.php +++ /dev/null @@ -1,9 +0,0 @@ - 'radio', -); - -$args = array_merge($vars, $overrides); - -echo elgg_view('input/default', $args); \ No newline at end of file -- cgit v1.2.3 From 419c4e01ba3a8b8a038cee32c1fce7d1883532c1 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Sun, 17 Oct 2010 10:51:18 +0000 Subject: Added checkboxes, form, longtext, option, plaintext, pulldown, and tags input views. Kept things dry by creating a html/tag view that takes care of outputting attributes/body. --- views/default/html/tag.php | 47 ++++++++++++++++++++++++++++++++ views/default/input/checkboxes.php | 56 ++++++++++++++++++++++++++++++++++++++ views/default/input/default.php | 48 ++++---------------------------- views/default/input/form.php | 39 ++++++++++++++++++++++++++ views/default/input/longtext.php | 33 ++++++++++++++++++++++ views/default/input/option.php | 17 ++++++++++++ views/default/input/plaintext.php | 18 ++++++++++++ views/default/input/pulldown.php | 55 +++++++++++++++++++++++++++++++++++++ views/default/input/tags.php | 28 +++++++++++++++++++ 9 files changed, 298 insertions(+), 43 deletions(-) create mode 100644 views/default/html/tag.php create mode 100644 views/default/input/checkboxes.php create mode 100644 views/default/input/form.php create mode 100644 views/default/input/longtext.php create mode 100644 views/default/input/option.php create mode 100644 views/default/input/plaintext.php create mode 100644 views/default/input/pulldown.php create mode 100644 views/default/input/tags.php diff --git a/views/default/html/tag.php b/views/default/html/tag.php new file mode 100644 index 000000000..d2f888d49 --- /dev/null +++ b/views/default/html/tag.php @@ -0,0 +1,47 @@ +$value) { + unset($vars[$key]); +} + +// backwards compatibility code +if (isset($vars['internalname'])) { + $vars['name'] = $vars['internalname']; + unset($vars['internalname']); +} + +if (isset($vars['internalid'])) { + $vars['id'] = $vars['internalid']; + unset($vars['internalid']); +} + +$js = ''; +if (isset($vars['js'])) { + $js = $vars['js']; + unset($vars['js']); +} + +$tag = $vars['tag']; + +//Build the input +$element = array(); + +$element[] = "<$tag"; +foreach ($attributes as $attr => $val) { + if ($val === TRUE) { + $element[] = $attr; + } elseif ($val !== FALSE) { + $val = htmlspecialchars($val); + $element[] = "$attr=\"$val\""; + } +} +$element[] = $js; +$element[] = "/>"; + +echo implode(" ", $element); \ No newline at end of file diff --git a/views/default/input/checkboxes.php b/views/default/input/checkboxes.php new file mode 100644 index 000000000..95460a6a8 --- /dev/null +++ b/views/default/input/checkboxes.php @@ -0,0 +1,56 @@ + option for the each checkbox field + * @uses string $vars['internalid'] The id for each input field. Optional (Only use this with a single value.) + * @uses string $vars['default'] The default value to send if nothing is checked. Optional, defaults to 0. + * @uses bool $vars['disabled'] Make all input elements disabled. Optional. + * @uses string $vars['value'] The current value. Optional. + * @uses string $vars['class'] The class of each input element. Optional. + * @uses string $vars['js'] Any Javascript to enter into the input tag. Optional. + * + */ + +$defaults = array( + 'class' => 'input-checkboxes', + 'default' => 0, + 'disabled' => FALSE, +); + +$args = array_merge($defaults, $vars); + +$value_array = (is_array($args['value'])) ? array_map('strtolower', $args['value']) : array(strtolower($args['value'])); + +$options = $args['options']; + +if ($options) { + // include a default value so if nothing is checked 0 will be passed. + if ($args['internalname']) { + echo elgg_view('input/hidden', array('internalname' => $args['internalname'], 'value' => $args['default'])); + } + + foreach($options as $option => $label) { + $opts = array( + 'value' => $option, + 'checked' => in_array(strtolower($option), $value_array)), + 'class' => $args['class'], + 'disabled' => $args['disabled'], + 'js' => $args['js'], + 'internalname' => $args['internalname'].'[]', + ); + + echo "
"; + } +} \ No newline at end of file diff --git a/views/default/input/default.php b/views/default/input/default.php index 0577b34e5..4f4eecc59 100644 --- a/views/default/input/default.php +++ b/views/default/input/default.php @@ -15,53 +15,15 @@ * including javascript event attributes such as onclick. */ -// remove all the junk that elgg_view throws into $vars - -unset($vars['config']); -unset($vars['url']); -unset($vars['page_owner']); -unset($vars['page_owner_user']); -foreach ($_SESSION as $key=>$value) { - unset($vars[$key]); -} - -// backwards compatibility code -if (isset($vars['internalname'])) { - $vars['name'] = $vars['internalname']; - unset($vars['internalname']); -} - -if (isset($vars['internalid'])) { - $vars['id'] = $vars['internalid']; - unset($vars['internalid']); -} - -$js = ''; -if (isset($vars['js'])) { - $js = $vars['js']; - unset($vars['js']); -} - // default attributes $defaults = array( 'type' => 'text', ); -$attributes = array_merge($defaults, $vars); - -//Build the input -$element = array(); +$overrides = array( + 'tag' => 'input', +); -$element[] = " $val) { - if ($val === TRUE) { - $element[] = $attr; - } elseif ($val !== FALSE) { - $val = htmlspecialchars($val); - $element[] = "$attr=\"$val\""; - } -} -$element[] = $js; -$element[] = "/>"; +$args = array_merge($defaults, $vars, $overrides); -echo implode(" ", $element); \ No newline at end of file +echo elgg_view('html/tag', $args); \ No newline at end of file diff --git a/views/default/input/form.php b/views/default/input/form.php new file mode 100644 index 000000000..e6b4f299e --- /dev/null +++ b/views/default/input/form.php @@ -0,0 +1,39 @@ + 'POST', + 'body' => '', +); + +$overrides = array( + 'tag' => 'form', +); + +$disable_security = $vars['disable_security']; +unset($vars['disable_security']); + +$args = array_merge($defaults, $vars, $overrides); + +if ($disable_security != TRUE) { + $args['body'] .= elgg_view('input/securitytoken'); +} + +echo elgg_view('html/tag', $args); diff --git a/views/default/input/longtext.php b/views/default/input/longtext.php new file mode 100644 index 000000000..a19c7dde8 --- /dev/null +++ b/views/default/input/longtext.php @@ -0,0 +1,33 @@ + 'input-textarea', +); + +$overrides = array( + 'tag' => 'textarea', +); + +$args = array_merge($defaults, $vars, $overrides); + +if (isset($args['value'])) { + $args['body'] = $args['value']; +} + +$args['class'] = $args['class'].' input-richtext'; + +echo elgg_view('html/tag', $args); \ No newline at end of file diff --git a/views/default/input/option.php b/views/default/input/option.php new file mode 100644 index 000000000..eab1dc4d2 --- /dev/null +++ b/views/default/input/option.php @@ -0,0 +1,17 @@ + 'option', +); + +$args = array_merge($vars, $overrides); + +if (!isset($args['body'])) { + $args['body'] = $args['value']; +} + +if (isset($args['body'])) { + $args['body'] = htmlentities($args['body'], ENT_QUOTES, 'UTF-8'); +} + +echo elgg_view('html/tag', $args); \ No newline at end of file diff --git a/views/default/input/plaintext.php b/views/default/input/plaintext.php new file mode 100644 index 000000000..4c8cdac57 --- /dev/null +++ b/views/default/input/plaintext.php @@ -0,0 +1,18 @@ + 'input-textarea', +); + +$overrides = array( + 'tag' => 'textarea', +); + +if (isset($vars['value'])) { + $vars['body'] = $value; +} + +echo elgg_view('html/tag', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/pulldown.php b/views/default/input/pulldown.php new file mode 100644 index 000000000..49c126c77 --- /dev/null +++ b/views/default/input/pulldown.php @@ -0,0 +1,55 @@ + "option" where "value" is an internal name and "option" is + * the value displayed on the button. Replaces $vars['options'] when defined. + */ + +$defaults = array( + 'class' => 'input-pulldown', +); + +$overrides = array( + 'tag' => 'select', +); + +$args = array_merge($defaults, $vars, $overrides); + +$body = ''; + +if ($vars['options_values']) { + foreach($vars['options_values'] as $value => $option) { + $option_args = array( + 'value' => $value, + 'body' => $option, + 'selected' => ($value == $args['value']), + ); + + $body .= elgg_view('input/option', $option_args); + } +} else { + foreach($vars['options'] as $option) { + $option_args = array( + 'body' => $option, + 'selected' => ($option == $args['value']), + ); + + $body .= elgg_view('input/option', $option_args); + } +} + +$args['body'] = $body; + +echo elgg_view('html/tag', $args); diff --git a/views/default/input/tags.php b/views/default/input/tags.php new file mode 100644 index 000000000..92e163e5e --- /dev/null +++ b/views/default/input/tags.php @@ -0,0 +1,28 @@ + 'input-tags', +); + +if (isset($vars['value']) && is_array($vars['value'])) { + $vars['value'] = implode(", ", $vars['value']); +} + +echo elgg_view('input/text', array_merge($defaults, $vars)); \ No newline at end of file -- cgit v1.2.3 From fea75c1f48b4ef798f1687698a22cba82a3713da Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Sun, 17 Oct 2010 11:17:09 +0000 Subject: Added default placeholders for most inputs -- tried to make code more consistent. Still needs documentation --- languages/en.php | 19 +++++++++++++++++++ views/default/input/color.php | 8 +++++--- views/default/input/date.php | 2 +- views/default/input/datetime-local.php | 2 +- views/default/input/datetime.php | 2 +- views/default/input/email.php | 5 ++++- views/default/input/file.php | 9 +++++---- views/default/input/hidden.php | 8 +++++--- views/default/input/image.php | 8 +++++--- views/default/input/month.php | 2 +- views/default/input/number.php | 8 +++++--- views/default/input/option.php | 6 +++++- views/default/input/password.php | 8 +++++--- views/default/input/range.php | 8 +++++--- views/default/input/reset.php | 8 +++++--- views/default/input/search.php | 8 +++++--- views/default/input/submit.php | 4 ++++ views/default/input/tags.php | 1 + views/default/input/tel.php | 8 +++++--- views/default/input/text.php | 8 +++++--- views/default/input/time.php | 8 +++++--- views/default/input/url.php | 4 ++++ views/default/input/week.php | 8 +++++--- 23 files changed, 106 insertions(+), 46 deletions(-) create mode 100644 languages/en.php diff --git a/languages/en.php b/languages/en.php new file mode 100644 index 000000000..e810da873 --- /dev/null +++ b/languages/en.php @@ -0,0 +1,19 @@ + '', + 'placeholder:color' => '', + 'placeholder:datetime-local' => '', + 'placeholder:datetime' => '', + 'placeholder:email' => '', + 'placeholder:month' => '', + 'placeholder:number' => '', + 'placeholder:password' => '', + 'placeholder:search' => '', + 'placeholder:tags' => '', + 'placeholder:tel' => '', + 'placeholder:time' => '', + 'placeholder:url' => '', + 'placeholder:week' => '', +); + +add_translation('en', $english); \ No newline at end of file diff --git a/views/default/input/color.php b/views/default/input/color.php index fa8dc7497..f67212d47 100644 --- a/views/default/input/color.php +++ b/views/default/input/color.php @@ -1,9 +1,11 @@ elgg_echo('placeholder:color'), +); + $overrides = array( 'type' => 'color', ); -$args = array_merge($vars, $overrides); - -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/date.php b/views/default/input/date.php index 7e35c7beb..8987d3e4a 100644 --- a/views/default/input/date.php +++ b/views/default/input/date.php @@ -1,6 +1,6 @@ 'yyyy-mm-dd', + 'placeholder' => elgg_echo('placeholder:date'), //'yyyy-mm-dd', ); $overrides = array( diff --git a/views/default/input/datetime-local.php b/views/default/input/datetime-local.php index 14bcac633..af5573120 100644 --- a/views/default/input/datetime-local.php +++ b/views/default/input/datetime-local.php @@ -1,6 +1,6 @@ 'yyyy-mm-ddThh:mm:ss', + 'placeholder' => elgg_echo('placeholder:datetime-local'), //'yyyy-mm-ddThh:mm:ss', ); $overrides = array( diff --git a/views/default/input/datetime.php b/views/default/input/datetime.php index 3a5f39bcb..a9b2fe418 100644 --- a/views/default/input/datetime.php +++ b/views/default/input/datetime.php @@ -1,6 +1,6 @@ 'yyyy-mm-ddThh:mm:ss+hh:mm', + 'placeholder' => elgg_echo('placeholder:datetime'), //'yyyy-mm-ddThh:mm:ss+hh:mm', ); $overrides = array( diff --git a/views/default/input/email.php b/views/default/input/email.php index 2b1dcfe7b..e6d05be67 100644 --- a/views/default/input/email.php +++ b/views/default/input/email.php @@ -1,9 +1,12 @@ elgg_echo('placeholder:email'), +); $overrides = array( 'type' => 'email', ); -$args = array_merge($vars, $overrides); +$args = array_merge($defaults, $vars, $overrides); echo elgg_view('input/default', $args); \ No newline at end of file diff --git a/views/default/input/file.php b/views/default/input/file.php index 4fdc24947..a90eed945 100644 --- a/views/default/input/file.php +++ b/views/default/input/file.php @@ -1,10 +1,11 @@ 'file', - 'value' => FALSE, ); -$args = array_merge($vars, $overrides); - -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/hidden.php b/views/default/input/hidden.php index 422d6449a..0cc5c6db4 100644 --- a/views/default/input/hidden.php +++ b/views/default/input/hidden.php @@ -1,9 +1,11 @@ 'hidden', ); -$args = array_merge($vars, $overrides); - -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/image.php b/views/default/input/image.php index 8b0a6728d..bf0a4de81 100644 --- a/views/default/input/image.php +++ b/views/default/input/image.php @@ -1,9 +1,11 @@ 'image', ); -$args = array_merge($vars, $overrides); - -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/month.php b/views/default/input/month.php index 01ecae384..b00db0309 100644 --- a/views/default/input/month.php +++ b/views/default/input/month.php @@ -1,6 +1,6 @@ 'yyyy-mm', + 'placeholder' => elgg_echo('placeholder:month'), ); $overrides = array( diff --git a/views/default/input/number.php b/views/default/input/number.php index 0944f8034..e996e4e96 100644 --- a/views/default/input/number.php +++ b/views/default/input/number.php @@ -1,9 +1,11 @@ 'number', ); -$args = array_merge($vars, $overrides); - -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/option.php b/views/default/input/option.php index eab1dc4d2..2955f1cb9 100644 --- a/views/default/input/option.php +++ b/views/default/input/option.php @@ -1,10 +1,14 @@ 'option', ); -$args = array_merge($vars, $overrides); +$args = array_merge($defaults, $vars, $overrides); if (!isset($args['body'])) { $args['body'] = $args['value']; diff --git a/views/default/input/password.php b/views/default/input/password.php index 21ed2bea0..22374c8d9 100644 --- a/views/default/input/password.php +++ b/views/default/input/password.php @@ -1,9 +1,11 @@ elgg_echo('placeholder:password'), +); + $overrides = array( 'type' => 'password', ); -$args = array_merge($vars, $overrides); - -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/range.php b/views/default/input/range.php index 3c93d49c2..48965f662 100644 --- a/views/default/input/range.php +++ b/views/default/input/range.php @@ -1,9 +1,11 @@ 'range', ); -$args = array_merge($vars, $overrides); - -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/reset.php b/views/default/input/reset.php index eb92982c6..023a6d7b6 100644 --- a/views/default/input/reset.php +++ b/views/default/input/reset.php @@ -1,9 +1,11 @@ elgg_echo('reset'), +); + $overrides = array( 'type' => 'reset', ); -$args = array_merge($vars, $overrides); - -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/search.php b/views/default/input/search.php index 33fa4d4ff..65c252bfc 100644 --- a/views/default/input/search.php +++ b/views/default/input/search.php @@ -1,9 +1,11 @@ elgg_echo('placeholder:search'), +) + $overrides = array( 'type' => 'search', ); -$args = array_merge($vars, $overrides); - -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/submit.php b/views/default/input/submit.php index 32ffb8087..741062ede 100644 --- a/views/default/input/submit.php +++ b/views/default/input/submit.php @@ -1,5 +1,9 @@ elgg_echo('submit'), +); + $overrides = array( 'type' => 'submit', ); diff --git a/views/default/input/tags.php b/views/default/input/tags.php index 92e163e5e..952134db0 100644 --- a/views/default/input/tags.php +++ b/views/default/input/tags.php @@ -19,6 +19,7 @@ $defaults = array( 'class' => 'input-tags', + 'placeholder' => elgg_echo('placeholder:tags'), ); if (isset($vars['value']) && is_array($vars['value'])) { diff --git a/views/default/input/tel.php b/views/default/input/tel.php index 973bb9311..174b4967d 100644 --- a/views/default/input/tel.php +++ b/views/default/input/tel.php @@ -1,9 +1,11 @@ elgg_echo('placeholder:tel'), +); + $overrides = array( 'type' => 'tel', ); -$args = array_merge($vars, $overrides); - -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/text.php b/views/default/input/text.php index b952108f4..77e66625c 100644 --- a/views/default/input/text.php +++ b/views/default/input/text.php @@ -1,9 +1,11 @@ elgg_echo('placeholder:text'), +); + $overrides = array( 'type' => 'text', ); -$args = array_merge($vars, $overrides); - -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/time.php b/views/default/input/time.php index c6b1c458b..f0ba3d169 100644 --- a/views/default/input/time.php +++ b/views/default/input/time.php @@ -1,9 +1,11 @@ elgg_echo('placeholder:time'), +); + $overrides = array( 'type' => 'time', ); -$args = array_merge($vars, $overrides); - -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/url.php b/views/default/input/url.php index 5068da207..0d3bf0273 100644 --- a/views/default/input/url.php +++ b/views/default/input/url.php @@ -1,5 +1,9 @@ elgg_echo('placeholder:url'), +); + $overrides = array( 'type' => 'url', ); diff --git a/views/default/input/week.php b/views/default/input/week.php index d34758eca..3e025e345 100644 --- a/views/default/input/week.php +++ b/views/default/input/week.php @@ -1,9 +1,11 @@ elgg_echo('placeholder:week'), +); + $overrides = array( 'type' => 'week', ); -$args = array_merge($vars, $overrides); - -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file -- cgit v1.2.3 From e87c1b5d6a208cdf81a7d0d756dc755bec0322da Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Mon, 18 Oct 2010 22:48:22 +0000 Subject: Added support for tags with bodies --- views/default/html/tag.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/views/default/html/tag.php b/views/default/html/tag.php index d2f888d49..8ad6679b4 100644 --- a/views/default/html/tag.php +++ b/views/default/html/tag.php @@ -41,7 +41,17 @@ foreach ($attributes as $attr => $val) { $element[] = "$attr=\"$val\""; } } -$element[] = $js; -$element[] = "/>"; -echo implode(" ", $element); \ No newline at end of file +if (!empty($js)) { + $element[] = $js; +} + +if (!isset($vars['body'])) { + $element[] = '/'; +} + +echo implode(" ", $element).">"; + +if (isset($vars['body'])) { + echo $vars['body'].""; +} \ No newline at end of file -- cgit v1.2.3 From 6cf50446e4071095c0b18a76038fb96de5a10475 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Mon, 18 Oct 2010 22:59:49 +0000 Subject: html/tag was not outputting any attributes --- views/default/html/tag.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/views/default/html/tag.php b/views/default/html/tag.php index 8ad6679b4..c8a49dd61 100644 --- a/views/default/html/tag.php +++ b/views/default/html/tag.php @@ -28,12 +28,16 @@ if (isset($vars['js'])) { } $tag = $vars['tag']; +unset($vars['tag']); + +$body = $vars['body']; +unset($vars['body']); //Build the input $element = array(); $element[] = "<$tag"; -foreach ($attributes as $attr => $val) { +foreach ($vars as $attr => $val) { if ($val === TRUE) { $element[] = $attr; } elseif ($val !== FALSE) { @@ -46,12 +50,12 @@ if (!empty($js)) { $element[] = $js; } -if (!isset($vars['body'])) { +if (!isset($body)) { $element[] = '/'; } echo implode(" ", $element).">"; -if (isset($vars['body'])) { - echo $vars['body'].""; +if (isset($body)) { + echo "$body"; } \ No newline at end of file -- cgit v1.2.3 From 4e34bacad758404f7a713e31d2ff5864c0d91c30 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Tue, 19 Oct 2010 00:38:13 +0000 Subject: Updated to new directory structure --- views/default/html/form.php | 11 +++++++++++ views/default/html/input.php | 12 ++++++++++++ views/default/html/option.php | 1 + views/default/html/tag.php | 3 +++ views/default/html/textarea.php | 16 ++++++++++++++++ views/default/input/button.php | 2 +- views/default/input/checkbox.php | 2 +- views/default/input/color.php | 2 +- views/default/input/date.php | 2 +- views/default/input/datetime-local.php | 2 +- views/default/input/datetime.php | 2 +- views/default/input/default.php | 14 ++------------ views/default/input/email.php | 2 +- views/default/input/file.php | 2 +- views/default/input/form.php | 21 ++++----------------- views/default/input/hidden.php | 2 +- views/default/input/image.php | 2 +- views/default/input/longtext.php | 16 ++-------------- views/default/input/month.php | 2 +- views/default/input/number.php | 2 +- views/default/input/password.php | 2 +- views/default/input/plaintext.php | 14 +------------- views/default/input/range.php | 2 +- views/default/input/reset.php | 2 +- views/default/input/search.php | 4 ++-- views/default/input/submit.php | 2 +- views/default/input/tel.php | 2 +- views/default/input/text.php | 2 +- views/default/input/time.php | 2 +- views/default/input/url.php | 2 +- views/default/input/week.php | 2 +- 31 files changed, 75 insertions(+), 79 deletions(-) create mode 100644 views/default/html/form.php create mode 100644 views/default/html/input.php create mode 100644 views/default/html/option.php create mode 100644 views/default/html/textarea.php diff --git a/views/default/html/form.php b/views/default/html/form.php new file mode 100644 index 000000000..b93c62051 --- /dev/null +++ b/views/default/html/form.php @@ -0,0 +1,11 @@ + 'POST', + 'body' => '', +); + +$overrides = array( + 'tag' => 'form', +); + +echo elgg_view('html/tag', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/html/input.php b/views/default/html/input.php new file mode 100644 index 000000000..7350ae308 --- /dev/null +++ b/views/default/html/input.php @@ -0,0 +1,12 @@ + 'text', +); + +$overrides = array( + 'tag' => 'input', +); + +$args = array_merge($defaults, $vars, $overrides); + +echo elgg_view('html/tag', $args); \ No newline at end of file diff --git a/views/default/html/option.php b/views/default/html/option.php new file mode 100644 index 000000000..b3d9bbc7f --- /dev/null +++ b/views/default/html/option.php @@ -0,0 +1 @@ +$value) { // backwards compatibility code if (isset($vars['internalname'])) { + //@todo put deprecated notice $vars['name'] = $vars['internalname']; unset($vars['internalname']); } if (isset($vars['internalid'])) { + //@todo put deprecated notice $vars['id'] = $vars['internalid']; unset($vars['internalid']); } $js = ''; if (isset($vars['js'])) { + //@todo put deprecated notice $js = $vars['js']; unset($vars['js']); } diff --git a/views/default/html/textarea.php b/views/default/html/textarea.php new file mode 100644 index 000000000..0c3813246 --- /dev/null +++ b/views/default/html/textarea.php @@ -0,0 +1,16 @@ + '', + 'class' => 'input-textarea', +); + +$overrides = array( + 'tag' => 'textarea', +); + +if (isset($vars['value'])) { + $vars['body'] = $vars['value']; + unset($vars['value']); +} + +echo elgg_view('html/tag', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/button.php b/views/default/input/button.php index 6fc1fb762..bda1d7bb3 100644 --- a/views/default/input/button.php +++ b/views/default/input/button.php @@ -6,4 +6,4 @@ $overrides = array( $args = array_merge($vars, $overrides); -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('html/input', $args); \ No newline at end of file diff --git a/views/default/input/checkbox.php b/views/default/input/checkbox.php index ff9a4b433..c9a2c6498 100644 --- a/views/default/input/checkbox.php +++ b/views/default/input/checkbox.php @@ -6,4 +6,4 @@ $overrides = array( $args = array_merge($vars, $overrides); -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('html/input', $args); \ No newline at end of file diff --git a/views/default/input/color.php b/views/default/input/color.php index f67212d47..07a364b50 100644 --- a/views/default/input/color.php +++ b/views/default/input/color.php @@ -8,4 +8,4 @@ $overrides = array( 'type' => 'color', ); -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/date.php b/views/default/input/date.php index 8987d3e4a..62014cb92 100644 --- a/views/default/input/date.php +++ b/views/default/input/date.php @@ -11,4 +11,4 @@ if (isset($vars['value']) && is_int($vars['value'])) { $vars['value'] = date("Y-m-d", $vars['value']); } -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/datetime-local.php b/views/default/input/datetime-local.php index af5573120..c9f0b32f9 100644 --- a/views/default/input/datetime-local.php +++ b/views/default/input/datetime-local.php @@ -11,4 +11,4 @@ if (isset($vars['value']) && is_int($vars['value'])) { $vars['value'] = date("Y-m-d\TH:i:s", $vars['value']); } -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/datetime.php b/views/default/input/datetime.php index a9b2fe418..7eecb62e8 100644 --- a/views/default/input/datetime.php +++ b/views/default/input/datetime.php @@ -11,4 +11,4 @@ if (isset($vars['value']) && is_int($vars['value'])) { $vars['value'] = date("c", $vars['value']); } -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/default.php b/views/default/input/default.php index 4f4eecc59..cf9f64097 100644 --- a/views/default/input/default.php +++ b/views/default/input/default.php @@ -15,15 +15,5 @@ * including javascript event attributes such as onclick. */ -// default attributes -$defaults = array( - 'type' => 'text', -); - -$overrides = array( - 'tag' => 'input', -); - -$args = array_merge($defaults, $vars, $overrides); - -echo elgg_view('html/tag', $args); \ No newline at end of file +//@todo put deprecated notice +echo elgg_view('html/input', $vars); \ No newline at end of file diff --git a/views/default/input/email.php b/views/default/input/email.php index e6d05be67..6d1bed19c 100644 --- a/views/default/input/email.php +++ b/views/default/input/email.php @@ -9,4 +9,4 @@ $overrides = array( $args = array_merge($defaults, $vars, $overrides); -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('html/input', $args); \ No newline at end of file diff --git a/views/default/input/file.php b/views/default/input/file.php index a90eed945..ef7223a80 100644 --- a/views/default/input/file.php +++ b/views/default/input/file.php @@ -8,4 +8,4 @@ $overrides = array( 'type' => 'file', ); -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/form.php b/views/default/input/form.php index e6b4f299e..c30dd5c9a 100644 --- a/views/default/input/form.php +++ b/views/default/input/form.php @@ -17,23 +17,10 @@ * */ +if ($vars['disable_security'] != TRUE) { + $vars['body'] .= elgg_view('input/securitytoken'); +} -$defaults = array( - 'method' => 'POST', - 'body' => '', -); - -$overrides = array( - 'tag' => 'form', -); - -$disable_security = $vars['disable_security']; unset($vars['disable_security']); -$args = array_merge($defaults, $vars, $overrides); - -if ($disable_security != TRUE) { - $args['body'] .= elgg_view('input/securitytoken'); -} - -echo elgg_view('html/tag', $args); +echo elgg_view('html/form', $vars); diff --git a/views/default/input/hidden.php b/views/default/input/hidden.php index 0cc5c6db4..da1e9bd00 100644 --- a/views/default/input/hidden.php +++ b/views/default/input/hidden.php @@ -8,4 +8,4 @@ $overrides = array( 'type' => 'hidden', ); -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/image.php b/views/default/input/image.php index bf0a4de81..f1b07cb8e 100644 --- a/views/default/input/image.php +++ b/views/default/input/image.php @@ -8,4 +8,4 @@ $overrides = array( 'type' => 'image', ); -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/longtext.php b/views/default/input/longtext.php index a19c7dde8..6366f8a3d 100644 --- a/views/default/input/longtext.php +++ b/views/default/input/longtext.php @@ -15,19 +15,7 @@ */ $defaults = array( - 'class' => 'input-textarea', + 'class' => 'input-richtext', ); -$overrides = array( - 'tag' => 'textarea', -); - -$args = array_merge($defaults, $vars, $overrides); - -if (isset($args['value'])) { - $args['body'] = $args['value']; -} - -$args['class'] = $args['class'].' input-richtext'; - -echo elgg_view('html/tag', $args); \ No newline at end of file +echo elgg_view('html/textarea', array_merge($defaults, $vars)); \ No newline at end of file diff --git a/views/default/input/month.php b/views/default/input/month.php index b00db0309..071d40262 100644 --- a/views/default/input/month.php +++ b/views/default/input/month.php @@ -11,4 +11,4 @@ if (isset($vars['value']) && is_int($vars['value'])) { $vars['value'] = date("Y-m", $vars['value']); } -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/number.php b/views/default/input/number.php index e996e4e96..fbd1bec72 100644 --- a/views/default/input/number.php +++ b/views/default/input/number.php @@ -8,4 +8,4 @@ $overrides = array( 'type' => 'number', ); -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/password.php b/views/default/input/password.php index 22374c8d9..609b39faa 100644 --- a/views/default/input/password.php +++ b/views/default/input/password.php @@ -8,4 +8,4 @@ $overrides = array( 'type' => 'password', ); -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/plaintext.php b/views/default/input/plaintext.php index 4c8cdac57..1d907dcfc 100644 --- a/views/default/input/plaintext.php +++ b/views/default/input/plaintext.php @@ -3,16 +3,4 @@ * */ -$defaults = array( - 'class' => 'input-textarea', -); - -$overrides = array( - 'tag' => 'textarea', -); - -if (isset($vars['value'])) { - $vars['body'] = $value; -} - -echo elgg_view('html/tag', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/textarea', $vars); \ No newline at end of file diff --git a/views/default/input/range.php b/views/default/input/range.php index 48965f662..8fedf067a 100644 --- a/views/default/input/range.php +++ b/views/default/input/range.php @@ -8,4 +8,4 @@ $overrides = array( 'type' => 'range', ); -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/reset.php b/views/default/input/reset.php index 023a6d7b6..911c6671b 100644 --- a/views/default/input/reset.php +++ b/views/default/input/reset.php @@ -8,4 +8,4 @@ $overrides = array( 'type' => 'reset', ); -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/search.php b/views/default/input/search.php index 65c252bfc..457c45999 100644 --- a/views/default/input/search.php +++ b/views/default/input/search.php @@ -2,10 +2,10 @@ $defaults = array( 'placeholder' => elgg_echo('placeholder:search'), -) +); $overrides = array( 'type' => 'search', ); -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/submit.php b/views/default/input/submit.php index 741062ede..a0cd1cfac 100644 --- a/views/default/input/submit.php +++ b/views/default/input/submit.php @@ -10,4 +10,4 @@ $overrides = array( $args = array_merge($vars, $overrides); -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('html/input', $args); \ No newline at end of file diff --git a/views/default/input/tel.php b/views/default/input/tel.php index 174b4967d..1bb146ce5 100644 --- a/views/default/input/tel.php +++ b/views/default/input/tel.php @@ -8,4 +8,4 @@ $overrides = array( 'type' => 'tel', ); -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/text.php b/views/default/input/text.php index 77e66625c..0993d1f2b 100644 --- a/views/default/input/text.php +++ b/views/default/input/text.php @@ -8,4 +8,4 @@ $overrides = array( 'type' => 'text', ); -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/time.php b/views/default/input/time.php index f0ba3d169..3d714ccc1 100644 --- a/views/default/input/time.php +++ b/views/default/input/time.php @@ -8,4 +8,4 @@ $overrides = array( 'type' => 'time', ); -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/url.php b/views/default/input/url.php index 0d3bf0273..60d8820e7 100644 --- a/views/default/input/url.php +++ b/views/default/input/url.php @@ -10,4 +10,4 @@ $overrides = array( $args = array_merge($vars, $overrides); -echo elgg_view('input/default', $args); \ No newline at end of file +echo elgg_view('html/input', $args); \ No newline at end of file diff --git a/views/default/input/week.php b/views/default/input/week.php index 3e025e345..294811aee 100644 --- a/views/default/input/week.php +++ b/views/default/input/week.php @@ -8,4 +8,4 @@ $overrides = array( 'type' => 'week', ); -echo elgg_view('input/default', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file -- cgit v1.2.3 From 2f69470d927c102216383077e3f7f3e70054bd24 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Tue, 19 Oct 2010 10:56:27 +0000 Subject: Removed stray paren in checkboxes.php --- views/default/input/checkboxes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/default/input/checkboxes.php b/views/default/input/checkboxes.php index 95460a6a8..816d65680 100644 --- a/views/default/input/checkboxes.php +++ b/views/default/input/checkboxes.php @@ -44,7 +44,7 @@ if ($options) { foreach($options as $option => $label) { $opts = array( 'value' => $option, - 'checked' => in_array(strtolower($option), $value_array)), + 'checked' => in_array(strtolower($option), $value_array), 'class' => $args['class'], 'disabled' => $args['disabled'], 'js' => $args['js'], -- cgit v1.2.3 From 3db487a7168011ddfb8f75535935700959cf3516 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Tue, 19 Oct 2010 12:05:03 +0000 Subject: NULL and empty-string attributes are skipped in addition to FALSE --- views/default/html/tag.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/default/html/tag.php b/views/default/html/tag.php index b4875d953..67a7d067c 100644 --- a/views/default/html/tag.php +++ b/views/default/html/tag.php @@ -43,7 +43,7 @@ $element[] = "<$tag"; foreach ($vars as $attr => $val) { if ($val === TRUE) { $element[] = $attr; - } elseif ($val !== FALSE) { + } elseif (!empty($val)) { $val = htmlspecialchars($val); $element[] = "$attr=\"$val\""; } -- cgit v1.2.3 From 1bb750cdf821416584dc42206a29dae7c41144a5 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Tue, 19 Oct 2010 12:06:07 +0000 Subject: Adds support for img tag view --- views/default/html/img.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 views/default/html/img.php diff --git a/views/default/html/img.php b/views/default/html/img.php new file mode 100644 index 000000000..3560e066e --- /dev/null +++ b/views/default/html/img.php @@ -0,0 +1,13 @@ + '', + 'title' => '', +); + +$overrides = array( + 'tag' => 'img', + 'body' => NULL, +); + +echo elgg_view('html/tag', array_merge($defaults, $vars, $overrides)); \ No newline at end of file -- cgit v1.2.3 From 9ff9d71952db26c06fe2eb1bf98b53340242e524 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 21 Oct 2010 17:46:39 +0000 Subject: Removed html/tag view -- all we really needed was a function to form an attribute string from an array. This is now being used in each input view and there is not so much view nesting going on... --- start.php | 62 ++++++++++++++++++++++++++++++++ views/default/html/form.php | 11 ------ views/default/html/img.php | 8 ++--- views/default/html/input.php | 12 ------- views/default/html/option.php | 1 - views/default/html/tag.php | 64 ---------------------------------- views/default/html/textarea.php | 16 --------- views/default/input/button.php | 10 +----- views/default/input/checkbox.php | 10 +----- views/default/input/checkboxes.php | 35 ++++++++----------- views/default/input/color.php | 12 +------ views/default/input/date.php | 12 ++----- views/default/input/datetime-local.php | 12 ++----- views/default/input/datetime.php | 12 ++----- views/default/input/default.php | 19 ---------- views/default/input/email.php | 13 +------ views/default/input/file.php | 12 +------ views/default/input/form.php | 19 ++++++---- views/default/input/hidden.php | 12 +------ views/default/input/image.php | 12 +------ views/default/input/longtext.php | 7 +++- views/default/input/month.php | 11 ++---- views/default/input/number.php | 12 +------ views/default/input/option.php | 22 ++++-------- views/default/input/password.php | 12 +------ views/default/input/plaintext.php | 20 +++++++++-- views/default/input/pulldown.php | 53 +++++++++++++--------------- views/default/input/range.php | 7 ++-- views/default/input/reset.php | 7 ++-- views/default/input/search.php | 7 ++-- views/default/input/submit.php | 9 ++--- views/default/input/tags.php | 6 ---- views/default/input/tel.php | 8 ++--- views/default/input/text.php | 7 ++-- views/default/input/time.php | 7 ++-- views/default/input/url.php | 9 ++--- views/default/input/week.php | 7 ++-- 37 files changed, 193 insertions(+), 382 deletions(-) delete mode 100644 views/default/html/form.php delete mode 100644 views/default/html/input.php delete mode 100644 views/default/html/option.php delete mode 100644 views/default/html/tag.php delete mode 100644 views/default/html/textarea.php delete mode 100644 views/default/input/default.php diff --git a/start.php b/start.php index 9b442a243..d83e75bcd 100644 --- a/start.php +++ b/start.php @@ -6,4 +6,66 @@ function html5_init() { elgg_extend_view('js/initialise_elgg', 'js/html5'); } +function html5_get_html_attributes(array $attrs = array(), $quote_style = ENT_COMPAT, $charset = 'UTF-8', $double_encode = TRUE) { + $attrs = html5_clean_vars($attrs); + $attributes = array(); + + if (isset($attrs['js'])) { + elgg_deprecated_notice("Use of the 'js' attribute was deprecated in 1.8. You can now use the js attributes directly.", '1.8'); + + if (!empty($attrs['js'])) { + $attributes[] = $attrs['js']; + } + + unset($attrs['js']); + } + + foreach ($attrs as $attr => $val) { + $attr = strtolower($attr); + + if ($val === TRUE) { + $attributes[] = $attr; + } elseif (!empty($val)) { + //allow multi-value attributes to be passed as array + if (is_array($val)) { + sort($val); //gzip? + + $val = implode(' ', $val); + } + + $val = htmlspecialchars($val, $quote_style, $charset, $double_encode); + $attributes[] = "$attr=\"$val\""; + } + } + + sort($attributes); //gzip? + + return implode(' ', $attributes); +} + +// remove all the junk that elgg_view throws into $vars +function html5_clean_vars(array $vars = array()) { + unset($vars['config']); + unset($vars['url']); + unset($vars['page_owner']); + unset($vars['page_owner_user']); + + foreach ($_SESSION as $key => $value) { + unset($vars[$key]); + } + + // backwards compatibility code + if (isset($vars['internalname'])) { + $vars['name'] = $vars['internalname']; + unset($vars['internalname']); + } + + if (isset($vars['internalid'])) { + $vars['id'] = $vars['internalid']; + unset($vars['internalid']); + } + + return $vars; +} + register_elgg_event_handler('init', 'system', 'html5_init'); diff --git a/views/default/html/form.php b/views/default/html/form.php deleted file mode 100644 index b93c62051..000000000 --- a/views/default/html/form.php +++ /dev/null @@ -1,11 +0,0 @@ - 'POST', - 'body' => '', -); - -$overrides = array( - 'tag' => 'form', -); - -echo elgg_view('html/tag', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/html/img.php b/views/default/html/img.php index 3560e066e..734e59a55 100644 --- a/views/default/html/img.php +++ b/views/default/html/img.php @@ -3,11 +3,9 @@ $defaults = array( 'alt' => '', 'title' => '', + 'border' => 0, ); -$overrides = array( - 'tag' => 'img', - 'body' => NULL, -); +$attributes = html5_get_html_attributes(array_merge($defaults, $vars)); -echo elgg_view('html/tag', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +echo ""; \ No newline at end of file diff --git a/views/default/html/input.php b/views/default/html/input.php deleted file mode 100644 index 7350ae308..000000000 --- a/views/default/html/input.php +++ /dev/null @@ -1,12 +0,0 @@ - 'text', -); - -$overrides = array( - 'tag' => 'input', -); - -$args = array_merge($defaults, $vars, $overrides); - -echo elgg_view('html/tag', $args); \ No newline at end of file diff --git a/views/default/html/option.php b/views/default/html/option.php deleted file mode 100644 index b3d9bbc7f..000000000 --- a/views/default/html/option.php +++ /dev/null @@ -1 +0,0 @@ -$value) { - unset($vars[$key]); -} - -// backwards compatibility code -if (isset($vars['internalname'])) { - //@todo put deprecated notice - $vars['name'] = $vars['internalname']; - unset($vars['internalname']); -} - -if (isset($vars['internalid'])) { - //@todo put deprecated notice - $vars['id'] = $vars['internalid']; - unset($vars['internalid']); -} - -$js = ''; -if (isset($vars['js'])) { - //@todo put deprecated notice - $js = $vars['js']; - unset($vars['js']); -} - -$tag = $vars['tag']; -unset($vars['tag']); - -$body = $vars['body']; -unset($vars['body']); - -//Build the input -$element = array(); - -$element[] = "<$tag"; -foreach ($vars as $attr => $val) { - if ($val === TRUE) { - $element[] = $attr; - } elseif (!empty($val)) { - $val = htmlspecialchars($val); - $element[] = "$attr=\"$val\""; - } -} - -if (!empty($js)) { - $element[] = $js; -} - -if (!isset($body)) { - $element[] = '/'; -} - -echo implode(" ", $element).">"; - -if (isset($body)) { - echo "$body"; -} \ No newline at end of file diff --git a/views/default/html/textarea.php b/views/default/html/textarea.php deleted file mode 100644 index 0c3813246..000000000 --- a/views/default/html/textarea.php +++ /dev/null @@ -1,16 +0,0 @@ - '', - 'class' => 'input-textarea', -); - -$overrides = array( - 'tag' => 'textarea', -); - -if (isset($vars['value'])) { - $vars['body'] = $vars['value']; - unset($vars['value']); -} - -echo elgg_view('html/tag', array_merge($defaults, $vars, $overrides)); \ No newline at end of file diff --git a/views/default/input/button.php b/views/default/input/button.php index bda1d7bb3..ddf432562 100644 --- a/views/default/input/button.php +++ b/views/default/input/button.php @@ -1,9 +1 @@ - 'button', -); - -$args = array_merge($vars, $overrides); - -echo elgg_view('html/input', $args); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/checkbox.php b/views/default/input/checkbox.php index c9a2c6498..5ba04a8cd 100644 --- a/views/default/input/checkbox.php +++ b/views/default/input/checkbox.php @@ -1,9 +1 @@ - 'checkbox', -); - -$args = array_merge($vars, $overrides); - -echo elgg_view('html/input', $args); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/checkboxes.php b/views/default/input/checkboxes.php index 816d65680..1e13b0687 100644 --- a/views/default/input/checkboxes.php +++ b/views/default/input/checkboxes.php @@ -25,32 +25,27 @@ $defaults = array( 'class' => 'input-checkboxes', - 'default' => 0, 'disabled' => FALSE, ); -$args = array_merge($defaults, $vars); +$vars = array_merge($defaults, $vars); -$value_array = (is_array($args['value'])) ? array_map('strtolower', $args['value']) : array(strtolower($args['value'])); +$value = $vars['value']; +unset($vars['value']); -$options = $args['options']; +$value_array = (is_array($value)) ? array_map('strtolower', $value) : array(strtolower($value)); + +$options = $vars['options']; +unset($vars['options']); if ($options) { - // include a default value so if nothing is checked 0 will be passed. - if ($args['internalname']) { - echo elgg_view('input/hidden', array('internalname' => $args['internalname'], 'value' => $args['default'])); - } - - foreach($options as $option => $label) { - $opts = array( - 'value' => $option, - 'checked' => in_array(strtolower($option), $value_array), - 'class' => $args['class'], - 'disabled' => $args['disabled'], - 'js' => $args['js'], - 'internalname' => $args['internalname'].'[]', - ); - - echo "
"; + foreach($options as $value => $label) { + echo "
"; } } \ No newline at end of file diff --git a/views/default/input/color.php b/views/default/input/color.php index 07a364b50..76dd50603 100644 --- a/views/default/input/color.php +++ b/views/default/input/color.php @@ -1,11 +1 @@ - elgg_echo('placeholder:color'), -); - -$overrides = array( - 'type' => 'color', -); - -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/date.php b/views/default/input/date.php index 62014cb92..c408ea3a7 100644 --- a/views/default/input/date.php +++ b/views/default/input/date.php @@ -1,14 +1,6 @@ elgg_echo('placeholder:date'), //'yyyy-mm-dd', -); - -$overrides = array( - 'type' => 'date', -); - if (isset($vars['value']) && is_int($vars['value'])) { $vars['value'] = date("Y-m-d", $vars['value']); } - -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +?> + /> diff --git a/views/default/input/datetime-local.php b/views/default/input/datetime-local.php index c9f0b32f9..e0ab4b171 100644 --- a/views/default/input/datetime-local.php +++ b/views/default/input/datetime-local.php @@ -1,14 +1,6 @@ elgg_echo('placeholder:datetime-local'), //'yyyy-mm-ddThh:mm:ss', -); - -$overrides = array( - 'type' => 'datetime-local', -); - if (isset($vars['value']) && is_int($vars['value'])) { $vars['value'] = date("Y-m-d\TH:i:s", $vars['value']); } - -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +?> + /> \ No newline at end of file diff --git a/views/default/input/datetime.php b/views/default/input/datetime.php index 7eecb62e8..eaa32634e 100644 --- a/views/default/input/datetime.php +++ b/views/default/input/datetime.php @@ -1,14 +1,6 @@ elgg_echo('placeholder:datetime'), //'yyyy-mm-ddThh:mm:ss+hh:mm', -); - -$overrides = array( - 'type' => 'datetime', -); - if (isset($vars['value']) && is_int($vars['value'])) { $vars['value'] = date("c", $vars['value']); } - -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file +?> + /> diff --git a/views/default/input/default.php b/views/default/input/default.php deleted file mode 100644 index cf9f64097..000000000 --- a/views/default/input/default.php +++ /dev/null @@ -1,19 +0,0 @@ - elgg_echo('placeholder:email'), -); - -$overrides = array( - 'type' => 'email', -); - -$args = array_merge($defaults, $vars, $overrides); - -echo elgg_view('html/input', $args); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/file.php b/views/default/input/file.php index ef7223a80..9df286890 100644 --- a/views/default/input/file.php +++ b/views/default/input/file.php @@ -1,11 +1 @@ - 'file', -); - -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/form.php b/views/default/input/form.php index c30dd5c9a..565db3afe 100644 --- a/views/default/input/form.php +++ b/views/default/input/form.php @@ -10,17 +10,24 @@ * @link http://elgg.org/ * * @uses $vars['body'] The body of the form (made up of other input/xxx views and html - * @uses $vars['method'] Method (default POST) - * @uses $vars['enctype'] How the form is encoded, default blank - * @uses $vars['action'] URL of the action being called * @uses $vars['disable_security'] Force the securitytokens not to be added to this form (@todo what's the point??) * */ +$defaults = array( + 'body' => '', + 'method' => 'POST', +); + +$vars = array_merge($defaults, $vars); if ($vars['disable_security'] != TRUE) { - $vars['body'] .= elgg_view('input/securitytoken'); + $body .= elgg_view('input/securitytoken'); } - unset($vars['disable_security']); -echo elgg_view('html/form', $vars); +$body = $vars['body']; +unset($vars['body']); + +$attributes = html5_get_html_attributes($vars); + +echo "
$body
"; diff --git a/views/default/input/hidden.php b/views/default/input/hidden.php index da1e9bd00..944382616 100644 --- a/views/default/input/hidden.php +++ b/views/default/input/hidden.php @@ -1,11 +1 @@ - 'hidden', -); - -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/image.php b/views/default/input/image.php index f1b07cb8e..ae65d86ca 100644 --- a/views/default/input/image.php +++ b/views/default/input/image.php @@ -1,11 +1 @@ - 'image', -); - -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/longtext.php b/views/default/input/longtext.php index 6366f8a3d..1020ef640 100644 --- a/views/default/input/longtext.php +++ b/views/default/input/longtext.php @@ -18,4 +18,9 @@ $defaults = array( 'class' => 'input-richtext', ); -echo elgg_view('html/textarea', array_merge($defaults, $vars)); \ No newline at end of file +$value = $vars['value']; +unset($vars['value']); + +$attributes = html5_get_html_attributes(array_merge($defaults, $vars)); + +echo ""; \ No newline at end of file diff --git a/views/default/input/month.php b/views/default/input/month.php index 071d40262..4bd320046 100644 --- a/views/default/input/month.php +++ b/views/default/input/month.php @@ -1,14 +1,7 @@ elgg_echo('placeholder:month'), -); - -$overrides = array( - 'type' => 'month', -); - if (isset($vars['value']) && is_int($vars['value'])) { $vars['value'] = date("Y-m", $vars['value']); } +?> -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/number.php b/views/default/input/number.php index fbd1bec72..ccfb72641 100644 --- a/views/default/input/number.php +++ b/views/default/input/number.php @@ -1,11 +1 @@ - 'number', -); - -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/option.php b/views/default/input/option.php index 2955f1cb9..f420c9be4 100644 --- a/views/default/input/option.php +++ b/views/default/input/option.php @@ -1,21 +1,13 @@ 'option', -); - -$args = array_merge($defaults, $vars, $overrides); - -if (!isset($args['body'])) { - $args['body'] = $args['value']; +if (!isset($text)) { + $text = $vars['value']; + unset($vars['value']); } -if (isset($args['body'])) { - $args['body'] = htmlentities($args['body'], ENT_QUOTES, 'UTF-8'); -} +$text = htmlentities($text, ENT_QUOTES, 'UTF-8'); +$attributes = html5_get_html_attributes($vars); -echo elgg_view('html/tag', $args); \ No newline at end of file +echo ""; \ No newline at end of file diff --git a/views/default/input/password.php b/views/default/input/password.php index 609b39faa..8c97cf020 100644 --- a/views/default/input/password.php +++ b/views/default/input/password.php @@ -1,11 +1 @@ - elgg_echo('placeholder:password'), -); - -$overrides = array( - 'type' => 'password', -); - -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/plaintext.php b/views/default/input/plaintext.php index 1d907dcfc..cd0a7d6b5 100644 --- a/views/default/input/plaintext.php +++ b/views/default/input/plaintext.php @@ -1,6 +1,22 @@ 'input-plaintext', +); + +$value = $vars['value']; +unset($vars['value']); + +$attributes = html5_get_html_attributes(array_merge($defaults, $vars)); + +echo ""; \ No newline at end of file diff --git a/views/default/input/pulldown.php b/views/default/input/pulldown.php index 49c126c77..8a30838d4 100644 --- a/views/default/input/pulldown.php +++ b/views/default/input/pulldown.php @@ -9,9 +9,6 @@ * @author Curverider Ltd * @link http://elgg.org/ * - * @uses $vars['value'] The current value, if any - * @uses $vars['js'] Any Javascript to enter into the input tag - * @uses $vars['internalname'] The name of the input field * @uses $vars['options'] An array of strings representing the options for the pulldown field * @uses $vars['options_values'] An associative array of "value" => "option" where "value" is an internal name and "option" is * the value displayed on the button. Replaces $vars['options'] when defined. @@ -21,35 +18,35 @@ $defaults = array( 'class' => 'input-pulldown', ); -$overrides = array( - 'tag' => 'select', -); +$vars = array_merge($defaults, $vars); + +$options_values = $vars['options_values']; +unset($vars['options_values']); -$args = array_merge($defaults, $vars, $overrides); +$options = $vars['options']; +unset($options); -$body = ''; +$value = $vars['value']; +unset($vars['value']); +?> -if ($vars['options_values']) { - foreach($vars['options_values'] as $value => $option) { - $option_args = array( - 'value' => $value, - 'body' => $option, - 'selected' => ($value == $args['value']), - ); - - $body .= elgg_view('input/option', $option_args); + \ No newline at end of file diff --git a/views/default/input/range.php b/views/default/input/range.php index 8fedf067a..588b835d1 100644 --- a/views/default/input/range.php +++ b/views/default/input/range.php @@ -4,8 +4,7 @@ $defaults = array( ); -$overrides = array( - 'type' => 'range', -); +$vars = array_merge($defaults, $vars); +?> -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/reset.php b/views/default/input/reset.php index 911c6671b..b1c7c06ed 100644 --- a/views/default/input/reset.php +++ b/views/default/input/reset.php @@ -4,8 +4,7 @@ $defaults = array( 'value' => elgg_echo('reset'), ); -$overrides = array( - 'type' => 'reset', -); +$vars = array_merge($defaults, $vars); +?> -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/search.php b/views/default/input/search.php index 457c45999..47988be51 100644 --- a/views/default/input/search.php +++ b/views/default/input/search.php @@ -4,8 +4,7 @@ $defaults = array( 'placeholder' => elgg_echo('placeholder:search'), ); -$overrides = array( - 'type' => 'search', -); +$vars = array_merge($defaults, $vars); +?> -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/submit.php b/views/default/input/submit.php index a0cd1cfac..4c86f6c66 100644 --- a/views/default/input/submit.php +++ b/views/default/input/submit.php @@ -4,10 +4,7 @@ $defaults = array( 'value' => elgg_echo('submit'), ); -$overrides = array( - 'type' => 'submit', -); - -$args = array_merge($vars, $overrides); +$vars = array_merge($defaults, $vars); +?> -echo elgg_view('html/input', $args); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/tags.php b/views/default/input/tags.php index 952134db0..3f5e2481a 100644 --- a/views/default/input/tags.php +++ b/views/default/input/tags.php @@ -9,14 +9,8 @@ * @link http://elgg.org/ * * @uses $vars['value'] The current value, if any - string or array - tags will be encoded - * @uses $vars['js'] Any Javascript to enter into the input tag - * @uses $vars['internalname'] The name of the input field - * @uses $vars['internalid'] The id of the input field - * @uses $vars['class'] CSS class override - * @uses $vars['disabled'] Is the input field disabled? */ - $defaults = array( 'class' => 'input-tags', 'placeholder' => elgg_echo('placeholder:tags'), diff --git a/views/default/input/tel.php b/views/default/input/tel.php index 1bb146ce5..441e85bf0 100644 --- a/views/default/input/tel.php +++ b/views/default/input/tel.php @@ -1,11 +1,9 @@ elgg_echo('placeholder:tel'), ); -$overrides = array( - 'type' => 'tel', -); +$vars = array_merge($defaults, $vars); +?> -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/text.php b/views/default/input/text.php index 0993d1f2b..b84d3d16f 100644 --- a/views/default/input/text.php +++ b/views/default/input/text.php @@ -4,8 +4,7 @@ $defaults = array( 'placeholder' => elgg_echo('placeholder:text'), ); -$overrides = array( - 'type' => 'text', -); +$vars = array_merge($defaults, $vars); +?> -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/time.php b/views/default/input/time.php index 3d714ccc1..641dd5244 100644 --- a/views/default/input/time.php +++ b/views/default/input/time.php @@ -4,8 +4,7 @@ $defaults = array( 'placeholder' => elgg_echo('placeholder:time'), ); -$overrides = array( - 'type' => 'time', -); +$vars = array_merge($defaults, $vars); +?> -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/url.php b/views/default/input/url.php index 60d8820e7..a0851f4d9 100644 --- a/views/default/input/url.php +++ b/views/default/input/url.php @@ -4,10 +4,7 @@ $defaults = array( 'placeholder' => elgg_echo('placeholder:url'), ); -$overrides = array( - 'type' => 'url', -); - -$args = array_merge($vars, $overrides); +$vars = array_merge($defaults, $vars); +?> -echo elgg_view('html/input', $args); \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/week.php b/views/default/input/week.php index 294811aee..d921755a9 100644 --- a/views/default/input/week.php +++ b/views/default/input/week.php @@ -4,8 +4,7 @@ $defauts = array( 'placeholder' => elgg_echo('placeholder:week'), ); -$overrides = array( - 'type' => 'week', -); +$vars = array_merge($defaults, $vars); +?> -echo elgg_view('html/input', array_merge($defaults, $vars, $overrides)); \ No newline at end of file + /> \ No newline at end of file -- cgit v1.2.3 From 42db97f9d404179f1d7f4059c891fca7766e482e Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 21 Oct 2010 18:45:20 +0000 Subject: Fixed issue with input/form and added output/friendlytime (uses "; -- cgit v1.2.3 From 37a8c770bea778b047f2b2a864dae1682ac6c311 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 21 Oct 2010 19:43:43 +0000 Subject: Added output/url to the mix -- includes ability to accept arbitrary attributes --- views/default/output/url.php | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 views/default/output/url.php diff --git a/views/default/output/url.php b/views/default/output/url.php new file mode 100644 index 000000000..f497a093d --- /dev/null +++ b/views/default/output/url.php @@ -0,0 +1,47 @@ + tags + * @uses string $vars['text'] The string between the tags. + * @uses bool $vars['is_action'] Is this a link to an action? + * + */ + +if (isset($vars['value'])) { + $vars['href'] = $vars['value']; + unset($vars['value']); +} + +$url = trim($vars['href']); + +if (isset($vars['is_action']) && $vars['is_action']) { + $url = elgg_add_action_tokens_to_url($url); + unset($vars['is_action']); +} + +if (isset($vars['body'])) { + $body = $vars['body']; + unset($vars['body']); +} + +if (!isset($body)) { + if (isset($vars['text'])) { + $text = $vars['text']; + unset($vars['text']); + } else { + $text = $url; + } + + $body = htmlentities($text, ENT_QUOTES, 'UTF-8'); +} + +$vars['href'] = $url; +$attributes = html5_get_html_attributes($vars); +echo "$text"; -- cgit v1.2.3 From 37656237fc4f82015641fcb179f17c3b7194ae22 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 21 Oct 2010 20:18:21 +0000 Subject: Fixed problem with output/url --- views/default/output/url.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/default/output/url.php b/views/default/output/url.php index f497a093d..274221a1b 100644 --- a/views/default/output/url.php +++ b/views/default/output/url.php @@ -8,7 +8,7 @@ * @author Curverider Ltd * @link http://elgg.org/ * - * @uses string $vars['href'] The string to display in the tags + * @uses string $vars['body'] The html to insert between the tags * @uses string $vars['text'] The string between the tags. * @uses bool $vars['is_action'] Is this a link to an action? * @@ -44,4 +44,4 @@ if (!isset($body)) { $vars['href'] = $url; $attributes = html5_get_html_attributes($vars); -echo "$text"; +echo "$body"; -- cgit v1.2.3 From 421822b135d524043b5ebfd07b1c62f6184e9891 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 21 Oct 2010 21:54:30 +0000 Subject: Removed default placeholder from text inputs --- views/default/input/text.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/views/default/input/text.php b/views/default/input/text.php index b84d3d16f..7bc22d04a 100644 --- a/views/default/input/text.php +++ b/views/default/input/text.php @@ -1,10 +1 @@ - elgg_echo('placeholder:text'), -); - -$vars = array_merge($defaults, $vars); -?> - /> \ No newline at end of file -- cgit v1.2.3 From e45dc237367658ed750701d1055e975eaef63f19 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Fri, 18 Mar 2011 18:39:18 -0700 Subject: Ignoring Eclipse project files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..336139754 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/.project +/.buildpath +/.settings -- cgit v1.2.3 From dff32c364b99e57db5ea891ce93f7ab5df9b3258 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Fri, 18 Mar 2011 21:28:05 -0700 Subject: Removed custom html5 function in favor of core function --- manifest.xml | 12 +++--- start.php | 69 ++-------------------------------- views/default/html/img.php | 2 +- views/default/input/button.php | 1 - views/default/input/checkbox.php | 1 - views/default/input/checkboxes.php | 51 ------------------------- views/default/input/color.php | 2 +- views/default/input/date.php | 6 --- views/default/input/datetime-local.php | 2 +- views/default/input/datetime.php | 2 +- views/default/input/email.php | 2 +- views/default/input/file.php | 1 - views/default/input/form.php | 33 ---------------- views/default/input/hidden.php | 1 - views/default/input/image.php | 2 +- views/default/input/longtext.php | 26 ------------- views/default/input/month.php | 2 +- views/default/input/number.php | 2 +- views/default/input/option.php | 2 +- views/default/input/password.php | 1 - views/default/input/plaintext.php | 22 ----------- views/default/input/pulldown.php | 52 ------------------------- views/default/input/range.php | 2 +- views/default/input/reset.php | 10 ----- views/default/input/search.php | 2 +- views/default/input/submit.php | 10 ----- views/default/input/tags.php | 23 ------------ views/default/input/tel.php | 2 +- views/default/input/text.php | 1 - views/default/input/time.php | 2 +- views/default/input/url.php | 2 +- views/default/input/week.php | 2 +- views/default/js/html5.php | 12 ------ views/default/output/url.php | 2 +- 34 files changed, 26 insertions(+), 338 deletions(-) delete mode 100644 views/default/input/button.php delete mode 100644 views/default/input/checkbox.php delete mode 100644 views/default/input/checkboxes.php delete mode 100644 views/default/input/date.php delete mode 100644 views/default/input/file.php delete mode 100644 views/default/input/form.php delete mode 100644 views/default/input/hidden.php delete mode 100644 views/default/input/longtext.php delete mode 100644 views/default/input/password.php delete mode 100644 views/default/input/plaintext.php delete mode 100644 views/default/input/pulldown.php delete mode 100644 views/default/input/reset.php delete mode 100644 views/default/input/submit.php delete mode 100644 views/default/input/tags.php delete mode 100644 views/default/input/text.php delete mode 100644 views/default/js/html5.php diff --git a/manifest.xml b/manifest.xml index c48ca01a3..a5399845a 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,8 +1,8 @@ - - - - - - + + Evan Winslow + 1.0 + Provides HTML5 support for Elgg + (C) Evan Winslow 2010 + http://code.google.com/p/elgg-ewinslow \ No newline at end of file diff --git a/start.php b/start.php index d83e75bcd..848190933 100644 --- a/start.php +++ b/start.php @@ -1,71 +1,10 @@ $val) { - $attr = strtolower($attr); - - if ($val === TRUE) { - $attributes[] = $attr; - } elseif (!empty($val)) { - //allow multi-value attributes to be passed as array - if (is_array($val)) { - sort($val); //gzip? - - $val = implode(' ', $val); - } - - $val = htmlspecialchars($val, $quote_style, $charset, $double_encode); - $attributes[] = "$attr=\"$val\""; - } - } - - sort($attributes); //gzip? - - return implode(' ', $attributes); -} + elgg_extend_view('css/screen', 'html5/css'); -// remove all the junk that elgg_view throws into $vars -function html5_clean_vars(array $vars = array()) { - unset($vars['config']); - unset($vars['url']); - unset($vars['page_owner']); - unset($vars['page_owner_user']); - - foreach ($_SESSION as $key => $value) { - unset($vars[$key]); - } - - // backwards compatibility code - if (isset($vars['internalname'])) { - $vars['name'] = $vars['internalname']; - unset($vars['internalname']); - } - - if (isset($vars['internalid'])) { - $vars['id'] = $vars['internalid']; - unset($vars['internalid']); - } - - return $vars; + elgg_register_js('Modernizr', 'mod/html5/js/Modernizr-1.5.js', 'head', 1); + elgg_register_js('jquery.placeholder', 'mod/html5/js/jquery.placeholder-1.0.1.js', 'footer'); } -register_elgg_event_handler('init', 'system', 'html5_init'); +elgg_register_event_handler('init', 'system', 'html5_init'); diff --git a/views/default/html/img.php b/views/default/html/img.php index 734e59a55..10fcbe0d1 100644 --- a/views/default/html/img.php +++ b/views/default/html/img.php @@ -6,6 +6,6 @@ $defaults = array( 'border' => 0, ); -$attributes = html5_get_html_attributes(array_merge($defaults, $vars)); +$attributes = elgg_format_attributes(array_merge($defaults, $vars)); echo ""; \ No newline at end of file diff --git a/views/default/input/button.php b/views/default/input/button.php deleted file mode 100644 index ddf432562..000000000 --- a/views/default/input/button.php +++ /dev/null @@ -1 +0,0 @@ - /> \ No newline at end of file diff --git a/views/default/input/checkbox.php b/views/default/input/checkbox.php deleted file mode 100644 index 5ba04a8cd..000000000 --- a/views/default/input/checkbox.php +++ /dev/null @@ -1 +0,0 @@ - /> \ No newline at end of file diff --git a/views/default/input/checkboxes.php b/views/default/input/checkboxes.php deleted file mode 100644 index 1e13b0687..000000000 --- a/views/default/input/checkboxes.php +++ /dev/null @@ -1,51 +0,0 @@ - option for the each checkbox field - * @uses string $vars['internalid'] The id for each input field. Optional (Only use this with a single value.) - * @uses string $vars['default'] The default value to send if nothing is checked. Optional, defaults to 0. - * @uses bool $vars['disabled'] Make all input elements disabled. Optional. - * @uses string $vars['value'] The current value. Optional. - * @uses string $vars['class'] The class of each input element. Optional. - * @uses string $vars['js'] Any Javascript to enter into the input tag. Optional. - * - */ - -$defaults = array( - 'class' => 'input-checkboxes', - 'disabled' => FALSE, -); - -$vars = array_merge($defaults, $vars); - -$value = $vars['value']; -unset($vars['value']); - -$value_array = (is_array($value)) ? array_map('strtolower', $value) : array(strtolower($value)); - -$options = $vars['options']; -unset($vars['options']); - -if ($options) { - foreach($options as $value => $label) { - echo "
"; - } -} \ No newline at end of file diff --git a/views/default/input/color.php b/views/default/input/color.php index 76dd50603..8bc4ad2a3 100644 --- a/views/default/input/color.php +++ b/views/default/input/color.php @@ -1 +1 @@ - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/date.php b/views/default/input/date.php deleted file mode 100644 index c408ea3a7..000000000 --- a/views/default/input/date.php +++ /dev/null @@ -1,6 +0,0 @@ - - /> diff --git a/views/default/input/datetime-local.php b/views/default/input/datetime-local.php index e0ab4b171..52902f543 100644 --- a/views/default/input/datetime-local.php +++ b/views/default/input/datetime-local.php @@ -3,4 +3,4 @@ if (isset($vars['value']) && is_int($vars['value'])) { $vars['value'] = date("Y-m-d\TH:i:s", $vars['value']); } ?> - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/datetime.php b/views/default/input/datetime.php index eaa32634e..61262f234 100644 --- a/views/default/input/datetime.php +++ b/views/default/input/datetime.php @@ -3,4 +3,4 @@ if (isset($vars['value']) && is_int($vars['value'])) { $vars['value'] = date("c", $vars['value']); } ?> - /> + /> diff --git a/views/default/input/email.php b/views/default/input/email.php index 797fa582f..15e36f145 100644 --- a/views/default/input/email.php +++ b/views/default/input/email.php @@ -1 +1 @@ - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/file.php b/views/default/input/file.php deleted file mode 100644 index 9df286890..000000000 --- a/views/default/input/file.php +++ /dev/null @@ -1 +0,0 @@ - /> \ No newline at end of file diff --git a/views/default/input/form.php b/views/default/input/form.php deleted file mode 100644 index 364e13f86..000000000 --- a/views/default/input/form.php +++ /dev/null @@ -1,33 +0,0 @@ - '', - 'method' => 'POST', -); - -$vars = array_merge($defaults, $vars); - -$body = $vars['body']; -unset($vars['body']); - -if ($vars['disable_security'] != TRUE) { - $body .= elgg_view('input/securitytoken'); -} -unset($vars['disable_security']); - -$attributes = html5_get_html_attributes($vars); - -echo "
$body
"; diff --git a/views/default/input/hidden.php b/views/default/input/hidden.php deleted file mode 100644 index 944382616..000000000 --- a/views/default/input/hidden.php +++ /dev/null @@ -1 +0,0 @@ - /> \ No newline at end of file diff --git a/views/default/input/image.php b/views/default/input/image.php index ae65d86ca..bb6a44045 100644 --- a/views/default/input/image.php +++ b/views/default/input/image.php @@ -1 +1 @@ - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/longtext.php b/views/default/input/longtext.php deleted file mode 100644 index 1020ef640..000000000 --- a/views/default/input/longtext.php +++ /dev/null @@ -1,26 +0,0 @@ - 'input-richtext', -); - -$value = $vars['value']; -unset($vars['value']); - -$attributes = html5_get_html_attributes(array_merge($defaults, $vars)); - -echo ""; \ No newline at end of file diff --git a/views/default/input/month.php b/views/default/input/month.php index 4bd320046..4eaf91048 100644 --- a/views/default/input/month.php +++ b/views/default/input/month.php @@ -4,4 +4,4 @@ if (isset($vars['value']) && is_int($vars['value'])) { } ?> - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/number.php b/views/default/input/number.php index ccfb72641..908e9382e 100644 --- a/views/default/input/number.php +++ b/views/default/input/number.php @@ -1 +1 @@ - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/option.php b/views/default/input/option.php index f420c9be4..05d5d649f 100644 --- a/views/default/input/option.php +++ b/views/default/input/option.php @@ -8,6 +8,6 @@ if (!isset($text)) { } $text = htmlentities($text, ENT_QUOTES, 'UTF-8'); -$attributes = html5_get_html_attributes($vars); +$attributes = elgg_format_attributes($vars); echo ""; \ No newline at end of file diff --git a/views/default/input/password.php b/views/default/input/password.php deleted file mode 100644 index 8c97cf020..000000000 --- a/views/default/input/password.php +++ /dev/null @@ -1 +0,0 @@ - /> \ No newline at end of file diff --git a/views/default/input/plaintext.php b/views/default/input/plaintext.php deleted file mode 100644 index cd0a7d6b5..000000000 --- a/views/default/input/plaintext.php +++ /dev/null @@ -1,22 +0,0 @@ - 'input-plaintext', -); - -$value = $vars['value']; -unset($vars['value']); - -$attributes = html5_get_html_attributes(array_merge($defaults, $vars)); - -echo ""; \ No newline at end of file diff --git a/views/default/input/pulldown.php b/views/default/input/pulldown.php deleted file mode 100644 index 8a30838d4..000000000 --- a/views/default/input/pulldown.php +++ /dev/null @@ -1,52 +0,0 @@ - "option" where "value" is an internal name and "option" is - * the value displayed on the button. Replaces $vars['options'] when defined. - */ - -$defaults = array( - 'class' => 'input-pulldown', -); - -$vars = array_merge($defaults, $vars); - -$options_values = $vars['options_values']; -unset($vars['options_values']); - -$options = $vars['options']; -unset($options); - -$value = $vars['value']; -unset($vars['value']); -?> - - \ No newline at end of file diff --git a/views/default/input/range.php b/views/default/input/range.php index 588b835d1..8d4d7f13d 100644 --- a/views/default/input/range.php +++ b/views/default/input/range.php @@ -7,4 +7,4 @@ $defaults = array( $vars = array_merge($defaults, $vars); ?> - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/reset.php b/views/default/input/reset.php deleted file mode 100644 index b1c7c06ed..000000000 --- a/views/default/input/reset.php +++ /dev/null @@ -1,10 +0,0 @@ - elgg_echo('reset'), -); - -$vars = array_merge($defaults, $vars); -?> - - /> \ No newline at end of file diff --git a/views/default/input/search.php b/views/default/input/search.php index 47988be51..29adba5fc 100644 --- a/views/default/input/search.php +++ b/views/default/input/search.php @@ -7,4 +7,4 @@ $defaults = array( $vars = array_merge($defaults, $vars); ?> - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/submit.php b/views/default/input/submit.php deleted file mode 100644 index 4c86f6c66..000000000 --- a/views/default/input/submit.php +++ /dev/null @@ -1,10 +0,0 @@ - elgg_echo('submit'), -); - -$vars = array_merge($defaults, $vars); -?> - - /> \ No newline at end of file diff --git a/views/default/input/tags.php b/views/default/input/tags.php deleted file mode 100644 index 3f5e2481a..000000000 --- a/views/default/input/tags.php +++ /dev/null @@ -1,23 +0,0 @@ - 'input-tags', - 'placeholder' => elgg_echo('placeholder:tags'), -); - -if (isset($vars['value']) && is_array($vars['value'])) { - $vars['value'] = implode(", ", $vars['value']); -} - -echo elgg_view('input/text', array_merge($defaults, $vars)); \ No newline at end of file diff --git a/views/default/input/tel.php b/views/default/input/tel.php index 441e85bf0..329554501 100644 --- a/views/default/input/tel.php +++ b/views/default/input/tel.php @@ -6,4 +6,4 @@ $defaults = array( $vars = array_merge($defaults, $vars); ?> - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/text.php b/views/default/input/text.php deleted file mode 100644 index 7bc22d04a..000000000 --- a/views/default/input/text.php +++ /dev/null @@ -1 +0,0 @@ - /> \ No newline at end of file diff --git a/views/default/input/time.php b/views/default/input/time.php index 641dd5244..58c8b0928 100644 --- a/views/default/input/time.php +++ b/views/default/input/time.php @@ -7,4 +7,4 @@ $defaults = array( $vars = array_merge($defaults, $vars); ?> - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/url.php b/views/default/input/url.php index a0851f4d9..d42d7c056 100644 --- a/views/default/input/url.php +++ b/views/default/input/url.php @@ -7,4 +7,4 @@ $defaults = array( $vars = array_merge($defaults, $vars); ?> - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/week.php b/views/default/input/week.php index d921755a9..59cf5d7f1 100644 --- a/views/default/input/week.php +++ b/views/default/input/week.php @@ -7,4 +7,4 @@ $defauts = array( $vars = array_merge($defaults, $vars); ?> - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/js/html5.php b/views/default/js/html5.php deleted file mode 100644 index ba2a517d9..000000000 --- a/views/default/js/html5.php +++ /dev/null @@ -1,12 +0,0 @@ -pluginspath.'html5/js/Modernizr-1.5.min.js'; - -$placeholder_script = $vars['url'].'mod/html5/js/jquery.placeholder-1.0.1.js'; -?> - -if (!Modernizr.input.placeholder) { - $(function() { $('[placeholder]').placeholder({className:'html5-placeholder'}); }); - document.write(''); -} diff --git a/views/default/output/url.php b/views/default/output/url.php index 274221a1b..31db9e928 100644 --- a/views/default/output/url.php +++ b/views/default/output/url.php @@ -43,5 +43,5 @@ if (!isset($body)) { } $vars['href'] = $url; -$attributes = html5_get_html_attributes($vars); +$attributes = elgg_format_attributes($vars); echo "$body"; -- cgit v1.2.3 From 48333eee0da7133f6b038252acabaf93bf94a9bd Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Fri, 18 Mar 2011 21:40:13 -0700 Subject: Added page/elements/doctype in anticipation of http://trac.elgg.org/ticket/3174 --- views/default/page/elements/doctype.php | 1 + 1 file changed, 1 insertion(+) create mode 100644 views/default/page/elements/doctype.php diff --git a/views/default/page/elements/doctype.php b/views/default/page/elements/doctype.php new file mode 100644 index 000000000..763b0739b --- /dev/null +++ b/views/default/page/elements/doctype.php @@ -0,0 +1 @@ + \ No newline at end of file -- cgit v1.2.3 From 16f9b5bf702572f90a7ab96263b340a6b24eaed6 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Fri, 18 Mar 2011 21:58:04 -0700 Subject: Adds module which uses
,
, and
tags --- views/default/page/components/module.php | 52 +++++++++++++++++++ views/default/page_elements/header.php | 87 -------------------------------- 2 files changed, 52 insertions(+), 87 deletions(-) create mode 100644 views/default/page/components/module.php delete mode 100644 views/default/page_elements/header.php diff --git a/views/default/page/components/module.php b/views/default/page/components/module.php new file mode 100644 index 000000000..eb5789bdb --- /dev/null +++ b/views/default/page/components/module.php @@ -0,0 +1,52 @@ +$header
"; + } +} else { + $header = "

$title

"; +} + +$body = "
$body
"; + +if (isset($vars['footer'])) { + if ($vars['footer']) { + $footer = "
$footer
"; + } +} + +$contents = $header . $body . $footer; +if ($show_inner) { + $contents = "
$contents
"; +} + +echo "
$contents
"; diff --git a/views/default/page_elements/header.php b/views/default/page_elements/header.php deleted file mode 100644 index a69f79cba..000000000 --- a/views/default/page_elements/header.php +++ /dev/null @@ -1,87 +0,0 @@ -sitename; -} else if (empty($vars['config']->sitename)) { - $title = $vars['title']; -} else { - $title = $vars['config']->sitename . ": " . $vars['title']; -} - -global $autofeed; -if (isset($autofeed) && $autofeed == true) { - $url = $url2 = full_url(); - if (substr_count($url,'?')) { - $url .= "&view=rss"; - } else { - $url .= "?view=rss"; - } - if (substr_count($url2,'?')) { - $url2 .= "&view=odd"; - } else { - $url2 .= "?view=opendd"; - } - $feedref = << - - -END; -} else { - $feedref = ""; -} - -// we won't trust server configuration but specify utf-8 -header('Content-type: text/html; charset=utf-8'); - -$version = get_version(); -$release = get_version(true); -?> - - - - - - - <?php echo $title; ?> - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3 From ba3410e1ed5b8a23214b14f0fd0ce8c55c35391d Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Sat, 19 Mar 2011 13:57:35 -0700 Subject: Valid manifest --- manifest.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manifest.xml b/manifest.xml index a5399845a..de132dc05 100644 --- a/manifest.xml +++ b/manifest.xml @@ -4,5 +4,9 @@ 1.0 Provides HTML5 support for Elgg (C) Evan Winslow 2010 - http://code.google.com/p/elgg-ewinslow + http://github.com/ewinslow/elgg-html5 + + elgg_version + 2011031400 + \ No newline at end of file -- cgit v1.2.3 From 1b1908d4c05392d07b0a0af086a567cbc53606ba Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 19 May 2011 15:59:07 -0700 Subject: Cleaned up all the input views --- views/default/input/color.php | 13 ++++++++++++- views/default/input/datetime-local.php | 10 +++++++++- views/default/input/datetime.php | 11 ++++++++++- views/default/input/email.php | 13 ++++++++++++- views/default/input/image.php | 12 +++++++++++- views/default/input/month.php | 11 ++++++++++- views/default/input/number.php | 12 +++++++++++- views/default/input/range.php | 7 +++++-- views/default/input/search.php | 7 +++++-- views/default/input/tel.php | 7 +++++-- views/default/input/time.php | 7 +++++-- views/default/input/url.php | 7 +++++-- views/default/input/week.php | 9 ++++++--- 13 files changed, 106 insertions(+), 20 deletions(-) diff --git a/views/default/input/color.php b/views/default/input/color.php index 8bc4ad2a3..be8154fc9 100644 --- a/views/default/input/color.php +++ b/views/default/input/color.php @@ -1 +1,12 @@ - /> \ No newline at end of file + 'elgg-input-color', +); + +$vars = array_merge($defaults, $vars); + +$vars['type'] = 'color'; + +?> + + /> \ No newline at end of file diff --git a/views/default/input/datetime-local.php b/views/default/input/datetime-local.php index 52902f543..468843901 100644 --- a/views/default/input/datetime-local.php +++ b/views/default/input/datetime-local.php @@ -1,6 +1,14 @@ 'elgg-input-datetime-local', +); + +$vars = array_merge($defaults, $vars); + if (isset($vars['value']) && is_int($vars['value'])) { $vars['value'] = date("Y-m-d\TH:i:s", $vars['value']); } + +$vars['type'] = 'datetime-local'; ?> - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/datetime.php b/views/default/input/datetime.php index 61262f234..69e4bd7f7 100644 --- a/views/default/input/datetime.php +++ b/views/default/input/datetime.php @@ -1,6 +1,15 @@ 'elgg-input-datetime', +); + +$vars = array_merge($defaults, $vars); + if (isset($vars['value']) && is_int($vars['value'])) { $vars['value'] = date("c", $vars['value']); } + +$vars['type'] = 'datetime'; + ?> - /> + /> diff --git a/views/default/input/email.php b/views/default/input/email.php index 15e36f145..de98d9c4f 100644 --- a/views/default/input/email.php +++ b/views/default/input/email.php @@ -1 +1,12 @@ - /> \ No newline at end of file + 'elgg-input-email', +); + +$vars = array_merge($defaults, $vars); + +$vars['type'] = 'email'; + +?> + + /> \ No newline at end of file diff --git a/views/default/input/image.php b/views/default/input/image.php index bb6a44045..cf740f782 100644 --- a/views/default/input/image.php +++ b/views/default/input/image.php @@ -1 +1,11 @@ - /> \ No newline at end of file + 'elgg-input-image', +); + +$vars = array_merge($defaults, $vars); + +$vars['type'] = 'image'; + +?> + /> \ No newline at end of file diff --git a/views/default/input/month.php b/views/default/input/month.php index 4eaf91048..c99b3f34c 100644 --- a/views/default/input/month.php +++ b/views/default/input/month.php @@ -1,7 +1,16 @@ 'elgg-input-month', +); + +$vars = array_merge($defaults, $vars); + if (isset($vars['value']) && is_int($vars['value'])) { $vars['value'] = date("Y-m", $vars['value']); } + +$vars['type'] = 'month'; + ?> - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/number.php b/views/default/input/number.php index 908e9382e..ec4938734 100644 --- a/views/default/input/number.php +++ b/views/default/input/number.php @@ -1 +1,11 @@ - /> \ No newline at end of file + 'elgg-input-number', +); + +$vars = array_merge($defaults, $vars); + +$vars['type'] = 'number'; + +?> + /> \ No newline at end of file diff --git a/views/default/input/range.php b/views/default/input/range.php index 8d4d7f13d..235687257 100644 --- a/views/default/input/range.php +++ b/views/default/input/range.php @@ -1,10 +1,13 @@ 'elgg-input-range', ); $vars = array_merge($defaults, $vars); + +$vars['type'] = 'range'; + ?> - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/search.php b/views/default/input/search.php index 29adba5fc..becf8a11b 100644 --- a/views/default/input/search.php +++ b/views/default/input/search.php @@ -1,10 +1,13 @@ elgg_echo('placeholder:search'), + 'class' => 'elgg-input-search', ); $vars = array_merge($defaults, $vars); + +$vars['type'] = 'search'; + ?> - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/tel.php b/views/default/input/tel.php index 329554501..0704344a8 100644 --- a/views/default/input/tel.php +++ b/views/default/input/tel.php @@ -1,9 +1,12 @@ elgg_echo('placeholder:tel'), + 'class' => 'elgg-input-tel', ); $vars = array_merge($defaults, $vars); + +$vars['type'] = 'tel'; + ?> - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/time.php b/views/default/input/time.php index 58c8b0928..6bb557266 100644 --- a/views/default/input/time.php +++ b/views/default/input/time.php @@ -1,10 +1,13 @@ elgg_echo('placeholder:time'), + 'class' => 'elgg-input-time', ); $vars = array_merge($defaults, $vars); + +$vars['type'] = 'time'; + ?> - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/url.php b/views/default/input/url.php index d42d7c056..ed3cd08a2 100644 --- a/views/default/input/url.php +++ b/views/default/input/url.php @@ -1,10 +1,13 @@ elgg_echo('placeholder:url'), + 'class' => 'elgg-input-url', ); $vars = array_merge($defaults, $vars); + +$vars['type'] = 'url'; + ?> - /> \ No newline at end of file + /> \ No newline at end of file diff --git a/views/default/input/week.php b/views/default/input/week.php index 59cf5d7f1..3d09ba07f 100644 --- a/views/default/input/week.php +++ b/views/default/input/week.php @@ -1,10 +1,13 @@ elgg_echo('placeholder:week'), +$defaults = array( + 'class' => 'elgg-input-week', ); $vars = array_merge($defaults, $vars); + +$vars['type'] = 'week'; + ?> - /> \ No newline at end of file + /> \ No newline at end of file -- cgit v1.2.3 From c5ed6305bfc47d7e4296bbc71df03a6cc21ab3d8 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 19 May 2011 16:03:34 -0700 Subject: Removed override of core view -- don't want to have to keep up with any updates. Also, outside of scope of this theme to transform a site into using html5 -- hopefully Elgg core would adopt this eventually. --- views/default/page/components/module.php | 52 -------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 views/default/page/components/module.php diff --git a/views/default/page/components/module.php b/views/default/page/components/module.php deleted file mode 100644 index eb5789bdb..000000000 --- a/views/default/page/components/module.php +++ /dev/null @@ -1,52 +0,0 @@ -$header"; - } -} else { - $header = "

$title

"; -} - -$body = "
$body
"; - -if (isset($vars['footer'])) { - if ($vars['footer']) { - $footer = "
$footer
"; - } -} - -$contents = $header . $body . $footer; -if ($show_inner) { - $contents = "
$contents
"; -} - -echo "
$contents
"; -- cgit v1.2.3 From 72fc1afa98e78c67baafdd5b777a5878c9607daf Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 19 May 2011 16:04:04 -0700 Subject: Updated manifest file to include the required "name" tag --- manifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/manifest.xml b/manifest.xml index de132dc05..010d2ab1c 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,5 +1,6 @@ + HTML5 Evan Winslow 1.0 Provides HTML5 support for Elgg -- cgit v1.2.3 From 888751ed186a8312fa482ae41a91eed0f8786d2b Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 19 May 2011 16:04:19 -0700 Subject: Moved 3rd party javascripts to a vendors folder --- js/Modernizr-1.5.min.js | 28 --------------- js/jquery.placeholder-1.0.1.js | 58 ------------------------------ start.php | 6 ++-- vendors/Modernizr-1.5.min.js | 28 +++++++++++++++ vendors/jquery/jquery.placeholder-1.0.1.js | 58 ++++++++++++++++++++++++++++++ 5 files changed, 89 insertions(+), 89 deletions(-) delete mode 100644 js/Modernizr-1.5.min.js delete mode 100644 js/jquery.placeholder-1.0.1.js create mode 100644 vendors/Modernizr-1.5.min.js create mode 100644 vendors/jquery/jquery.placeholder-1.0.1.js diff --git a/js/Modernizr-1.5.min.js b/js/Modernizr-1.5.min.js deleted file mode 100644 index a8dc724e6..000000000 --- a/js/Modernizr-1.5.min.js +++ /dev/null @@ -1,28 +0,0 @@ -/*! - * Modernizr JavaScript library 1.5 - * http://www.modernizr.com/ - * - * Copyright (c) 2009-2010 Faruk Ates - http://farukat.es/ - * Dual-licensed under the BSD and MIT licenses. - * http://www.modernizr.com/license/ - * - * Featuring major contributions by - * Paul Irish - http://paulirish.com - */ - window.Modernizr=function(i,e,I){function C(a,b){for(var c in a)if(m[a[c]]!==I&&(!b||b(a[c],D)))return true}function r(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);return!!C([a,"Webkit"+c,"Moz"+c,"O"+c,"ms"+c,"Khtml"+c],b)}function P(){j[E]=function(a){for(var b=0,c=a.length;b7)};d.historymanagement=function(){return!!(i.history&&history.pushState)};d.draganddrop=function(){return u("drag")&&u("dragstart")&&u("dragenter")&&u("dragover")&&u("dragleave")&&u("dragend")&&u("drop")};d.websockets=function(){return"WebSocket"in i};d.rgba=function(){m.cssText="background-color:rgba(150,255,150,.5)";return(""+m.backgroundColor).indexOf("rgba")!==-1};d.hsla=function(){m.cssText="background-color:hsla(120,40%,100%,.5)";return(""+ - m.backgroundColor).indexOf("rgba")!==-1};d.multiplebgs=function(){m.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(m.background)};d.backgroundsize=function(){return r("backgroundSize")};d.borderimage=function(){return r("borderImage")};d.borderradius=function(){return r("borderRadius","",function(a){return(""+a).indexOf("orderRadius")!==-1})};d.boxshadow=function(){return r("boxShadow")};d.opacity=function(){var a=y.join("opacity:.5;")+"";m.cssText=a;return(""+m.opacity).indexOf("0.5")!== - -1};d.cssanimations=function(){return r("animationName")};d.csscolumns=function(){return r("columnCount")};d.cssgradients=function(){var a=("background-image:"+y.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+y.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);m.cssText=a;return(""+m.backgroundImage).indexOf("gradient")!==-1};d.cssreflections=function(){return r("boxReflect")};d.csstransforms=function(){return!!C(["transformProperty", - "WebkitTransform","MozTransform","OTransform","msTransform"])};d.csstransforms3d=function(){var a=!!C(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);if(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent="@media ("+y.join("transform-3d),(")+"modernizr){#modernizr{height:3px}}";e.getElementsByTagName("head")[0].appendChild(b);c.id="modernizr";s.appendChild(c);a=c.offsetHeight===3;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}return a}; - d.csstransitions=function(){return r("transitionProperty")};d.fontface=function(){var a;if(/*@cc_on@if(@_jscript_version>=5)!@end@*/0)a=true;else{var b=e.createElement("style"),c=e.createElement("span"),h,t=false,g=e.body,o,w;b.textContent="@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAAAAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAAAAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAAAK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZXAwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAAAAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDAAAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoAAwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC88sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCqv1WIgJmAAACAFUAAAIRAc0ADwAfAAATFRQWOwEyNj0BNCYrASIGARQGKwEiJj0BNDY7ATIWFX8aIvAiGhoi8CIaAZIoN/43KCg3/jcoAWD0JB4eJPQkHh7++EY2NkbVRjY2RgAAAAABAEH/+QCdAEEACQAANjQ2MzIWFAYjIkEeEA8fHw8QDxwWFhwWAAAAAQAAAAIAAIuYbWpfDzz1AAsEAAAAAADFn9IuAAAAAMWf0i797/8zA4gDMwAAAAgAAgAAAAAAAAABAAADM/8zAFwDx/3v/98DiAABAAAAAAAAAAAAAAAAAAAABQF2ACIAAAAAAVUAAAJmAFUA3QBBAAAAKgAqACoAWgBuAAEAAAAFAFAABwBUAAQAAgAAAAEAAQAAAEAALgADAAMAAAAQAMYAAQAAAAAAAACLAAAAAQAAAAAAAQAhAIsAAQAAAAAAAgAFAKwAAQAAAAAAAwBDALEAAQAAAAAABAAnAPQAAQAAAAAABQAKARsAAQAAAAAABgAmASUAAQAAAAAADgAaAUsAAwABBAkAAAEWAWUAAwABBAkAAQBCAnsAAwABBAkAAgAKAr0AAwABBAkAAwCGAscAAwABBAkABABOA00AAwABBAkABQAUA5sAAwABBAkABgBMA68AAwABBAkADgA0A/tDb3B5cmlnaHQgMjAwOSBieSBEYW5pZWwgSm9obnNvbi4gIFJlbGVhc2VkIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgT3BlbiBGb250IExpY2Vuc2UuIEtheWFoIExpIGdseXBocyBhcmUgcmVsZWFzZWQgdW5kZXIgdGhlIEdQTCB2ZXJzaW9uIDMuYmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhTGlnaHRiYWVjMmE5MmJmZmU1MDMyIC0gc3Vic2V0IG9mIEZvbnRGb3JnZSAyLjAgOiBKdXJhIExpZ2h0IDogMjMtMS0yMDA5YmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhIExpZ2h0VmVyc2lvbiAyIGJhZWMyYTkyYmZmZTUwMzIgLSBzdWJzZXQgb2YgSnVyYUxpZ2h0aHR0cDovL3NjcmlwdHMuc2lsLm9yZy9PRkwAQwBvAHAAeQByAGkAZwBoAHQAIAAyADAAMAA5ACAAYgB5ACAARABhAG4AaQBlAGwAIABKAG8AaABuAHMAbwBuAC4AIAAgAFIAZQBsAGUAYQBzAGUAZAAgAHUAbgBkAGUAcgAgAHQAaABlACAAdABlAHIAbQBzACAAbwBmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUALgAgAEsAYQB5AGEAaAAgAEwAaQAgAGcAbAB5AHAAaABzACAAYQByAGUAIAByAGUAbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAEcAUABMACAAdgBlAHIAcwBpAG8AbgAgADMALgBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQBMAGkAZwBoAHQAYgBhAGUAYwAyAGEAOQAyAGIAZgBmAGUANQAwADMAMgAgAC0AIABzAHUAYgBzAGUAdAAgAG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAAgADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgAEwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGIAYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAIAAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBhAEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==')}"; - e.getElementsByTagName("head")[0].appendChild(b);c.setAttribute("style","font:99px _,arial,helvetica;position:absolute;visibility:hidden");if(!g){g=s.appendChild(e.createElement("fontface"));t=true}c.innerHTML="........";c.id="fonttest";g.appendChild(c);h=c.offsetWidth*c.offsetHeight;c.style.font="99px testfont,_,arial,helvetica";a=h!==c.offsetWidth*c.offsetHeight;var v=function(){if(g.parentNode){a=j.fontface=h!==c.offsetWidth*c.offsetHeight;s.className=s.className.replace(/(no-)?fontface\b/,"")+ - (a?" ":" no-")+"fontface"}};setTimeout(v,75);setTimeout(v,150);addEventListener("load",function(){v();(w=true)&&o&&o(a);setTimeout(function(){t||(g=c);g.parentNode.removeChild(g);b.parentNode.removeChild(b)},50)},false)}j._fontfaceready=function(p){w||a?p(a):(o=p)};return a||h!==c.offsetWidth};d.video=function(){var a=e.createElement("video"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('video/ogg; codecs="theora"');b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"');b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return b}; - d.audio=function(){var a=e.createElement("audio"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');b.mp3=a.canPlayType("audio/mpeg;");b.wav=a.canPlayType('audio/wav; codecs="1"');b.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}return b};d.localStorage=function(){return"localStorage"in i&&i.localStorage!==null};d.sessionStorage=function(){try{return"sessionStorage"in i&&i.sessionStorage!==null}catch(a){return false}};d.webworkers=function(){return!!i.Worker}; - d.applicationCache=function(){var a=i.applicationCache;return!!(a&&typeof a.status!="undefined"&&typeof a.update=="function"&&typeof a.swapCache=="function")};d.svg=function(){return!!e.createElementNS&&!!e.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect};d.smil=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg","animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg", - "clipPath")))};for(var z in d)if(O(d,z))N.push(((j[z.toLowerCase()]=d[z]())?"":"no-")+z.toLowerCase());j[E]||P();j.addTest=function(a,b){a=a.toLowerCase();if(!j[a]){b=!!b();s.className+=" "+(b?"":"no-")+a;j[a]=b;return j}};m.cssText="";D=n=null;(function(){var a=e.createElement("div");a.innerHTML="";return a.childNodes.length!==1})()&&function(a,b){function c(f,k){if(o[f])o[f].styleSheet.cssText+=k;else{var l=t[G],q=b[A]("style");q.media=f;l.insertBefore(q,l[G]);o[f]=q;c(f,k)}}function h(f, - k){for(var l=new RegExp("\\b("+w+")\\b(?!.*[;}])","gi"),q=function(B){return".iepp_"+B},x=-1;++x\\s*$","i");g.innerHTML=f.outerHTML.replace(/\r|\n/g," ").replace(l,f.currentStyle.display=="block"?"":"");l=g.childNodes[0];l.className+=" iepp_"+q;l=p[p.length]=[f,l];f.parentNode.replaceChild(l[1],l[0])}h(b.styleSheets,"all")});a.attachEvent("onafterprint", - function(){for(var f=-1,k;++f7)};d.historymanagement=function(){return!!(i.history&&history.pushState)};d.draganddrop=function(){return u("drag")&&u("dragstart")&&u("dragenter")&&u("dragover")&&u("dragleave")&&u("dragend")&&u("drop")};d.websockets=function(){return"WebSocket"in i};d.rgba=function(){m.cssText="background-color:rgba(150,255,150,.5)";return(""+m.backgroundColor).indexOf("rgba")!==-1};d.hsla=function(){m.cssText="background-color:hsla(120,40%,100%,.5)";return(""+ + m.backgroundColor).indexOf("rgba")!==-1};d.multiplebgs=function(){m.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(m.background)};d.backgroundsize=function(){return r("backgroundSize")};d.borderimage=function(){return r("borderImage")};d.borderradius=function(){return r("borderRadius","",function(a){return(""+a).indexOf("orderRadius")!==-1})};d.boxshadow=function(){return r("boxShadow")};d.opacity=function(){var a=y.join("opacity:.5;")+"";m.cssText=a;return(""+m.opacity).indexOf("0.5")!== + -1};d.cssanimations=function(){return r("animationName")};d.csscolumns=function(){return r("columnCount")};d.cssgradients=function(){var a=("background-image:"+y.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+y.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);m.cssText=a;return(""+m.backgroundImage).indexOf("gradient")!==-1};d.cssreflections=function(){return r("boxReflect")};d.csstransforms=function(){return!!C(["transformProperty", + "WebkitTransform","MozTransform","OTransform","msTransform"])};d.csstransforms3d=function(){var a=!!C(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);if(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent="@media ("+y.join("transform-3d),(")+"modernizr){#modernizr{height:3px}}";e.getElementsByTagName("head")[0].appendChild(b);c.id="modernizr";s.appendChild(c);a=c.offsetHeight===3;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}return a}; + d.csstransitions=function(){return r("transitionProperty")};d.fontface=function(){var a;if(/*@cc_on@if(@_jscript_version>=5)!@end@*/0)a=true;else{var b=e.createElement("style"),c=e.createElement("span"),h,t=false,g=e.body,o,w;b.textContent="@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAAAAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAAAAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAAAK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZXAwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAAAAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDAAAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoAAwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC88sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCqv1WIgJmAAACAFUAAAIRAc0ADwAfAAATFRQWOwEyNj0BNCYrASIGARQGKwEiJj0BNDY7ATIWFX8aIvAiGhoi8CIaAZIoN/43KCg3/jcoAWD0JB4eJPQkHh7++EY2NkbVRjY2RgAAAAABAEH/+QCdAEEACQAANjQ2MzIWFAYjIkEeEA8fHw8QDxwWFhwWAAAAAQAAAAIAAIuYbWpfDzz1AAsEAAAAAADFn9IuAAAAAMWf0i797/8zA4gDMwAAAAgAAgAAAAAAAAABAAADM/8zAFwDx/3v/98DiAABAAAAAAAAAAAAAAAAAAAABQF2ACIAAAAAAVUAAAJmAFUA3QBBAAAAKgAqACoAWgBuAAEAAAAFAFAABwBUAAQAAgAAAAEAAQAAAEAALgADAAMAAAAQAMYAAQAAAAAAAACLAAAAAQAAAAAAAQAhAIsAAQAAAAAAAgAFAKwAAQAAAAAAAwBDALEAAQAAAAAABAAnAPQAAQAAAAAABQAKARsAAQAAAAAABgAmASUAAQAAAAAADgAaAUsAAwABBAkAAAEWAWUAAwABBAkAAQBCAnsAAwABBAkAAgAKAr0AAwABBAkAAwCGAscAAwABBAkABABOA00AAwABBAkABQAUA5sAAwABBAkABgBMA68AAwABBAkADgA0A/tDb3B5cmlnaHQgMjAwOSBieSBEYW5pZWwgSm9obnNvbi4gIFJlbGVhc2VkIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgT3BlbiBGb250IExpY2Vuc2UuIEtheWFoIExpIGdseXBocyBhcmUgcmVsZWFzZWQgdW5kZXIgdGhlIEdQTCB2ZXJzaW9uIDMuYmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhTGlnaHRiYWVjMmE5MmJmZmU1MDMyIC0gc3Vic2V0IG9mIEZvbnRGb3JnZSAyLjAgOiBKdXJhIExpZ2h0IDogMjMtMS0yMDA5YmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhIExpZ2h0VmVyc2lvbiAyIGJhZWMyYTkyYmZmZTUwMzIgLSBzdWJzZXQgb2YgSnVyYUxpZ2h0aHR0cDovL3NjcmlwdHMuc2lsLm9yZy9PRkwAQwBvAHAAeQByAGkAZwBoAHQAIAAyADAAMAA5ACAAYgB5ACAARABhAG4AaQBlAGwAIABKAG8AaABuAHMAbwBuAC4AIAAgAFIAZQBsAGUAYQBzAGUAZAAgAHUAbgBkAGUAcgAgAHQAaABlACAAdABlAHIAbQBzACAAbwBmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUALgAgAEsAYQB5AGEAaAAgAEwAaQAgAGcAbAB5AHAAaABzACAAYQByAGUAIAByAGUAbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAEcAUABMACAAdgBlAHIAcwBpAG8AbgAgADMALgBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQBMAGkAZwBoAHQAYgBhAGUAYwAyAGEAOQAyAGIAZgBmAGUANQAwADMAMgAgAC0AIABzAHUAYgBzAGUAdAAgAG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAAgADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgAEwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGIAYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAIAAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBhAEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==')}"; + e.getElementsByTagName("head")[0].appendChild(b);c.setAttribute("style","font:99px _,arial,helvetica;position:absolute;visibility:hidden");if(!g){g=s.appendChild(e.createElement("fontface"));t=true}c.innerHTML="........";c.id="fonttest";g.appendChild(c);h=c.offsetWidth*c.offsetHeight;c.style.font="99px testfont,_,arial,helvetica";a=h!==c.offsetWidth*c.offsetHeight;var v=function(){if(g.parentNode){a=j.fontface=h!==c.offsetWidth*c.offsetHeight;s.className=s.className.replace(/(no-)?fontface\b/,"")+ + (a?" ":" no-")+"fontface"}};setTimeout(v,75);setTimeout(v,150);addEventListener("load",function(){v();(w=true)&&o&&o(a);setTimeout(function(){t||(g=c);g.parentNode.removeChild(g);b.parentNode.removeChild(b)},50)},false)}j._fontfaceready=function(p){w||a?p(a):(o=p)};return a||h!==c.offsetWidth};d.video=function(){var a=e.createElement("video"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('video/ogg; codecs="theora"');b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"');b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return b}; + d.audio=function(){var a=e.createElement("audio"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');b.mp3=a.canPlayType("audio/mpeg;");b.wav=a.canPlayType('audio/wav; codecs="1"');b.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}return b};d.localStorage=function(){return"localStorage"in i&&i.localStorage!==null};d.sessionStorage=function(){try{return"sessionStorage"in i&&i.sessionStorage!==null}catch(a){return false}};d.webworkers=function(){return!!i.Worker}; + d.applicationCache=function(){var a=i.applicationCache;return!!(a&&typeof a.status!="undefined"&&typeof a.update=="function"&&typeof a.swapCache=="function")};d.svg=function(){return!!e.createElementNS&&!!e.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect};d.smil=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg","animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg", + "clipPath")))};for(var z in d)if(O(d,z))N.push(((j[z.toLowerCase()]=d[z]())?"":"no-")+z.toLowerCase());j[E]||P();j.addTest=function(a,b){a=a.toLowerCase();if(!j[a]){b=!!b();s.className+=" "+(b?"":"no-")+a;j[a]=b;return j}};m.cssText="";D=n=null;(function(){var a=e.createElement("div");a.innerHTML="";return a.childNodes.length!==1})()&&function(a,b){function c(f,k){if(o[f])o[f].styleSheet.cssText+=k;else{var l=t[G],q=b[A]("style");q.media=f;l.insertBefore(q,l[G]);o[f]=q;c(f,k)}}function h(f, + k){for(var l=new RegExp("\\b("+w+")\\b(?!.*[;}])","gi"),q=function(B){return".iepp_"+B},x=-1;++x\\s*$","i");g.innerHTML=f.outerHTML.replace(/\r|\n/g," ").replace(l,f.currentStyle.display=="block"?"":"");l=g.childNodes[0];l.className+=" iepp_"+q;l=p[p.length]=[f,l];f.parentNode.replaceChild(l[1],l[0])}h(b.styleSheets,"all")});a.attachEvent("onafterprint", + function(){for(var f=-1,k;++f Date: Thu, 19 May 2011 16:07:44 -0700 Subject: Updated manifest, added README --- README | 7 +++++++ manifest.xml | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 README diff --git a/README b/README new file mode 100644 index 000000000..29e8181b9 --- /dev/null +++ b/README @@ -0,0 +1,7 @@ +# HTML5 Plugin for Elgg # +Provides several javascript libraries + views that allow developers to start using HTML5 features in Elgg today. + +## Features ## +* HTML5 input views +* Modernizr javascript library for easy html5 feature detection +* Javascript shim for the placeholder attribute \ No newline at end of file diff --git a/manifest.xml b/manifest.xml index 010d2ab1c..3f874d3bf 100644 --- a/manifest.xml +++ b/manifest.xml @@ -3,7 +3,9 @@ HTML5 Evan Winslow 1.0 - Provides HTML5 support for Elgg + + Provides several javascript libraries + views that allow developers to start using HTML5 features in Elgg today. + (C) Evan Winslow 2010 http://github.com/ewinslow/elgg-html5 -- cgit v1.2.3 From eba13eb88fb8d16d94c93c113e7c136c7559881b Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 19 May 2011 16:19:46 -0700 Subject: Deleted some unnecessary inputs, added theme previews for all new inputs --- start.php | 1 + views/default/html5/theme_preview/forms/inputs.php | 101 +++++++++++++++++++++ views/default/input/email.php | 12 --- views/default/input/url.php | 13 --- 4 files changed, 102 insertions(+), 25 deletions(-) create mode 100644 views/default/html5/theme_preview/forms/inputs.php delete mode 100644 views/default/input/email.php delete mode 100644 views/default/input/url.php diff --git a/start.php b/start.php index 3df8fe0bd..462eb88e7 100644 --- a/start.php +++ b/start.php @@ -2,6 +2,7 @@ function html5_init() { elgg_extend_view('css/elgg', 'html5/css', 1); + elgg_extend_view('theme_preview/forms/inputs', 'html5/theme_preview/forms/inputs'); elgg_register_js('Modernizr', '/mod/html5/vendors/Modernizr-1.5.js', 'head', 1); elgg_register_js('jquery.placeholder', '/mod/html5/vendors/jquery/jquery.placeholder-1.0.1.js', 'footer'); diff --git a/views/default/html5/theme_preview/forms/inputs.php b/views/default/html5/theme_preview/forms/inputs.php new file mode 100644 index 000000000..de38dc71c --- /dev/null +++ b/views/default/html5/theme_preview/forms/inputs.php @@ -0,0 +1,101 @@ +
+
+ HTML5 Inputs +
+ + 'color', + 'id' => 'color', + )); + ?> +
+
+ + 'datetime-local', + 'id' => 'datetime-local', + )); + ?> +
+
+
+ 'datetime', + 'id' => 'datetime', + )); + ?> +
+
+
+ 'email', + 'id' => 'email', + )); + ?> +
+
+
+ 'image', + 'id' => 'image', + )); + ?> +
+
+
+ 'month', + 'id' => 'month', + )); + ?> +
+
+ + 'number', + 'id' => 'number', + )); + ?> +
+
+ + 'range', + 'id' => 'range', + )); + ?> +
+
+ + 'search', + 'id' => 'search', + )); + ?> +
+
+ + 'tel', + 'id' => 'tel', + )); + ?> +
+
+ + 'time', + 'id' => 'time', + )); + ?> +
+
+ + 'week', + 'id' => 'week', + )); + ?> +
+
+
\ No newline at end of file diff --git a/views/default/input/email.php b/views/default/input/email.php deleted file mode 100644 index de98d9c4f..000000000 --- a/views/default/input/email.php +++ /dev/null @@ -1,12 +0,0 @@ - 'elgg-input-email', -); - -$vars = array_merge($defaults, $vars); - -$vars['type'] = 'email'; - -?> - - /> \ No newline at end of file diff --git a/views/default/input/url.php b/views/default/input/url.php deleted file mode 100644 index ed3cd08a2..000000000 --- a/views/default/input/url.php +++ /dev/null @@ -1,13 +0,0 @@ - 'elgg-input-url', -); - -$vars = array_merge($defaults, $vars); - -$vars['type'] = 'url'; - -?> - - /> \ No newline at end of file -- cgit v1.2.3 From 0c70885f0a18474656a382f54f85706efaf17752 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Thu, 19 May 2011 16:19:57 -0700 Subject: Deleted extraneous language file --- languages/en.php | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 languages/en.php diff --git a/languages/en.php b/languages/en.php deleted file mode 100644 index e810da873..000000000 --- a/languages/en.php +++ /dev/null @@ -1,19 +0,0 @@ - '', - 'placeholder:color' => '', - 'placeholder:datetime-local' => '', - 'placeholder:datetime' => '', - 'placeholder:email' => '', - 'placeholder:month' => '', - 'placeholder:number' => '', - 'placeholder:password' => '', - 'placeholder:search' => '', - 'placeholder:tags' => '', - 'placeholder:tel' => '', - 'placeholder:time' => '', - 'placeholder:url' => '', - 'placeholder:week' => '', -); - -add_translation('en', $english); \ No newline at end of file -- cgit v1.2.3 From 38342cd98c03c9aacd985f97557148eeed628c42 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Fri, 20 May 2011 15:00:44 -0700 Subject: removed output/url view: not providing any special html5 features --- views/default/output/url.php | 47 -------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 views/default/output/url.php diff --git a/views/default/output/url.php b/views/default/output/url.php deleted file mode 100644 index 31db9e928..000000000 --- a/views/default/output/url.php +++ /dev/null @@ -1,47 +0,0 @@ - tags - * @uses string $vars['text'] The string between the tags. - * @uses bool $vars['is_action'] Is this a link to an action? - * - */ - -if (isset($vars['value'])) { - $vars['href'] = $vars['value']; - unset($vars['value']); -} - -$url = trim($vars['href']); - -if (isset($vars['is_action']) && $vars['is_action']) { - $url = elgg_add_action_tokens_to_url($url); - unset($vars['is_action']); -} - -if (isset($vars['body'])) { - $body = $vars['body']; - unset($vars['body']); -} - -if (!isset($body)) { - if (isset($vars['text'])) { - $text = $vars['text']; - unset($vars['text']); - } else { - $text = $url; - } - - $body = htmlentities($text, ENT_QUOTES, 'UTF-8'); -} - -$vars['href'] = $url; -$attributes = elgg_format_attributes($vars); -echo "$body"; -- cgit v1.2.3 From eedfbb15b8d1e81e2e11b34f02b68df6700b288d Mon Sep 17 00:00:00 2001 From: Sem Date: Tue, 31 Jul 2012 22:09:18 +0200 Subject: Added doctype, header, footer and aside tags. Fixed time tag. --- views/default/output/friendlytime.php | 3 +- views/default/page/admin.php | 66 ++++++++++++++++++++++++ views/default/page/default.php | 74 +++++++++++++++++++++++++++ views/default/page/elements/doctype.php | 1 - views/default/page/elements/foot.php | 11 ++++ views/default/page/elements/footer.php | 22 ++++++++ views/default/page/elements/head.php | 79 +++++++++++++++++++++++++++++ views/default/page/elements/owner_block.php | 31 +++++++++++ views/default/page/layouts/admin.php | 40 +++++++++++++++ views/default/page/layouts/one_sidebar.php | 48 ++++++++++++++++++ views/default/page/layouts/two_sidebar.php | 43 ++++++++++++++++ views/default/page/walled_garden.php | 27 ++++++++++ 12 files changed, 443 insertions(+), 2 deletions(-) create mode 100644 views/default/page/admin.php create mode 100644 views/default/page/default.php delete mode 100644 views/default/page/elements/doctype.php create mode 100644 views/default/page/elements/foot.php create mode 100644 views/default/page/elements/footer.php create mode 100644 views/default/page/elements/head.php create mode 100644 views/default/page/elements/owner_block.php create mode 100644 views/default/page/layouts/admin.php create mode 100644 views/default/page/layouts/one_sidebar.php create mode 100644 views/default/page/layouts/two_sidebar.php create mode 100644 views/default/page/walled_garden.php diff --git a/views/default/output/friendlytime.php b/views/default/output/friendlytime.php index 3618e7f56..c9c74e880 100644 --- a/views/default/output/friendlytime.php +++ b/views/default/output/friendlytime.php @@ -8,5 +8,6 @@ $friendly_time = elgg_get_friendly_time($vars['time']); $timestamp = htmlentities(date(elgg_echo('friendlytime:date_format'), $vars['time'])); +$datetime = htmlentities(date("Y-m-d h:m", $vars['time'])); -echo ""; +echo ""; diff --git a/views/default/page/admin.php b/views/default/page/admin.php new file mode 100644 index 000000000..7d0449096 --- /dev/null +++ b/views/default/page/admin.php @@ -0,0 +1,66 @@ +$notices_html"; +} + +// render content before head so that JavaScript and CSS can be loaded. See #4032 +$messages = elgg_view('page/elements/messages', array('object' => $vars['sysmessages'])); +$header = elgg_view('admin/header', $vars); +$body = $vars['body']; +$footer = elgg_view('admin/footer', $vars); + + +// Set the content type +header("Content-type: text/html; charset=UTF-8"); + +?> + + + + + + +
+
+
+
+ +
+
+
+ + +
+
+
+ +
+
+ +
+
+ + + + \ No newline at end of file diff --git a/views/default/page/default.php b/views/default/page/default.php new file mode 100644 index 000000000..f75fa1908 --- /dev/null +++ b/views/default/page/default.php @@ -0,0 +1,74 @@ + $vars['sysmessages'])); +$header = elgg_view('page/elements/header', $vars); +$body = elgg_view('page/elements/body', $vars); +$footer = elgg_view('page/elements/footer', $vars); + +// Set the content type +header("Content-type: text/html; charset=UTF-8"); + +?> + + + + + + +
+
+ +
+ + +
+
+ +
+
+ + +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+ + + \ No newline at end of file diff --git a/views/default/page/elements/doctype.php b/views/default/page/elements/doctype.php deleted file mode 100644 index 763b0739b..000000000 --- a/views/default/page/elements/doctype.php +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/views/default/page/elements/foot.php b/views/default/page/elements/foot.php new file mode 100644 index 000000000..a56b373b4 --- /dev/null +++ b/views/default/page/elements/foot.php @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/views/default/page/elements/footer.php b/views/default/page/elements/footer.php new file mode 100644 index 000000000..ded2cea9a --- /dev/null +++ b/views/default/page/elements/footer.php @@ -0,0 +1,22 @@ + 'priority', 'class' => 'elgg-menu-hz')); + +$powered_url = elgg_get_site_url() . "_graphics/powered_by_elgg_badge_drk_bckgnd.gif"; + +echo '
'; +echo elgg_view('output/url', array( + 'href' => 'http://elgg.org', + 'text' => "\"Powered", + 'class' => '', + 'is_trusted' => true, +)); +echo '
'; diff --git a/views/default/page/elements/head.php b/views/default/page/elements/head.php new file mode 100644 index 000000000..b1556b547 --- /dev/null +++ b/views/default/page/elements/head.php @@ -0,0 +1,79 @@ + + +END; +} else { + $feedref = ""; +} + +$js = elgg_get_loaded_js('head'); +$css = elgg_get_loaded_css(); + +$version = get_version(); +$release = get_version(true); +?> + + + + <?php echo $title; ?> + + + + + + + + + + + + + + + + + +getGUID() != elgg_get_logged_in_user_guid())) { + + $header = elgg_view_entity($owner, array('full_view' => false)); + + $body = elgg_view_menu('owner_block', array('entity' => $owner)); + + $body .= elgg_view('page/elements/owner_block/extend', $vars); + + echo elgg_view('page/components/module', array( + 'header' => $header, + 'body' => $body, + 'class' => 'elgg-owner-block', + )); +} + +elgg_pop_context(); \ No newline at end of file diff --git a/views/default/page/layouts/admin.php b/views/default/page/layouts/admin.php new file mode 100644 index 000000000..f9975d3e4 --- /dev/null +++ b/views/default/page/layouts/admin.php @@ -0,0 +1,40 @@ + + +
+ +
+
+ 'priority', + 'class' => 'elgg-menu-hz', + )); + + if (isset($vars['title'])) { + echo elgg_view_title($vars['title']); + } + ?> +
+ +
+
\ No newline at end of file diff --git a/views/default/page/layouts/one_sidebar.php b/views/default/page/layouts/one_sidebar.php new file mode 100644 index 000000000..61d6fed0e --- /dev/null +++ b/views/default/page/layouts/one_sidebar.php @@ -0,0 +1,48 @@ + + +
+ + +
+ +
+
diff --git a/views/default/page/layouts/two_sidebar.php b/views/default/page/layouts/two_sidebar.php new file mode 100644 index 000000000..b2660a155 --- /dev/null +++ b/views/default/page/layouts/two_sidebar.php @@ -0,0 +1,43 @@ + + +
+ + + +
+ +
+
diff --git a/views/default/page/walled_garden.php b/views/default/page/walled_garden.php new file mode 100644 index 000000000..e1d57dac8 --- /dev/null +++ b/views/default/page/walled_garden.php @@ -0,0 +1,27 @@ + + + + + + + +
+
+ $vars['sysmessages'])); ?> +
+
+ +
+
+ + + \ No newline at end of file -- cgit v1.2.3 From c6bf8d8ab9463722da4e1e0323c3383e08b8924e Mon Sep 17 00:00:00 2001 From: Sem Date: Thu, 14 Feb 2013 14:02:41 +0100 Subject: Using correct language in html tag and putting a placeholder in the search box. --- views/default/page/admin.php | 4 ++-- views/default/page/default.php | 4 ++-- views/default/page/elements/head.php | 8 +++---- views/default/page/walled_garden.php | 4 ++-- views/default/search/search_box.php | 41 ++++++++++++++++++++++++++++++++++++ 5 files changed, 50 insertions(+), 11 deletions(-) create mode 100644 views/default/search/search_box.php diff --git a/views/default/page/admin.php b/views/default/page/admin.php index 7d0449096..a6d6bf6e1 100644 --- a/views/default/page/admin.php +++ b/views/default/page/admin.php @@ -32,7 +32,7 @@ header("Content-type: text/html; charset=UTF-8"); ?> - + @@ -63,4 +63,4 @@ header("Content-type: text/html; charset=UTF-8"); - \ No newline at end of file + diff --git a/views/default/page/default.php b/views/default/page/default.php index f75fa1908..a0e6d4037 100644 --- a/views/default/page/default.php +++ b/views/default/page/default.php @@ -35,7 +35,7 @@ header("Content-type: text/html; charset=UTF-8"); ?> - + @@ -71,4 +71,4 @@ header("Content-type: text/html; charset=UTF-8"); - \ No newline at end of file + diff --git a/views/default/page/elements/head.php b/views/default/page/elements/head.php index b1556b547..e7951c4ff 100644 --- a/views/default/page/elements/head.php +++ b/views/default/page/elements/head.php @@ -14,7 +14,7 @@ if (empty($vars['title'])) { global $autofeed; if (isset($autofeed) && $autofeed == true) { - $url = full_url(); + $url = current_page_url(); if (substr_count($url,'?')) { $url .= "&view=rss"; } else { @@ -33,12 +33,10 @@ END; $js = elgg_get_loaded_js('head'); $css = elgg_get_loaded_css(); -$version = get_version(); $release = get_version(true); ?> - - + <?php echo $title; ?> @@ -76,4 +74,4 @@ $metatags = elgg_view('metatags', $vars); if ($metatags) { elgg_deprecated_notice("The metatags view has been deprecated. Extend page/elements/head instead", 1.8); echo $metatags; -} \ No newline at end of file +} diff --git a/views/default/page/walled_garden.php b/views/default/page/walled_garden.php index e1d57dac8..77c901d8c 100644 --- a/views/default/page/walled_garden.php +++ b/views/default/page/walled_garden.php @@ -9,7 +9,7 @@ header("Content-type: text/html; charset=UTF-8"); ?> - + @@ -24,4 +24,4 @@ header("Content-type: text/html; charset=UTF-8"); - \ No newline at end of file + diff --git a/views/default/search/search_box.php b/views/default/search/search_box.php new file mode 100644 index 000000000..c1ea40705 --- /dev/null +++ b/views/default/search/search_box.php @@ -0,0 +1,41 @@ +,&, quotes and characters above 127 +if (function_exists('mb_convert_encoding')) { + $display_query = mb_convert_encoding($value, 'HTML-ENTITIES', 'UTF-8'); +} else { + // if no mbstring extension, we just strip characters + $display_query = preg_replace("/[^\x01-\x7F]/", "", $value); +} +$display_query = htmlspecialchars($display_query, ENT_QUOTES, 'UTF-8', false); + +?> + +
+
+ + + +
+
-- cgit v1.2.3 From b56c888650b1bfc127f9a8314a33a136eb752e66 Mon Sep 17 00:00:00 2001 From: hellekin Date: Mon, 18 Feb 2013 21:28:02 -0300 Subject: Fix 'headers already sent' --- views/default/page/default.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/views/default/page/default.php b/views/default/page/default.php index a0e6d4037..40ad2c69f 100644 --- a/views/default/page/default.php +++ b/views/default/page/default.php @@ -30,13 +30,11 @@ $header = elgg_view('page/elements/header', $vars); $body = elgg_view('page/elements/body', $vars); $footer = elgg_view('page/elements/footer', $vars); -// Set the content type -header("Content-type: text/html; charset=UTF-8"); - ?> + @@ -44,7 +42,7 @@ header("Content-type: text/html; charset=UTF-8");
- +
@@ -52,7 +50,7 @@ header("Content-type: text/html; charset=UTF-8");
- +
-- cgit v1.2.3 From 9cffddf0969ee63002c2a6c3574bdc796849e9ee Mon Sep 17 00:00:00 2001 From: Sem Date: Thu, 21 Feb 2013 00:52:32 +0100 Subject: Using ISO 8601 in time datetime attribute. --- manifest.xml | 8 ++++---- views/default/output/friendlytime.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/manifest.xml b/manifest.xml index 3f874d3bf..8b01d421e 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,15 +1,15 @@ HTML5 - Evan Winslow - 1.0 + Evan Winslow and Lorea Developers + 1.1 Provides several javascript libraries + views that allow developers to start using HTML5 features in Elgg today. (C) Evan Winslow 2010 http://github.com/ewinslow/elgg-html5 - elgg_version - 2011031400 + elgg_release + 1.8 \ No newline at end of file diff --git a/views/default/output/friendlytime.php b/views/default/output/friendlytime.php index c9c74e880..b752b74ce 100644 --- a/views/default/output/friendlytime.php +++ b/views/default/output/friendlytime.php @@ -8,6 +8,6 @@ $friendly_time = elgg_get_friendly_time($vars['time']); $timestamp = htmlentities(date(elgg_echo('friendlytime:date_format'), $vars['time'])); -$datetime = htmlentities(date("Y-m-d h:m", $vars['time'])); +$datetime = htmlentities(date("c", $vars['time'])); echo ""; -- cgit v1.2.3 From 8819bab8c0735c0ec428672fd36381c25823440b Mon Sep 17 00:00:00 2001 From: Sem Date: Thu, 21 Feb 2013 00:56:42 +0100 Subject: Erasing meta tag because is already writed by page/default view. --- views/default/page/default.php | 1 - 1 file changed, 1 deletion(-) diff --git a/views/default/page/default.php b/views/default/page/default.php index 40ad2c69f..491f691f4 100644 --- a/views/default/page/default.php +++ b/views/default/page/default.php @@ -34,7 +34,6 @@ $footer = elgg_view('page/elements/footer', $vars); - -- cgit v1.2.3 From 88733a24caee170acda071281eb4630bf5ef5794 Mon Sep 17 00:00:00 2001 From: Sem Date: Thu, 22 Aug 2013 17:34:22 -0400 Subject: Added @override keyword at some actions and views --- views/default/output/friendlytime.php | 1 + views/default/page/admin.php | 2 ++ views/default/page/default.php | 2 ++ views/default/page/elements/foot.php | 3 +++ views/default/page/elements/footer.php | 1 + views/default/page/elements/head.php | 1 + views/default/page/elements/owner_block.php | 1 + views/default/page/layouts/admin.php | 2 ++ views/default/page/layouts/one_sidebar.php | 2 ++ views/default/page/layouts/two_sidebar.php | 2 ++ views/default/page/walled_garden.php | 2 ++ views/default/search/search_box.php | 2 ++ 12 files changed, 21 insertions(+) diff --git a/views/default/output/friendlytime.php b/views/default/output/friendlytime.php index b752b74ce..dc9699fba 100644 --- a/views/default/output/friendlytime.php +++ b/views/default/output/friendlytime.php @@ -4,6 +4,7 @@ * Translates an epoch time into a human-readable time. * * @uses string $vars['time'] Unix-style epoch timestamp + * @override views/default/output/friendlytime.php */ $friendly_time = elgg_get_friendly_time($vars['time']); diff --git a/views/default/page/admin.php b/views/default/page/admin.php index a6d6bf6e1..e1180e851 100644 --- a/views/default/page/admin.php +++ b/views/default/page/admin.php @@ -8,6 +8,8 @@ * @uses $vars['title'] The page title * @uses $vars['body'] The main content of the page * @uses $vars['sysmessages'] A 2d array of various message registers, passed from system_messages() + * + * @override views/default/page/admin.php */ $notices_html = ''; diff --git a/views/default/page/default.php b/views/default/page/default.php index 491f691f4..7a74a0459 100644 --- a/views/default/page/default.php +++ b/views/default/page/default.php @@ -9,6 +9,8 @@ * @uses $vars['title'] The page title * @uses $vars['body'] The main content of the page * @uses $vars['sysmessages'] A 2d array of various message registers, passed from system_messages() + * + * @override views/default/page/default.php */ // backward compatability support for plugins that are not using the new approach diff --git a/views/default/page/elements/foot.php b/views/default/page/elements/foot.php index a56b373b4..6736fe3ab 100644 --- a/views/default/page/elements/foot.php +++ b/views/default/page/elements/foot.php @@ -1,4 +1,7 @@ diff --git a/views/default/page/layouts/one_sidebar.php b/views/default/page/layouts/one_sidebar.php index 61d6fed0e..e5e063b51 100644 --- a/views/default/page/layouts/one_sidebar.php +++ b/views/default/page/layouts/one_sidebar.php @@ -10,6 +10,8 @@ * @uses $vars['title'] Optional title for main content area * @uses $vars['class'] Additional class to apply to layout * @uses $vars['nav'] HTML of the page nav (override) (default: breadcrumbs) + * + * @override views/default/page/layouts/one_sidebar.php */ $class = 'elgg-layout elgg-layout-one-sidebar clearfix'; diff --git a/views/default/page/layouts/two_sidebar.php b/views/default/page/layouts/two_sidebar.php index b2660a155..929547424 100644 --- a/views/default/page/layouts/two_sidebar.php +++ b/views/default/page/layouts/two_sidebar.php @@ -9,6 +9,8 @@ * @uses $vars['sidebar'] Optional content that is displayed in the sidebar * @uses $vars['sidebar_alt'] Optional content that is displayed in the alternate sidebar * @uses $vars['class'] Additional class to apply to layout + * + * @override views/default/page/layouts/two_sidebar.php */ $class = 'elgg-layout elgg-layout-two-sidebar clearfix'; diff --git a/views/default/page/walled_garden.php b/views/default/page/walled_garden.php index 77c901d8c..1075ea811 100644 --- a/views/default/page/walled_garden.php +++ b/views/default/page/walled_garden.php @@ -3,6 +3,8 @@ * Walled garden page shell * * Used for the walled garden index page + * + * @override views/default/page/walled_garden.php */ // Set the content type diff --git a/views/default/search/search_box.php b/views/default/search/search_box.php index c1ea40705..9d0ed5e91 100644 --- a/views/default/search/search_box.php +++ b/views/default/search/search_box.php @@ -4,6 +4,8 @@ * * @uses $vars['value'] Current search query * @uses $vars['class'] Additional class + * + * @override mod/search/views/default/search/search_box.php */ if (array_key_exists('value', $vars)) { -- cgit v1.2.3 From 46c365abd6e190a5c389b0dd49b02cd6e878ccd9 Mon Sep 17 00:00:00 2001 From: Sem Date: Fri, 23 Aug 2013 04:57:44 +0200 Subject: Updated to Elgg 1.8.16. --- views/default/page/default.php | 13 ++++++++---- views/default/page/elements/foot.php | 11 ---------- views/default/page/elements/footer.php | 4 ++-- views/default/page/elements/owner_block.php | 31 ----------------------------- views/default/page/walled_garden.php | 15 +++++++++++++- views/default/search/search_box.php | 2 +- 6 files changed, 26 insertions(+), 50 deletions(-) delete mode 100644 views/default/page/elements/foot.php delete mode 100644 views/default/page/elements/owner_block.php diff --git a/views/default/page/default.php b/views/default/page/default.php index 491f691f4..aba69aebc 100644 --- a/views/default/page/default.php +++ b/views/default/page/default.php @@ -30,9 +30,14 @@ $header = elgg_view('page/elements/header', $vars); $body = elgg_view('page/elements/body', $vars); $footer = elgg_view('page/elements/footer', $vars); +// Set the content type +header("Content-type: text/html; charset=UTF-8"); + +$lang = get_current_language(); + ?> - + @@ -41,14 +46,14 @@ $footer = elgg_view('page/elements/footer', $vars);
- - + +
- +
diff --git a/views/default/page/elements/foot.php b/views/default/page/elements/foot.php deleted file mode 100644 index a56b373b4..000000000 --- a/views/default/page/elements/foot.php +++ /dev/null @@ -1,11 +0,0 @@ - - - \ No newline at end of file diff --git a/views/default/page/elements/footer.php b/views/default/page/elements/footer.php index ded2cea9a..318a98b2d 100644 --- a/views/default/page/elements/footer.php +++ b/views/default/page/elements/footer.php @@ -12,11 +12,11 @@ echo elgg_view_menu('footer', array('sort_by' => 'priority', 'class' => 'elgg-me $powered_url = elgg_get_site_url() . "_graphics/powered_by_elgg_badge_drk_bckgnd.gif"; -echo '
'; +echo '
'; echo elgg_view('output/url', array( 'href' => 'http://elgg.org', 'text' => "\"Powered", 'class' => '', 'is_trusted' => true, )); -echo '
'; +echo ''; diff --git a/views/default/page/elements/owner_block.php b/views/default/page/elements/owner_block.php deleted file mode 100644 index fc7f0f6d2..000000000 --- a/views/default/page/elements/owner_block.php +++ /dev/null @@ -1,31 +0,0 @@ -getGUID() != elgg_get_logged_in_user_guid())) { - - $header = elgg_view_entity($owner, array('full_view' => false)); - - $body = elgg_view_menu('owner_block', array('entity' => $owner)); - - $body .= elgg_view('page/elements/owner_block/extend', $vars); - - echo elgg_view('page/components/module', array( - 'header' => $header, - 'body' => $body, - 'class' => 'elgg-owner-block', - )); -} - -elgg_pop_context(); \ No newline at end of file diff --git a/views/default/page/walled_garden.php b/views/default/page/walled_garden.php index 77c901d8c..26d1235c2 100644 --- a/views/default/page/walled_garden.php +++ b/views/default/page/walled_garden.php @@ -5,6 +5,12 @@ * Used for the walled garden index page */ +$is_sticky_register = elgg_is_sticky_form('register'); +$wg_body_class = 'elgg-body-walledgarden'; +if ($is_sticky_register) { + $wg_body_class .= ' hidden'; +} + // Set the content type header("Content-type: text/html; charset=UTF-8"); ?> @@ -18,10 +24,17 @@ header("Content-type: text/html; charset=UTF-8");
$vars['sysmessages'])); ?>
-
+
+ + + diff --git a/views/default/search/search_box.php b/views/default/search/search_box.php index c1ea40705..4223661b3 100644 --- a/views/default/search/search_box.php +++ b/views/default/search/search_box.php @@ -34,7 +34,7 @@ $display_query = htmlspecialchars($display_query, ENT_QUOTES, 'UTF-8', false);
- +
-- cgit v1.2.3 From 81690f6e39ef46985ce4a7310cccd98808876521 Mon Sep 17 00:00:00 2001 From: Sem Date: Fri, 8 Nov 2013 06:54:40 +0100 Subject: Bumped version 1.8.0 --- manifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.xml b/manifest.xml index 8b01d421e..e5a53dda7 100644 --- a/manifest.xml +++ b/manifest.xml @@ -2,7 +2,7 @@ HTML5 Evan Winslow and Lorea Developers - 1.1 + 1.8.0 Provides several javascript libraries + views that allow developers to start using HTML5 features in Elgg today. @@ -12,4 +12,4 @@ elgg_release 1.8 - \ No newline at end of file + -- cgit v1.2.3