-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented client and server side validation for all existing plugins. User created plugins will now automatically validate default form fields. All user created plugins will now generate with a validation skeleton in plugin_name.js as function validate[plugin_name]() Fixed issue 6 - Implemented server side validation and exception handling Fix Issue 11 - Fixed return behavior.
- Loading branch information
Showing
47 changed files
with
392 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
Bernard Board - version 0.03 | ||
CHANGELOG 0.04 Client and server side form validation. | ||
CHANGELOG 0.03 Complete reimplementation of plugins. | ||
|
||
Development Branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
<div class="ui-widget-header"> | ||
<%= @title %> | ||
</div> | ||
<% calendar(@parameters["usrname"], @parameters["passwrd"]).each_with_index do |event, i| %> | ||
<%= event.title %> - <%= event.start_time.strftime("%a %d-%m-%Y %H:%M")%><br> | ||
<% end %> | ||
<% calendar_events = calendar(@parameters["usrname"], @parameters["passwrd"]) %> | ||
<% if calendar_events =="error" %> | ||
<%= javascript_tag "alert('Could not create Calendar item. Incorrect username or password.')"%> | ||
<%= javascript_tag "jQuery('##{itemid}').remove();" %> | ||
<% else %> | ||
<% calendar_events.each_with_index do |event, i| %> | ||
<%= event.title %> - <%= event.start_time.strftime("%a %d-%m-%Y %H:%M")%><br> | ||
<% end %> | ||
<%end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
<%= nagios(@parameters["uri"], @parameters["username"], @parameters["password"], @title) %> | ||
|
||
<% result = nagios(@parameters["uri"], @parameters["username"], @parameters["password"], @title) %> | ||
<% if result == "error1" %> | ||
<%= javascript_tag "alert('Could not create Nagios item. Please check if the url is correct.')"%> | ||
<%= javascript_tag "jQuery('##{itemid}').remove();" %> | ||
<% elsif result == "error2" %> | ||
<%= javascript_tag "alert('Could not create Nagios item. Please check if your username and password are correct.')"%> | ||
<%= javascript_tag "jQuery('##{itemid}').remove();" %> | ||
<% else %> | ||
<%= result %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
<!-- Since the twitter plugin is so closely related to the feed plugin, we're using the feed helper get_feed in both plugins, even tho it is only listed in feed.rb--> | ||
<% feed = get_feed(@parameters["uri"])%> | ||
|
||
<div class="ui-widget"> | ||
<div class="ui-widget-header"> | ||
<%= @parameters["title"] %> | ||
</div> | ||
|
||
<% feed.items.each_with_index do |topic,i| %> | ||
<div id="twitterfeed<%=i%>" class="twitterfeed" style="display:none;"> | ||
<%= image_tag "twitter_icon.gif", :html => {"align" => "left"}%> | ||
<%= topic.title %><br> | ||
<small> Added on <%= topic.date.strftime('%m/%d/%Y')%> </small> | ||
<% if feed =="error"%> | ||
<%= javascript_tag "alert('Could not create Feed item. Please check if the feed url is correct.')"%> | ||
<%= javascript_tag "jQuery('##{itemid}').remove();" %> | ||
<% else %> | ||
<div class="ui-widget"> | ||
<div class="ui-widget-header"> | ||
<%= @parameters["title"] %> | ||
</div> | ||
<% end %> | ||
</div> | ||
|
||
<%= javascript_tag "update_twitterfeed(#{feed.items.size})"%> | ||
<% feed.items.each_with_index do |topic,i| %> | ||
<div id="twitterfeed<%=i%>" class="twitterfeed" style="display:none;"> | ||
<%= image_tag "twitter_icon.gif", :html => {"align" => "left"}%> | ||
<%= topic.title %><br> | ||
<small> Added on <%= topic.date.strftime('%m/%d/%Y')%> </small> | ||
</div> | ||
<% end %> | ||
</div> | ||
<%= javascript_tag "update_twitterfeed(#{feed.items.size})"%> | ||
<% end %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
lib/generators/board_plugin/templates/lib/javascripts/javascripts.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
//Your Javascript goes here | ||
function validateCalendar() { | ||
if(jQuery('#form_for input[name=usrname]').val() == ""){ | ||
alert("Username field cannot be empty"); | ||
return false; | ||
} | ||
else if (jQuery('#form_for input[name=passwrd]').val() ==""){ | ||
alert("Password field cannot be empty"); | ||
return false; | ||
} | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
//Your Javascript goes here | ||
function validateImage(){ | ||
if(jQuery('#form_for input[name=remote]').attr("checked") == true && jQuery('#form_for input[name=url]').val() == ""){ | ||
alert("Url field cannot be empty"); | ||
return false; | ||
} | ||
else if(jQuery('#form_for input[name=image]').val() == ""){ | ||
alert("Image Location field cannot be empty"); | ||
return false; | ||
} | ||
return true; | ||
|
||
} |
Oops, something went wrong.