aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-07-12 11:09:32 +0000
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-07-12 11:09:32 +0000
commit01029b45d097beedc7c08191a3e6bd9873c55cfe (patch)
tree1a3afd53dbb7c430d00c2a4b55294b64e7ab4c19 /mod
parent2165c39e8e014061329c6d28351a8d6746f82e0b (diff)
downloadelgg-01029b45d097beedc7c08191a3e6bd9873c55cfe.tar.gz
elgg-01029b45d097beedc7c08191a3e6bd9873c55cfe.tar.bz2
Updated ecml and embed with new success/failure for input code.
git-svn-id: http://code.elgg.org/elgg/trunk@6697 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/ecml/graphics/url_status.pngbin0 -> 2001 bytes
-rw-r--r--mod/ecml/views/default/ecml/admin/css.php18
-rw-r--r--mod/ecml/views/default/embed/web_services/content.php18
-rw-r--r--mod/embed/views/default/embed/css.php6
4 files changed, 34 insertions, 8 deletions
diff --git a/mod/ecml/graphics/url_status.png b/mod/ecml/graphics/url_status.png
new file mode 100644
index 000000000..95c2b5635
--- /dev/null
+++ b/mod/ecml/graphics/url_status.png
Binary files differ
diff --git a/mod/ecml/views/default/ecml/admin/css.php b/mod/ecml/views/default/ecml/admin/css.php
index 5c70d5242..c51f04a75 100644
--- a/mod/ecml/views/default/ecml/admin/css.php
+++ b/mod/ecml/views/default/ecml/admin/css.php
@@ -72,6 +72,24 @@
padding:5px;
width:auto;
}
+#web_services_resource {
+ width:670px;
+}
+#url_status {
+ width:30px;
+ height:30px;
+ float:right;
+}
+#url_status.success {
+ background-image: url(<?php echo $vars['url']; ?>mod/ecml/graphics/url_status.png);
+ background-repeat: no-repeat;
+ background-position: left top;
+}
+#url_status.failure {
+ background-image: url(<?php echo $vars['url']; ?>mod/ecml/graphics/url_status.png);
+ background-repeat: no-repeat;
+ background-position: left bottom;
+}
#embed_ecml_keyword_help,
#ecml_preview {
padding:10px;
diff --git a/mod/ecml/views/default/embed/web_services/content.php b/mod/ecml/views/default/embed/web_services/content.php
index bf7bc10e3..83f8363a7 100644
--- a/mod/ecml/views/default/embed/web_services/content.php
+++ b/mod/ecml/views/default/embed/web_services/content.php
@@ -45,7 +45,7 @@ $embed = elgg_view('input/button', array(
'internalid' => 'embed_submit',
'type' => 'button',
'value' => elgg_echo('embed:embed'),
- 'class' => 'submit_button embed_disabled',
+ 'class' => 'submit_button disabled',
'disabled' => TRUE
));
@@ -56,7 +56,7 @@ echo $keywords_html;
echo "<div class='embed_content_section instructions hidden'><a class='ecml_embed_instructions link'>Instructions</a>";
echo "<div id='embed_ecml_keyword_help' class='hidden'></div></div>";
-echo "<div id='embed_service_url'><label>URL".$input."</label>";
+echo "<div id='embed_service_url'><label>URL<br />".$input."<div id='url_status' class=''></div></label>";
echo "<div class='ecml_generated_code hidden'>ECML: <span id='ecml_code'></span></div></div>";
echo "<div class='embed_content_section preview hidden'><a class='ecml_embed_preview link'>Preview</a>";
@@ -86,6 +86,7 @@ $(function() {
var selected_service = '';
var manual_selected_service = false;
var embed_button = $('#embed_submit');
+ var url_status = $('#url_status');
var embed_resource_input = $('#web_services_resource');
// counter for paused input to try to validate/generate a preview.
@@ -110,9 +111,11 @@ $(function() {
var value_length = value.length;
if (value_length > 0) {
- embed_button.removeAttr('disabled').removeClass('embed_disabled').addClass('embed_warning');
+ //embed_button.removeAttr('disabled').removeClass('disabled');//.addClass('embed_warning');
+ url_status.removeClass('success').addClass('failure');
} else {
- embed_button.attr('disabled', 'disabled').addClass('embed_disabled');
+ embed_button.attr('disabled', 'disabled').addClass('disabled');
+ url_status.removeClass('success').removeClass('failure');
}
if (value_length < 5) {
@@ -176,7 +179,12 @@ $(function() {
$('.ecml_generated_code').removeClass('hidden'); // reveal ecml generated code
// set status for embed button
- embed_button.removeAttr('disabled').removeClass('embed_disabled').removeClass('embed_warning').addClass('embed_good');
+ embed_button.removeAttr('disabled').removeClass('disabled');
+ url_status.removeClass('failure').addClass('success');
+ } else {
+ // data failure
+ embed_button.attr('disabled', 'disabled').addClass('disabled');
+ url_status.removeClass('success').removeClass('failure');
}
}, 'json');
}
diff --git a/mod/embed/views/default/embed/css.php b/mod/embed/views/default/embed/css.php
index 8cb55970d..15484fa22 100644
--- a/mod/embed/views/default/embed/css.php
+++ b/mod/embed/views/default/embed/css.php
@@ -155,12 +155,12 @@
/* embed web services */
.embed_disabled {
- /* background-color: red; */
+ background-color: silver;
}
.embed_warning {
- background-color: yellow;
- border-color: yellow;
+ background-color: red;
+ border-color: red;
}
.embed_good {