Ink
02/03/2022, 3:53 PMSimone
02/26/2022, 10:57 PM<cfset struct['id'] = '<button type="button" class="btn btn-primary btn-sm" onClick="Check('ID#qry.id#');"><i class="fas fa-cogs"></i></button>'>
phillipsenn
03/18/2022, 6:41 PMphillipsenn
04/11/2022, 4:40 PMPatrick
04/18/2022, 3:20 PMryan
04/19/2022, 1:32 PMgus_dancy
04/22/2022, 8:33 PMgsr
06/20/2022, 4:10 PMaliaspooryorik
aliaspooryorik
<https://jqueryvalidation.org/>
? Oh I guess you mean <https://github.com/victorjonsson/jQuery-Form-Validator>
but you aren't making this easy!gus_dancy
07/15/2022, 11:01 PMTim
08/25/2022, 9:25 PMbrowserify
to bundle an application, and include it in an html page, which sounded like what I wanted, so I'm trying to do that, but this is also where things have gotten complicated.
I was able to sort out that if I put this code at the top of my d3.charts.js file, it pulls in the correct dependencies.
const d3 = require("d3/dist/d3");
const htl = require("htl/dist/htl");
And I can use browserify
to bundle all those dependencies into a single file.
The charts depend on d3 per above. d3 depends on jquery. But I also use foundation-sites which also depends on jquery. So I figured that it would be a good idea™ to package jquery as one bundle, foundation as a second bundle, and d3 and the charts as a third bundle (so as not to have jquery duplicated, and to not include the chart bundle on pages that don't need it), and that somehow, I'd be able to set it up so that foundation and my chart bundle would be able to reference jquery.
I was able to work out how to exclude jquery from my foundation and chart bundles (browserify -x jquery
), but what I haven't successfully worked out is how to reference jquery in the HTML so that foundation and the charts can see and use it. It seems that browserify --standalone
is involved somehow, because that's what's supposed to make things visible from outside the bundle. But I haven't figured out how to make this work.
I'm not sure what additional code, etc. might be useful, so I'm going to leave it here, but can reply with whatever. Also, if anyone has a completely different approach, I'm also open to that. Like I said at the start -- I just want the chart in the page...Simone
09/20/2022, 6:18 PMreturn this.system.filter(function (item, key) {
if(key.)
});
what ia m tryin to chhieve , if the key is: 1,2,3,4,5 it should be equal to 9 and it should also exclude key 7 from the list, i know in cf we can do listfind but i am nt sure in javascriptgsr
09/27/2022, 5:57 PMSimone
10/21/2022, 11:38 PMSimone
10/21/2022, 11:38 PMgus_dancy
10/26/2022, 6:52 PMJonas Eriksson
11/08/2022, 9:53 AMfunction countEurobat10items() {
var eurobat10counterX = Array.from(containermixitup.querySelectorAll('.LongLife'));
console.log(eurobat10counterX.length); // example: 35 total in DOM, 15 have "display:none" -> I want this number to be 20
eurobat10counter = eurobat10counterX.length;
// set this counter value into a span ID in the filter box
$('#eurobat10counter').html(eurobat10counter);
// change the className of the filter row, i.e. if we filter on one kind, we fade the others
if ( eurobat10counter < 1 )
{
document.getElementById("eurobat10Label").className = "configuratorOptionItemSmallDisabled";
document.getElementById("eurobat10counter").className = "configuratorOptionCounterDisabled";
}
else {
document.getElementById("eurobat10Label").className = "configuratorOptionItemSmall";
document.getElementById("eurobat10counter").className = "configuratorOptionCounter";
} ;
}
hemi345
11/08/2022, 3:04 PM<div class="travFormInput">
<select x-model="p_person_to" name="p_person_to" required>
<option value="">Choose one</option>
<template x-for="u in acctUsers" :key="u['USERID']">
<template x-if="p_person_to == u['USERID']">
<option :value="u['USERID']" x-text="u['FULLNAME']" SELECTED></option>
</template>
<template x-if="p_person_to != u['USERID']">
<option :value="u['USERID']" x-text="u['FULLNAME']"></option>
</template>
</template>
</select>
</div>
any ideas or better ways to do this?chris-schmitz
11/16/2022, 1:55 PM<script type="module">
import { initializeApp } from "<https://www.gstatic.com/firebasejs/9.14.0/firebase-app.js>";
import { getMessaging, getToken, onMessage } from "<https://www.gstatic.com/firebasejs/9.14.0/firebase-messaging.js>";
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "<Api-Key>",
authDomain: "<Domain>",
projectId: "<ProjectId>",
storageBucket: "<Bucket>",
messagingSenderId: "<Sender-Id>",
appId: "<App-Id>",
name: "<App-Name>"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const messaging = getMessaging();
getToken( messaging, { vapidKey: '<Public-Key>' } )
.then((currentToken) => {
if (currentToken) {
window.localStorage.setItem( 'fbToken', currentToken );
} else {
console.log('No registration token available. Request permission to generate one.');
}
}).catch((err) => {
console.log('An error occurred while retrieving token. ', err);
});
onMessage(messaging, payload => {
console.log("Message received. ", payload);
const { title, ...options } = payload.notification;
});
</script>
On clicking a button the app reads the token from local storage and sends an ajax request to CF which then uses cfhttp()
to send a message to Firebase with this request body:
{
"to" : arguments.data.fbToken
, "notification" : {
"message": arguments.data.msg
, "title": "Greetings"
}
}
The result of the cfhttp()
call shows success: 1
(plus things like multicast_id
and message_id
), so I assume that I did things right so far.
Yet the onMessage()
event handler never fires, and I don't know whether the message never arrives or if there is a different problem.
Any ideas or hints?s1deburn
11/21/2022, 2:41 PMMark Takata (Adobe)
12/21/2022, 7:11 PMJonas Eriksson
01/19/2023, 1:30 PMChris Tierney
02/20/2023, 11:40 PMphillipsenn
05/05/2023, 3:14 PMAlex
05/22/2023, 8:13 AMSimone
06/18/2023, 12:31 AMfunction showMessage() {
swal({
title: "",
html: 'This will trigger some updates</b>',
type: "warning",
showCancelButton: true,
confirmButtonColor: "##EF5350",
confirmButtonText: "Yes, Proceed",
cancelButtonText: "Cancel",
reverseButtons: true
},function(isConfirmed) {
alert(isConfirmed)
if (isConfirmed) {
alert($(".openStandings").attr('data-href'));
$.ajax({
type: "POST",
url: $(".openStandings").attr('data-href'),
success: function(data) {
alert(data);
if (data.toLowerCase().indexOf("error") >= 0) {
swal({
title: "Oops",
text: data,
type: "error",
showCancelButton: false,
confirmButtonColor: "##EF5350",
confirmButtonText: "OK",
closeOnConfirm: true
});
} else {
swal({
title: "Great",
text: data,
type: "success",
showCancelButton: false,
confirmButtonColor: "##EF5350",
confirmButtonText: "OK",
closeOnConfirm: true
});
}
}
})
}
})
}
J
06/22/2023, 2:56 PMSimone
06/23/2023, 4:00 PM