<commit_before><?php /* @var $this Mage_Core_Block_Template */ ?>
<?php if ($websites = $this->getWebsites()): ?>
<p class="switcher"><label for="store_selector"><?php echo $this->__('Choose Store Views:') ?></label>
<select name="store_selector" id="store_selector" multiple="true" size="25">
<?php if ($this->hasDefaultOption()): ?>
    <option value=""><?php echo $this->getDefaultStoreName() ?></option>
<?php endif; ?>
    <?php foreach ($websites as $website): ?>
        <?php $showWebsite = false; ?>
        <?php foreach ($website->getGroups() as $group): ?>
            <?php $showGroup = false; ?>
            <?php foreach ($this->getStores($group) as $store): ?>
                <?php if ($showWebsite == false): ?>
                    <?php $showWebsite = true; ?>
                    <optgroup label="<?php echo $this->escapeHtml($website->getName()) ?>"></optgroup>
                <?php endif; ?>
                <?php if ($showGroup == false): ?>
                    <?php $showGroup = true; ?>
                    <optgroup label="&nbsp;&nbsp;&nbsp;<?php echo $this->escapeHtml($group->getName()) ?>">
                <?php endif; ?>
                <option value="<?php echo $this->escapeHtml($store->getId()) ?>"<?php if($this->getStoreId() == $store->getId()): ?> selected="selected"<?php endif; ?>>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $this->escapeHtml($store->getName()) ?></option>
            <?php endforeach; ?>
            <?php if ($showGroup): ?>
                </optgroup>
            <?php endif; ?>
        <?php endforeach; ?>
    <?php endforeach; ?>
</select>
<?php echo $this->getHintHtml() ?>
<button onclick="switchStores($('store_selector').selectedOptions)"><span><span><?php echo $this->__('Choose') ?></span></span></button>
</p>
<script type="text/javascript">
    function switchStores(values) {<commit_msg>Pre-select selected stores<commit_after><?php /* @var $this Mage_Core_Block_Template */ ?>
<?php if ($websites = $this->getWebsites()): ?>
<p class="switcher"><label for="store_selector"><?php echo $this->__('Choose Store Views:') ?></label>
<select name="store_selector" id="store_selector" multiple="true" size="25">
<?php if ($this->hasDefaultOption()): ?>
    <option value=""><?php echo $this->getDefaultStoreName() ?></option>
<?php endif; ?>
<?php $selectedStores = explode(',', $this->getRequest()->getParam('stores')); ?>
    <?php foreach ($websites as $website): ?>
        <?php $showWebsite = false; ?>
        <?php foreach ($website->getGroups() as $group): ?>
            <?php $showGroup = false; ?>
            <?php foreach ($this->getStores($group) as $store): ?>
                <?php if ($showWebsite == false): ?>
                    <?php $showWebsite = true; ?>
                    <optgroup label="<?php echo $this->escapeHtml($website->getName()) ?>"></optgroup>
                <?php endif; ?>
                <?php if ($showGroup == false): ?>
                    <?php $showGroup = true; ?>
                    <optgroup label="&nbsp;&nbsp;&nbsp;<?php echo $this->escapeHtml($group->getName()) ?>">
                <?php endif; ?>
                <option value="<?php echo $this->escapeHtml($store->getId()) ?>"<?php if (in_array($store->getId(), $selectedStores)): ?> selected="selected"<?php endif; ?>>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $this->escapeHtml($store->getName()) ?></option>
            <?php endforeach; ?>
            <?php if ($showGroup): ?>
                </optgroup>
            <?php endif; ?>
        <?php endforeach; ?>
    <?php endforeach; ?>
</select>
<?php echo $this->getHintHtml() ?>
<button onclick="switchStores($('store_selector').selectedOptions)"><span><span><?php echo $this->__('Choose') ?></span></span></button>
</p>
<script type="text/javascript">
    function switchStores(values) {
{'fraction_non_alphanumeric': 0.21807672096689437, 'fraction_numerical': 0.0010509721492380452, 'mean_word_length': 3.0979547900968782, 'pattern_counts': {'":': 0, '<': 106, '<?xml version=': 0, '>': 143, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7064723', 'n_tokens_mistral': 1118, 'n_tokens_neox': 1081, 'n_words': 243}