Skip to content

Instantly share code, notes, and snippets.

@fidlerryan
Last active September 1, 2021 14:39
Show Gist options
  • Save fidlerryan/c1eff8e2b11acbb2890412f2d62e8589 to your computer and use it in GitHub Desktop.
Save fidlerryan/c1eff8e2b11acbb2890412f2d62e8589 to your computer and use it in GitHub Desktop.
AZDirectory 7.0.0
$nullDate = $db->quote( $db->getNullDate() );
$nowDate = $db->quote( Factory::getDate()->toSql() );
$query
->andWhere(
[
$db->quoteName( 'a.publish_up' ) . ' = ' . $nullDate,
$db->quoteName( 'a.publish_up' ) . ' IS NULL',
$db->quoteName( 'a.publish_up' ) . ' <= ' . $nowDate
]
)
->andWhere(
[
$db->quoteName( 'a.publish_down' ) . ' = ' . $nullDate,
$db->quoteName( 'a.publish_down' ) . ' IS NULL',
$db->quoteName( 'a.publish_down' ) . ' >= ' . $nowDate
]
)
modazModal.addEventListener( 'show.bs.modal', function( e ){
// get the data-remote attribute
var modazRemoteUrl = e.relatedTarget.dataset.remote;
// jQuery .load replacement
fetch( modazRemoteUrl )
.then( function( modazResp ){
return modazResp.text();
})
.then( function( modazBody ){
document.getElementById( 'modazdirectory__modal-body' ).innerHTML = modazBody;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment