phanterpwa 13.13.15__py3-none-any.whl → 13.13.17__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- phanterpwa/__init__.py +1 -1
- phanterpwa/frontend/components/widgets.py +71 -12
- {phanterpwa-13.13.15.dist-info → phanterpwa-13.13.17.dist-info}/METADATA +1 -1
- {phanterpwa-13.13.15.dist-info → phanterpwa-13.13.17.dist-info}/RECORD +9 -9
- {phanterpwa-13.13.15.dist-info → phanterpwa-13.13.17.dist-info}/LICENSE +0 -0
- {phanterpwa-13.13.15.dist-info → phanterpwa-13.13.17.dist-info}/WHEEL +0 -0
- {phanterpwa-13.13.15.dist-info → phanterpwa-13.13.17.dist-info}/dependency_links.txt +0 -0
- {phanterpwa-13.13.15.dist-info → phanterpwa-13.13.17.dist-info}/entry_points.txt +0 -0
- {phanterpwa-13.13.15.dist-info → phanterpwa-13.13.17.dist-info}/top_level.txt +0 -0
phanterpwa/__init__.py
CHANGED
|
@@ -3032,6 +3032,7 @@ class Inert(Widget):
|
|
|
3032
3032
|
def value(self):
|
|
3033
3033
|
return self._value
|
|
3034
3034
|
|
|
3035
|
+
|
|
3035
3036
|
class CheckBox(Widget):
|
|
3036
3037
|
def __init__(self, identifier, **parameters):
|
|
3037
3038
|
self._label = parameters.get("label", None)
|
|
@@ -3176,7 +3177,8 @@ class RadioBox(Widget):
|
|
|
3176
3177
|
def __init__(self, identifier, **parameters):
|
|
3177
3178
|
self._label = parameters.get("label", None)
|
|
3178
3179
|
self._name = parameters.get("name", None)
|
|
3179
|
-
self.
|
|
3180
|
+
self._checked = parameters.get("is_checked", False)
|
|
3181
|
+
self._value = parameters.get("value", False)
|
|
3180
3182
|
self._can_empty = parameters.get("can_empty", False)
|
|
3181
3183
|
self._wear = parameters.get("wear", "material")
|
|
3182
3184
|
self._form = parameters.get("form", None)
|
|
@@ -3196,7 +3198,7 @@ class RadioBox(Widget):
|
|
|
3196
3198
|
wrapper_attr["_class"] = "{0}{1}".format(wrapper_attr["_class"], " has_label")
|
|
3197
3199
|
label = LABEL(self._label, _for="phanterpwa-widget-radio-input-{0}".format(identifier))
|
|
3198
3200
|
_checked = None
|
|
3199
|
-
if self.
|
|
3201
|
+
if self._checked is True or self._checked is "true":
|
|
3200
3202
|
_checked = "checked"
|
|
3201
3203
|
wrapper_attr["_class"] = "{0}{1}".format(wrapper_attr["_class"], " has_true")
|
|
3202
3204
|
|
|
@@ -3227,23 +3229,20 @@ class RadioBox(Widget):
|
|
|
3227
3229
|
|
|
3228
3230
|
def _change_xml_radio(self):
|
|
3229
3231
|
el = jQuery("#phanterpwa-widget-radio-input-{0}".format(self.identifier))
|
|
3230
|
-
|
|
3232
|
+
checked = el.prop("checked")
|
|
3231
3233
|
p = el.parent()
|
|
3232
|
-
|
|
3233
|
-
if value is True:
|
|
3234
|
+
if checked is True:
|
|
3234
3235
|
p.addClass("has_true")
|
|
3235
|
-
|
|
3236
|
-
self._value = True
|
|
3236
|
+
self._checked = True
|
|
3237
3237
|
|
|
3238
3238
|
else:
|
|
3239
3239
|
p.removeClass("has_true")
|
|
3240
|
-
|
|
3241
|
-
self._value = False
|
|
3240
|
+
self._checked = False
|
|
3242
3241
|
|
|
3243
3242
|
self._xml_radio().html_to(jQuery(self.target_selector).find(".phanterpwa-widget-radio-option-container"))
|
|
3244
3243
|
|
|
3245
3244
|
def _xml_radio(self):
|
|
3246
|
-
if self.
|
|
3245
|
+
if self._checked is True:
|
|
3247
3246
|
return DIV(
|
|
3248
3247
|
I(_class="far fa-dot-circle"),
|
|
3249
3248
|
_class="phanterpwa-widget-radio-true"
|
|
@@ -3259,8 +3258,8 @@ class RadioBox(Widget):
|
|
|
3259
3258
|
p.addClass("has_true")
|
|
3260
3259
|
jQuery(".phanterpwa-widget-wrapper").removeClass("focus").removeClass("pre_focus")
|
|
3261
3260
|
p.addClass("focus")
|
|
3262
|
-
self.
|
|
3263
|
-
p.find("input").prop("checked", self.
|
|
3261
|
+
self._checked = True
|
|
3262
|
+
p.find("input").prop("checked", self._checked)
|
|
3264
3263
|
jQuery(".phanterpwa-widget-radio-input").trigger("change")
|
|
3265
3264
|
|
|
3266
3265
|
def _switch_focus(self, el):
|
|
@@ -3290,11 +3289,71 @@ class RadioBox(Widget):
|
|
|
3290
3289
|
lambda: self._change_xml_radio()
|
|
3291
3290
|
)
|
|
3292
3291
|
|
|
3292
|
+
def get_value(self):
|
|
3293
|
+
return jQuery("input[name='{}']:checked".format(self._name)).val()
|
|
3293
3294
|
|
|
3294
3295
|
def start(self):
|
|
3295
3296
|
self._binds()
|
|
3296
3297
|
|
|
3297
3298
|
|
|
3299
|
+
class MenuRadioBoxes(Widget):
|
|
3300
|
+
def __init__(self, identifier, name, *radioboxes, default=None, **parameters):
|
|
3301
|
+
self._values = []
|
|
3302
|
+
self._name = name
|
|
3303
|
+
cont = 0
|
|
3304
|
+
tem = __new__(Date().getTime())
|
|
3305
|
+
for x in radioboxes:
|
|
3306
|
+
cont += 1
|
|
3307
|
+
v = None
|
|
3308
|
+
if isinstance(x, RadioBox):
|
|
3309
|
+
x._name = name
|
|
3310
|
+
if x._value == default:
|
|
3311
|
+
x._checked = True
|
|
3312
|
+
else:
|
|
3313
|
+
x._checked = False
|
|
3314
|
+
v = x
|
|
3315
|
+
elif isinstance(x, list) and len(x) == 2:
|
|
3316
|
+
if x[0] == default:
|
|
3317
|
+
_checked = True
|
|
3318
|
+
else:
|
|
3319
|
+
_checked = False
|
|
3320
|
+
v = RadioBox("rb{0}-{1}".format(tem, cont), name=name, label=x[1], value=x[0], is_checked=_checked)
|
|
3321
|
+
elif isinstance(x, str):
|
|
3322
|
+
if x == default:
|
|
3323
|
+
_checked = True
|
|
3324
|
+
else:
|
|
3325
|
+
_checked = False
|
|
3326
|
+
v = RadioBox(
|
|
3327
|
+
"rb{0}-{1}".format(tem, cont),
|
|
3328
|
+
name=name,
|
|
3329
|
+
label=x,
|
|
3330
|
+
value=x,
|
|
3331
|
+
is_checked=_checked
|
|
3332
|
+
)
|
|
3333
|
+
else:
|
|
3334
|
+
raise ValueError("Invalid Radiobox, must be RadioBox instance, list[value, label] or str[label].")
|
|
3335
|
+
if v is not None:
|
|
3336
|
+
self._values.append(v)
|
|
3337
|
+
html = DIV(
|
|
3338
|
+
*self._values,
|
|
3339
|
+
_class="phanterpwa-widget-menuradioboxes-radios",
|
|
3340
|
+
)
|
|
3341
|
+
if "_class" in parameters:
|
|
3342
|
+
parameters["_class"] = "{0}{1}".format(parameters["_class"], " phanterpwa-widget-menuradioboxes")
|
|
3343
|
+
else:
|
|
3344
|
+
parameters['_class'] = "phanterpwa-widget-menuradioboxes"
|
|
3345
|
+
Widget.__init__(self, identifier, html, **parameters)
|
|
3346
|
+
|
|
3347
|
+
def get_value(self):
|
|
3348
|
+
return jQuery("input[name='{}']:checked".format(self._name)).val()
|
|
3349
|
+
|
|
3350
|
+
def reload(self):
|
|
3351
|
+
self.start()
|
|
3352
|
+
|
|
3353
|
+
def start(self):
|
|
3354
|
+
for x in self._values:
|
|
3355
|
+
x.start()
|
|
3356
|
+
|
|
3298
3357
|
class MenuBox(Widget):
|
|
3299
3358
|
def __init__(self, identifier, button, *options, **parameters):
|
|
3300
3359
|
class_button = ""
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
phanterpwa/__init__.py,sha256=
|
|
1
|
+
phanterpwa/__init__.py,sha256=UDMicQ0kBdBWNTRQ44oCp3zfsPhE9kun0JiJerlrfoc,398
|
|
2
2
|
phanterpwa/__main__.py,sha256=1vSHtv6-sgAgpZiklf9bwarXX1b-fmKx1rjwJw4h78o,4017
|
|
3
3
|
phanterpwa/compiler.py,sha256=Je3qtVO_cZ69_PPWcXKyBgnRfQ-Ev-zkZ3UTN-ddOTQ,47478
|
|
4
4
|
phanterpwa/configer.py,sha256=O0IO5rf-hwFNdBjcz94OF-fqXKTWbqPElTsfS5V2beY,26327
|
|
@@ -109,7 +109,7 @@ phanterpwa/frontend/components/modal.py,sha256=q4v2z3HUS58lJ49E6ZWCEkSRVXy7kMiy5
|
|
|
109
109
|
phanterpwa/frontend/components/pagination.py,sha256=IJIyReYbKRj4OTVsZbNiCMfSOIq7qSLpFTF9qQdPbFM,791
|
|
110
110
|
phanterpwa/frontend/components/snippets.py,sha256=fm-QPIJ_Mv8fSHsS3UK8Bq8Iw_ziaECwEr-VjcaiPQw,4060
|
|
111
111
|
phanterpwa/frontend/components/top_slide.py,sha256=ReB0z63I9HjT8iq6ZfNB56KoZLzBxdfcFCIw7QjRQvU,3175
|
|
112
|
-
phanterpwa/frontend/components/widgets.py,sha256
|
|
112
|
+
phanterpwa/frontend/components/widgets.py,sha256=-EReDmuv7W1WHC5EM8pKX5TJkfqF84NujhGkonkdGFc,233358
|
|
113
113
|
phanterpwa/frontend/plugins/client.py,sha256=0x1HmGq6-WAap9RGl2szQj1GXClyGVtnznuYMwpUdb8,27481
|
|
114
114
|
phanterpwa/gallery/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
115
115
|
phanterpwa/gallery/cutter.py,sha256=PN5jJyLvJjgFvfEznb7uOqH5ISIrHn8BNWcQ548Cjtw,7220
|
|
@@ -435,10 +435,10 @@ phanterpwa/usual_sass/preloaders/indefined_text.sass,sha256=z4JuUtBrzoqH3HuNFXvN
|
|
|
435
435
|
phanterpwa/usual_sass/preloaders/run_points.sass,sha256=EYl93ljfgAc-ZLJ0VScrCoIlHP7Nr6NLdxj1zk2wm_E,3367
|
|
436
436
|
phanterpwa/usual_sass/preloaders/square.sass,sha256=TOsh9muP4zkYLUJcw4i1LeRs60NrtgRWBk_1oMt2_58,1348
|
|
437
437
|
phanterpwa/usual_sass/preloaders/squares.sass,sha256=kH1I89qEfmbvYxCtKFVNcxP5bWIjnqbheXVnyGF0VNo,3862
|
|
438
|
-
phanterpwa-13.13.
|
|
439
|
-
phanterpwa-13.13.
|
|
440
|
-
phanterpwa-13.13.
|
|
441
|
-
phanterpwa-13.13.
|
|
442
|
-
phanterpwa-13.13.
|
|
443
|
-
phanterpwa-13.13.
|
|
444
|
-
phanterpwa-13.13.
|
|
438
|
+
phanterpwa-13.13.17.dist-info/LICENSE,sha256=lGEW1PRSZOkug2-d0IJgryCjqt6zhxN5x9pFgy3lx2E,1087
|
|
439
|
+
phanterpwa-13.13.17.dist-info/METADATA,sha256=Ut9rzNtLST9RZoWci6Gl3bQs9_9-65Z1o7dNVTMZdBQ,1940
|
|
440
|
+
phanterpwa-13.13.17.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
441
|
+
phanterpwa-13.13.17.dist-info/dependency_links.txt,sha256=Pslekmz-4l1SpBO0x2aYkYZPCScmbrB9HUq1YvXYUzM,40
|
|
442
|
+
phanterpwa-13.13.17.dist-info/entry_points.txt,sha256=siJH2lFXIdsUBDRgcXV4blOb2_iku1vcbqxJ-trIQrw,56
|
|
443
|
+
phanterpwa-13.13.17.dist-info/top_level.txt,sha256=nF1WJ8AByxBv3bLKp3xySR2l2Twrj5n5n7C404lULSk,5319
|
|
444
|
+
phanterpwa-13.13.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|