Using dialog and checklist option
964563
def with_checklist(self):
        
        data = []
        if self.name == "ALL":
            data = self.data
        else:
            for name in self.data:
                if self.name in name:
                    data.append(name)
        if data:
            text = "Press 'spacebar' to choose SlackBuild for view"
            title = " SlackBuilds.org "
            backtitle = "{0} {1}".format(_meta_.__all__, _meta_.__version__)
            status = False
            pkg = DialogUtil(data, text, title, backtitle, status).checklist()
            if pkg and len(pkg) > 1:
                print("\nslpkg: Error: Choose only one package")
                raise SystemExit()
            if pkg is None:
                raise SystemExit()
            self.name = "".join(pkg)
            os.system("clear")
1239758
function toggleSelected (containerId, newCheckedValue) {
    [].forEach.call(document.getElementById(containerId).getElementsByTagName('input'), function (input) {
        if (input.type !== 'checkbox') return;
        input.checked = newCheckedValue;
        toggleTestEnabled(input);
    });
    updateEnabledTestCount();
}
253134
function () {
			
			var i, length;
			
			for (i = 0, length = this.choicesList.length ; i < length ; i += 1) {
				
				if (this.choicesList[i].node.firstChild.checked) {
					Dom.addClass(this.choicesList[i].node,"inputEx-selected");
				} else {
					Dom.removeClass(this.choicesList[i].node,"inputEx-selected");
				}
				
			}
		}
410767
function(parent, items, handler, userData, commandService) {
			var choices = this.getChoices(items, handler, userData);
			var addCheck = choices.some(function(choice) {
				return choice.checked;
			});
			choices.forEach(function(choice) {
				if (choice.name) {
					var itemNode = document.createElement("li"); //$NON-NLS-0$
					itemNode.setAttribute("role", "none"); //$NON-NLS-0$ //$NON-NLS-1$
					parent.appendChild(itemNode);
					var node = document.createElement("span"); //$NON-NLS-0$
					node.tabIndex = -1; 
					node.classList.add("dropdownMenuItem"); //$NON-NLS-0$
					node.style.outline = "none";
					if (addCheck) {
						node.setAttribute("role", "menuitemradio");  //$NON-NLS-1$ //$NON-NLS-0$
						node.setAttribute("aria-checked", choice.checked ? "true" : "false"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
						var check = document.createElement("span"); //$NON-NLS-0$
						check.classList.add("check"); //$NON-NLS-0$
						check.setAttribute("role", "none"); //$NON-NLS-0$ //$NON-NLS-1$
						check.setAttribute("aria-hidden", "true");  //$NON-NLS-1$ //$NON-NLS-0$
						check.appendChild(document.createTextNode(choice.checked ? "\u25CF" : "")); //$NON-NLS-1$ //$NON-NLS-0$
						node.appendChild(check);
					} else {
						node.setAttribute("role", "menuitem");  //$NON-NLS-1$ //$NON-NLS-0$
					}
					if (choice.imageClass) {
						var image = document.createElement("span"); //$NON-NLS-0$
						image.classList.add(choice.imageClass);
						node.appendChild(image);
					}
					var span = document.createElement("span"); //$NON-NLS-0$
					var text = document.createTextNode(choice.name);
					span.appendChild(text);
					node.appendChild(span);
					itemNode.appendChild(node);
					node.choice = choice;
					node.addEventListener("click", function(event) { //$NON-NLS-0$
						mMetrics.logEvent("command", "invoke", this.id + ">" + choice.name); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
						choice.callback.call(choice, items);
					}.bind(this), false); 
					node.addEventListener("keydown", function(event) { //$NON-NLS-0$
						if (event.keyCode === lib.KEY.ENTER || event.keyCode === lib.KEY.SPACE) {
							mMetrics.logEvent("command", "invoke", this.id + ">" + choice.name); //$NON-NLS-3$ //$NON-NLS-1$ //$NON-NLS-0$
							choice.callback.call(choice, items);
						}
					}.bind(this), false);
				} else {  // anything not named is a separator
					commandService._generateMenuSeparator(parent);
				}
			}.bind(this));
		}
1324634
def create_dialog(self):
        """"""
        bbox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
        self.idx_ok = bbox.button(QDialogButtonBox.Ok)
        self.idx_cancel = bbox.button(QDialogButtonBox.Cancel)

        filebutton = QPushButton()
        filebutton.setText('Choose')
        self.idx_filename = filebutton
        
        self.xp_format = FormMenu(['CSV', 'Brain Vision'])
        self.all_types = FormBool('All event types')
        
        self.idx_evt_type = QListWidget()
        self.idx_evt_type.setSelectionMode(QAbstractItemView.ExtendedSelection)
        
        filebutton.clicked.connect(self.save_as)
        self.all_types.connect(self.toggle_buttons)
        bbox.clicked.connect(self.button_clicked)
        
        form = QFormLayout()
        form.addRow('Filename', self.idx_filename)
        form.addRow('Format', self.xp_format)
        form.addRow(self.all_types)
        form.addRow('Event type(s)', self.idx_evt_type)
        
        btnlayout = QHBoxLayout()
        btnlayout.addStretch(1)
        btnlayout.addWidget(bbox)

        vlayout = QVBoxLayout()
        vlayout.addLayout(form)
        vlayout.addStretch(1)
        vlayout.addLayout(btnlayout)

        self.setLayout(vlayout)
919140
private void addChoiceOption(CmsAttributeValueView reference, List<String> choicePath) {

        String attributeChoice = choicePath.get(0);
        CmsType optionType = getAttributeType().getAttributeType(attributeChoice);
        int valueIndex = reference.getValueIndex() + 1;
        CmsEntity choiceEntity = m_entityBackEnd.createEntity(null, getAttributeType().getId());
        CmsAttributeValueView valueWidget = reference;
        if (reference.hasValue()) {
            valueWidget = new CmsAttributeValueView(
                this,
                m_widgetService.getAttributeLabel(attributeChoice),
                m_widgetService.getAttributeHelp(attributeChoice));
            if (optionType.isSimpleType() && m_widgetService.isDisplaySingleLine(attributeChoice)) {
                valueWidget.setCompactMode(CmsAttributeValueView.COMPACT_MODE_SINGLE_LINE);
            }
        }

        List<CmsChoiceMenuEntryBean> menuEntries = CmsRenderer.getChoiceEntries(getAttributeType(), true);
        for (CmsChoiceMenuEntryBean menuEntry : menuEntries) {
            valueWidget.addChoice(m_widgetService, menuEntry);
        }

        m_entity.insertAttributeValue(m_attributeName, choiceEntity, valueIndex);
        ((FlowPanel)reference.getParent()).insert(valueWidget, valueIndex);
        insertHandlers(valueWidget.getValueIndex());

        if (optionType.isSimpleType()) {
            String defaultValue = m_widgetService.getDefaultAttributeValue(attributeChoice, getSimplePath(valueIndex));
            I_CmsFormEditWidget widget = m_widgetService.getAttributeFormWidget(attributeChoice);
            choiceEntity.addAttributeValue(attributeChoice, defaultValue);
            valueWidget.setValueWidget(widget, defaultValue, defaultValue, true);
        } else {
            CmsEntity value = m_entityBackEnd.createEntity(null, optionType.getId());
            choiceEntity.addAttributeValue(attributeChoice, value);
            List<String> remainingAttributeNames = tail(choicePath);
            createNestedEntitiesForChoicePath(value, remainingAttributeNames);
            I_CmsEntityRenderer renderer = m_widgetService.getRendererForAttribute(attributeChoice, optionType);
            valueWidget.setValueEntity(renderer, value);
        }
        updateButtonVisisbility();

    }
1034340
def OnBorderChoice(self, event):
        """"""

        choicelist = event.GetEventObject().GetItems()
        self.borderstate = choicelist[event.GetInt()]
1118895
function (el) {
			var toggle = el.prop('checked');
			can.each(this.options.todos, function (todo) {
				todo.attr('complete', toggle).save();
			});
		}
403866
function() {
      
     var that = this;
      
     this.dialog = new inputEx.widget.Dialog({
				id: this.options.dialogId,
				inputExDef: {
				         type: 'form',
			            fields: this.options.fields,
			            buttons: [
			               {type: 'submit', value: msgs.saveText, onClick: function() { that.onDialogSave(); return false; /* prevent form submit */} },
			               {type: 'link', value: msgs.cancelText, onClick: function() { that.onDialogCancel(); } }
			            ]
				      },
				title: this.options.dialogLabel,
				panelConfig: this.options.panelConfig
		});
		
		// Add a listener on the closing button and hook it to onDialogCancel()
		YAHOO.util.Event.addListener(that.dialog.close,"click",function(){
			that.onDialogCancel();
		},that);
		
   }
741593
def ok(self, *args, cb=None):
        """"""
        self.clear_widgets()
        if cb:
            cb()
        self.idx += 1
        self.advance_dialog()
815082
def confirm_value(self, widget):
        
        self.hide()
        params = (self.fileFolderNavigator.get_selection_list(),)
        return params
709873
def checkablePopup( self ):
        
        if not self._checkablePopup and self.isCheckable():
            popup = QListView(self)
            popup.setSelectionMode(QListView.NoSelection)
            popup.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
            popup.setWindowFlags(Qt.Popup)
            popup.installEventFilter(self)
            popup.doubleClicked.connect(self.checkModelIndex)
            self._checkablePopup = popup
        
        return self._checkablePopup
1192559
protected void init() {

        LinkedHashMap<String, String> sortList = getSortList();
        if (sortList != null) {
            m_sortSelectBox = new CmsSelectBox(sortList);
            m_sortSelectBox.addValueChangeHandler(this);
            m_sortSelectBox.addStyleName(DIALOG_CSS.selectboxWidth());
            m_sortSelectBox.truncate(TM_GALLERY_SORT, 200);
            m_options.add(m_sortSelectBox);
            Label infoLabel = new Label();
            infoLabel.setStyleName(DIALOG_CSS.infoLabel());
            m_infoLabel = infoLabel;
            m_options.insert(infoLabel, 0);
        }
        createQuickBox();

    }
602081
function(content, opts, onOk, oncancel) {
        Dialog.setup('prompt', content, opts, onOk, oncancel);
      }
1178471
function (event) {
            // flag that avoids to trigger the user callback when browsing the checkbox list
            var avoidCallback = (this._hasFocus || this._keepFocus);
            this.$TextInput._dom_onfocus.call(this, event, true);
            if (this._cfg.onfocus && !avoidCallback) {
                this.evalCallback(this._cfg.onfocus);
            }
        }
1283856
function (checkListContent) {
    var prefix;
    if (isNumberedList) {
      prefix = " " + num + ". ";
      num++;
    } else {
      prefix = " " + bullet + " ";
      if (isCheckList) {
        prefix += '[';
        prefix += checkListContent || ' ';
        prefix += '] ';
      }
    }
    return prefix;
  }
170595
private void checkSelection() {

        m_okButton.disable(Messages.get().key(Messages.GUI_UPLOAD_BUTTON_OK_DISABLE_CHECKING_0));

        if (!m_selectionDone) {
            m_firstContentHeight = CmsDomUtil.getCurrentStyleInt(m_scrollPanel.getElement(), CmsDomUtil.Style.height);
            m_firstInfoHeight = m_dialogInfo.getOffsetHeight();
            m_firstSummaryHeight = m_selectionSummary.getOffsetHeight();
        }

        CmsRpcAction<CmsUploadFileBean> callback = new CmsRpcAction<CmsUploadFileBean>() {

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#execute()
             */
            @Override
            public void execute() {

                List<String> filesToCheck = new ArrayList<String>(getFilesToUpload().keySet());
                filesToCheck.removeAll(getFilesToUnzip(false));
                getUploadService().checkUploadFiles(filesToCheck, getTargetFolder(), m_isTargetRootPath, this);
            }

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object)
             */
            @Override
            protected void onResponse(CmsUploadFileBean result) {

                proceedWorkflow(result);
            }
        };
        callback.execute();
    }