Copying a component (news.list) template in edit mode. Menu Overlay - templates

There is a component - a news.list (I act according to Bitrix Course)
<?$APPLICATION->IncludeComponent(
"bitrix:news.list",
"",
Array(
"ACTIVE_DATE_FORMAT" => "d.m.Y",
"ADD_SECTIONS_CHAIN" => "N",
"AJAX_MODE" => "N",
"AJAX_OPTION_ADDITIONAL" => "",
"AJAX_OPTION_HISTORY" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "Y",
"CACHE_TIME" => "36000000",
"CACHE_TYPE" => "A",
"CHECK_DATES" => "Y",
"DETAIL_URL" => "",
"DISPLAY_BOTTOM_PAGER" => "N",
"DISPLAY_DATE" => "N",
"DISPLAY_NAME" => "Y",
"DISPLAY_PICTURE" => "Y",
"DISPLAY_PREVIEW_TEXT" => "Y",
"DISPLAY_TOP_PAGER" => "N",
"FIELD_CODE" => array("",""),
"FILTER_NAME" => "",
"HIDE_LINK_WHEN_NO_DETAIL" => "N",
"IBLOCK_ID" => "4",
"IBLOCK_TYPE" => "other",
"INCLUDE_IBLOCK_INTO_CHAIN" => "N",
"INCLUDE_SUBSECTIONS" => "Y",
"MESSAGE_404" => "",
"NEWS_COUNT" => "10",
"PAGER_BASE_LINK_ENABLE" => "N",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
"PAGER_SHOW_ALL" => "N",
"PAGER_SHOW_ALWAYS" => "N",
"PAGER_TEMPLATE" => ".default",
"PAGER_TITLE" => "Новости",
"PARENT_SECTION" => "",
"PARENT_SECTION_CODE" => "",
"PREVIEW_TRUNCATE_LEN" => "",
"PROPERTY_CODE" => array("URL",""),
"SET_BROWSER_TITLE" => "N",
"SET_LAST_MODIFIED" => "N",
"SET_META_DESCRIPTION" => "N",
"SET_META_KEYWORDS" => "N",
"SET_STATUS_404" => "N",
"SET_TITLE" => "N",
"SHOW_404" => "N",
"SORT_BY1" => "SORT",
"SORT_BY2" => "SORT",
"SORT_ORDER1" => "ASC",
"SORT_ORDER2" => "ASC",
"STRICT_SECTION_CHECK" => "N"
)
);?>
Opening the page in edit mode
As you can see, the access menu for the component has overlapped and I cannot copy the component template.
How to access the menu and copy the component template?
As I understand it, the component template can be copied manually. But I don't know which path to copy and where to paste (required exact paths). If you know, then tell me.
As you can see, I copied the .default template of the news.list component from the /bitrix/components/bitrix/news.list/templates folder to the /local/templates/main/components/bitrix/news.list/slider_index folder (the copied component was named slider_index), but that didn't help. I am attaching the code for the main page
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1"> -->
<title><?$APPLICATION->ShowTitle();?></title>
<?$APPLICATION->ShowHead();?>
<?$APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH."/css/screen.css");?>
<?$APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH."/font/font.css");?>
<?$APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH."/css/jquery.fancybox.css");?>
<?$APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH."/css/jquery.bxslider.css");?>
<?$APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH."/css/jquery.formstyler.css");?>
<?$APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH."/css/jquery.formstyler.theme.css");?>
<?$APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH."/js/jquery-3.1.1.min.js");?>
<?$APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH."/js/jquery.fancybox.min.js");?>
<?$APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH."/js/jquery.bxslider.min.js");?>
<?$APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH."/js/jquery.formstyler.min.js");?>
<?$APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH."/js/main.js");?>
<?$isIndex = $APPLICATION->GetCurPage() == SITE_DIR; ?>
</head>
<body>
<div id="panel"><?$APPLICATION->ShowPanel();?></div>
<header>
<?echo $isIndex;?>
<div class="top_head_white_bl">
<div class="standart_width">
<div class="top_head_logo">
<?$APPLICATION->IncludeComponent(
"bitrix:main.include",
"",
Array(
"AREA_FILE_SHOW" => "file",
"AREA_FILE_SUFFIX" => "inc",
"EDIT_TEMPLATE" => "",
"PATH" => "/include/inc_logo.php"
)
);?>
</div>
<div class="header_menu_bl">
<?$APPLICATION->IncludeComponent("bitrix:menu", "header", Array(
"ALLOW_MULTI_SELECT" => "N", // Разрешить несколько активных пунктов одновременно
"CHILD_MENU_TYPE" => "left", // Тип меню для остальных уровней
"DELAY" => "N", // Откладывать выполнение шаблона меню
"MAX_LEVEL" => "3", // Уровень вложенности меню
"MENU_CACHE_GET_VARS" => "", // Значимые переменные запроса
"MENU_CACHE_TIME" => "3600", // Время кеширования (сек.)
"MENU_CACHE_TYPE" => "A", // Тип кеширования
"MENU_CACHE_USE_GROUPS" => "Y", // Учитывать права доступа
"ROOT_MENU_TYPE" => "top", // Тип меню для первого уровня
"USE_EXT" => "Y", // Подключать файлы с именами вида .тип_меню.menu_ext.php
"COMPONENT_TEMPLATE" => "horizontal_multilevel"
),
false
);?>
</div>
<div class="top_head_favor_bl">
<div class="top_head_favor">
Избранное<span>10</span>
</div>
</div>
<div class="top_head_bt">
<a class="gray_bt" data-fancybox data-src="#call_back" href="javascript:;">
<?$APPLICATION->IncludeComponent(
"bitrix:main.include",
"",
Array(
"AREA_FILE_SHOW" => "file",
"AREA_FILE_SUFFIX" => "inc",
"EDIT_TEMPLATE" => "",
"PATH" => "/include/inc_callback.php"
)
);?>
</a>
</div>
</div>
</div>
<?echo $isIndex;?>
<?if($isIndex):?>
<div class="index_slider_bl">
<?$APPLICATION->IncludeComponent(
"bitrix:news.list",
"",
Array(
"ACTIVE_DATE_FORMAT" => "d.m.Y",
"ADD_SECTIONS_CHAIN" => "N",
"AJAX_MODE" => "N",
"AJAX_OPTION_ADDITIONAL" => "",
"AJAX_OPTION_HISTORY" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "Y",
"CACHE_TIME" => "36000000",
"CACHE_TYPE" => "A",
"CHECK_DATES" => "Y",
"DETAIL_URL" => "",
"DISPLAY_BOTTOM_PAGER" => "N",
"DISPLAY_DATE" => "N",
"DISPLAY_NAME" => "Y",
"DISPLAY_PICTURE" => "Y",
"DISPLAY_PREVIEW_TEXT" => "Y",
"DISPLAY_TOP_PAGER" => "N",
"FIELD_CODE" => array("",""),
"FILTER_NAME" => "",
"HIDE_LINK_WHEN_NO_DETAIL" => "N",
"IBLOCK_ID" => "4",
"IBLOCK_TYPE" => "other",
"INCLUDE_IBLOCK_INTO_CHAIN" => "N",
"INCLUDE_SUBSECTIONS" => "Y",
"MESSAGE_404" => "",
"NEWS_COUNT" => "10",
"PAGER_BASE_LINK_ENABLE" => "N",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
"PAGER_SHOW_ALL" => "N",
"PAGER_SHOW_ALWAYS" => "N",
"PAGER_TEMPLATE" => ".default",
"PAGER_TITLE" => "Новости",
"PARENT_SECTION" => "",
"PARENT_SECTION_CODE" => "",
"PREVIEW_TRUNCATE_LEN" => "",
"PROPERTY_CODE" => array("URL",""),
"SET_BROWSER_TITLE" => "N",
"SET_LAST_MODIFIED" => "N",
"SET_META_DESCRIPTION" => "N",
"SET_META_KEYWORDS" => "N",
"SET_STATUS_404" => "N",
"SET_TITLE" => "N",
"SHOW_404" => "N",
"SORT_BY1" => "SORT",
"SORT_BY2" => "SORT",
"SORT_ORDER1" => "ASC",
"SORT_ORDER2" => "ASC",
"STRICT_SECTION_CHECK" => "N"
)
);?>
<ul class="index_slider">
<li>
<div class="index_slider_el" style="background-image:url(<?=SITE_TEMPLATE_PATH?>/img/index_slider_bg.png);">
<div class="standart_width index_slider_cont">
<div class="ind_slid_txt_bl">
<div class="ind_slid_tit">Современный монстр.</div>
<div class="ind_slid_txt">В своем стремлении повысить качество жизни, они забывают, что синтетическое тестирование требует анализа форм воздействия. Идейные соображения высшего порядка, а также социально-экономическое развитие создает предпосылки для как самодостаточных, так и внешне зависимых концептуальных решений!</div>
<a class="blue_bt" href="">Узнать подробнее</a>
</div>
<div class="ind_slid_img"><img src="<?=SITE_TEMPLATE_PATH?>/img/index_slider1.png" alt=""/></div>
</div>
</div>
</li>
<li>
<div class="index_slider_el" style="background-image:url(<?=SITE_TEMPLATE_PATH?>/img/index_slider_bg.png);">
<div class="standart_width index_slider_cont">
<div class="ind_slid_txt_bl">
<div class="ind_slid_tit">Осенний ценопад</div>
<div class="ind_slid_txt">Перспективное планирование способствует повышению качества поставленных обществом задач. В частности, синтетическое тестирование прекрасно подходит для реализации стандартных подходов.</div>
<a class="blue_bt" href="">Узнать подробнее</a>
</div>
<div class="ind_slid_img"><img src="<?=SITE_TEMPLATE_PATH?>/img/index_slider1.png" alt=""/></div>
</div>
</div>
</li>
</ul>
</div>
<div class="gray_head_info_bl">
<div class="standart_width clear_after">
<div class="mouse_bl"><img src="<?=SITE_TEMPLATE_PATH?>/img/mouse.png" alt=""/></div>
<div class="head_search_bl">
<form>
<input type="text" placeholder="Поиск товаров и услуг"/>
<input type="submit" value="найти"/>
</form>
</div>
</div>
</div>
<?endif?>
</header>
<?if(!$isIndex):?>
<section>
<div class="bread_crumbs_bl">
<div class="standart_width">
<ul class="bread_crumbs not_style">
<?$APPLICATION->IncludeComponent("bitrix:breadcrumb", "navchain", Array(
"PATH" => "", // Путь, для которого будет построена навигационная цепочка (по умолчанию, текущий путь)
"SITE_ID" => "s1", // Cайт (устанавливается в случае многосайтовой версии, когда DOCUMENT_ROOT у сайтов разный)
"START_FROM" => "0", // Номер пункта, начиная с которого будет построена навигационная цепочка
),
false
);?>
</ul>
</div>
</div>
</section>
<?endif;?>
Backup copy - https://transfiles.ru/8gw4h.

Need to copy here /local/templates/main/components/bitrix/news.list/.default
Include component :
<?$APPLICATION->IncludeComponent(
"bitrix:news.list",
"",
Array(
or
Need to copy here /local/templates/main/components/bitrix/news.list/slider_index
Include component :
<?$APPLICATION->IncludeComponent(
"bitrix:news.list",
"slider_index",
Array(
<?$APPLICATION->IncludeComponent(
"bitrix:news.list",
"", // ---! this is the name of the component template
// "" - this is the section .default
// the pattern is first looked up in /local/ , and if not searched in /bitrix/
"main" - из /local/templates/main/ - there should be such a site template and active https://dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=43&LESSON_ID=2820&LESSON_PATH=3913.2704.2880.2820
about component template:
https://dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=43&LESSON_ID=2829&LESSON_PATH=3913.2704.2881.2829

Related

Call to a member function store() on null on Livewire

I'm new to Livewire and I faced this problem Call to a member function store() on null I don't know how to make the store() function not work when I don't send a file! graduation_certificate it is nullable.
Database file
public function up()
{
Schema::create('user_trainees', function(Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->unsigned();
$table->integer('region_id')->unsigned();
$table->integer('city_id')->unsigned();
$table->integer('university_id')->unsigned();
$table->integer('department_id')->unsigned();
$table->string('major', 150);
$table->bigInteger('student_number')->nullable();
$table->float('gpa');
$table->enum('gpa_type', array('4', '5'));
$table->enum('training_date', array('firstsemester', 'secondsemester', 'thirdsemester', 'summersemester'))->nullable();
$table->integer('training_hours')->nullable();
$table->integer('graduation_year')->nullable();
$table->enum('academic_degree', array('bachelor', 'diploma'));
$table->string('graduation_certificate', 200)->nullable();
$table->string('academic_transaction', 200);
$table->string('cv', 200);
$table->tinyInteger('is_graduate');
$table->timestamps();
$table->softDeletes();
});
}
blade file
<x-form.label label="وثيقة التخرج" name="graduation_certificate" />
<div class="flex">
<input type="file" wire:model="graduation_certificate" name="graduation_certificate"
id="graduation_certificate"
class="px-8 py-12 border-2 border-dashed rounded-md dark:border-gray-700 dark:text-gray-400 dark:bg-gray-800">
</div>
livewire class
public function submit()
{
$user_uni = User::create([
'name' => "{$this->firstName} {$this->lastName}",
'type_id' => $this->userType,
'email' => $this->email,
'password' => bcrypt($this->password),
'gender' => $this->gender,
'mobile' => $this->mobile,
'is_active' => 1,
]);
UserTrainee::create([
'user_id' => $user_uni->id,
'region_id' => $this->region,
'city_id' => $this->city,
'university_id' => $this->university,
'department_id' => $this->department,
'major' => $this->major,
'student_number' => $this->studentNumber,
'gpa' => $this->gpa,
'gpa_type' => $this->gpa_type,
'training_date' => $this->training_date,
'training_hours' => $this->trainingHours,
'graduation_year' => $this->graduation_year,
'academic_degree' => $this->academic_degree,
'graduation_certificate' => $this->graduation_certificate->store('files', 'public'),
'academic_transaction' => $this->academic_transaction->store('files', 'public'),
'cv' => $this->cv->store('files', 'public'),
'is_graduate' => $this->traineeType,
]);
}
You don't conditionally store the files, meaning that even if you haven't uploaded something (meaning its NULL), you attempt to store it. Just wrap some conditions around it,
// ...
'graduation_certificate' => $this->graduation_certificate ? $this->graduation_certificate->store('files', 'public') : null,
'academic_transaction' => $this->academic_transaction ? $this->academic_transaction->store('files', 'public') : null,
'cv' => $this->cv ? $this->cv->store('files', 'public') : null,
// ...
you have to make variable of cv like you made for graduation_certificate, cv is getting NULL that's why you are facing this error

Kendo: Full width with floating labels enabled

I started to use the new floating labels but I notice that the controls, otherwise with full width, are now resized to default. Here is my code:
<div class="form-group">
<div class="col-sm-4">
#(Html.Kendo().TextBoxFor(m => m.ContactPersonName)
.HtmlAttributes(new { #class = "form-control", style = "width: 100%;" })
.Label(l => l.Content("Name *").Floating(true)))
</div>
<div class="col-sm-4">
#(Html.Kendo().TextBoxFor(m => m.Mobile)
.HtmlAttributes(new { #class = "form-control numeric phone", style = "width: 100%;" })
.Label(l => l.Content("Mobile # *").Floating(true)))
</div>
<div class="col-sm-4">
#(Html.Kendo().TextBoxFor(m => m.Email)
.HtmlAttributes(new { #class = "form-control", style = "width: 100%;" })
.Label(l => l.Content("Email *").Floating(true)))
</div>
</div>
<div class="form-group">
<div class="col-sm-8">
#(Html.Kendo().TextBoxFor(m => m.TRN)
.HtmlAttributes(new { #class = "form-control", maxlength = "15", style = "width: 100%;" })
.Label(l => l.Content("Tax Registration # *").Floating(true)))
</div>
</div>
<div class="form-group">
<div class="col-sm-8">
#(Html.Kendo().TextBoxFor(m => m.SponsorName)
.HtmlAttributes(new { #class = "form-control", maxlength = "100", style = "width: 100%;" })
.Label(l => l.Content("Sponsor Name *").Floating(true)))
</div>
<div class="col-sm-4">
#(Html.Kendo().TextBoxFor(m => m.TradeLicenseNo)
.HtmlAttributes(new { #class = "form-control numeric", maxlength = "20", style = "width: 100%;" })
.Label(l => l.Content("Trade License # *").Floating(true)))
</div>
</div>
It seems, the floating labels added some wrapping element to the HTML and the width: 100% style is not taking shape accordingly.
Here is the generated markup:
How can I style this form to take up the width of the bootstrap cell.
I figured it out by creating a new style in Edge's console:
span.k-floating-label-container {
width: 100%;
}

Vue.js and django rest framework for implements a cascading dropdown list

I would need help building a request to my backend API.
I currently have a form with a drop down list. The data in this list comes from this.$Http.get('/ quality/api/affaires/')
Below this drop-down list, I have another list. This list, I would like it to be empty until the 1st is not selected, then it is implemented with data according to the selection above.
Backend side (Django) I have 2 models which are "Affaires" and "AffairesOfs". I used Serialize and I can therefore request each of these models via api/affaires and api/affairesofs
In the "AffairesOfs" model I have a foreignekey (idaffaire) on the id of the "Affaires" model.
Finally, I would like my second list to be made up of all the “affairesofs” linked to the “Affaires” selected.
For now, I have my 2 drop-down lists but I can't find a way to link the second to the first.
I tried different methods found on the internet (with the use of v-model, ...) but could not achieve a result.
I can't even get the value selected from the first list to display it in the console, or in a <span>. I think I need a change event on the first list which ask a getMethod with selected value in parameters ?
example of api/affaire :
{
"id": 1,
"nom": "HORS AFFAIRE",
"adresse": "15, rue de la Gibaudière",
"cp": "49183",
"ville": "Saint-Barthélémy d'Anjou",
"dessinateur": 0,
"conducteur": 0,
"chefdeprojet": null,
"cloture": 0
},
{
"id": 2,
"nom": "Suivi Production",
"adresse": null,
"cp": null,
"ville": null,
"dessinateur": null,
"conducteur": null,
"chefdeprojet": null,
"cloture": 0
},
example of api/affairesofs :
{
"id": 2,
"idaffaire": {
"id": 1042,
"nom": "Schlumberger",
"adresse": "",
"cp": "75007",
"ville": "Paris",
"dessinateur": null,
"conducteur": 6,
"chefdeprojet": 16,
"cloture": 1
},
"dateajout": "2015-12-14T15:08:46Z",
"statut": 2,
"type": 0,
"nom": "Chassis St Do R1 à R3",
"isanalise": 1,
"idpersonnel": 1
},
{
"id": 6,
"idaffaire": {
"id": 1045,
"nom": "LAVAL",
"adresse": "",
"cp": "53000",
"ville": "Laval",
"dessinateur": 3,
"conducteur": 9,
"chefdeprojet": 9,
"cloture": 1
},
and below there is my page :
<div id="starting">
<div class="container">
<div class="row">
<form class="form-group">
<label>N° d'affaire</label>
<select class="col" v-model="affaireSelected">
<option value="">Choisir :</option>
<option v-for="affaire in affaires" v-bind:value="affaire.id">${affaire.id} - ${affaire.nom}</option>
</select>
<span> Selectionné : {{ affaireSelected }}</span>
<label>N° d'OF</label>
<select class="col">
<option value="choisir">Choisir :</option>
<option v-for="of in ofs" :value="of.id">${of.id} - ${of.nom}</option>
</select>
<input type="submit" value="Valider" class="btn btn-success" />
</form>
</div>
</div>
<div class="loading" v-if="loading===true">Loading…/div>
</div>
<!-- vue.js files !-->
<script src="https://cdn.jsdelivr.net/npm/vue#2.5.13/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-resource#1.3.5"></script>
<script type="text/javascript">
new Vue({
el: '#starting',
delimiters: ['${','}'],
data: {
ncs: [],
affaires: [],
ofs: [],
affaireSelected: '',
loading: false,
currentNc: {},
},
mounted: function() {
this.getAffaires();
this.getOfs();
},
methods: {
getAffaires: function() {
this.loading = true;
this.$http.get('/qualite/api/affaires/')
.then((response) => {
this.affaires =response.data;
this.loading = false;
})
.catch((err) => {
this.loading = false;
console.log(err);
})
},
getOfs: function() {
this.loading = true;
this.$http.get('/qualite/api/affairesOf/')
.then((response) => {
this.ofs =response.data;
this.loading = false;
})
.catch((err) => {
this.loading = false;
console.log(err);
})
},
}
});
</script>
Finally found a solution. I need to use a computed property juste like this :
computed: {
ofsByAffaire() {
return this.ofs.filter(oF => oF.idaffaire.id === this.affaireSelected.id);
}
},
then, I juste have to use this computed property on the template :
<select class="col">
<option value="choisir">Choisir :</option>
<option v-for="of in ofsByAffaire" :value="of.id">${of.id} - ${of.nom}</option>
</select>

Calabash 2.0 tap issue

I'm trying to test a hybrid webView application and having an issue with the tap method on an iPhone 6 simulator. Touch works fine in the same app with calabash-cucumber.
Xcode: Version 7.0.1 (7A1001)
OS: OSX Yosemite 10.10.5 (14F27)
calabash-cucumber (0.16.4):
irb(main):002:0> query "webView css:'.ion-navicon'"
[
[0] {
"center" => {
"X" => 348.046875,
"Y" => 53.90625000000001
},
"webView" => "<UIWebView: 0x7f8761935e60; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0x7f8761921320>>",
"nodeName" => "BUTTON",
"id" => "",
"textContent" => "\n\t\t\t",
"class" => "button button-icon button-clear ion-navicon",
"rect" => {
"x" => 348.0469,
"height" => 42,
"y" => 53.90625,
"width" => 35,
"left" => 280,
"top" => 25,
"center_y" => 53.90625,
"center_x" => 348.0469
},
"nodeType" => "ELEMENT_NODE"
}
]
irb(main):004:0> touch "webView css:'.ion-navicon'"
[
[0] {
"center" => {
"X" => 348.046875,
"Y" => 53.90625000000001
},
"webView" => "<UIWebView: 0x7f8761935e60; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0x7f8761921320>>",
"nodeName" => "BUTTON",
"id" => "",
"textContent" => "\n\t\t\t",
"class" => "button button-icon button-clear ion-navicon",
"rect" => {
"x" => 348.0469,
"height" => 42,
"y" => 53.90625,
"width" => 35,
"left" => 280,
"top" => 25,
"center_y" => 53.90625,
"center_x" => 348.0469
},
"nodeType" => "ELEMENT_NODE"
}
]
That works great.
Calabash 2.0 hangs for a while on tap, and eventually spits out an error.
calabash (2.0.0.pre4):
irb(main):030:0> query "webView css:'.ion-navicon'"
Getting: http://127.0.0.1:37265/map {}
[
[0] {
"center" => {
"X" => 348.046875,
"Y" => 53.90625000000001
},
"webView" => "<UIWebView: 0x7f8310705f10; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0x7f83107303e0>>",
"nodeName" => "BUTTON",
"id" => "",
"textContent" => "\n\t\t\t",
"class" => "button button-icon button-clear ion-navicon",
"rect" => {
"x" => 348.0469,
"height" => 42,
"y" => 53.90625,
"width" => 35,
"left" => 280,
"top" => 25,
"center_y" => 53.90625,
"center_x" => 348.0469
},
"nodeType" => "ELEMENT_NODE"
}
]
irb(main):027:0> tap "webView css:'.ion-navicon'"
Getting: http://127.0.0.1:37265/map {}
Getting: http://127.0.0.1:37265/uia {}
RuntimeError: Expected '' to be an array.
from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/ios/device/routes/uia_route_mixin.rb:138:in `expect_uia_results_is_array'
from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/ios/device/routes/uia_route_mixin.rb:115:in `handle_uia_results'
from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/ios/device/routes/uia_route_mixin.rb:105:in `uia_over_http'
from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/ios/device/routes/uia_route_mixin.rb:43:in `uia_route'
from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/ios/device/routes/uia_route_mixin.rb:56:in `uia_serialize_and_call'
from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/ios/device/gestures_mixin.rb:107:in `_tap'
from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/device.rb:145:in `tap'
from /Users/szoradm/.rvm/gems/ruby-2.0.0-p643/gems/calabash-2.0.0.pre4/lib/calabash/gestures.rb:50:in `tap'
from (irb):27
from /Users/szoradm/.rvm/rubies/ruby-2.0.0-p643/bin/irb:12:in `<main>'
Any suggestions?
Looks like a bug:
2.0.0.pre4/lib/calabash/ios/device/routes/uia_route_mixin.rb:138:
in `expect_uia_results_is_array'
The server is returning some unexpected output. Can you create an issue?
In the report, please note the Calabash iOS Server version. Thanks.
https://github.com/calabash/calabash

OpenTBS odp - automatic slide adding and sub-blocks

i have an array like this:
$entryArray = array();
$i = 0;
foreach ($entities as $value){
$entryArray[$i]['modul'] = $value->getModul()->getName();
$entryArray[$i]['matches']['date'] = $value->getDate();
$entryArray[$i]['matches']['tonality'] = $value->getTonality()->getName();
$entryArray[$i]['matches']['author'] = $value->getAccountname();
$entryArray[$i]['matches']['content'] = $value->getContent();
$entryArray[$i]['matches']['follower'] = $value->getFollower();
$entryArray[$i]['matches']['link'] = $value->getlink();
}
It works fine without the 'matches' and without the sub-attribut.
Here is my template:
I want categorize the tables with moduls:
modul1
table1
modul2
table2
and i want a new slide after the end of slide is reached.
Thank you very much for every one how can help me on this ;)
It is not possible to split a table over several a slides with a ODP Presentation.
Then I can see tow problems with your data and your template :
Assuming your template is merged with the PHP array $entryArray, the first step to do is to give a convenient structure for the main block and sub-block.
The structure of $entryArray should be like this :
$entryArray = array(
0 => array(
'modul' => "Module name 1",
'matches' => array(
0 => array('date' => "...", 'tonality' => "...", 'author' => "...", ...),
1 => array('date' => "...", 'tonality' => "...", 'author' => "...", ...),
2 => array('date' => "...", 'tonality' => "...", 'author' => "...", ...),
...
),
),
1 => array(
'modul' => "Module name 2",
'matches' => array(
0 => array('date' => "...", 'tonality' => "...", 'author' => "...", ...),
1 => array('date' => "...", 'tonality' => "...", 'author' => "...", ...),
2 => array('date' => "...", 'tonality' => "...", 'author' => "...", ...),
...
),
),
...
);
Then the second thing is that the main block named "table-block" is not correctly defined. Since the parameter "block" is not defined, the parameter "sub1" is not taken in account because it is a block parameter and the block is not defined here.
The main block could be define like this :
[table-block.modul;block=tbs:slide;sub1=matches]
Note that tbs:slide works with an ODP presentation but not with an PPTX presentation.