x x x
x
Only portrait mode is currently supported - please rotate your device.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

HTML
<script>
  // set page name as event name only on event creation
  if (getQueryVariableFromUrl('entry_id') === 'notfound') {
    $("#i_name").change(function () {
      $("#i_pageName").val($("#i_name").val());
    });
	$("#i_offline").waitUntilExists(() => {	
		$('#i_offline').click();
	})
    // extra precaution - set page name as event name
    $(document).mousemove(function (event) {
      $("#i_pageName").val($("#i_name").val());
    });
  }
</script>

<script>
$("#judging-admin-only").waitUntilExists(() => {
  if (isAdmin || isJudgingAdmin) {
    $("#judging-admin-only").toggleClass('display-none');
  }
});
$("#admin-only").waitUntilExists(() => {
  if (isAdmin) {
    $("#admin-only").toggleClass('display-none');
  }
});
// remove type ahead search prediction drop down for co-hosts
console.log("Before new script");
$("#s2id_i_cohosts").waitUntilExists(() => {
	$("#s2id_i_cohosts").keyup(function() {
 		let resultsCount = $('.select2-results-dept-0 ').length;
 		console.log(resultsCount);
    	if (resultsCount === 1){
        	console.log("here");
      		$('.aui-dropdown2.atlassian-select2-drop, .aui-select2-drop').removeClass("display-none");
  		} else {
        	console.log("there");
      		$('.aui-dropdown2.atlassian-select2-drop, .aui-select2-drop').addClass("display-none");
  		}  
	});
});
</script>

...