小编Tab*_*res的帖子

如何按[今日]和SharePoint列表视图中的时间进行过滤?

我正在尝试根据日期和时间过滤Sharepoint列表.但它只适用于日期,忽略数据和时间字段中的时间.

在此输入图像描述

sharepoint-designer caml sharepoint-2010

6
推荐指数
1
解决办法
4万
查看次数

如何更改传单指令上的默认图标引脚?

我想知道是否可以更改默认图标(蓝色),在应用程序初始化时使用另一个自定义图标,我阅读了有关如何更改的信息,但我想要整个应用程序的自定义图标。

HTML

<div ng-controller="CustomizedMarkersController">
   <button type="button" class="btn btn-primary padright" ng-click="markers.m1.icon=icon" ng-repeat="(key, icon) in icons">{{ key }}</button>
   <leaflet markers="markers" center="lisbon"></leaflet>
</div>
Run Code Online (Sandbox Code Playgroud)

JS

app.controller("CustomizedMarkersController", [ '$scope', function($scope) {
    var local_icons = {
       default_icon: {},
       leaf_icon: {
          iconUrl: 'examples/img/leaf-green.png',
          shadowUrl: 'examples/img/leaf-shadow.png',
          iconSize:     [38, 95], // size of the icon
          shadowSize:   [50, 64], // size of the shadow
          iconAnchor:   [22, 94], // point of the icon which will correspond to marker's location
          shadowAnchor: [4, 62],  // the same for the shadow
          popupAnchor:  [-3, -76] …
Run Code Online (Sandbox Code Playgroud)

javascript directive angularjs leaflet angular-leaflet-directive

6
推荐指数
2
解决办法
7404
查看次数

当返回实际上是 EMPTY 可观察值时,如何使用大理石方法进行测试?

我使用 rxjs 中的 EMPTY 来处理 catchError,为了通过失败场景,预期的正确值是多少。

import { Injectable } from '@angular/core';
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { EMPTY } from 'rxjs';
import { map, mergeMap, catchError } from 'rxjs/operators';
import { MoviesService } from './movies.service';

@Injectable()
export class MovieEffects {

  loadMovies$ = createEffect(() => this.actions$.pipe(
    ofType('[Movies Page] Load Movies'),
    mergeMap(() => this.moviesService.getAll()
      .pipe(
        map(movies => ({ type: '[Movies API] Movies Loaded Success', payload: movies })),
        catchError(() => EMPTY)
      ))
    )
  );

  constructor(
    private actions$: Actions, …
Run Code Online (Sandbox Code Playgroud)

javascript jasmine rxjs5 ngrx-effects rxjs-marbles

5
推荐指数
1
解决办法
2210
查看次数

以编程方式从查找字段值获取ID的更好方法是什么?

当我试图获取id时:

string idValue = item[Lookup].ToString();
Run Code Online (Sandbox Code Playgroud)

我通过示例得到了下一个值:

1#1

我需要这样的价值:

1

实际上这段代码处理了这个要求:

using (SPSite site = new SPSite(context.CurrentWebUrl))
{
    using (SPWeb web = site.OpenWeb())
    {
        //Context list                 
        SPList list = web.Lists[context.ListId];
        SPList child = web.Lists[List]; 
        SPListItem currentItem = list.GetItemById(context.ItemId);
        string updateItems = "";
        int ID = currentItem.ID;

        foreach (SPListItem item in child.Items)
        {
            string idValue = item[Lookup].ToString();
            int partial = idValue.LastIndexOf(";");
            string idPure = idValue.Substring(0, partial);

            if (idPure == ID.ToString())
            {
                item[Field] = Value;
                item.Update();
                updateItems += item.ID.ToString();
            }
        }              

        //Return Items*/ …
Run Code Online (Sandbox Code Playgroud)

c# lookup splistitem sharepoint-2010

4
推荐指数
1
解决办法
2万
查看次数

angular 中 performance.navigation.type 的替代品是什么?

我有这个代码是为了知道页面是否被用户重新加载,不幸的是已被弃用。我想知道 angular 是否有这种方法。

if (performance.navigation.type === 1) {
   console.log('is refreshed')
}

if (performance.navigation.type === 0) {
   console.log('the user is arrived')
}  
Run Code Online (Sandbox Code Playgroud)

javascript router navigateurl angular

3
推荐指数
3
解决办法
4638
查看次数

如何在附加的html字符串上的javascript函数中连接参数字符串?

这是我的html代码

 <div id="content"></div> 
Run Code Online (Sandbox Code Playgroud)

然后我将inpunt附加到#content:

 $( document ).ready(function() {
  // Handler for .ready() called.
       var parameter = "<p>Hola</p>";
       $("#content").append('<div><p>click the button</p>'+
                     '<input type="submit" name="submit_answers" value="Submit" onclick="getValue();" >'+  
                     '<input type="submit" name="submit_answers" value="Submit" onclick="'+getValue2(parameter)+'" >'+                        
                     '</div>');
});

function getValue2(parameter){
    alert(parameter);
}

function getValue(){
    alert("Hola");
}
Run Code Online (Sandbox Code Playgroud)

第一个输入效果很好,但是在文档准备好之后,第二个输入不起作用。在这种情况下,声明函数的更好方法是什么?

html javascript jquery concatenation append

0
推荐指数
1
解决办法
1万
查看次数