Skip to content

Instantly share code, notes, and snippets.

@tlovett1
Created June 18, 2014 16:41
Show Gist options
  • Save tlovett1/077705ac4af2769b54aa to your computer and use it in GitHub Desktop.
Save tlovett1/077705ac4af2769b54aa to your computer and use it in GitHub Desktop.
PMC_Deadline_Checklist = function () {
//cache the reference to our class
var self = this;
//Cache the checklist container
this.$checklist_container = $( '#pmc-deadline-post-checklist-meta-box' );
//Cache the HTML DOM Checklist Items we'll be updating
this.$vertical_taxonomy_todo_item = this.$checklist_container.find( 'li.vertical' );
this.$category_taxonomy_todo_item = this.$checklist_container.find( 'li.category' );
this.$post_tag_taxonomy_todo_item = this.$checklist_container.find( 'li.post-tag' );
this.$featured_image_todo_item = this.$checklist_container.find( 'li.featured-image' );
this.$seo_title_todo_item = this.$checklist_container.find( 'li.seo-title' );
this.$seo_description_todo_item = this.$checklist_container.find( 'li.seo-description' );
this.$seo_keywords_todo_item = this.$checklist_container.find( 'li.seo-keywords' );
//Cache the initially-loaded vertical input fields
this.$taxonomy_vertical_input = $( 'ul#verticalchecklist li input[type = "checkbox"]' );
this.$taxonomy_category_input = $( 'ul#categorychecklist li input[type = "checkbox"]' );
this.$taxonomy_post_tag_div = $( 'div.tagchecklist' );
this.$featured_image_div = $( '#postimagediv' );
this.$seo_title = $( '#mt_seo_title' );
this.$seo_description = $( '#mt_seo_description' );
this.$seo_keywords = $( '#mt_seo_keywords' );
this.watch_for_changes = function () {
//Watch for Vertical taxonomy changes
this.watch_for_vertical_taxonomy_changes();
//Watch for Category taxonomy changes
this.watch_for_category_taxonomy_changes();
//Watch for Post Tag changes
this.watch_for_post_tag_changes();
//Watch for Featured Images Changes
this.watch_for_featured_image_changes();
//Watch for SEO Title Changes
this.watch_for_seo_title_changes();
//Watch for SEO Description Changes
this.watch_for_seo_description_changes();
//Watch for SEO Keyword Changes
this.watch_for_seo_keyword_changes();
}
}
new PMC_Deadline_Checklist();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment