Changeset 2583891
- Timestamp:
- 08/17/2021 04:46:28 AM (5 years ago)
- Location:
- mondoplayer/trunk
- Files:
-
- 3 edited
-
includes/class_mondoplayer_search.php (modified) (1 diff)
-
js/web_player_v2.js (modified) (16 diffs)
-
mondoplayer.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mondoplayer/trunk/includes/class_mondoplayer_search.php
r2583785 r2583891 283 283 <h2 style='text-align: left;color: #777;'>Create a New Category</h2> 284 284 <table style='width: 100%' cellspacing='0' cellpadding='0'> 285 <tr><td class='label_column'>Enter a name for the new category:</td><td class='content_column'><input type="text" class="form_field_input" id="bulk_submit_create_category" value="" placeholder="Enter a name for this category" autocorrect="off" autocapitalize="off" spellcheck="true" style='width: 50%;vertical-align: middle;margin-right: 8px' /><div style='display:inline-block;vertical-align: middle;color: #999'>Hide in Main Vlog roll <input type='checkbox' id='bulk_submit_create_category_hide' /></div></td></tr>285 <tr><td class='label_column'>Enter a name for the new category:</td><td class='content_column'><input type="text" class="form_field_input" id="bulk_submit_create_category" value="" placeholder="Enter a name for this category" autocorrect="off" autocapitalize="off" spellcheck="true" style='width: 50%;vertical-align: middle;margin-right: 8px' /><div style='display:inline-block;vertical-align: middle;color: #999'>Hide in Main Vlog Roll <input type='checkbox' id='bulk_submit_create_category_hide' /></div></td></tr> 286 286 </table> 287 287 <div class="options_popup_buttons"><input type="button" class="form_submit_btn_light" value="Create Category" onclick="bulk_submit_create_category()" style='width: 200px' /> <input type="button" class="form_submit_btn_light" value="Back" onclick="bulk_submit_close_create_category()" style='width: 200px' /></div> -
mondoplayer/trunk/js/web_player_v2.js
r2583810 r2583891 5502 5502 document.getElementById("autopilot_hashtag_details").style.display = "table"; 5503 5503 document.getElementById("autopilot_hashtags_table").style.display = "table"; 5504 document.getElementById("autopilot_hashtags").value = "";5504 //document.getElementById("autopilot_hashtags").value = ""; 5505 5505 5506 5506 while (document.getElementById("autopilot_hashtags_search_term").firstChild ) { … … 5540 5540 div.innerHTML = search_terms_labels[s].title; 5541 5541 } else { 5542 div.innerHTML = "Search '" + search_terms_labels[s].title + "'";5542 div.innerHTML = search_terms_labels[s].title; 5543 5543 } 5544 5544 document.getElementById("autopilot_hashtags_search_term").appendChild(div); … … 5573 5573 edit_button.setAttribute("search", -1); 5574 5574 edit_button.addEventListener("click", function(event) { 5575 autopilot_edit_hashtags(event.target.getAttribute("search"));5575 edit_hashtags_list = [parseInt(event.target.getAttribute("search"))]; 5576 5576 autopilot_edit_hashtags_next(); 5577 5577 }); … … 5652 5652 edit_button.setAttribute("search", search); 5653 5653 edit_button.addEventListener("click", function(event) { 5654 autopilot_edit_hashtags(event.target.getAttribute("search"));5654 edit_hashtags_list = [parseInt(event.target.getAttribute("search"))]; 5655 5655 autopilot_edit_hashtags_next(); 5656 5656 }); … … 5711 5711 var selection = parseInt(event.target.getAttribute("index")); 5712 5712 if (selection == -1) { 5713 edit_hashtags_list = new Array(); 5713 5714 if (document.getElementById("hashtag_search_term_-1").getAttribute('picked') == "true") { 5714 5715 document.getElementById("hashtag_search_term_-1").setAttribute('picked', false); … … 5717 5718 document.getElementById("hashtag_search_term_-1").setAttribute('picked', true); 5718 5719 document.getElementById("hashtag_search_term_-1").classList.add('selected_hashtag_search'); 5720 edit_hashtags_list.push(-1); 5719 5721 } 5720 5722 for (var s = 0; s < search_terms_labels.length; s++) { … … 5727 5729 } 5728 5730 } else { 5731 if (edit_hashtags_list.indexOf(-1) > -1) { 5732 edit_hashtags_list.splice(edit_hashtags_list.indexOf(-1), 1); 5733 } 5729 5734 document.getElementById("hashtag_search_term_-1").setAttribute('picked', false); 5730 5735 document.getElementById("hashtag_search_term_-1").classList.remove('selected_hashtag_search'); … … 5732 5737 document.getElementById("hashtag_search_term_" + selection).setAttribute('picked', false) 5733 5738 document.getElementById("hashtag_search_term_" + selection).classList.remove('selected_hashtag_search'); 5739 if (edit_hashtags_list.indexOf(selection) > -1) { 5740 edit_hashtags_list.splice(edit_hashtags_list.indexOf(parseInt(selection)), 1); 5741 } 5734 5742 } else { 5735 5743 document.getElementById("hashtag_search_term_" + selection).setAttribute('picked', true) 5736 5744 document.getElementById("hashtag_search_term_" + selection).classList.add('selected_hashtag_search'); 5745 edit_hashtags_list.push(parseInt(selection)); 5737 5746 } 5738 5747 } … … 5770 5779 return; 5771 5780 } 5781 autopilot_draw_hashtags(); 5772 5782 temp_hashtag = document.getElementById("autopilot_hashtags").value.trim(); 5773 document.getElementById("autopilot_hashtags").value = "";5774 5783 document.getElementById("autopilot_hashtags_screen1_hashtag").innerHTML = temp_hashtag.replace(/#/g, " #"); 5775 5784 document.getElementById("autopilot_hashtags_screen1").style.display = "block"; … … 5779 5788 } 5780 5789 5790 var edit_hashtags_list = new Array(); 5791 5781 5792 var edit_searches = new Array(); 5782 var old_fixed ;5793 var old_fixed = new Object(); 5783 5794 function autopilot_hashtag_screen1_next() { 5784 var hashtag_searches = document.getElementById('autopilot_hashtags_search_term').childNodes; 5785 var has_selection = false; 5786 edit_searches = new Array(); 5787 for (var i = 0; i < hashtag_searches.length; i++) { 5788 if (hashtag_searches[i].getAttribute('picked') == 'true') { 5789 has_selection = true; 5790 edit_searches.push(parseInt(hashtag_searches[i].getAttribute('index'))); 5791 } 5792 } 5793 if (! has_selection) { 5794 return; 5795 old_fixed = new Object(); 5796 5797 if (edit_hashtags_list.length == 0) { 5798 return; 5799 } 5800 5801 for (var i = 0; i < edit_hashtags_list.length; i++) { 5802 if (edit_hashtags_list[i] == -1) { 5803 old_fixed[edit_hashtags_list[i]] = JSON.parse(JSON.stringify(cur_autopilot.hashtags.fixed)); 5804 } else { 5805 old_fixed[edit_hashtags_list[i]] = JSON.parse(JSON.stringify(cur_autopilot.hashtags.search[edit_hashtags_list[i]].fixed)); 5806 } 5795 5807 } 5796 5808 … … 5798 5810 var split_hashtags = temp_split.filter(function(item, index) { return temp_split.indexOf(item) >= index; }); 5799 5811 5800 close_autopilot_hashtags(false); 5801 let skip_to_draw = true; 5802 if (edit_searches.includes(-1)) { 5803 old_fixed = JSON.parse(JSON.stringify(cur_autopilot.hashtags.fixed)); 5812 //close_autopilot_hashtags(false); 5813 if (edit_hashtags_list.includes(-1)) { 5814 old_fixed[-1] = JSON.parse(JSON.stringify(cur_autopilot.hashtags.fixed)); 5804 5815 var test_hashtags = new Array(); 5805 5816 for (var i = 0; i < cur_autopilot.hashtags.fixed.length; i++) { … … 5822 5833 } 5823 5834 } 5824 if (cur_autopilot.hashtags.fixed.length + cur_autopilot.hashtags.variable.length > 1 ) { 5825 autopilot_edit_hashtags(-1); 5826 skip_to_draw = false; 5827 } 5828 } else { 5829 for (var s = 0; s < edit_searches.length; s++) { 5830 let edit_search = edit_searches[s]; 5831 old_fixed = JSON.parse(JSON.stringify(cur_autopilot.hashtags.search[edit_search].fixed)); 5835 } else { 5836 for (var s = 0; s < edit_hashtags_list.length; s++) { 5837 let edit_search = edit_hashtags_list[s]; 5838 old_fixed[edit_search] = JSON.parse(JSON.stringify(cur_autopilot.hashtags.search[edit_search].fixed)); 5832 5839 var test_hashtags = new Array(); 5833 5840 for (var i = 0; i < cur_autopilot.hashtags.search[edit_search].fixed.length; i++) { … … 5849 5856 } 5850 5857 } 5851 if (cur_autopilot.hashtags.search[edit_search].fixed.length + cur_autopilot.hashtags.search[edit_search].variable.length > 1) { 5852 autopilot_edit_hashtags(edit_search); 5853 skip_to_draw = false; 5854 } 5855 } 5856 autopilot_edit_hashtags_next(); 5857 } 5858 if (skip_to_draw) { 5859 autopilot_edit_hashtags_next(); 5860 } else { 5861 autopilot_edit_hashtags_draw(); 5862 } 5858 } 5859 } 5860 autopilot_edit_hashtags_next(); 5863 5861 } 5864 5862 function autopilot_edit_schedule(hide) { … … 5883 5881 var edit_search_hashtags; 5884 5882 var edit_search_hashtags_variable_count; 5885 var edit_hashtags_list = new Array(); 5886 function autopilot_edit_hashtags(search) { 5887 edit_hashtags_list.push(search); 5888 } 5883 5889 5884 function autopilot_edit_hashtags_next() { 5885 console.log("edit_hashtags_list: " + JSON.stringify(edit_hashtags_list)); 5890 5886 if (edit_hashtags_list.length == 0) { 5891 5887 close_autopilot_hashtags(false); … … 5912 5908 } 5913 5909 5910 document.getElementById("autopilot_hashtags_screen1").style.display = "none"; 5914 5911 document.getElementById("autopilot_hashtags_screen2").style.display = "block"; 5915 5912 document.getElementById("autopilot_form_bottom").style.display = "none"; … … 6001 5998 6002 5999 function close_autopilot_hashtags(undo) { 6003 if (undo) { 6004 for (var s = 0; s < edit_searches.length; s++) { 6005 let edit_search = edit_searches[s]; 6006 6007 if (edit_search == -1) { 6008 cur_autopilot.hashtags.fixed = old_fixed; 6009 } else { 6010 cur_autopilot.hashtags.search[edit_search].fixed = old_fixed; 6011 } 6012 } 6013 } 6000 console.log("close_autopilot_hashtags"); 6014 6001 if (edit_hashtags_list.length > 0) { 6015 6002 autopilot_edit_hashtags_next(); 6016 6003 return; 6004 } 6005 document.getElementById("autopilot_hashtags").value = ""; 6006 6007 if (undo) { 6008 for (var s = 0; s < edit_hashtags_list.length; s++) { 6009 let edit_search = edit_hashtags_list[s]; 6010 6011 if (edit_search == -1) { 6012 cur_autopilot.hashtags.fixed = old_fixed[-1]; 6013 } else { 6014 cur_autopilot.hashtags.search[edit_search].fixed = old_fixed[edit_search]; 6015 } 6016 } 6017 6017 } 6018 6018 window.scrollTo(0,0); -
mondoplayer/trunk/mondoplayer.php
r2583810 r2583891 742 742 <table class='form-table'><tbody> 743 743 <tr class="form-field form-required term-name-wrap"> 744 <th scope="row"><label for="mondoplayer_hide">Hide in Main Vlog roll</label></th>744 <th scope="row"><label for="mondoplayer_hide">Hide in Main Vlog Roll</label></th> 745 745 <td><input type='checkbox' id="mondoplayer_hide" name="mondoplayer_hide" value='1' /> 746 746 <p class="description">Check this to prevent posts in this category from showing up in your main vlog roll (your front page or /blog).</p></td> … … 830 830 <table class='form-table'><tbody> 831 831 <tr class="form-field form-required term-name-wrap"> 832 <th scope="row"><label for="mondoplayer_hide">Hide in Main Vlog roll</label></th>832 <th scope="row"><label for="mondoplayer_hide">Hide in Main Vlog Roll</label></th> 833 833 <td><input type='checkbox' id="mondoplayer_hide" name="mondoplayer_hide" value='1' <?php if ($term_meta['mondoplayer_hide'][0] == 1) {echo 'checked';} ?> /> 834 834 <p class="description">Check this to prevent posts in this category from showing up in your main vlog roll (your front page or /blog).</p></td>
Note: See TracChangeset
for help on using the changeset viewer.