Plugin Directory

Changeset 2583891


Ignore:
Timestamp:
08/17/2021 04:46:28 AM (5 years ago)
Author:
crisworth
Message:

Feature update

Location:
mondoplayer/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • mondoplayer/trunk/includes/class_mondoplayer_search.php

    r2583785 r2583891  
    283283<h2 style='text-align: left;color: #777;'>Create a New Category</h2>
    284284<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 Vlogroll&nbsp;&nbsp;<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&nbsp;&nbsp;<input type='checkbox' id='bulk_submit_create_category_hide' /></div></td></tr>
    286286</table>
    287287<div class="options_popup_buttons"><input type="button" class="form_submit_btn_light" value="Create Category" onclick="bulk_submit_create_category()" style='width: 200px' />&nbsp;&nbsp;<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  
    55025502    document.getElementById("autopilot_hashtag_details").style.display = "table";
    55035503    document.getElementById("autopilot_hashtags_table").style.display = "table";
    5504     document.getElementById("autopilot_hashtags").value = "";
     5504    //document.getElementById("autopilot_hashtags").value = "";
    55055505
    55065506    while (document.getElementById("autopilot_hashtags_search_term").firstChild ) {
     
    55405540            div.innerHTML = search_terms_labels[s].title;
    55415541        } else {
    5542             div.innerHTML = "Search '" + search_terms_labels[s].title + "'";
     5542            div.innerHTML = search_terms_labels[s].title;
    55435543        }
    55445544        document.getElementById("autopilot_hashtags_search_term").appendChild(div);
     
    55735573        edit_button.setAttribute("search", -1);
    55745574        edit_button.addEventListener("click", function(event) {
    5575             autopilot_edit_hashtags(event.target.getAttribute("search"));
     5575            edit_hashtags_list = [parseInt(event.target.getAttribute("search"))];
    55765576            autopilot_edit_hashtags_next();
    55775577        });
     
    56525652        edit_button.setAttribute("search", search);
    56535653        edit_button.addEventListener("click", function(event) {
    5654             autopilot_edit_hashtags(event.target.getAttribute("search"));
     5654            edit_hashtags_list = [parseInt(event.target.getAttribute("search"))];
    56555655            autopilot_edit_hashtags_next();
    56565656        });
     
    57115711    var selection = parseInt(event.target.getAttribute("index"));
    57125712    if (selection == -1) {
     5713        edit_hashtags_list = new Array();
    57135714        if (document.getElementById("hashtag_search_term_-1").getAttribute('picked') == "true") {
    57145715            document.getElementById("hashtag_search_term_-1").setAttribute('picked', false);
     
    57175718            document.getElementById("hashtag_search_term_-1").setAttribute('picked', true);
    57185719            document.getElementById("hashtag_search_term_-1").classList.add('selected_hashtag_search');
     5720            edit_hashtags_list.push(-1);
    57195721        }
    57205722        for (var s = 0; s < search_terms_labels.length; s++) {
     
    57275729        }
    57285730    } else {
     5731        if (edit_hashtags_list.indexOf(-1) > -1) {
     5732            edit_hashtags_list.splice(edit_hashtags_list.indexOf(-1), 1);
     5733        }
    57295734        document.getElementById("hashtag_search_term_-1").setAttribute('picked', false);
    57305735        document.getElementById("hashtag_search_term_-1").classList.remove('selected_hashtag_search');
     
    57325737            document.getElementById("hashtag_search_term_" + selection).setAttribute('picked', false)
    57335738            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            }
    57345742        } else {
    57355743            document.getElementById("hashtag_search_term_" + selection).setAttribute('picked', true)
    57365744            document.getElementById("hashtag_search_term_" + selection).classList.add('selected_hashtag_search');
     5745            edit_hashtags_list.push(parseInt(selection));
    57375746        }
    57385747    }
     
    57705779        return;
    57715780    }
     5781    autopilot_draw_hashtags();
    57725782    temp_hashtag = document.getElementById("autopilot_hashtags").value.trim();
    5773     document.getElementById("autopilot_hashtags").value = "";
    57745783    document.getElementById("autopilot_hashtags_screen1_hashtag").innerHTML = temp_hashtag.replace(/#/g, " #");
    57755784    document.getElementById("autopilot_hashtags_screen1").style.display = "block";
     
    57795788}
    57805789
     5790var edit_hashtags_list = new Array();
     5791
    57815792var edit_searches = new Array();
    5782 var old_fixed;
     5793var old_fixed = new Object();
    57835794function 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        }
    57955807    }
    57965808
     
    57985810    var split_hashtags = temp_split.filter(function(item, index) { return temp_split.indexOf(item) >= index; });
    57995811
    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));
    58045815        var test_hashtags = new Array();
    58055816        for (var i = 0; i < cur_autopilot.hashtags.fixed.length; i++) {
     
    58225833            }
    58235834        }
    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));
    58325839            var test_hashtags = new Array();
    58335840            for (var i = 0; i < cur_autopilot.hashtags.search[edit_search].fixed.length; i++) {
     
    58495856                }
    58505857            }
    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();
    58635861}
    58645862function autopilot_edit_schedule(hide) {
     
    58835881var edit_search_hashtags;
    58845882var 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
    58895884function autopilot_edit_hashtags_next() {
     5885    console.log("edit_hashtags_list: " + JSON.stringify(edit_hashtags_list));
    58905886    if (edit_hashtags_list.length == 0) {
    58915887        close_autopilot_hashtags(false);
     
    59125908    }
    59135909
     5910    document.getElementById("autopilot_hashtags_screen1").style.display = "none";
    59145911    document.getElementById("autopilot_hashtags_screen2").style.display = "block";
    59155912    document.getElementById("autopilot_form_bottom").style.display = "none";
     
    60015998
    60025999function 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");
    60146001    if (edit_hashtags_list.length > 0) {
    60156002        autopilot_edit_hashtags_next();
    60166003        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        }
    60176017    }
    60186018    window.scrollTo(0,0);
  • mondoplayer/trunk/mondoplayer.php

    r2583810 r2583891  
    742742        <table class='form-table'><tbody>
    743743        <tr class="form-field form-required term-name-wrap">
    744             <th scope="row"><label for="mondoplayer_hide">Hide in Main Vlogroll</label></th>
     744            <th scope="row"><label for="mondoplayer_hide">Hide in Main Vlog Roll</label></th>
    745745            <td><input type='checkbox' id="mondoplayer_hide" name="mondoplayer_hide" value='1' />
    746746            <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>
     
    830830        <table class='form-table'><tbody>
    831831        <tr class="form-field form-required term-name-wrap">
    832             <th scope="row"><label for="mondoplayer_hide">Hide in Main Vlogroll</label></th>
     832            <th scope="row"><label for="mondoplayer_hide">Hide in Main Vlog Roll</label></th>
    833833            <td><input type='checkbox' id="mondoplayer_hide" name="mondoplayer_hide" value='1' <?php if ($term_meta['mondoplayer_hide'][0] == 1) {echo 'checked';} ?> />
    834834            <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.