зеркало из https://github.com/mozilla/pjs.git
sample colorpicker
This commit is contained in:
Родитель
1f47bc0cb5
Коммит
53b7be0216
|
@ -26,6 +26,7 @@ include $(topsrcdir)/config/config.mk
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
EXPORT_RESOURCE_SAMPLES = \
|
EXPORT_RESOURCE_SAMPLES = \
|
||||||
|
$(srcdir)/colorpicker.xul \
|
||||||
$(srcdir)/dexanimmaster.xul \
|
$(srcdir)/dexanimmaster.xul \
|
||||||
$(srcdir)/dexanimdialog.xul \
|
$(srcdir)/dexanimdialog.xul \
|
||||||
$(srcdir)/dexparammaster.xul \
|
$(srcdir)/dexparammaster.xul \
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0"?> <!-- -*- Mode: SGML -*- -->
|
||||||
|
|
||||||
|
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||||
|
|
||||||
|
<window title="Color Picker"
|
||||||
|
xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
|
align="vertical"
|
||||||
|
style="width:200px"
|
||||||
|
>
|
||||||
|
|
||||||
|
<html:script>
|
||||||
|
function doSomethingUseful(cp)
|
||||||
|
{
|
||||||
|
var color = cp.getAttribute('color');
|
||||||
|
document.getElementById("input").value = color;
|
||||||
|
document.getElementById("mydiv").style.backgroundColor = color;
|
||||||
|
}
|
||||||
|
</html:script>
|
||||||
|
|
||||||
|
<colorpicker id="cp" onclick="doSomethingUseful(this);"/>
|
||||||
|
<html:p/>
|
||||||
|
<html:input id="input"/>
|
||||||
|
<html:p/>
|
||||||
|
<html:div id="mydiv" style="width:100px; height:100px; background-color:white"/>
|
||||||
|
|
||||||
|
</window>
|
|
@ -22,6 +22,7 @@ DIRS=sampleimages
|
||||||
include <$(DEPTH)\config\rules.mak>
|
include <$(DEPTH)\config\rules.mak>
|
||||||
|
|
||||||
install:: $(DLL)
|
install:: $(DLL)
|
||||||
|
$(MAKE_INSTALL) colorpicker.xul $(DIST)\bin\res\samples
|
||||||
$(MAKE_INSTALL) dexanimmaster.xul $(DIST)\bin\res\samples
|
$(MAKE_INSTALL) dexanimmaster.xul $(DIST)\bin\res\samples
|
||||||
$(MAKE_INSTALL) dexanimdialog.xul $(DIST)\bin\res\samples
|
$(MAKE_INSTALL) dexanimdialog.xul $(DIST)\bin\res\samples
|
||||||
$(MAKE_INSTALL) dexparammaster.xul $(DIST)\bin\res\samples
|
$(MAKE_INSTALL) dexparammaster.xul $(DIST)\bin\res\samples
|
||||||
|
@ -34,6 +35,7 @@ install:: $(DLL)
|
||||||
$(MAKE_INSTALL) xpmenu.xul $(DIST)\bin\res\samples
|
$(MAKE_INSTALL) xpmenu.xul $(DIST)\bin\res\samples
|
||||||
|
|
||||||
clobber::
|
clobber::
|
||||||
|
rm -f $(DIST)\res\samples\colorpicker.xul
|
||||||
rm -f $(DIST)\res\samples\dexanimmaster.xul
|
rm -f $(DIST)\res\samples\dexanimmaster.xul
|
||||||
rm -f $(DIST)\res\samples\dexanimdialog.xul
|
rm -f $(DIST)\res\samples\dexanimdialog.xul
|
||||||
rm -f $(DIST)\res\samples\dexparammaster.xul
|
rm -f $(DIST)\res\samples\dexparammaster.xul
|
||||||
|
|
Загрузка…
Ссылка в новой задаче