x x x
x

Versions Compared

Key

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

...

ConfiForms Form Definition
additionalFormAdminsconfluence-administrators, morganstanley-admins,mssba-admins
closeButtonLabelCancel
formNamedashboardannouncementspremium
saveButtonLabelCreate/Save
registrationFormTitleNew Announcement


Create/SavedashboardannouncementspremiumCancelconfluence-administrators,morganstanley-admins,mssba-adminsNew AnnouncementINLINE

titletruetrue

imagetruetrue

cardLinktruetrue

descriptiontruetrue

cardButtonTexttruetrue

titleTitletexttrue

imageImageimage/*filetrue

cardLinkExternal Linkfalse[events=Event|mentor=Mentor|resources=Resource|]This link set where the button button redirects to. Used to set external links for announcements.text

descriptionDescriptionDescription must be less than 244 characters.false[events=Event|mentor=Mentor|resources=Resource|]textareatrue

linkStyleLink Style (IGNORE)text

cardButtonTextButton TextText that displays on button. This is the button that will take user to external link set above.texttrue

!cardLink:[empty]Reset valuecardLink

!cardLink:[empty]linkStyle=inactivelinkSet valuetruecardLink


HTML
<div id="admin-panel">
<a href="#cf_messages" id="toggle-admin-table">Manage Announcements</a>
</div>

<script>
$( "#toggle-admin-table" ).click(function() {
  if($('.announcementsTable').is(":visible")){
        $('.announcementsTable').hide()
    }
    else{
    $('.announcementsTable').show()
}
});

let adminPanel = document.getElementById('admin-panel')
let addAnouncement = $('button.aui-button.aui-button-primary.cf_dashboardannouncementspremium')[0]
adminPanel.insertAdjacentElement('afterbegin',addAnouncement)
</script>


Divbox
classannouncementsTable


ConfiForms TableView
pagerNO LIMIT
formNamedashboardannouncementspremium
enableGridEdittrue


INLINEtrue





HTML
<!-- End admin section -->


HTML
<!-- Start id=announcements-wrapper section -->


HTML
<p class="header">About the Innovation Awards</p>
<div class="carousel-container"> 
<span class="carousel-arrow carousel-previous">◀</span>


ConfiForms CleanView
formNamedashboardannouncementspremium
sortcreated DESC




HTML
<span class="carousel-arrow carousel-next">▶</span>
</div>
<script>
let anouncementNo = document.getElementsByClassName("announcementcard").length
if(anouncementNo < 2){
	$('.carousel-next').hide()
	$('.carousel-previous').hide()
}

$('.carousel-previous').click(function() {
if(slideIndex -1 === 0){
        currentSlide(anouncementNo)
    }
    else{
    currentSlide(slideIndex - 1)    
}  

});

$('.carousel-next').click(function() {
  if(slideIndex + 1 > anouncementNo){
        currentSlide(1)
    }
    else{
    currentSlide(slideIndex + 1)    
}
});
let div = document.getElementsByClassName('carousel-container')[0]
div.addEventListener('touchstart', handleTouchStart, false); 
div.addEventListener('touchmove', handleTouchMove, false);

var xDown = null; 
var yDown = null;

function getTouches(evt) {
return evt.touches || // browser API
evt.originalEvent.touches; // jQuery
} 

function handleTouchStart(evt) {
console.log('touched')
const firstTouch = getTouches(evt)[0]; 
xDown = firstTouch.clientX; 
yDown = firstTouch.clientY; 
}; 

function handleTouchMove(evt) {
if ( ! xDown || ! yDown ) {
return;
}

var xUp = evt.touches[0].clientX; 
var yUp = evt.touches[0].clientY;

var xDiff = xDown - xUp;
var yDiff = yDown - yUp;

if ( Math.abs( xDiff ) > Math.abs( yDiff ) ) {/*most significant*/
if ( xDiff > 0 ) {
/* left swipe */ 
console.log('swiped left')
if(slideIndex + 1 > anouncementNo){
currentSlide(1)
}
else{
currentSlide(slideIndex + 1) 
}
} else {
/* right swipe */
console.log('swiped right')
if(slideIndex -1 === 0){
currentSlide(anouncementNo)
}
else{
currentSlide(slideIndex - 1) 
} 
} 
} else {
if ( yDiff > 0 ) {
/* up swipe */ 
console.log('swiped up')
} else { 
/* down swipe */
console.log('swiped down')
} 
}
/* reset values */
xDown = null;
yDown = null; 
};</script>


HTML
<!-- End adminid=announcements-wrapper section -->


HTML
<!-- End id=announcementcontainer section -->

...