Skip to content
This repository has been archived by the owner on Feb 15, 2019. It is now read-only.

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
dessalines committed Sep 10, 2014
1 parent 2cb21f1 commit dadfbb9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions resources/testweb/creator_main.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ <h3> Youtube link &nbsp;&nbsp;&nbsp; </h3>
<div id="youtubeLinkDiv" class="form-group">
<label for="youtubeLink3" class="col-sm-2 control-label">Youtube link</label>
<div class="col-sm-10">
<input name="youtubelink" type="url" class="form-control" id="youtubeLink3"
<input id="youtubeLinkInput" name="youtubelink" type="url" class="form-control" id="youtubeLink3"
placeholder="Your video link"
data-bv-message="The link is not valid"

Expand Down Expand Up @@ -262,7 +262,7 @@ <h3> Description &nbsp;&nbsp;&nbsp; </h3>
<div id="shortDescriptionDiv" class="form-group">
<label for="shortDescription3" class="col-sm-2 control-label">Description</label>
<div class="col-sm-10">
<textarea name="shortDescription" rows="3" type="name" class="form-control" id="shortDescription3"
<textarea id="shortDescriptionInput" name="shortDescription" rows="3" type="name" class="form-control" id="shortDescription3"
placeholder="140 characters max"

data-bv-message="Not valid"
Expand Down
7 changes: 7 additions & 0 deletions resources/testweb/creator_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,20 @@ $(document).ready(function() {
// show the creator content
$("#creator_edit_content").removeClass("hide");



// show the save btn
setupSummerNote('getcreatorpage', '#main_body', 'main_body');

saveSummerNote('savecreatorpage', '#saveBtn', '#main_body');

simpleFetch('getcreatorpage').done(function(result) {

var youtube_link = result['youtube_link'];
console.log('youtube ' + youtube_link);
$('#youtubeLinkInput').text(youtube_link);


var emptyObj = '{"main_body": "Nothing here yet"}';
console.log('page = ' + result);
console.log('emptyObj = ' + emptyObj);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/bitpieces/shared/tools/WebTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public static String getCreatorPageJson(String id, String reqBody) {
String json = null;
try {
Creators_page_fields page = Creators_page_fields.findFirst("creators_id = ?", id);
json = page.toJson(false, "main_body");
json = page.toJson(false, "main_body", "description", "youtube_link");
} catch (NullPointerException e) {
return "{\"main_body\": \"Nothing here yet\"}";

Expand Down

0 comments on commit dadfbb9

Please sign in to comment.